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

Checklist to confirm PHP 8.3 compatibility #450

Open
17 of 20 tasks
IMSoP opened this issue Oct 9, 2024 · 0 comments
Open
17 of 20 tasks

Checklist to confirm PHP 8.3 compatibility #450

IMSoP opened this issue Oct 9, 2024 · 0 comments

Comments

@IMSoP
Copy link

IMSoP commented Oct 9, 2024

Since PHP has a policy of avoid Breaking Changes in "minor" releases, the library should in theory be compatible with any PHP 8.x. In practice, each PHP release has a small number of breaking changes, which might require small adjustments. (Note that there will be a larger list of new Warnings and Deprecations, but fixing these is not essential to consider the library compatible.)

For PHP 8.3, the manual lists the following incompatible changes. Once we have checked all of them (plus those for 8.2 on #449), it should be safe to consider the library "PHP 8.3 compatible".

  • Programs that were very close to overflowing the call stack may now throw an Error when using more than zend.max_allowed_stack_size-zend.reserved_stack_size bytes of stack
    • Not something a library / framework needs to worry about
  • Executing proc_get_status() multiple times will now always return the right value on POSIX systems. [...] Executing proc_close() after proc_get_status() will now also return the right exit code.
    • No uses.
  • Zend Max Execution Timers is now enabled by default for ZTS builds on Linux.
  • Uses of traits with static properties will now redeclare static properties inherited from the parent class. This will create a separate static property storage for the current class. This is analogous to adding the static property to the class directly without traits.
    • No traits defined or used.
  • Assigning a negative index $n to an empty array will now make sure that the next index is $n+1 instead of 0.
  • Class constant visibility variance is now correctly checked when inherited from interfaces.
  • WeakMap entries whose key maps to itself (possibly transitively) may now be removed during cycle collection if the key is not reachable except by iterating over the WeakMap (reachability via iteration is considered weak). Previously, such entries would never be automatically removed.
    • No uses
  • The DateTime extension has introduced Date extension specific exceptions and errors under the DateError and DateException hierarchies, instead of warnings and generic exceptions.
  • Calling DOMChildNode::after(), DOMChildNode::before(), DOMChildNode::replaceWith() on a node that has no parent is now a no-op instead of a hierarchy exception, which is the behaviour demanded by the DOM specification.
  • Using the DOMParentNode and DOMChildNode methods without a document now works instead of throwing a DOM_HIERARCHY_REQUEST_ERR DOMException. This is in line with the behaviour demanded by the DOM specification.
  • Calling DOMDocument::createAttributeNS() without specifying a prefix would incorrectly create a default namespace, placing the element inside the namespace instead of the attribute. This bug is now fixed.
  • DOMDocument::createAttributeNS() would previously incorrectly throw a DOM_NAMESPACE_ERRNAMESPACE_ERR DOMException when the prefix was already used for a different URI. It now correctly chooses a different prefix when there's a prefix name conflict.
  • New methods and properties were added to some DOM classes. If a userland class inherits from these classes and declare a method or property with the same name, the declarations must be compatible. Otherwise, a typical compile error about incompatible declarations will be thrown. See the list of new features and new functions for a list of the newly implemented methods and properties.
  • FFI: C functions that have a return type of void now return null instead of returning the following object object(FFI\CData:void) { }
    • No uses
  • The opcache.consistency_checks INI directive was removed.
  • The type of Phar class constants are now declared.
  • The range() function has had various changes (see Changelog)
  • number_format() now handles negative $decimals values by rounding $num to abs($decimals) digits before the decimal point. Previously, negative $decimals values were ignored.
  • The file() flags error check now catches all invalid flags. Notably FILE_APPEND was previously silently accepted.
  • The type of SNMP class constants are now declared.
    • No uses
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

No branches or pull requests

1 participant