Skip to content

[FrameworkBundle] [SecurityBundle] Rename internal WebTestCase to avoid confusion #32617

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

Closed
wants to merge 3 commits into from

Conversation

janvt
Copy link
Contributor

@janvt janvt commented Jul 19, 2019

FrameworkBundle & SecurityBundle had 2 classes called WebTestCase,
one of which is only meant for internal tests. To avoid confusion the internal
classes have been renamed to AbstractWebTestCase and made abstract.

Q A
Branch? master
Bug fix? no
New feature? no
BC breaks? no (or, yes, but internal class)
Deprecations? no
Tests pass? yes
Fixed tickets #32577
License MIT

FrameworkBundle had 2 classes called WebTestCase, one of which is only
meant for internal tests. To avoid confusion the internal class has
been renamed to AbstractWebTestCase

'See symfony#32577
@janvt
Copy link
Contributor Author

janvt commented Jul 19, 2019

This change follows the instructions in the issue, however, I will say it feels wierd that the WebTestCase class is abstract and is inherited by the AbstractWebTestCase, which is not abstract (but could be)....

@nicolas-grekas
Copy link
Member

Shouldn't this change target 3.4?

@janvt
Copy link
Contributor Author

janvt commented Jul 19, 2019

Wasn't sure, can gladly open a new PR.

@xabbuh xabbuh added this to the 3.4 milestone Jul 19, 2019
@@ -14,7 +14,7 @@
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as BaseWebTestCase;
use Symfony\Component\Filesystem\Filesystem;

class WebTestCase extends BaseWebTestCase
class AbstractWebTestCase extends BaseWebTestCase
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 for abstract class

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@janvt
Copy link
Contributor Author

janvt commented Jul 19, 2019

So, if I change this to target the 3.4 branch, the patch will not cleanly apply to versions after, as some functional tests were only added in later versions. How should I proceed?

@xabbuh
Copy link
Member

xabbuh commented Jul 19, 2019

@janvt We can either handle that in follow-up PRs or someone who merges branches up can fix those cases while merging.

@janvt
Copy link
Contributor Author

janvt commented Jul 19, 2019

So, should I just create one PR for each branch (3.4& 4.*)? Can gladly do that, just a bit of busy work :)

@janvt
Copy link
Contributor Author

janvt commented Jul 19, 2019

Also just saw, the same is the case in the SecurityBundle - \Symfony\Bundle\SecurityBundle\Tests\Functional\WebTestCase. Should I rename this as well? Seems to be internal, same as the FrameworkBundle class.

janvt added 2 commits July 19, 2019 14:32
SecurityBundle had 2 classes called WebTestCase, one of which is only
meant for internal tests. To avoid confusion the internal class has
been renamed to AbstractWebTestCase and made abstract.

See symfony#32577
@janvt janvt changed the title [FrameworkBundle] Rename internal WebTestCase to avoid confusion [FrameworkBundle] [SecurityBundle] Rename internal WebTestCase to avoid confusion Jul 19, 2019
@janvt
Copy link
Contributor Author

janvt commented Jul 19, 2019

I opened 2 PRs against the 3.4 and 4.2 branches. The latter should patch relatively well onto 4.* branches. Only one test removed, as far as I can see. Will close this.

@janvt janvt closed this Jul 19, 2019
nicolas-grekas added a commit that referenced this pull request Jul 23, 2019
…stCase to avoid confusion (janvt)

This PR was squashed before being merged into the 3.4 branch (closes #32625).

Discussion
----------

[FrameworkBundle] [SecurityBundle] Rename internal WebTestCase to avoid confusion

FrameworkBundle & SecurityBundle each had 2 classes called WebTestCase,
one of which is only meant for internal tests. To avoid confusion the internal
class has been renamed to AbstractWebTestCase and made abstract.

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no (or, yes, but internal class)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #32577
| License       | MIT

This PR is to ease integration, as not all test classes are present in all currently
maintained branches.

See #32617

Commits
-------

775d970 [FrameworkBundle] [SecurityBundle] Rename internal WebTestCase to avoid confusion
symfony-splitter pushed a commit to symfony/framework-bundle that referenced this pull request Jul 23, 2019
…stCase to avoid confusion (janvt)

This PR was squashed before being merged into the 3.4 branch (closes #32625).

Discussion
----------

[FrameworkBundle] [SecurityBundle] Rename internal WebTestCase to avoid confusion

FrameworkBundle & SecurityBundle each had 2 classes called WebTestCase,
one of which is only meant for internal tests. To avoid confusion the internal
class has been renamed to AbstractWebTestCase and made abstract.

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no (or, yes, but internal class)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #32577
| License       | MIT

This PR is to ease integration, as not all test classes are present in all currently
maintained branches.

See symfony/symfony#32617

Commits
-------

775d970927 [FrameworkBundle] [SecurityBundle] Rename internal WebTestCase to avoid confusion
nicolas-grekas added a commit that referenced this pull request Jul 23, 2019
…stCase to avoid confusion (janvt)

This PR was squashed before being merged into the 4.2 branch (closes #32626).

Discussion
----------

[FrameworkBundle] [SecurityBundle] Rename internal WebTestCase to avoid confusion

FrameworkBundle & SecurityBundle each had 2 classes called WebTestCase,
one of which is only meant for internal tests. To avoid confusion the internal
class has been renamed to AbstractWebTestCase and made abstract.

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no (or, yes, but internal class)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #32577
| License       | MIT

This PR is to ease integration, as not all test classes are present in all currently
maintained branches. This PR should patch relatively well onto 4.* branches.

See #32617

Commits
-------

01aaece [FrameworkBundle] [SecurityBundle] Rename internal WebTestCase to avoid confusion
@janvt janvt deleted the ticket_32577 branch July 30, 2019 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants