From 78afa980193b665bb5700a0f0e76d5dc5a246fea Mon Sep 17 00:00:00 2001 From: Rodrigo Primo Date: Wed, 27 May 2026 14:15:23 +0000 Subject: [PATCH] Rewrite Section 4.6 entry in the PER-CS 2.0 to 3.0 migration guide PER-CS 3.0 introduced three rules in Section 4.6: the set-visibility modifier was added to the modifier ordering, all modifier keywords MUST be all lower-case, and the `public` keyword MAY be omitted when using a set-visibility on a public-read property. The current entry does not describe these accurately. This commit rewrites the entry and updates the example. --- migration-3.0.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/migration-3.0.md b/migration-3.0.md index 409a868..7a3dc7b 100644 --- a/migration-3.0.md +++ b/migration-3.0.md @@ -75,7 +75,9 @@ class Foo ## [Section 4.6 - Modifier Keywords](https://www.php-fig.org/per/coding-style/#46-modifier-keywords) -At least one of `readonly`, `get`-visibility, and `set`-visibility must be specified. If at least one is specified, the others may be omitted. +The set-visibility modifier (`public(set)`, `protected(set)`, `private(set)`) was added to the modifier ordering, between the general visibility and the `static` modifier. + +All modifier keywords MUST be all lower-case. The `public` keyword MAY be omitted when using a set-visibility on a public-read property. ```php class Foo @@ -83,9 +85,9 @@ class Foo // These are all acceptable. public private(set) string $one; private(set) string $two; - readonly string $three; // These are not. + PUBLIC PROTECTED(set) string $three; private(set) public string $four; } ```