Skip to content

Conversation

@przepompownia
Copy link
Contributor

No description provided.

@mamazu
Copy link
Contributor

mamazu commented Dec 16, 2025

Just as an FYI this might also make sense to run on the main phpactor as well.

@dantleech dantleech merged commit 3f3d9ab into phpactor:master Dec 16, 2025
6 checks passed
@przepompownia przepompownia deleted the refactor-new-initializers branch December 16, 2025 18:19
@przepompownia
Copy link
Contributor Author

przepompownia commented Dec 16, 2025

Just as an FYI this might also make sense to run on the main phpactor as well.

Why not, though that's where my attention is right now.

The previous and next commits used Rector rules. I made this change manually reviewing about 27 occurrences of ?: (meaning it may be incomplete, like those made by Rector, but it's always a step forward), not always in the initializers. In Phpactor, I see 172 results – maybe it's worth writing a modified rule. The original rule (NewInInitializerRector) does not touch the ?: case.

https://github.com/rectorphp/rector/blob/587e77e6aa66c0bd3546f3f49927decc673a1ad3/rules/Php81/Rector/ClassMethod/NewInInitializerRector.php#L105-L111

mamazu added a commit to mamazu/phpactor that referenced this pull request Dec 19, 2025
mamazu added a commit to mamazu/phpactor that referenced this pull request Dec 19, 2025
dantleech pushed a commit to phpactor/phpactor that referenced this pull request Dec 20, 2025
* Use new for defaults in promoted properties

See phpactor/language-server#64

* Fixing stricter types
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants