Skip to content

Drop support for PHP < 7.2 - step 2 (drop polyfills and work-arounds) #973

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 4 commits into from
Apr 14, 2025

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Apr 14, 2025

Description

Tokenizer: remove backfill code for PHP < 7.2

Includes removing some related tests which have now become redundant.

MessageCollector: remove polyfill for PHP < 7.2

Generic/DisallowAlternativePHPTags: remove support for PHP < 7.2

The ASP and script style open tags are only recognized as T_OPEN_TAG/T_OPEN_TAG_WITH_ECHO in PHP < 7.0.

This means that the sniff can now be simplified to only look for T_INLINE_HTML and that the tests related to PHP < 7.0 can also be removed.

Tests: remove some PHP < 7.2 specific code

Suggested changelog entry

N/A

Related issues/external references

Related to #972

gsherwood and others added 4 commits April 14, 2025 14:31
Includes removing some related tests which have now become redundant.

Co-authored-by: jrfnl <jrfnl@users.noreply.github.com>
The ASP and script style open tags are only recognized as `T_OPEN_TAG`/`T_OPEN_TAG_WITH_ECHO` in PHP < 7.0.

This means that the sniff can now be simplified to only look for `T_INLINE_HTML` and that the tests related to PHP < 7.0 can also be removed.
@jrfnl jrfnl added this to the 4.0.0 milestone Apr 14, 2025
@jrfnl jrfnl merged commit 2036590 into 4.x Apr 14, 2025
61 of 62 checks passed
@jrfnl jrfnl deleted the phpcs-4.0/feature/drop-support-php-lt-7.2-step-2 branch April 14, 2025 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants