8000 [DX] Enable polyfill rules on withPhpSets() config by TomasVotruba · Pull Request #5981 · rectorphp/rector-src · GitHub
[go: up one dir, main page]

Skip to content

[DX] Enable polyfill rules on withPhpSets() config #5981

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

Merged
merged 1 commit into from
Jun 20, 2024

Conversation

TomasVotruba
Copy link
Member
@TomasVotruba TomasVotruba commented Jun 20, 2024

Polyfill rules are now enabled, once withPhpSets() is in the place. To pick up used packages in composer.json 👍

Follow up to #5388

StrEndsWithRector::class,
StrContainsRector::class,
]);
};
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If anyone notices this set should be more complete, let us know 😉

@TomasVotruba TomasVotruba merged commit e007104 into main Jun 20, 2024
39 checks passed
@TomasVotruba TomasVotruba deleted the tv-polyfills-register branch June 20, 2024 02:49
Comment on lines +460 to +461
// make use of polyfill packages in composer.json
$this->sets[] = SetList::PHP_POLYFILLS;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should be enabled manually via passed config, for example, we use withPhpSets(php53: true), it doesn't make sense to have str_starts_with() change? That will make too much change when it on step by step migration.

I think user needs to enable it by, eg: withPhpSets(php53: true, polyfill: true)

wdyt?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think add new method: withPhpPolyfill() can be the way to go

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, thanks 👍

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.

2 participants
0