From 4a04709f20a51350424767ff5ed528d1f0337291 Mon Sep 17 00:00:00 2001 From: Rodrigo Primo Date: Wed, 27 May 2026 13:29:14 +0000 Subject: [PATCH] Add Section 8 to the PER-CS 1.0 to 2.0 migration guide PER-CS 2.0 added a new normative rule to Section 8 requiring that the `()` after `class` MUST be omitted when an anonymous class has no arguments. The rule is not currently documented in the migration guide. This commit adds the missing entry. --- migration-2.0.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/migration-2.0.md b/migration-2.0.md index 2b14f0d..282540f 100644 --- a/migration-2.0.md +++ b/migration-2.0.md @@ -158,6 +158,19 @@ $func = fn( $result = $collection->reduce(fn(int $x, int $y): int => $x + $y, 0); ``` +## [Section 8 - Anonymous Classes](https://www.php-fig.org/per/coding-style/#8-anonymous-classes) + +A new rule was added stating that if an anonymous class has no arguments, the `()` after `class` MUST be omitted. + +```php +