[php-src] Issue #12878: Failure to resolve PDO as required extension in tests

From: Date: Wed, 06 Dec 2023 02:16:23 +0000
Subject: [php-src] Issue #12878: Failure to resolve PDO as required extension in tests
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-245991@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/12878 Author: ltrk2 ### Description The following code: ```php --TEST-- test --EXTENSIONS-- PDO --FILE-- <?php print("hello"); ?> --EXPECTF-- hello ``` When executed using the test runner as ``` php -n generated/run-tests.php -n -P -q test.phpt ``` Resulted in this output: ``` ===================================================================== Running selected tests. SKIP test [test.phpt] reason: Required extension missing: PDO ===================================================================== Number of tests : 1 0 Tests skipped : 1 (100.0%) -------- Tests warned : 0 ( 0.0%) ( 0.0%) Tests failed : 0 ( 0.0%) ( 0.0%) Tests passed : 0 ( 0.0%) ( 0.0%) --------------------------------------------------------------------- Time taken : 0 seconds ===================================================================== ``` But I expected this output instead: ``` ===================================================================== Running selected tests. ===================================================================== Number of tests : 1 1 Tests skipped : 0 ( 0.0%) -------- Tests warned : 0 ( 0.0%) ( 0.0%) Tests failed : 0 ( 0.0%) ( 0.0%) Tests passed : 1 (100.0%) (100.0%) --------------------------------------------------------------------- Time taken : 0 seconds ===================================================================== ``` It works fine in PHP 8.2. I'd gladly just use pdo, but we have a set of tests that run on versions 7.0 through 8.3 and the lower versions only support PDO. What are your thoughts regarding this? ### PHP Version PHP 8.3.0 ### Operating System Ubuntu 22.04

« previous php.bugs (#245991) next »