Skip to content

Conversation

@jonnyeom
Copy link
Collaborator

@jonnyeom jonnyeom commented Feb 20, 2023

Update General standards + better php 8 support

Here are the changes in this MR

Updated

  • Standard: Group php,psalm,phpstan param and return annotations (SlevomatCodingStandard.Commenting.DocCommentSpacing)
  • Standard: Enforce property spacing for promoted properties (SlevomatCodingStandard.Classes.PropertyDeclaration)
  • Standard: Add compact to ForbiddenFunctions (Generic.PHP.ForbiddenFunctions)
  • Standard: Enforce explicit assertions for advanced string types and int ranges (SlevomatCodingStandard.PHP.RequireExplicitAssertion)
  • Makefile: Add shell command to more easily update tests

Added

  • SlevomatCodingStandard.Classes.BackedEnumTypeSpacing
  • SlevomatCodingStandard.Functions.RequireTrailingCommaInCall
  • SlevomatCodingStandard.Functions.DisallowTrailingCommaInCall (for single line calls)
  • SlevomatCodingStandard.Functions.RequireTrailingCommaInClosureUse
  • SlevomatCodingStandard.Functions.DisallowTrailingCommaInClosureUse (for single line calls)
  • SlevomatCodingStandard.Functions.DisallowTrailingCommaInDeclaration (for single line calls)
  • SlevomatCodingStandard.Attributes.DisallowAttributesJoining
  • SlevomatCodingStandard.Attributes.DisallowMultipleAttributesPerLine
  • SlevomatCodingStandard.Attributes.AttributeAndTargetSpacing
  • SlevomatCodingStandard.Attributes.RequireAttributeAfterDocComment

@jonnyeom jonnyeom changed the base branch from master to 4.0.x February 20, 2023 16:16
@jonnyeom jonnyeom requested a review from colinodell February 20, 2023 17:07
@jonnyeom jonnyeom self-assigned this Feb 20, 2023
@jonnyeom
Copy link
Collaborator Author

Id like to update/add these rules. Mostly very small ones but enforcing consistency.
@colinodell Any worries here?

@jonnyeom jonnyeom marked this pull request as ready for review February 20, 2023 17:08
@jonnyeom jonnyeom force-pushed the feature/updating-standards branch from 2714bf2 to 6294112 Compare February 20, 2023 22:02
@jonnyeom
Copy link
Collaborator Author

I wont be making a release just yet but merging into 4.0.x

@jonnyeom jonnyeom merged commit d5edcdd into 4.0.x Feb 20, 2023
@jonnyeom jonnyeom deleted the feature/updating-standards branch June 7, 2023 17:58
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.

2 participants