Add PHP-CS-Fixer deprecation awareness and type annotation improvements#23
Add PHP-CS-Fixer deprecation awareness and type annotation improvements#23
Conversation
- 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
There was a problem hiding this comment.
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.
…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)
|
@gemini-code-assist please review |
There was a problem hiding this comment.
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.
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>
Signed-off-by: Sebastian Mendel <github@sebastianmendel.de>
Summary
references/php-cs-fixer-deprecations.mddocumenting all deprecated rule set aliases in PHP-CS-Fixer 3.90+ (e.g.,@PER-CS1.0->@PER-CS1x0,@PHP80Migration->@PHP8x0Migration) and the deprecatedfunction_typehint_spacerulelist<float>vsarray<string, float>guidance toreferences/type-safety.mdfor embedding/vector type annotations (PHPStan level 10 distinction)references/static-analysis-tools.mdPHP-CS-Fixer sectionTest plan
references/php-cs-fixer-deprecations.mdrenders correctly and all alias mappings are accuratetype-safety.mdembedding section code examples are syntactically correctstatic-analysis-tools.mddeprecation check command is correct