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

Keep existing constraints in package.json #965

Merged

Conversation

smnandre
Copy link
Contributor

When a dependency constraint is already set in the package.json, the PackageSynchroniser replaces it with even if the constraint is valid.

This PR changes this behaviour and let the constraint untouched if it matches the one provided by the PHP package.

Related issues:

@smnandre smnandre changed the title Keep existing constraints in packages.json Keep existing constraints in package.json Jan 19, 2023
maxhelias
maxhelias previously approved these changes Jan 23, 2023
Copy link
Member

@weaverryan weaverryan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😍

I've just made a small suggestion so that the test case will cover BOTH situations (when a constraint should not be updated but also when it SHOULD be updated). I've tested things locally, including these test changes. It's all working awesomely!

Thanks @smnandre!

tests/PackageJsonSynchronizerTest.php Outdated Show resolved Hide resolved
tests/PackageJsonSynchronizerTest.php Show resolved Hide resolved
@smnandre
Copy link
Contributor Author

Thank you both for your review and your suggestions 😃

weaverryan
weaverryan previously approved these changes Jan 23, 2023
Copy link
Member

@weaverryan weaverryan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is ready to go - excellent work - it seems to work great when I played with the test locally!

@nicolas-grekas nicolas-grekas changed the base branch from 2.x to 1.x January 30, 2023 16:29
@nicolas-grekas nicolas-grekas dismissed stale reviews from weaverryan and maxhelias January 30, 2023 16:29

The base branch was changed.

@nicolas-grekas nicolas-grekas force-pushed the feat/keep-stricter-package-constraints branch from b4bbd2c to ae95fe1 Compare January 30, 2023 16:29
@nicolas-grekas
Copy link
Member

Thank you @smnandre.

@nicolas-grekas nicolas-grekas merged commit d309f02 into symfony:1.x Jan 30, 2023
@smnandre smnandre deleted the feat/keep-stricter-package-constraints branch February 2, 2023 23:46
@smnandre smnandre mentioned this pull request Feb 17, 2023
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

Successfully merging this pull request may close these issues.

None yet

4 participants