Rewrite Section 4.6 entry in the PER-CS 2.0 to 3.0 migration guide#145
Open
rodrigoprimo wants to merge 1 commit into
Open
Rewrite Section 4.6 entry in the PER-CS 2.0 to 3.0 migration guide#145rodrigoprimo wants to merge 1 commit into
rodrigoprimo wants to merge 1 commit into
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The current Section 4.6 entry in
migration-3.0.mdsays:As far as I can see, this sentence does not match what actually changed in 3.0, and the related
readonly string $three;is not related to the changes introduced in 3.0 and is incorrect per the spec, as it is missing the visibility modifier.What I believe did actually change in Section 4.6 in 3.0, all introduced by #99:
public(set),protected(set),private(set)) was added to the modifier ordering, between general visibility andstatic. Compare the 2.0 modifier order (no set-visibility) with the 3.0 modifier order.publickeyword MAY be omitted when using a set-visibility on a public-read property. New in 3.0 (refined within Document how to use aviz #99 by commit5724087).This PR proposes rewriting the entry to cover those three rules and updating the example accordingly:
readonly string $three;line is removed, since (as discussed above) it appears to be inconsistent with Section 4.3.PUBLIC PROTECTED(set) string $three;is added to illustrate the new lower-case requirement.Happy to revise or drop any of this if I'm misreading the spec.