Skip to content

Clarify the scope of this PER in the meta document #63

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

Closed
wants to merge 6 commits into from

Conversation

lpd-au
Copy link
Contributor

@lpd-au lpd-au commented Feb 27, 2023

What

This pull request:

  • Clarifies that this PER obsoletes PSR-12 but extends PSR-1.
  • Adds the goal of incorporating PSR-1 requirements related to style.
  • Allows for a potential future change to this PER to specify PascalCase class constants.
  • Removes vague and meaningless language from non-goals sub-section.

Why

Excluding 1.0 as a clone of PSR-12, this is effectively the first substantial release of any PER. I feel it is important we're upfront and properly describe the scope of this PER, as was discussed even prior to the 1.0 vote. I do not want it perceived as scope creep to edit this section in a later version.

This change would explicitly allow us to begin adding PSR-1 style rules to this PER immediately in 2.0.x and more clearly advise readers where else to look (ie PSR-1) and not look (ie PSR-12) if they can't yet find a style rule relevant to their code. Currently, the scope section says the spec will only contain additions and clarifications to PSR-12. Arguably you could consider repeating PSR-1 rules as a clarification to PSR-12 but this new wording is unambiguous.

We have previously discussed the potential to recommand PascalCase class constants in this PER. This change is a bit of a roundabout way of saying if we ever do, we'd do that by issuing an errata to PSR-1 optionally allowing PascalCase class constants, then edit this PSR to recommend/require them instead of UPPER_CASE. It also attempts to maintain the non-goal of revisiting PSR-1/PSR-12 decisions without good reason, while allowing us to when such good reason exists. I'm not sure how successful I was in communicating either of these things, so your feedback is most welcome.

* Add goal of incorporating PSR-1 style guidelines
* Allow for potential future change to PSR-1 to specify PascalCase class constants
* Remove vague and meaningless language from non-goals sub-section
Copy link
Collaborator

@Crell Crell left a comment

Choose a reason for hiding this comment

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

Proposed rewording to make the intent, I think, clearer.

Comment on lines +64 to +65
It is not the intention of this PER to substantially or arbitrarily alter coding style guidelines found in PSR-1 and PSR-12.
It will not change anything stipulated in PSR-1 that concerns technical interoperability or runtime behaviour.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
It is not the intention of this PER to substantially or arbitrarily alter coding style guidelines found in PSR-1 and PSR-12.
It will not change anything stipulated in PSR-1 that concerns technical interoperability or runtime behaviour.
* It is not the intention of this PER to arbitrarily alter coding style guidelines found in PSR-1 and PSR-12.
* It is not the intention of this PER to change any elements of PSR-1 that concern technical interoperability or runtime behavior.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I perceive this suggestion as less firm on not changing runtime elements of PSR-1 and not making large changes (measured by number of rules touched), only a single issue we've identified as possibly in scope. I'm concerned that may make it less pallatable to anyone on the fence about this change. Wdyt?

lpd-au and others added 2 commits March 1, 2023 01:53
Co-authored-by: Larry Garfield <larry@garfieldtech.com>
@KorvinSzanto
Copy link
Contributor

This was superseded by #64. I'd guess a lot of these changes will be obsolete once we get past 2.0.0 so I'm going to close this for now.

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.

5 participants