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

by a semantic version constraint matched against a Composer dependency not working #52

Closed
DanielSiepmann opened this issue Jan 3, 2024 · 8 comments · Fixed by #54
Closed
Labels
bug Something isn't working

Comments

@DanielSiepmann
Copy link

The "by a semantic version constraint matched against a Composer dependency" approach does not work. We receive the following output:

 ------ ---------------------------------------------------------
  Line   packages/site_codappix/ext_localconf.php
 ------ ---------------------------------------------------------
  10     Package "typo3/cms-core" is not installed via Composer.
 ------ ---------------------------------------------------------

I tried to debug via xdebug and it looks like the !InstalledVersions::isInstalled call is heading to phpstan phar version and its own packages composer dependencies instead of the actual project dependencies.

@staabm
Copy link
Owner

staabm commented Jan 3, 2024

thanks for reporting. it works in my tests as expected.

could you create a small reproducing repo? It might be something specific to typo3

@DanielSiepmann
Copy link
Author

Thanks for your fast response, and sure: https://github.com/DanielSiepmann/phpstan-todo-by-issue-52

I broke our setup down to the minimum. It seems the issue is caused by typo3/minimal dependency.
Removing that dependency removes the issue.

So not really related to TYPO3 I guess, but to metapackages in general? I'm not too deep into this topic.

@staabm
Copy link
Owner

staabm commented Jan 3, 2024

thanks for the repro. as soon as typo3/minimal is removed from the repro it starts to work. it seems one of typo3/minimal dependencies is fiddling with autoloading.

maybe you can reduce it further from this point?

@DanielSiepmann
Copy link
Author

I could further reduce to only include typo3/cms-core and typo3/cms-backend.

@staabm
Copy link
Owner

staabm commented Jan 3, 2024

thank you.

I think it will be fixed with #54 - I need a proper automated test for staabm/phpstan-todo-by to land it though.

could you work on that?

@staabm staabm added the bug Something isn't working label Jan 3, 2024
@staabm staabm mentioned this issue Jan 3, 2024
@staabm staabm closed this as completed in #54 Jan 3, 2024
@staabm
Copy link
Owner

staabm commented Jan 3, 2024

fix released in https://github.com/staabm/phpstan-todo-by/releases/tag/0.1.17

@DanielSiepmann
Copy link
Author

Thank you very much for such a fast fix.
I'll give it a try tomorrow and only respond if we still have issues :)

Copy link

github-actions bot commented Feb 4, 2024

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants