-
-
Notifications
You must be signed in to change notification settings - Fork 616
ci: Add automated check for BC breaks #1762
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
Conversation
Added a github action using roave/backward-compatibility-check to highlight potential breaking changes in PRs.
We have generally considered it acceptable for BC to add strict parameter types that match the pre-existing phpdoc types. Roave reports all of these since it doesn't read the phpdoc at all. Rather than having a large and potentially hard to follow baseline I think it's better we suppress that whole class of errors. Maintainers will continue to manually review parameter type additions, as we have previously.
This reverts commit af342ef.
|
@carlos-granados while this won't necessarily cover everything (and from experimenting so far it produces a few false positives) I think worth having an extra layer of safety checking in our build as we start working towards 4.x - particularly because I want to start making some backwards-compatible changes in 3.x first to minimise the diff between the two versions. |
carlos-granados
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be useful to add this dependency as a regular dev dependency, not only in CI? In this way we could run a BC check locally before submitting a PR
The problem is it has quite a few dependencies, including some that it shares with us in stricter versions - e.g. it requires It doesn't have to be installed within the project context - once installed it runs against any project directory - so installing it standalone alongside felt like a neater/safer solution. It's possible to use the same shell steps as the actions job to install it locally in a subdirectory (or any directory) and run it from there assuming the environment has the required tools e.g. I could commit that as a shell script instead of having it just in the actions job, but I actually wonder if it's easier to let people work that out for themselves / tweak it for their preferences rather than trying to have an officially-supported-way of doing it especially given the variations in shells / composer installations / etc? At some point I might try to look at whether there's anything I can do to get the docker-based flow working neatly (and possibly look at a couple of other issues/enhancements that I've already spotted with it) but I don't want to get too sidetracked from our own 4.x at the moment. |
Understood. Could we at least add some instructions/pointers explaining how to set this up locally? I myself would like to use this tool |
Good idea - added to the BC section of the contributing docs. |
carlos-granados
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great addition @acoulton
Added a github action using roave/backward-compatibility-check to highlight potential breaking changes in PRs.