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

Undefined class constant 'ROOT_PACKAGE_NAME' in src/DependencyInjection/Configuration.php:115 #331

Closed
Tanuel opened this issue Apr 20, 2020 · 5 comments
Milestone

Comments

@Tanuel
Copy link

Tanuel commented Apr 20, 2020

this package has no direct dependency to ocramius/package-versions, but tries to access a class constant not present in the minimum version set by jean85/pretty-package-versions

simply running composer update does not help.

An easy fix for this issue is to actually require ocramius/package-versions in composer.json instead of depending on another dependency to do that.

version 1.3.0 is required for ROOT_PACKAGE_NAME but jean85/pretty-package-versions brings 1.2

composer why ocramius/package-versions
jean85/pretty-package-versions  1.2  requires  ocramius/package-versions (^1.2.0)  
@Jean85
Copy link
Collaborator

Jean85 commented Apr 20, 2020

That's right and it WAS like that. I did a mistake with #325 in d48d50d#diff-b5d0ee8c97c7abd7e3fa29b9a27d1780L24

That should be reverted. We could add composer-require-checker in CI to avoid those issues in the future. In the meantime, composer update should fix your issue. If it doesn't, try running composer why-not ocramius/package-versions:^1.3 to debug.

@Jean85 Jean85 added this to the 3.4 milestone Apr 20, 2020
@Tanuel
Copy link
Author

Tanuel commented Apr 20, 2020

In the meantime, composer update should fix your issue. If it doesn't, try running composer why-not ocramius/package-versions:^1.3 to debug.

For some reason, composer update will not update to the latest, but the minimum required version.

composer why-not ocramius/package-versions:^1.3
There is no installed package depending on "ocramius/package-versions" in versions not matching ^1.3

what will solve this issue is running composer require ocramius/package-versions. After that composer install. Again confusing: the package does not get added to composer.json. At this point i have no idea what composer is doing anymore

@Jean85
Copy link
Collaborator

Jean85 commented Apr 20, 2020

You surely have some issues on your end, because that package is a strong requirement for jean85/pretty-package-versions, it's not possible to NOT have it in some version, at least.

@Tanuel
Copy link
Author

Tanuel commented Apr 20, 2020

Yes I had it in the lowest possible version which was 1.2. there might be some weirdness with our satis repository tho which I can try to figure out.
What I just find weird is that composer require did not add the package to the composer.json requirements...

@Jean85
Copy link
Collaborator

Jean85 commented May 4, 2020

Fix released as 3.5.0: https://github.com/getsentry/sentry-symfony/releases/tag/3.5.0

@Jean85 Jean85 closed this as completed May 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants