<?php

declare(strict_types=1);

(static function () : void {
    foreach (['ibm_db2', 'mysqli', 'oci8', 'sqlsrv', 'pgsql'] as $extension) {
        if (extension_loaded($extension)) {
            continue;
        }

        require sprintf(__DIR__ . '/../vendor/jetbrains/phpstorm-stubs/%1$s/%1$s.php', $extension);
    }
})();

<?php

declare(strict_types=1);

// PHPStan does not read global constants from the stubs yet, remove this when it does
if (defined('OCI_NO_AUTO_COMMIT')) {
    return;
}

define('OCI_NO_AUTO_COMMIT', 0);

Remove unneeded and risky stub parsing
Remove unneeded and risky stub parsing

PHPStan already reads these stubs, but in a controlled and safe why. It
does not seem to read global constants yet, which is why we define
OCI_NO_AUTO_COMMIT if undefined. Might be unneeded in the future too.
