8000 [DX] rename unit test controller by frankdejonge · Pull Request #29602 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[DX] rename unit test controller #29602

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 1 commit into from
Dec 14, 2018
Merged

[DX] rename unit test controller #29602

merged 1 commit into from
Dec 14, 2018

Conversation

frankdejonge
Copy link
Contributor
Q A
Branch? 3.4
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets n/a
License MIT
Doc PR n/a

Whenever I create a new controller the actually needed controller shows up second in the list of auto-completion. The first suggestion is a class defined in the test and should not ever be extended in the application. This PR renames it so that doesn't happen anymore.

Example of the autocomplete issue:

screenshot 2018-12-14 at 10 33 26

@carsonbot carsonbot added Status: Needs Review DX DX = Developer eXperience (anything that improves the experience of using Symfony) labels Dec 14, 2018
@nicolas-grekas
Copy link
Member
nicolas-grekas commented Dec 14, 2018

Another idea: mark it as @internal. Would that fix the issue?
I've been suggesting we should mark all test classes as internal for precisely this reason.
Nobody gave it a try, until today maybe :)

@frankdejonge
Copy link
Contributor Author

@nicolas-grekas just tried that and it didn't have the expected result, I've just hit "invalidate caches" to verify this behaviour after a clean inspection of PHPStorm and it still shows up first. It only receives a strike through once it's used in the current file.

@nicolas-grekas
Copy link
Member

Didn't https://youtrack.jetbrains.com/issue/WI-37750 solve the issue? Can you check if you have the latest phpstorm version?

@frankdejonge
Copy link
Contributor Author

@nicolas-grekas I've updated it, it still shows it first.

@nicolas-grekas nicolas-grekas added this to the 3.4 milestone Dec 14, 2018
@nicolas-grekas
Copy link
Member

Thank you @frankdejonge.

@nicolas-grekas nicolas-grekas merged commit d4e426c into symfony:3.4 Dec 14, 2018
nicolas-grekas added a commit that referenced this pull request Dec 14, 2018
This PR was merged into the 3.4 branch.

Discussion
----------

[DX] rename unit test controller

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      |no
| New feature?  |no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Whenever I create a new controller the actually needed controller shows up second in the list of auto-completion. The first suggestion is a class defined in the test and should not ever be extended in the application. This PR renames it so that doesn't happen anymore.

Example of the autocomplete issue:

<img width="748" alt="screenshot 2018-12-14 at 10 33 26" src="https://user-images.githubusercontent.com/534693/49995500-a09dca80-ff8c-11e8-80b5-18890ff058b1.png">

Commits
-------

d4e426c Renamed test controller from Controller to TestController so it doesn't show up in the IDE autocomplete.
@frankdejonge frankdejonge deleted the dx/rename-unit-test-controller branch December 14, 2018 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DX DX = Developer eXperience (anything that improves the experience of using Symfony) Status: Reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0