Closed enumag closed 8 years ago
Any test case/scenario that can be used to automate this failure and verify its correctness?
@Ocramius I tried to add --classmap-authoritative
to .travis.install.sh (and removed the fix). It caused the build to fail with:
1) PackageVersionsTest\VersionsTest::testValidVersions
Error: Class 'PackageVersions\Versions' not found
Which is the error we wanted to test. So I'll just commit the fix along with the .travis.installer.sh change and that should be it.
The test should be an additional one, not a replacement for current installation...
I don't think it's necessary in this case (if something works with --classmap-authoritative I'm sure it will work without it as well). But alright, have it your way. It has to be a separate travis build though.
I don't think it's necessary
Well, people usually run it without --classmap-authoritative
, so we have to test with a separate flag for this particular scenario :-)
Anyway, I will have to take a closer look at this patch, since I might be able to also fix #18 in a similar way.
Manually rebased and merged, thanks!
btw, due to the change done in #33, it is useless, as the classmap generator will contain the class due to the fallback class
Yeah, can be reverted...
The proper way to ensure the class made it in the classmap (forgetting #33 which creates the file all the time) would have been to generate the file on the ScriptEvents::PRE_AUTOLOAD_DUMP
instead
Hello,
With 1.5.1 and --classmap-authoritative
, I encounter this issue, is there any fix? Thank you
@itscaro please write a test case reproducing the failure first
I tried to replace
--optimize-autoloader
with--classmap-authoritative
for my CI and got this exception:It seems that the Versions class was generated but is missing in the composer autoloading classmap because when I added the file manually in composer.json it works fine: