PHP-CS-Fixer icon indicating copy to clipboard operation
PHP-CS-Fixer copied to clipboard

feat: allowUnsupportedPhpVersion

Open dkarlovi opened this issue 6 months ago • 3 comments

Deprecates PHP_CS_FIXER_IGNORE_ENV

See #8719 and discussion in https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/pull/8300#issuecomment-2865855890 and onwards.

dkarlovi avatar Jun 13 '25 08:06 dkarlovi

Coverage Status

coverage: 94.829% (-0.04%) from 94.87% when pulling f9db1d7b245722fc8c228355f5fe44cb9e526fae on sigwinhq:feat/version-opt-in into a32defda77a0d406b35a662cef1ada63a5947c3b on PHP-CS-Fixer:master.

coveralls avatar Jun 13 '25 09:06 coveralls

@Wirone are these tests which are failing flaky or is it just me? The one on the Mac is timing out, should be marked as @large for PHPUnit, or?

dkarlovi avatar Jun 13 '25 12:06 dkarlovi

I appreciate the effort to make the proposal 🙇🏻

In current state of PR, i consider it blocked by this

~~I don't understand, you've closed the PR without any discussion?~~

NVM you've closed the discussion, mobile GH is weird.

dkarlovi avatar Jun 13 '25 17:06 dkarlovi

@keradus

good work. thank you

Thank you for the reviews and patience. :beers:

dkarlovi avatar Jun 26 '25 15:06 dkarlovi

Thanks for this PR, don't take me wrong, I love this project ❤️ , but what's the point of setting this value if PHP CS Fixer still insists on showing this big warnings at the top?

PHP CS Fixer currently supports PHP syntax only up to PHP 8.3, current PHP version: 8.4.8. Execution may be unstable. You may experience code modified in a wrong way. Please report such cases at https://github.com/PHP-CS-Fixer/PHP-CS-Fixer. Remove Config::setUnsupportedPhpVersionAllowed(true) to allow executions only on supported PHP versions.

I know. I set the config value. I know what I'm doing and it works perfectly fine. There is no need to warn me all the time 😁

Can we get rid of this when this is set explicitly?

It feels similar to the Parallel feature warning I have been seeing ever since turning it on:

Parallel runner is an experimental feature and may be unstable, use it at your own risk. Feedback highly appreciated!

It just works, amazingly ⚡

ruudk avatar Jul 01 '25 08:07 ruudk

it's experimental and risky execution, i like to keep the warning to explicitly warn the users. imagine big corporate project and this config hidden somewhere in one of config installed from company-level config repo.

(for Parallel execution, i leave it up for @Wirone to decide when it's not experimental anymore. I think it works mostly smooth, yet we have some tests problems)

keradus avatar Jul 01 '25 10:07 keradus

From my POV, the config is now propagated via the config file and that's all I care about, you can opt-in per project even when using shared infrastructure code (which we do) and it works.

The message being there doesn't bother me just like the rest of the header, it's in CI output logs which I don't read, and even if I did, it's just I line you skip like any other. If you or somebody else feels you should be able to suppress the message, feel free to open a PR.

dkarlovi avatar Jul 01 '25 10:07 dkarlovi