Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[PhpUnitBridge] Always segregate vendor and non vendor deprecations#27006
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
[PhpUnitBridge] Always segregate vendor and non vendor deprecations#27006
Uh oh!
There was an error while loading.Please reload this page.
Conversation
2f59a4a tocaf8e6bComparejaviereguiluz commentedApr 22, 2018 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
greg0ire commentedApr 22, 2018 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
It is slightly related, and it is a step towards a second attempt at doing#24867, which is deeply related, and might help you implement that idea. |
greg0ire commentedApr 22, 2018
To sum things up, there is vendor code code and your code. This PR makes the distinction between your code calling your deprecated code , and your code calling deprecated vendor code.#24867 is about a third category: vendor code calling deprecated vendor code. |
| // store failing status | ||
| $isFailing =DeprecationErrorHandler::MODE_WEAK !==$mode &&$mode <$deprecations['unsilencedCount'] +$deprecations['remainingCount'] +$deprecations['otherCount']; | ||
| $passesBeforeShutdown =!$isPassing($mode,$deprecations); |
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.
I believe the negation is incorrect: let's assume$isPassing returnstrue here and in the shutdown function below.$passesBeforeShutdown will befalse, which causes theif on line 275 to evaluate totrue and exit with a non-zero exit code.
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.
Oh right! Probably something I forgot to change when I decided to avoid negative logic 👍
caf8e6b to18acc34Comparenicolas-grekas commentedJul 23, 2018 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I don't think this segregation makes sense: your code is always the root of any calls made to vendors. |
greg0ire commentedJul 23, 2018 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
It very much is, but you can get deprecations without any calls made to your vendors, and if you do, that's probably the deprecations that should be fixed in priority, especially when you are a library, because it means you are calling your own code in a deprecated way |
nicolas-grekas commentedJul 23, 2018
Maybe it's a matter of vocabulary: vendor vs not-vendor means little to me as I explained, but direct vs indirect makes more sense to me. |
greg0ire commentedJul 23, 2018
This is not a segregation between direct and indirect, it's a segregation between |
nicolas-grekas commentedJul 25, 2018
According to#28048, it could make sense to group deprecations in 3 groups (in this order):
Maybe also implement the thresholds discussed in#28048 here? |
greg0ire commentedJul 25, 2018
stof commentedJul 25, 2018
you cannot replace the mode by something switching the exit code. any non-0 exit code is a failure, and CI would break on them. Having to replace the |
greg0ire commentedJul 25, 2018 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Another idea could be to produce a report in an easy-to-parse format and let people act on it if they wish to. |
nicolas-grekas commentedJul 25, 2018
Unless someone needs that IRL and is willing to implement, that possible, but we're not looking for more code to maintainà priori. :) |
18acc34 to66ee0ffComparegreg0ire commentedJul 26, 2018
Rebased without the comment about exit codes |
fabpot commentedOct 10, 2018
@greg0ire@nicolas-grekas How do we move forward on this one? |
greg0ire commentedOct 10, 2018
I'm currently working on an implementation of#28048 , and it would make my life easier if this got merge, so I'm going to rebase this again, and hope you accept to merge it. |
f0c680a tof183d99CompareEven if it does not make the exit code change, this is valuableinformation. Besides, not doing this reduces the complexity (fewer testsfor the weak vendors mode).I introduced a new closure for computing whether the build is failing ornot, named using positive logic so that things are easier to understand.
f183d99 to85c4243Comparenicolas-grekas commentedOct 10, 2018 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
I'd suggest borrowing this PR is your work. |
greg0ire commentedOct 10, 2018
Ok |

Uh oh!
There was an error while loading.Please reload this page.
Even if it does not make the exit code change, this is valuable
information. Besides, not doing this reduces the complexity (fewer tests
for the weak vendors mode).
I introduced a new closure for computing whether the build is failing or
not, named using positive logic so that things are easier to understand.