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

[Downgrade PHP 8.1] Add DowngradeNewInInitializerRector #1275

Merged
merged 2 commits into from
Nov 19, 2021
Merged

[Downgrade PHP 8.1] Add DowngradeNewInInitializerRector #1275

merged 2 commits into from
Nov 19, 2021

Conversation

villfa
Copy link
Contributor

@villfa villfa commented Nov 19, 2021

No description provided.

@samsonasik
Copy link
Member

@TomasVotruba the upgrade rule https://github.com/rectorphp/rector-src/blob/main/rules/Php81/Rector/ClassMethod/NewInInitializerRector.php doesn't provide property promotion, in against the downgrade of this PR.

Ref fixture:

private Logger $logger;
public function __construct(Logger $logger = new NullLogger)

is that on purpose?

@TomasVotruba
Copy link
Member

TomasVotruba commented Nov 19, 2021

is that on purpose?

No, it's a very fresh rule, so probably not covered yet. Could you handle it?

@samsonasik
Copy link
Member

I will try.

@villfa villfa marked this pull request as draft November 19, 2021 12:22
@villfa
Copy link
Contributor Author

villfa commented Nov 19, 2021

I've converted this PR to draft because it only covers constructors while by reading the RFC again it appears it concerns any method or function.

@TomasVotruba
Copy link
Member

Thanks 👍

It seems ready now, doesn't it?

@villfa
Copy link
Contributor Author

villfa commented Nov 19, 2021

It is but I wanted to apply CS before review.

@villfa villfa marked this pull request as ready for review November 19, 2021 19:59
@TomasVotruba
Copy link
Member

Thank you 👍

@TomasVotruba TomasVotruba merged commit fa20738 into rectorphp:main Nov 19, 2021
@villfa villfa deleted the feat/downgrade_new_in_initializers branch November 19, 2021 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants