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

[Question] option for not changing version format #1305

Open
mimmi20 opened this issue Mar 8, 2024 · 4 comments
Open

[Question] option for not changing version format #1305

mimmi20 opened this issue Mar 8, 2024 · 4 comments
Assignees

Comments

@mimmi20
Copy link

mimmi20 commented Mar 8, 2024

I am testing this library.

For dependencies like symfony/console tis library want to change the version format.

-    "symfony/console": "^v6.4.4"
+    "symfony/console": "^6.4.4"

Does an option exist to disable this behavior?

@localheinz localheinz self-assigned this Dec 4, 2024
@localheinz
Copy link
Member

Thinking about this for the next major version, perhaps it does make sense to allow configuration.

@Aerendir
Copy link

I confirm this is a big issue for me that is forcing me to disable this check.

I use Heroku and it uses the php version in composer.json to determine which stack to install.

If I use php: ^8.3, like the library wants, Heroku installs PHP8.4, but this version causes some issues with my code that is not still ready for this version.

So I need to use php: ~8.3, but the normalization transforms it back in php: ^8.3, making impossible to stick with a precise minor version.

@localheinz
Copy link
Member

Can’t you use ~8.3.0 instead?

@fredden
Copy link

fredden commented Jan 11, 2025

So I need to use php: ~8.3, but the normalization transforms it back in php: ^8.3

These two constraints are equal. See https://getcomposer.org/doc/articles/versions.md#tilde-version-range-, and compare https://semver.madewithlove.com/?package=php&constraint=~8.3 with https://semver.madewithlove.com/?package=php&constraint=%5E8.3

It's also worth noting that PHP does not follow semantic versioning, so using ^8.3 is not safe. I recommend ~8.3.0 for your particular case.

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

4 participants