rfc:final_by_default_anonymous_classes
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision |
rfc:final_by_default_anonymous_classes [2024/01/15 10:35] – danog | rfc:final_by_default_anonymous_classes [2024/02/06 19:51] (current) – Move to declined ilutov |
---|
* Date: 2023-12-23 | * Date: 2023-12-23 |
* Author: Daniil Gentili <daniil@daniil.it> | * Author: Daniil Gentili <daniil@daniil.it> |
* Status: Voting | * Status: Declined |
| |
===== Introduction ===== | ===== Introduction ===== |
Rationale regarding ''open'': | Rationale regarding ''open'': |
| |
On one hand, looking at code like ''new class {}'', you would assume that since the class apparently has no name, it should not be impossible to extend it, but on the other hand, there are valid usecases for extending even anonymous classes (comments in the PR (https://github.com/php/php-src/pull/11126 referenced proxying), I can think of phpunit mocking to a much, much lesser extent given that you should realistically (hopefully) never have to mock an anonymous class that does not already implement an interface), and completely precluding the possibility of extending a class that | On one hand, looking at code like ''new class {}'', you would assume that since the class apparently has no name, it should not be impossible to extend it, but on the other hand, there are valid usecases for extending even anonymous classes (comments in the PR (https://github.com/php/php-src/pull/11126 referenced proxying), and I can also think of phpunit mocking: completely precluding the possibility of mocking a class that |
| |
- Has a name (even if it's not immediately obvious) | - Has a name (even if it's not immediately obvious) |
2/3 required to accept. | 2/3 required to accept. |
| |
<doodle title="Make final anonymous classes final by default?" auth="danog" voteType="single" closed="false" closeon="2024-01-30T00:00:00Z"> | <doodle title="Make final anonymous classes final by default?" auth="danog" voteType="single" closed="true" closeon="2024-01-30T00:00:00Z"> |
* Yes | * Yes |
* No | * No |
2/3 required to accept. | 2/3 required to accept. |
| |
<doodle title="Add an optional open keyword for anonymous classes?" auth="danog" voteType="single" closed="false" closeon="2024-01-30T00:00:00Z"> | <doodle title="Add an optional open keyword for anonymous classes?" auth="danog" voteType="single" closed="true" closeon="2024-01-30T00:00:00Z"> |
* Yes | * Yes |
* No | * No |
rfc/final_by_default_anonymous_classes.1705314946.txt.gz · Last modified: 2024/01/15 10:35 by danog