Skip to content

fix: TypeDeclarationSpacesFixer - handle asymmetric visibility and final properties#8900

Merged
kubawerlos merged 5 commits intoPHP-CS-Fixer:masterfrom
6b7562617765726c6f73:fix_TypeDeclarationSpacesFixer
Jul 29, 2025
Merged

fix: TypeDeclarationSpacesFixer - handle asymmetric visibility and final properties#8900
kubawerlos merged 5 commits intoPHP-CS-Fixer:masterfrom
6b7562617765726c6f73:fix_TypeDeclarationSpacesFixer

Conversation

@kubawerlos
Copy link
Copy Markdown
Member

@kubawerlos kubawerlos commented Jul 29, 2025

Fixes #8899

This one is on me:

  • When I was adding support to asymmetric visibility, I was looking for T_READONLY usages and tried to add T_*_SET ones next to it.
  • Of course, I have found it in TypeDeclarationSpacesFixer, but I have removed the usage, and tests were still passing (see 1st commit). There were tests for readonly, so I've assumed it is covered, but not needed in the fixer.
  • I could/should dig deeper, and I would discover that T_READONLY was needed, same as asymmetric visibility tokens.

@coveralls
Copy link
Copy Markdown

coveralls commented Jul 29, 2025

Coverage Status

coverage: 94.755%. remained the same
when pulling ce59658 on 6b7562617765726c6f73:fix_TypeDeclarationSpacesFixer
into 5bd26f0 on PHP-CS-Fixer:master.

@kubawerlos kubawerlos marked this pull request as ready for review July 29, 2025 16:57
Comment thread src/Fixer/Whitespace/TypeDeclarationSpacesFixer.php Outdated
@kubawerlos kubawerlos added topic/PHP8.4 Related to features available in PHP 8.4+ topic/PHP8.5 Related to features available in PHP 8.5+ labels Jul 29, 2025
Comment thread tests/Fixer/Whitespace/TypeDeclarationSpacesFixerTest.php Outdated
@kubawerlos kubawerlos removed the topic/PHP8.5 Related to features available in PHP 8.5+ label Jul 29, 2025
@kubawerlos kubawerlos removed this from the PHP 8.5 initial compatibility milestone Jul 29, 2025
@kubawerlos kubawerlos changed the title fix: TypeDeclarationSpacesFixer - handle asymmetric visibility fix: TypeDeclarationSpacesFixer - handle asymmetric visibility and final properties Jul 29, 2025
@kubawerlos kubawerlos enabled auto-merge (squash) July 29, 2025 20:04
@kubawerlos kubawerlos merged commit 125449b into PHP-CS-Fixer:master Jul 29, 2025
31 checks passed
@kubawerlos kubawerlos deleted the fix_TypeDeclarationSpacesFixer branch July 29, 2025 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug topic/PHP8.4 Related to features available in PHP 8.4+

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Null offset on SplFixedArray when checking file

4 participants