Skip to content

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

Merged
TomasVotruba merged 1 commit into
mainfrom
tv-polyfills-register
Jun 20, 2024
Merged

TomasVotruba merged 1 commit into
mainfrom
tv-polyfills-register

Conversation

@TomasVotruba

@TomasVotruba TomasVotruba commented Jun 20, 2024 •

Copy link
Copy Markdown
Member

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
Copy Markdown
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
@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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 👍

@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been automatically locked because it has been closed for 150 days. Please open a new PR if you want to continue the work.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Oct 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants