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

composer-require-checker check not picking up phpmailer #73

Open
ghost opened this issue Jun 19, 2018 · 7 comments
Open

composer-require-checker check not picking up phpmailer #73

ghost opened this issue Jun 19, 2018 · 7 comments

Comments

@ghost
Copy link

ghost commented Jun 19, 2018

With & without optimize-autoloader being set to true in composer.json, composer-require-checker check ./composer.json lists PHPMailer\PHPMailer\PHPMailer as an "unknown symbol", which is a little odd as I've got other packages loaded with psr-4 that drop off the list when I pull them in with composer require :s

@Ocramius
Copy link
Collaborator

Reproduction should be a test case that can be integrated with this test suite. In https://github.com/Roave/BackwardCompatibilityCheck/blob/1.0.3/src/SourceLocator/StaticClassMapSourceLocator.php I implemented a source locator capable of working with any composer dump-autoload -a output (as per composer 1.6.4)

@ghost
Copy link
Author

ghost commented Jun 19, 2018

not sure how to integrate it with the test suite while at work- was just about able to smoosh together a bare-minimum reproduction repo- reproducing the problem with composer install && composer run tests

@Ocramius
Copy link
Collaborator

@WDD-Marv we all do work as well, heh 😛

I think we might need a better abstraction for detecting files overall though: the current one is very much a hack.

@ghost
Copy link
Author

ghost commented Jun 20, 2018

@Ocramius I'm wondering if it's something specific to the symbol \{a}\{b}\{c} where a, b, & c are equal to "PHPMailer"- I've not used anything else with this package that I've observed has the same class name..


Where might one look to best determine why the class isn't being picked up ?

@Ocramius
Copy link
Collaborator

@WDD-Marv no assumptions - everything should be based on AST.

The best way to understand why it's not being picked up is with an isolated reproduction scenario that you reduce more and more until you get to the point where a change makes the test pass/break on a very tiny modification.

@ghost
Copy link
Author

ghost commented Jun 21, 2018

additional note: swiftmailer classes aren't being picked up either.

@temp
Copy link

temp commented Nov 23, 2018

Stumbled upon the same problem. Might this be related to the fact that swiftmailer registers it's own autoloader?
Edit: Just saw there are a lot of other issues regarding this issue. Will follow there.

MidnightDesign pushed a commit to MidnightDesign/ComposerRequireChecker that referenced this issue Sep 17, 2020
fix: Argument::that allows params
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants