Skip to content

Requirements: document iconv as a recommended PHP extension#91

Merged
jrfnl merged 1 commit into
mainfrom
add-iconv-recommended-extension
Mar 4, 2026
Merged

Requirements: document iconv as a recommended PHP extension#91
jrfnl merged 1 commit into
mainfrom
add-iconv-recommended-extension

Conversation

@rodrigoprimo

Copy link
Copy Markdown
Contributor

Description

As suggested in squizlabs/PHP_CodeSniffer#3923 (comment), this PR adds iconv to the Requirements wiki page as a strongly recommended PHP extension. Without it, PHP_CodeSniffer falls back to byte-based length calculations, which can cause sniffs like Generic.Files.LineLength to report incorrect results for files containing multibyte characters.

Related issues/external references

Discussed in squizlabs/PHP_CodeSniffer#3923

PR checklist

  • I have checked there is no other PR open for the same change.
  • I have read the Contribution Guidelines.
  • I grant the project the right to include my changes under the BSD-3-Clause license (and I have the right to grant these rights).
  • I have verified that my changes comply with the projects coding standards.
  • [When adding a new Wiki page] I have added the new page to the _Sidebar.md file.
  • [When adding/updating output examples] I have verified via the GitHub Actions artifact that the pre-processing handles the command correctly.

@github-actions

github-actions Bot commented Mar 4, 2026

Copy link
Copy Markdown

=== This is an auto-generated comment ===

Thank you for your PR.
A dry-run has been executed on your PR, executing all markdown pre-processing for the wiki files.

Please review the resulting final markdown files via the created artifact.
This is especially important when adding new pages or updating auto-generated output blocks.

N.B.: the above link will automatically be updated when this PR is updated.

@jrfnl jrfnl left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @rodrigoprimo !

Potential follow-up:
Would it be an idea to add a suggest section to the composer.json file of the PHPCS package with this recommendation too ?
https://getcomposer.org/doc/04-schema.md#suggest

@jrfnl jrfnl merged commit e555133 into main Mar 4, 2026
16 checks passed
@jrfnl jrfnl deleted the add-iconv-recommended-extension branch March 4, 2026 19:57
@jrfnl

jrfnl commented Mar 4, 2026

Copy link
Copy Markdown
Member

Oh, just thinking as another potential follow-up: may be the pcntl extension should also be added to the "recommended" extensions ? (without this extension, parallel processing doesn't work).

@jrfnl

jrfnl commented Mar 4, 2026

Copy link
Copy Markdown
Member

Oh and another one as potential follow up related to: PHPCSStandards/PHP_CodeSniffer#294 - have a > [!WARNING] to point out that the gRPC extension may hang PHPCS in combination with parallel processing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants