Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
Move Constraint validator test case to Test namespace#17203
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
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.
missing silencing
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.
and it cannot be removed in 3.0...
30ea9a3 tocbf1f77Comparewouterj commentedDec 31, 2015
Thanks for your quick review,@stof! I've fixed the PR now. |
Tobion commentedJan 12, 2016
We do not maintain BC for test files in |
nicolas-grekas commentedJan 13, 2016
I agree with@Tobion, no need to preserve BC for tests |
stof commentedJan 13, 2016
Well, given that some tests are using this class in other components, we would have to preserve BC (and people might use it elsewhere too already). The point is that this base testcase is meant to be extended when writing tests. We just messed up its location when introducing it (and this is the drawback of the inclusion of tests inside the runtime, as our testsuite is autoloadable by any code installing the component as a dependency) |
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.
This is an issue: we won't test the bridge with symfony/validator anymore, which could hide BC breaks.
We need to find a way to keep ~2.8 here.
(same comment for the other cases below)
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.
Why wouldn't this test the bridge with symfony/validator anymore? It would simply be tested against 3.1, or am I missing something?
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.
ping@nicolas-grekas
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.
@nicolas-grekas Can you give us more insights about this?
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 think the point is that the test suite tests both against the highest and lowest possible dependencies. Since 3.1 is the minimum boundary, even the--prefer-lowest tests will run against 3.1 and not against 2.8, which might hide compatibility issues.
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.
So the solution would be to keep both classes (new and old) and use the old one in the core libraries, so we can still properly support and test 2.8 and 3.0?
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 think that would be good, yes.
nicolas-grekas commentedJan 13, 2016
@stof, then I suggest to NOT deprecate anything in this PR |
stof commentedJan 13, 2016
@nicolas-grekas I don't understand what you mean. Do you suggest moving the class without deprecating the old class name ? |
nicolas-grekas commentedJan 13, 2016
@stof yes, that's the best idea I have for now to still allow ~2.8 in composer json files... |
fabpot commentedJan 25, 2016
I think we are going too far with BC. Files under |
cbf1f77 to5c516d8Comparewouterj commentedJan 25, 2016
Alright, removed the class and file. |
fabpot commentedFeb 29, 2016
@nicolas-grekas The only remaining issue is the composer deps changes |
5c516d8 to5eeb754Comparewouterj commentedFeb 29, 2016
Rebased Status: Needs review |
UPGRADE-3.1.md Outdated
| UPGRADE FROM 3.0 to 3.1 | ||
| ======================= | ||
| <<<<<<< HEAD |
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.
Conflict resolution issue
5eeb754 tod4ff6ffComparewouterj commentedFeb 29, 2016
Thanks, fixed your comments@stof. |
xabbuh commentedMar 1, 2016
This seems to need a rebase again. |
UPGRADE-3.1.md Outdated
| // ... | ||
| use Symfony\Component\Validator\Test\ConstraintValidatorTestCase; | ||
| class MyCustomValidatorTest extends ConstraintValidatorTestCase |
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.
Did we move away from prefixing abstract classes withAbstract (in general)?
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.
Hmm, I'm not sure actually. But it seems to be more common to not add the prefix for abstract classes in Symfony.
fabpot commentedJun 15, 2016
@wouterj IIUC, it would be better to keep |
d4ff6ff toed33a2dComparewouterj commentedJun 15, 2016
Updated the PR to keep both classes and deprecate the old one. We can't trigger a deprecation warning, as we can't update all core packages to use the new class. |
ed33a2d to0e868eeCompare0e868ee toe938361Comparefabpot commentedJun 15, 2016
Thank you@wouterj. |
…(WouterJ)This PR was merged into the 3.2-dev branch.Discussion----------Move Constraint validator test case to Test namespace| Q | A| ------------- | ---| Bug fix? | no| New feature? | kinda| BC breaks? | no| Deprecations? | yes| Tests pass? | yes| Fixed tickets | -| License | MIT| Doc PR | -The Validator component has a very usefull test utility to test constraint validators. It's only hidden deep in the Tests namespace. Just as was done with the TypeTestCase of the Form component some years ago, I think it's usefull to move the constraint test case to the Test namespace as well.*Btw, my last PR of the year and the first deprecation of 3.1* 🎆Commits-------e938361 Move Constraint validator test case to Test namespace
The Validator component has a very usefull test utility to test constraint validators. It's only hidden deep in the Tests namespace. Just as was done with the TypeTestCase of the Form component some years ago, I think it's usefull to move the constraint test case to the Test namespace as well.
Btw, my last PR of the year and the first deprecation of 3.1 🎆