Skip to content

Add PHP-CS-Fixer deprecation awareness and type annotation improvements#23

Merged
CybotTM merged 4 commits intomainfrom
feat/phpcsfixer-deprecations-and-types
Mar 28, 2026
Merged

Add PHP-CS-Fixer deprecation awareness and type annotation improvements#23
CybotTM merged 4 commits intomainfrom
feat/phpcsfixer-deprecations-and-types

Conversation

@CybotTM
Copy link
Copy Markdown
Member

@CybotTM CybotTM commented Mar 28, 2026

Summary

  • Add references/php-cs-fixer-deprecations.md documenting all deprecated rule set aliases in PHP-CS-Fixer 3.90+ (e.g., @PER-CS1.0 -> @PER-CS1x0, @PHP80Migration -> @PHP8x0Migration) and the deprecated function_typehint_space rule
  • Add list<float> vs array<string, float> guidance to references/type-safety.md for embedding/vector type annotations (PHPStan level 10 distinction)
  • Update SKILL.md with a new "PHP-CS-Fixer Deprecations" reference section and migration checklist item
  • Add deprecation detection step to references/static-analysis-tools.md PHP-CS-Fixer section

Test plan

  • Verify references/php-cs-fixer-deprecations.md renders correctly and all alias mappings are accurate
  • Verify type-safety.md embedding section code examples are syntactically correct
  • Verify SKILL.md links to the new reference file
  • Verify static-analysis-tools.md deprecation check command is correct

- Add references/php-cs-fixer-deprecations.md with deprecated rule set
  alias mappings for PHP-CS-Fixer 3.90+ (PER-CS, PHP8xMigration, etc.)
- Add embedding/vector type annotation guidance to type-safety.md
  explaining list<float> vs array<string, float> for JSON arrays
- Update SKILL.md with deprecation reference section and checklist item
- Add deprecation check note to static-analysis-tools.md PHP-CS-Fixer section
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces documentation for PHP-CS-Fixer deprecations, including a new reference guide for rule set aliases and updates to the migration checklist. It also adds a section on type safety for embedding vectors. Feedback focuses on correcting factual errors regarding PHP-CS-Fixer and PER-CS version numbers, ensuring consistent use of the vendor binary path, and preferring runtime assertions over PHPDoc annotations for type narrowing.

Comment thread skills/php-modernization/references/php-cs-fixer-deprecations.md Outdated
Comment thread skills/php-modernization/SKILL.md Outdated
Comment thread skills/php-modernization/references/php-cs-fixer-deprecations.md Outdated
Comment thread skills/php-modernization/references/php-cs-fixer-deprecations.md Outdated
Comment thread skills/php-modernization/references/static-analysis-tools.md Outdated
Comment thread skills/php-modernization/references/type-safety.md
…ths, trim SKILL.md

- Fix PHP-CS-Fixer version from 3.90+ to 3.50.0+ (deprecations were introduced in 3.50.0)
- Remove non-existent @PER-CS3.0 entry from deprecation table
- Correct PER-CS alias: resolves to PER-CS 2.0 (@PER-CS2x0) as of 3.54.0, not 3.0
- Use vendor/bin/php-cs-fixer instead of bare php-cs-fixer in all commands
- Replace @var annotations with runtime assertions (array_is_list) in type-safety docs
- Condense SKILL.md reference section to table format (539 -> 403 words, under 500 limit)
@CybotTM CybotTM enabled auto-merge March 28, 2026 07:39
@CybotTM
Copy link
Copy Markdown
Member Author

CybotTM commented Mar 28, 2026

@gemini-code-assist please review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request modernizes the PHP documentation by converting reference links into a table, adding guidance on handling PHP-CS-Fixer deprecations, and introducing best practices for typing embedding vectors as lists for PHPStan level 10. Feedback includes improving the formatting of shell commands in the main skill file, simplifying code examples for vector type annotations, and refining the technical description of JSON arrays to emphasize their nature as ordered sequences.

Comment thread skills/php-modernization/SKILL.md
Comment thread skills/php-modernization/references/type-safety.md
Comment thread skills/php-modernization/references/type-safety.md
Bootstrap: this PR needs one-time manual approval since the
workflow isn't on the base branch yet. All subsequent PRs will
be auto-approved for repo collaborators.

Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
Comment thread .github/workflows/pr-quality.yml Fixed
Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
@CybotTM CybotTM merged commit a59beda into main Mar 28, 2026
5 checks passed
@CybotTM CybotTM deleted the feat/phpcsfixer-deprecations-and-types branch March 28, 2026 08:28
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