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

Deprecate implicitly nullable parameter types #336

Closed
6 tasks done
thekid opened this issue Mar 16, 2024 · 0 comments
Closed
6 tasks done

Deprecate implicitly nullable parameter types #336

thekid opened this issue Mar 16, 2024 · 0 comments
Labels
Milestone

Comments

@thekid
Copy link
Member

thekid commented Mar 16, 2024

See https://wiki.php.net/rfc/deprecate-implicitly-nullable-types

  • Throwable.class.php - E_DEPRECATED: Implicitly marking parameter $cause as nullable is deprecated, the explicit nullable type must be used instead
  • Environment.class.php - E_DEPRECATED: Implicitly marking parameter $platform as nullable is deprecated, the explicit nullable type must be used instead
  • Runtime.class.php - E_DEPRECATED: Implicitly marking parameter $options as nullable is deprecated, the explicit nullable type must be used instead
  • Date.class.php - E_DEPRECATED: Implicitly marking parameter $timezone as nullable is deprecated, the explicit nullable type must be used instead
  • VirtualProperty.class.php - E_DEPRECATED: Implicitly marking parameter $name as nullable is deprecated, the explicit nullable type must be used instead
  • Properties.class.php - E_DEPRECATED: Implicitly marking parameter $filename as nullable is deprecated, the explicit nullable type must be used instead

⚠️ Note: These can not be fixed syntactically in a way that works with all PHP versions PHP 7.0 - 8.4, see xp-framework/rfc#343 (comment). We either need to drop support for at least PHP 7.0 or remove the type hint. Both create BC breaks.

👉 Workaround: For XP 11, we'll go with suppressing these errors via error handler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

1 participant