-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
The autoloader throws an exception on class_exists #20773
Comments
Hi @sidolov. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
For more details, please, review the Magento Contributor Assistant documentation. @sidolov do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
Hi @engcom-backlog-nazar. Thank you for working on this issue.
|
@engcom-backlog-nazar Thank you for verifying the issue. Based on the provided information internal tickets Issue Available: @engcom-backlog-nazar, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself. |
Hi @Vinai. Thank you for working on this issue.
|
#mm19in |
Hi @sidolov. Thank you for your report.
The fix will be available with the upcoming 2.3.2 release. |
Hi @sidolov. Thank you for your report. The fix will be available with the upcoming 2.2.9 release. |
Summary (*)
The autoloader throws an exception on
class_exists
. That is clearly an unexpected behavior according to the documentation: http://php.net/manual/en/function.class-exists.phpThis will cause issues when including third-party libraries that are not written for Magento.
An autoloader that throws an exception is not PSR-4 compliant
Examples (*)
Run
class_exists('FooFactory')
. It should returnfalse
but an error is thrown instead.To reproduce the issue apply changes from the #14085
Expected result: there is no error thrown
Actual result: autoloader throws an exception
@Vinai, @kandy, @orlangur I moved content from the #14085 to current issue.
Proposed solution
The text was updated successfully, but these errors were encountered: