-
-
Notifications
You must be signed in to change notification settings - Fork 22
Fix autoloading #41
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
Fix autoloading #41
Conversation
|
There IS an autoloader in |
|
Why? |
|
I am not sure why it happens, but I think there is a autoloading problem (that we have multiple same named classes arround). locally it works for me. but I can see these errors in CI now |
|
But we do not? PHPUnit prefixes the classes, there is only one ;-) |
|
I need to lookup how this custom autoloader, the custom tool installer and the ant setup works. its pretty non-standard for me :) |
|
local debugging wise, it looks like the autoloader is not used at all for loading the tokenizer classes.. |
|
my guess is, that the test-suite is loading the XMLSerialize class from within PHPUnit instead of the ones in our src folder |
|
see the CI output which proofs my point ➜ tokenizer git:(fix) ✗ tools/phpunit Runtime: PHP 8.3.28 ...................string(91) "phar:///Users/m.staab/.phive/phars/phpunit-10.5.59.phar/theseer-tokenizer/XMLSerializer.php" |
|
@theseer I think the problem is, that PHPUnit 10.x started to use pre-loading for its classes and therefore in this current setup we cannot replace PHPUnit internal classes with our own (or at least the relevant XMLSerializer class is loaded that early, that we cannot inject our own class) //cc @sebastianbergmann |
I just extracted the
and that way I can see the |
|
But it should be scoped, shouldn't it? It's a third party dependency... |
|
as far as I can tell in the PHPUnit 10.x release I did not find any file which is prefixed. either it doesn't work in the latest release or its something only happening on newer major versions.. I don't know. I guess it should be prefixed/scoped - yes. |
At first glance it currently is not. PHP-Scoper is run in the build process, but the resulting PHAR does not seem to be scoped. I will look into this ASAP. |
|
As Autoloading is not the culprit, tracking the issue will continue in #40. |
No description provided.