Skip to content

3.0 changelog #116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

3.0 changelog #116

wants to merge 2 commits into from

Conversation

Crell
Copy link
Collaborator

@Crell Crell commented May 31, 2025

The links point to the live site, like the 2.0 changelog does, so not all of them will work yet. They should once it's tagged and published, though.

@@ -0,0 +1,156 @@
# Migrating from PER-CS v1.0 (PSR-12) to PER-CS v2.0 ###
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Migrating from PER-CS v1.0 (PSR-12) to PER-CS v2.0 ###
# Migrating from PER-CS v2.0 to PER-CS v3.0 ###

Formatting conventions are now provided for compound types (those that include union or intersection type declarations).

* The `|` and `&` symbols and parentheses MUST NOT have leading or trailing spaces.
* If a type declaration is long enough to split to multiple lines, each ANDed block must be on one line, and each ORed block on its own line.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* If a type declaration is long enough to split to multiple lines, each ANDed block must be on one line, and each ORed block on its own line.
* If a type declaration is long enough to split to multiple lines, each block must be on one line, and each block on its own line.


## [Section 2.7 - Naming](https://www.php-fig.org/per/coding-style/#27-naming)

PER-CS now recommends following the same naming conventions as PHP Internals for abbreviations and acronyms. Specifically, only uppercase the first character of the acronym: `XmlFormatter`, not `XMLFormatter`.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
PER-CS now recommends following the same naming conventions as PHP Internals for abbreviations and acronyms. Specifically, only uppercase the first character of the acronym: `XmlFormatter`, not `XMLFormatter`.
PER-CS now recommends following the same naming conventions as PHP Internals for abbreviations and acronyms. Specifically, only uppercase the first character of the acronym: `XmlFormatter`, not `XMLFormatter`.


## [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.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
At least one of `readonly`, `get`-visibility, and `set`-visibility must be specified. If at least one is specified, the others may be omitted.
At least one of `readonly`, `get`-visibility, and `set`-visibility must be specified. If at least one is specified, the others may be omitted.


Formatting guidelines for property hooks are now included.

When using property hooks on a constructor promoted property, only single-line set hooks are allowed. Anything more complicated MUST be defined separately from the constructor.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
When using property hooks on a constructor promoted property, only single-line set hooks are allowed. Anything more complicated MUST be defined separately from the constructor.
When using property hooks on a constructor promoted property, only single-line set hooks are allowed. Anything more complicated MUST be defined separately from the constructor.


## [Section 6.4 - Operator placement](https://www.php-fig.org/per/coding-style/#64-operator-placement)

When breaking a series of chained operations across multiple lines, the operator MUST be at the beginning of each line, not the end of each line, and all lines but the first MUST be indented. Examples include `??` and ternary conditionals.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
When breaking a series of chained operations across multiple lines, the operator MUST be at the beginning of each line, not the end of each line, and all lines but the first MUST be indented. Examples include `??` and ternary conditionals.
When breaking a series of chained operations across multiple lines, the operator MUST be at the beginning of each line, not the end of each line, and all lines but the first MUST be indented. Examples include `??` and ternary conditionals.

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.

4 participants