[php-src] PR #21325: Prevent instantiation and cloning of __PHP_Incomplete_Class
| From: | jordikroon | Date: | Sun, 01 Mar 2026 19:02:20 +0000 |
| Subject: | [php-src] PR #21325: Prevent instantiation and cloning of __PHP_Incomplete_Class | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-35062@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/21325
Author: jordikroon
Though technically this could cause a BC break I don't think this is a real dealbreaker since
by logic it should not be possible.
Extending or using newInstanceWithoutConstructor already wasn't possible. This PR extends that
by disallowing calling the constructor or cloning
__PHP_Incomplete_Class.
If someone thinks this BC will cause real problems. I am okay with creating an RFC instead backing
this PR.
There were a few tests relying on new __PHP_Incomplete_Class, those have been updated
to reflect the change.