Skip to content

refactor(php82): use PHP 8.2 idioms - #304

Open
somethingwithproof wants to merge 2 commits into
Cacti:developfrom
somethingwithproof:chore/php82-floor
Open

somethingwithproof wants to merge 2 commits into
Cacti:developfrom
somethingwithproof:chore/php82-floor

Conversation

@somethingwithproof

Copy link
Copy Markdown
Member

Closes #303.

Uses ??=, arrow functions, first-class callables and str_starts_with. No behaviour change.

Commits:

  • refactor(php82): use ??=, str_contains, str_starts_with, arrow functions and first-class callables

Tests

The plugin test suite passes on PHP 8.2, 8.4 and 8.5, php -l is clean on all three, PHPStan reports the same messages as before, and every changed line is covered by tests. Any switch turned into match compares values that are already integers or strings at every caller, so the strict comparison changes nothing.

…ons and first-class callables

Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
Signed-off-by: Thomas Vincent <thomasvincent@gmail.com>
@sonarqubecloud

sonarqubecloud Bot commented Dec 3, 2026

Copy link
Copy Markdown

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.

Use PHP 8.2 idioms

1 participant