You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using this library inside a Magento 2 project. When running a CLI command, I get an error related to this library:
$ bin/magento yireo_extensionchecker:scan --module Vendor_Module
Fatal error: Cannot redeclare VeeWee\Xml\Dom\Assert\assert_attribute() (previously declared in /var/www/html/vendor/veewee/xml/src/Xml/Dom/Assert/assert_attribute.php:15) in /var/www/html/vendor/veewee/xml/src/Xml/Dom/Assert/assert_attribute.php on line 17
I tried to debug the issue, but I cannot wrap my head around it. The issue pretty much says that in line 17 of /var/www/html/vendor/veewee/xml/src/Xml/Dom/Assert/assert_attribute.php, the method VeeWee\Xml\Dom\Assert\assert_attribute() is declared. However, line 17 doesn't declare a method at all:
I know it is a very poor issue, because it is not possible to reproduce this. I still wanted to ask you, whether you have any idea by chance? Have you seen this before?
Thanks!
The text was updated successfully, but these errors were encountered:
This package comes shipped with an autoloader that checks if the function exists before loading the file to avoid these kind of errors.
This means that the specific tool you are using is using a custom autoloader either explicit or implicit by using something like class_exists() or friends.
Sadly there is no central function autoloader logic in php yet.
Thanks a lot for your help! I've further looked into this and found out that the issue is caused by a call to class_exists('VeeWee\Xml\Dom\Assert\assert_attribute'). The issue is described in more detail here: yireo/Yireo_ExtensionChecker#53
Support Question
I am using this library inside a Magento 2 project. When running a CLI command, I get an error related to this library:
I tried to debug the issue, but I cannot wrap my head around it. The issue pretty much says that in line 17 of
/var/www/html/vendor/veewee/xml/src/Xml/Dom/Assert/assert_attribute.php
, the methodVeeWee\Xml\Dom\Assert\assert_attribute()
is declared. However, line 17 doesn't declare a method at all:xml/src/Xml/Dom/Assert/assert_attribute.php
Line 17 in 47504ae
I know it is a very poor issue, because it is not possible to reproduce this. I still wanted to ask you, whether you have any idea by chance? Have you seen this before?
Thanks!
The text was updated successfully, but these errors were encountered: