Skip to content

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Apr 26, 2025

Description

This commit introduces a new Standards::prepareInstalledStandardsForDisplay() method. This new method only prepares the "list" into displayable phrases. It doesn't include output formatting with new lines, that's up to the actual display.

This new method allows for getting rid of some output buffering calls in select places.

Includes improving the readability of the "coding standard is not installed" error.
Includes deprecating the Standards::printInstalledStandards() method, which is now no longer used by PHPCS itself.

Suggested changelog entry

Deprecated:

  • Standards::printInstalledStandards(). Use echo Standards::prepareInstalledStandardsForDisplay() instead.

Additional context

This is the readability improvement I mention above:
image

This commit introduces a new `Standards::prepareInstalledStandardsForDisplay()` method.
This new method only prepares the "list" into displayable phrases. It doesn't include output formatting with new lines, that's up to the actual display.

This new method allows for getting rid of some output buffering calls in select places.

Includes improving the readability of the "coding standard is not installed" error.
Includes deprecating the `Standards::printInstalledStandards()` method, which is now no longer used by PHPCS itself.
@jrfnl
Copy link
Member Author

jrfnl commented Apr 29, 2025

Rebased without changes. Merging once the build has passed.

@jrfnl jrfnl force-pushed the phpcs-4.0/feature/standards-allow-for-removing-more-output-buffering branch from 8f590a7 to 4b912a7 Compare April 29, 2025 13:27
@jrfnl jrfnl merged commit ad85819 into 4.x Apr 29, 2025
62 checks passed
@jrfnl jrfnl deleted the phpcs-4.0/feature/standards-allow-for-removing-more-output-buffering branch April 29, 2025 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants