Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions migration-3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,19 @@ 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
{
// 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;
}
```
Expand Down