Skip to content

fix: sort AbstractGeneratorCommand imports in templates with CRLF line endings - #10623

Merged
paulbalandan merged 1 commit into
codeigniter4:4.8from
paulbalandan:crlf-import-sorting-48
Oct 13, 2026
Merged

paulbalandan merged 1 commit into
codeigniter4:4.8from
paulbalandan:crlf-import-sorting-48

Conversation

@paulbalandan

Copy link
Copy Markdown
Member

Description
Follow-up to #10622 for AbstractGeneratorCommand on 4.8. Its buildContent() finds the import block with the same /(?:^use [^;]+;$\n?)+/m pattern as GeneratorTrait. On a template with CRLF line endings, the \r after each ; breaks the match and the imports are left unsorted.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value (without duplication)
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@carson-codeigniter4 carson-codeigniter4 Bot added 4.8 PRs that target the `4.8` branch. bug Verified issues on the current code behavior or pull requests that will fix them labels Oct 12, 2026
@paulbalandan
paulbalandan force-pushed the crlf-import-sorting-48 branch from b4ef0d8 to c59d02c Compare October 13, 2026 05:44
@paulbalandan
paulbalandan merged commit 7b6ae8f into codeigniter4:4.8 Oct 13, 2026
59 checks passed
@paulbalandan
paulbalandan deleted the crlf-import-sorting-48 branch October 13, 2026 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4.8 PRs that target the `4.8` branch. bug Verified issues on the current code behavior or pull requests that will fix them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants