Skip to content

[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

Merged
merged 2 commits into from
Apr 19, 2013

Conversation

wouterj
Copy link
Member

@wouterj wouterj commented Apr 12, 2013

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:

  • Make a Doc PR
  • 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.

@wouterj
Copy link
Member Author

wouterj commented Apr 12, 2013

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
Copy link
Member

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

Copy link
Member Author

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.

Copy link
Contributor

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;
Copy link
Contributor

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@webmozart
Copy link
Contributor

Apart from the mentioned issues, this looks good. Could you please rebase and make the suggested changes?

@wouterj
Copy link
Member Author

wouterj commented Apr 19, 2013

@bschussek I fixed/did the suggested changes, updated the doc PR and rebased it. I think it's ready to merge now.

fabpot added a commit that referenced this pull request Apr 19, 2013
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
@fabpot fabpot merged commit 8da6129 into symfony:master Apr 19, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants