Skip to content
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

BUGFIX: Drop use of E_STRICT to fix PHP 8.4 deprecation #3437

Merged
merged 1 commit into from
Jan 27, 2025

Conversation

kdambekalns
Copy link
Member

@kdambekalns kdambekalns commented Jan 22, 2025

The use of E_STRICT is deprecated as of PHP 8.4, so this fixes deprecation warnings. Furthermore, the constant is no longer useful…

In PHP 5.4, the functionality of E_STRICT was incorporated into E_ALL, meaning strict standards notices are included in the E_ALL error level. As a result, there is no need to use E_STRICT separately starting with PHP 5.4. This change is documented in the PHP manual under the migration guide for PHP 7.0, which states:

All of the E_STRICT notices have been reclassified to other levels.
The E_STRICT constant is retained, so calls like
error_reporting(E_ALL|E_STRICT) will not cause an error.

(see https://www.php.net/manual/en/migration70.incompatible)

Checklist

  • Code follows the PSR-2 coding style
  • Tests have been created, run and adjusted as needed
  • The PR is created against the lowest maintained branch
  • Reviewer - PR Title is brief but complete and starts with FEATURE|TASK|BUGFIX
  • Reviewer - The first section explains the change briefly for change-logs
  • Reviewer - Breaking Changes are marked with !!! and have upgrade-instructions

The use of `E_STRICT` is deprecated as of PHP 8.4, so this fixes
deprecation warnings. Furthermore, the constant is no longer useful…

In PHP 5.4, the functionality of `E_STRICT` was incorporated into
`E_ALL`, meaning strict standards notices are included in the `E_ALL`
error level. As a result, there is no need to use `E_STRICT` separately
starting with PHP 5.4. This change is documented in the PHP manual
under the migration guide for PHP 7.0, which states:

> All of the E_STRICT notices have been reclassified to other levels.
> The E_STRICT constant is retained, so calls like
> `error_reporting(E_ALL|E_STRICT)` will not cause an error.

(see https://www.php.net/manual/en/migration70.incompatible)
Copy link
Contributor

@dlubitz dlubitz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good by reading.

@kdambekalns kdambekalns merged commit 4175051 into neos:8.3 Jan 27, 2025
12 checks passed
@kdambekalns kdambekalns deleted the bugfix/drop-e-strict-constant branch January 27, 2025 08:01
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