Enforce uses sorting in CAS Server project

Created on 10 June 2025, 18 days ago

Problem/Motivation

The uses sorting sniff has been reverted out of coder by default, but it can still be optionally enabled.
📌 Revert case sensitive use-statement sniff Active

Use ordering enforcement is important on a project with disparate contributors to avoid any automated tools or IDE ping-ponging back and forth about the ordering. With a standard enforced on the MR, that will be the standard that code must meet.

Not yet a coding standard, but in the works, pending phpstorm fixing their auto-uses.
📌 Coding standards for "use" statements RTBC

Without adding the sniff, ordering is not checked or enforced.

Steps to reproduce

Add a use in the wrong order and commit it. It will not be picked up by phpcs.

Proposed resolution

Enforce a known ordering during testing.

Remaining tasks

Add phpcs.xml with expected standards.

User interface changes

n/a

API changes

n/a

Data model changes

n/a

Release notes snippet

NB: Will not trigger a release on its own.

  • @todo
📌 Task
Status

Needs work

Version

3.0

Component

Miscellaneous

Created by

🇦🇺Australia elc

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024