Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #97 - Preloading issues #143

Draft
wants to merge 1 commit into
base: 1.3.x
Choose a base branch
from

Conversation

annuh
Copy link

@annuh annuh commented Nov 27, 2020

Fixes: #97

This PR add class_exists checks before calling the class_alias function. I decided to check to all class_alias functions.

This fixes the following warnings (in PHP8 RC5 with preloading enabled)

<b>Warning</b>:  Can't preload already declared class Doctrine\Common\Persistence\Proxy in <b>/var/www/html/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/Proxy.php</b> on line <b>13</b><br />
<b>Warning</b>:  Can't preload already declared class Doctrine\Common\Persistence\Mapping\Driver\AnnotationDriver in <b>/var/www/html/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/Mapping/Driver/AnnotationDriver.php</b> on line <b>13</b><br />
<b>Warning</b>:  Can't preload already declared class Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain in <b>/var/www/html/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriverChain.php</b> on line <b>13</b><br />
<b>Warning</b>:  Can't preload already declared class Doctrine\Common\Persistence\Mapping\Driver\MappingDriver in <b>/var/www/html/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriver.php</b> on line <b>13</b><br />
<b>Warning</b>:  Can't preload already declared class Doctrine\Common\Persistence\AbstractManagerRegistry in <b>/var/www/html/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/AbstractManagerRegistry.php</b> on line <b>13</b><br />
<b>Warning</b>:  Can't preload already declared class Doctrine\Common\Persistence\Mapping\ClassMetadata in <b>/var/www/html/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/Mapping/ClassMetadata.php</b> on line <b>13</b><br />
<b>Warning</b>:  Can't preload already declared class Doctrine\Common\Persistence\Event\LoadClassMetadataEventArgs in <b>/var/www/html/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/Event/LoadClassMetadataEventArgs.php</b> on line <b>13</b><br />
<b>Warning</b>:  Can't preload already declared class Doctrine\Common\Persistence\Event\LifecycleEventArgs in <b>/var/www/html/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/Event/LifecycleEventArgs.php</b> on line <b>13</b><br />
<b>Warning</b>:  Can't preload already declared class Doctrine\Common\Persistence\ConnectionRegistry in <b>/var/www/html/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/ConnectionRegistry.php</b> on line <b>13</b><br />
<b>Warning</b>:  Can't preload already declared class Doctrine\Common\Persistence\ManagerRegistry in <b>/var/www/html/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/ManagerRegistry.php</b> on line <b>13</b><br />
<b>Warning</b>:  Can't preload already declared class Doctrine\Common\Persistence\ObjectRepository in <b>/var/www/html/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/ObjectRepository.php</b> on line <b>13</b><br />
<b>Warning</b>:  Can't preload already declared class Doctrine\Common\Persistence\ObjectManager in <b>/var/www/html/vendor/doctrine/persistence/lib/Doctrine/Common/Persistence/ObjectManager.php</b> on line <b>13</b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant