Skip to content

Expand Section 4.3 entry in the PER-CS 2.0 to 3.0 migration guide#143

Open
rodrigoprimo wants to merge 1 commit into
php-fig:masterfrom
rodrigoprimo:add-section-4.3-to-migration-guide-3.0
Open

Expand Section 4.3 entry in the PER-CS 2.0 to 3.0 migration guide#143
rodrigoprimo wants to merge 1 commit into
php-fig:masterfrom
rodrigoprimo:add-section-4.3-to-migration-guide-3.0

Conversation

@rodrigoprimo
Copy link
Copy Markdown
Contributor

@rodrigoprimo rodrigoprimo commented May 27, 2026

PER-CS 3.0 extended two rules from Section 4.3 that previously applied only to properties, so they now also apply to constants. Both were introduced by #72:

  • The "no more than one declared per statement" rule now covers both properties and constants. Compare section 4.3 in 2.0 ("There MUST NOT be more than one property declared per statement.") with section 4.3 in 3.0 ("There MUST NOT be more than one property or constant declared per statement.").
  • The "no single underscore prefix" rule now covers both property and constant names. Compare 2.0 ("Property names MUST NOT be prefixed with a single underscore...") with 3.0 ("Property or constant names MUST NOT be prefixed with a single underscore...").

Neither is documented in the migration guide. This PR adds them as a bulleted list to the existing Section 4.3 entry.

PER-CS 3.0 extended two rules from Section 4.3 that previously
applied only to properties so they now also apply to constants:

* The "no more than one declared per statement" rule now covers
  both properties and constants.
* The "no single underscore prefix" rule now covers both property
  and constant names.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant