Skip to content

Breaking change missing in 5 to 6 upgrade #822

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

Closed
bbrala opened this issue May 2, 2025 · 5 comments · Fixed by #823
Closed

Breaking change missing in 5 to 6 upgrade #822

bbrala opened this issue May 2, 2025 · 5 comments · Fixed by #823

Comments

@bbrala
Copy link
Contributor

bbrala commented May 2, 2025

Seems the signature of BaseConstraint has changed:

public function addError(?JsonPointer $path, $message, $constraint = '', ?array $more = null)

public function addError(ConstraintError $constraint, ?JsonPointer $path = null, array $more = []): void

Is that intentional? Guess the fact it isn't optional anymore is the problem there.

Copy link

github-actions bot commented May 2, 2025

🚀 @bbrala, thanks for your contribution! Every idea, bug report, and discussion helps make this project better. Your input is invaluable, and we appreciate the time you took to share it. A maintainer will review it soon—stay awesome! 💡✨

⭐ Enjoying contributing? Star the project! ⭐Your contributions help this project grow, and we'd love your support in another way too! If you find this repo helpful, consider leaving a star 🌟 on GitHub.

@bbrala bbrala changed the title Change missing in 5 to 6 upgrade Breaking change missing in 5 to 6 upgrade May 2, 2025
@longwave
Copy link

longwave commented May 2, 2025

This was done a very long time ago in #364

@longwave
Copy link

longwave commented May 2, 2025

To be compatible with both versions we can perhaps use class_exists(ConstraintError::class) and call the relevant signature?

@DannyvdSluijs DannyvdSluijs self-assigned this May 2, 2025
@DannyvdSluijs
Copy link
Collaborator

@bbrala perhaps you can elaborate on your issue? Breaking changes between mayor versions is possible.

I can see this was not covered in the upgrade guide. If this is your point, feel free to open PR and add the information.

@bbrala
Copy link
Contributor Author

bbrala commented May 2, 2025

To be compatible with both versions we can perhaps use class_exists(ConstraintError::class) and call the relevant signature?

yes we can.

@bbrala perhaps you can elaborate on your issue? Breaking changes between mayor versions is possible.

I can see this was not covered in the upgrade guide. If this is your point, feel free to open PR and add the information.

Ok, will do.

DannyvdSluijs pushed a commit that referenced this issue May 5, 2025
Add missing breaking change to upgrade guide

Fixes #822

---------

Co-authored-by: Copilot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants