|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #75682 Undocumented PHP 7.2 BC break
Submitted: 2017-12-14 05:30 UTC Modified: 2017-12-14 22:58 UTC
Avg. Score:4.0 ± 1.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: glenn at codeacious dot com Assigned:
Status: Verified Package: Documentation problem
PHP Version: 7.2.0 OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2017-12-14 05:30 UTC] glenn at codeacious dot com
From manual page:
PHP 7.2 seems to be applying a stricter comparison between the parameter types of an overridden method and its superclass method signature.

This is causing errors like this when they didn't occur under 7.1:

  PHP Fatal error: Declaration of SubClass::foo() must be compatible with SuperClass::foo()

Examples are being discussed here:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2017-12-14 22:58 UTC]
-Status: Open +Status: Verified
 [2017-12-14 22:58 UTC]
This behavioral change has been introduced in commit b67eb34[1] as
fix for bug #73987.  The bugfix targeted PHP 7.1.2 and 7.2.0, but
has been reverted in the PHP-7.1 branch[2] before PHP 7.1.2 has
been released.  I suppose this has been done for BC reasons, and
as such it would need an entry in UPGRADING and consequently in
the migration guide.

[1] <;a=commit;h=b67eb3440bb244adf6957bf2c68aeeaa6efc8c8d>
[2] <;a=commit;h=49e9ae1fc1b5a4b0404135d1827ed64a1481d623>
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Feb 26 19:01:29 2024 UTC