Bug #77643 [NEW]: PHP Warning: Can't preload class Zend\Db\Sql\Insert with unresolved constants

From: Date: Thu, 21 Feb 2019 01:19:29 +0000
Subject: Bug #77643 [NEW]: PHP Warning: Can't preload class Zend\Db\Sql\Insert with unresolved constants
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-219666@lists.php.net to get a copy of this message
From: mberchtold at gmail dot com Operating system: Windows 10 x64 PHP version: master-Git-2019-02-21 (snap) Package: opcache Bug Type: Bug Bug description:PHP Warning: Can't preload class Zend\Db\Sql\Insert with unresolved constants Description: ------------ I'm trying to preload zend framework 3. A lot of the following warnings are reported and the class is not preloaded: PHP Warning: Can't preload class Zend\Db\Sql\Insert with unresolved constants When I inspect the Zend\Db\Insert class, there are no undefined constants. Preloading only the file itself does not issue any warnings, only after all the dependent classes are preloaded. I could not figure out a minimal reproducible example, other than preloading some files from zend\db. Test script: --------------- --INI-- opcache.enable=1 opcache.enable_cli=1 opcache.optimization_level=-1 opcache.preload={PWD}/preload_undef_const_3.inc preload_undef_const_3.inc: <?php $basedirectory = 'C:/test/'; // dependent classes opcache_compile_file($basedirectory . 'vendor/zendframework/zend-db/src/Adapter/Platform/PlatformInterface.php'); opcache_compile_file($basedirectory . 'vendor/zendframework/zend-db/src/Sql/SqlInterface.php'); opcache_compile_file($basedirectory . 'vendor/zendframework/zend-db/src/Sql/AbstractSql.php'); opcache_compile_file($basedirectory . 'vendor/zendframework/zend-db/src/Sql/PreparableSqlInterface.php'); opcache_compile_file($basedirectory . 'vendor/zendframework/zend-db/src/Sql/AbstractPreparableSql.php'); // actual class opcache_compile_file($basedirectory . 'vendor/zendframework/zend-db/src/Sql/Insert.php'); Expected result: ---------------- No warning Actual result: -------------- PHP Warning: Can't preload class Zend\Db\Sql\Insert with unresolved constants -- Edit bug report at https://bugs.php.net/bug.php?id=77643&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=77643&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=77643&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=77643&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=77643&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=77643&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=77643&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=77643&r=needscript Try newer version: https://bugs.php.net/fix.php?id=77643&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=77643&r=support Expected behavior: https://bugs.php.net/fix.php?id=77643&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=77643&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=77643&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=77643&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=77643&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=77643&r=dst IIS Stability: https://bugs.php.net/fix.php?id=77643&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=77643&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=77643&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=77643&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=77643&r=mysqlcfg

« previous php.bugs (#219666) next »