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

bug: Fix PHPDoc alignment fixer containing callbacks using \Closure #6746

Merged
merged 4 commits into from Jan 21, 2023

Conversation

cs278
Copy link
Contributor

@cs278 cs278 commented Jan 9, 2023

Fixes the PHPDoc alignment fixer so that @param annotations using \Closure don't break the alignment, e.g.:

--- a/tests/integration/Sentry/AbstractSentryTest.php
+++ b/tests/integration/Sentry/AbstractSentryTest.php
@@ -71,7 +71,7 @@ final protected function tearDown(): void
      *
-     * @param array<string,mixed>         $input
+     * @param array<string,mixed> $input
      * @param \Closure(mixed,string):void $callback
      */

Quite a simple change in the end, I've just updated the regexp in TypeExpression to handle the backslash.

@cs278 cs278 changed the title Fix PHPDoc alignment fixer containing callbacks using \Closure bug: Fix PHPDoc alignment fixer containing callbacks using \Closure Jan 9, 2023
@cs278 cs278 marked this pull request as ready for review January 9, 2023 17:25
@coveralls
Copy link

coveralls commented Jan 10, 2023

Pull Request Test Coverage Report for Build 3901039923

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 92.926%

Totals Coverage Status
Change from base Build 3873623566: 0.0%
Covered Lines: 22556
Relevant Lines: 24273

💛 - Coveralls

@cs278 cs278 requested a review from keradus January 11, 2023 16:57
@keradus
Copy link
Member

keradus commented Jan 11, 2023

Kudos, @cs278 !

@keradus keradus added the RTM Ready To Merge label Jan 11, 2023
@cs278
Copy link
Contributor Author

cs278 commented Jan 12, 2023

@keradus I've just squashed all the fixups, the only change was this: 5c108d2 which should mean CI passes.

@kubawerlos kubawerlos merged commit ecb41d5 into PHP-CS-Fixer:master Jan 21, 2023
@kubawerlos
Copy link
Contributor

thank you @cs278

@kubawerlos kubawerlos removed the RTM Ready To Merge label Jan 21, 2023
@GrahamCampbell
Copy link
Contributor

This has broken the tests.

@kubawerlos
Copy link
Contributor

@GrahamCampbell what tests?

@GrahamCampbell
Copy link
Contributor

image

I should have been more specific, in that the CI is now failing, though the "tests" are passing.

@keradus keradus mentioned this pull request Jan 22, 2023
@keradus
Copy link
Member

keradus commented Jan 22, 2023

@GrahamCampbell , I think you would be faster to actually raise a fix than raising an awareness that one see on main repo page anyway ;)
#6759

@kubawerlos
Copy link
Contributor

@GrahamCampbell if you look into these there is no single test failing, just style check.

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.

None yet

5 participants