[BUG]: Loader should not load already loaded files #15489
Labels
5.0
The issues we want to solve in the 5.0 release
bug
A bug report
external dependency
This issue depends on external issue to be resolved.
status: low
Low
I use
Phalcon\Loader
as the main autoloader, but some libraries (for examplelaminas/laminas-zendframework-bridge
) register their autoloaders to load files before I can do so with$loader->loadFiles()
, resulting in a "Cannot redeclare XYZ" error is raised.Phalcon\Loader
should userequire_once
instead ofrequire
so that the error does not appear.cphalcon/phalcon/Loader.zep
Line 121 in 20356b6
cphalcon/phalcon/Loader.zep
Line 194 in 20356b6
cphalcon/phalcon/Loader.zep
Line 253 in 20356b6
cphalcon/phalcon/Loader.zep
Line 378 in 20356b6
To Reproduce
The text was updated successfully, but these errors were encountered: