Skip to content

[CodingStyle] Remove php_sapi_name()/pi() to constant conversion, deprecate FuncCallToConstFetchRector - #8959

Merged
TomasVotruba merged 2 commits into
mainfrom
remove-func-call-to-const-fetch-from-coding-style
Nov 16, 2026
Merged

TomasVotruba merged 2 commits into
mainfrom
remove-func-call-to-const-fetch-from-coding-style

Conversation

@TomasVotruba

@TomasVotruba TomasVotruba commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Both php_sapi_name() and pi() are valid, non-deprecated functions, so there is no need to convert them to PHP_SAPI/M_PI.

  • Removes the FuncCallToConstFetchRector config from CodingStyleLevel. As it was the only configured rule there, CodingStyleLevel::RULES_WITH_CONFIGURATION and the loops reading it are removed too.
  • Deprecates FuncCallToConstFetchRector, as it is no longer used in any set or level.

@TomasVotruba TomasVotruba changed the title [CodingStyle] Remove php_sapi_name()/pi() to constant conversion from coding style set [CodingStyle] Remove php_sapi_name()/pi() to constant conversion, deprecate FuncCallToConstFetchRector Nov 16, 2026
@TomasVotruba
TomasVotruba merged commit 4dc1e5c into main Nov 16, 2026
51 checks passed
@TomasVotruba
TomasVotruba deleted the remove-func-call-to-const-fetch-from-coding-style branch November 16, 2026 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant