Skip to content
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

Enable UnusedUse sniff again #9267

Merged
merged 1 commit into from
Dec 25, 2021

Conversation

derrabus
Copy link
Member

Keeping the UnusedUse sniff deactivated entirely does more harm than good, I figured. The sniff is still not perfect when it comes to annotations, but if we keep annotations multiline, it works. I think, we can live with that.

@derrabus derrabus added the CI label Dec 18, 2021
@derrabus derrabus requested a review from greg0ire December 18, 2021 20:11
@beberlei
Copy link
Member

Couldn't we ignore tests/ for this sniff only if it causes these problems with annotations?

@derrabus derrabus force-pushed the improvement/unused-uses branch from fbd1cef to 252c218 Compare December 18, 2021 21:26
@derrabus
Copy link
Member Author

Couldn't we ignore tests/ for this sniff only if it causes these problems with annotations?

We could, but why should we? Our test suite does not need to cover all edge cases of the doctrine/annotations library, so adhering to a syntax that CodeSniffer understands seems okay to me. I think we gain more from a rule that removes unused imports from the tests, especially if at the same time we require code to explicitly import elements from the global scope.

@derrabus derrabus force-pushed the improvement/unused-uses branch from 252c218 to 9b6c1d4 Compare December 20, 2021 13:48
@derrabus derrabus added this to the 2.11.0 milestone Dec 20, 2021
@derrabus derrabus force-pushed the improvement/unused-uses branch from 9b6c1d4 to 305bdb4 Compare December 21, 2021 10:04
@derrabus derrabus force-pushed the improvement/unused-uses branch from 305bdb4 to 672393d Compare December 21, 2021 10:22
@derrabus derrabus merged commit ea4c9b2 into doctrine:2.11.x Dec 25, 2021
@derrabus derrabus deleted the improvement/unused-uses branch December 25, 2021 22:06
derrabus added a commit to derrabus/orm that referenced this pull request Dec 26, 2021
* 2.11.x:
  Enable UnusedUse sniff again (doctrine#9267)
  Whitelist composer plugins used by this repository (doctrine#9286)
  Fix XML export for `change-tracking-policy` (doctrine#9285)
  Allow symfony/cache 6 (doctrine#9283)
  Put actual value instead of index inside $originalEntityData. (doctrine#9244)
  Fix return types of cache interfaces (doctrine#9271)
  Better explain limitations of DQL "DELETE" (doctrine#9281)
  Fix docblocks on nullable EM properties (doctrine#9273)
  Docs: use canonical order for phpdoc tags, add missed semicolon (doctrine#9190)
  Make PrimaryReadReplicaConnection enforcement explicit (doctrine#9239)
  Regenerate Psalm baseline (doctrine#9272)
  Improve compatibility with Doctrine DBAL 4 (doctrine#9266)
  [docs] Fix wording for attributes=>parameters. (doctrine#9265)
  Support for nesting attributes with PHP 8.1 (doctrine#9241)
  Revert "Fix SchemaValidator with abstract child class in discriminator map (doctrine#9096)" (doctrine#9262)
  Docs: consistency for FQCN, spacing, etc (doctrine#9232)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants