-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Form] Moved TypeTestCase to the Test namespace #7659
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
I had to use fully qualified names because you can't have an alias name which is equal to an existing class. The other failing tests in 5.3.* are not caused by this PR. |
@@ -13,7 +13,7 @@ | |||
|
|||
use Symfony\Component\Form\CallbackTransformer; | |||
|
|||
class CheckboxTypeTest extends TypeTestCase | |||
class CheckboxTypeTest extends \Symfony\Component\Form\Test\Type\TypeTestCase |
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.
Use a use statement with an alias instead of a FQCN
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.
@stof I thought about that too, but I can't think of a good alias name. BaseTypeTestCase
is wrong and TypeTestCase
cannot be used.
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.
Given that, I think the FQCNs are fine.
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Symfony\Component\Form\Test\Type; |
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 this can be moved to Symfony\Component\Form\Test directly, no?
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.
fixed
Apart from the mentioned issues, this looks good. Could you please rebase and make the suggested changes? |
@bschussek I fixed/did the suggested changes, updated the doc PR and rebased it. I think it's ready to merge now. |
This PR was merged into the master branch. Discussion ---------- [Form] Moved TypeTestCase to the Test namespace | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | #7175 | License | MIT | Doc PR | symfony/symfony-docs#2500 Todo: - [x] Make a Doc PR - [x] Update the changelog and UPGRADE-3.md files As discussed in #7175, since this class is documented as a practise to test your form types, it's good to move it to the `Test` namespace. I am not sure about the deprecation, I thought things deprecated in 2.3 are removed in 3.0. Also, I think we shouldn't trigger a E_USER_DEPRECATED message. Please correct me if I'm wrong, it's my first PR for the core code. Commits ------- 8da6129 Moved FormIntegrationTestCase and FormPerformanceTestCase to the Test namespace e46f841 Moved TypeTestCase to it's own namespace
Todo:
As discussed in #7175, since this class is documented as a practise to test your form types, it's good to move it to the
Test
namespace.I am not sure about the deprecation, I thought things deprecated in 2.3 are removed in 3.0. Also, I think we shouldn't trigger a E_USER_DEPRECATED message.
Please correct me if I'm wrong, it's my first PR for the core code.