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

Ambiguous class with composer #185

Closed
B-Prod opened this issue Jun 13, 2017 · 3 comments · Fixed by #192
Closed

Ambiguous class with composer #185

B-Prod opened this issue Jun 13, 2017 · 3 comments · Fixed by #192

Comments

@B-Prod
Copy link

B-Prod commented Jun 13, 2017

When generating the autoload files, there are a lot of warning messages about ambiguous classes. For example:
Warning: Ambiguous class resolution, "Lullabot\AMP\Spec\AmpLayout" was found in both "/tmp/build/9062a266/code/vendor/lullabot/amp/src/Spec/validator-generated.php" and "/tmp/build/9062a266/code/vendor/lullabot/amp/src/validator-generated.php", the first will be used.
Warning: Ambiguous class resolution, "Lullabot\AMP\Spec\AmpLayoutLayout" was found in both "/tmp/build/9062a266/code/vendor/lullabot/amp/src/Spec/validator-generated.php" and "/tmp/build/9062a266/code/vendor/lullabot/amp/src/validator-generated.php", the first will be used.
Warning: Ambiguous class resolution, "Lullabot\AMP\Spec\AtRuleSpec" was found in both "/tmp/build/9062a266/code/vendor/lullabot/amp/src/Spec/validator-generated.php" and "/tmp/build/9062a266/code/vendor/lullabot/amp/src/validator-generated.php", the first will be used.
...

Should you not remove the classmap "src/Spec/validator-generated.php" from the autoload definition in the composer.json?
Or is this the expected behaviour?

@francoispottier
Copy link

Same issue here. Do we have to remove one or the other through composer.json?

Thanks!

@davereid
Copy link
Member

davereid commented Aug 3, 2017

I'm also getting the same error. It seems odd that src/validator-generated.php and Spec/valdiator-generated.php seem like the same file.

@davereid
Copy link
Member

davereid commented Aug 3, 2017

It looks like this file was added in #182 but instead of updating the existing file, it was just duplicated. I'm working on a PR to remove the duplication.

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