Skip to content

[license] Preserve literal author emails (#179)#226

Merged
coisa merged 6 commits intomainfrom
codex/179-license-email-entities
Apr 24, 2026
Merged

[license] Preserve literal author emails (#179)#226
coisa merged 6 commits intomainfrom
codex/179-license-email-entities

Conversation

@coisa
Copy link
Copy Markdown
Contributor

@coisa coisa commented Apr 24, 2026

Related Issue

Closes #179

Motivation / Context

  • LICENSE generation was rendering maintainer email angle brackets as HTML entities when Twig autoescaping was active.
  • The composer-plugin consumer fixture can now have its own dependencies installed, which exposed nested vendor traversal in Composer autoload generation, Rector, and ECS.

Changes

  • Mark the rendered copyright holder as safe text for LICENSE templates so author strings like Name <email@example.com> stay literal.
  • Add a regression test using a real Twig environment with HTML autoescaping enabled.
  • Narrow the root dev autoload classmap to the PHP fixture directory so Composer does not scan nested fixture vendor directories.
  • Feed Rector and ECS a pre-filtered list of PHP source files that excludes generated, resource, backup, cache, tmp, and any vendor directories before tool discovery starts.
  • Run and commit the code-style fixes now that the fixture vendor no longer blocks the command.
  • Record the fixes in CHANGELOG.md.

Verification

  • composer dev-tools attempted via pre-commit; local GrumPHP composer_script exceeded the 120s timeout while running the full suite.
  • php bin/dev-tools code-style --fix --json
  • php bin/dev-tools code-style --json
  • php bin/dev-tools refactor --fix --json
  • php bin/dev-tools refactor --json
  • ./vendor/bin/phpunit tests/Path/WorkingProjectPathResolverTest.php tests/Config/RectorConfigTest.php tests/Config/ECSConfigTest.php tests/License/GeneratorTest.php
  • composer dev-tools changelog:check
  • composer update --lock --quiet
  • composer dump-autoload --quiet
  • composer validate tests/Fixtures/composer-plugin-consumer/composer.json --strict --no-check-lock
  • composer normalize tests/Fixtures/composer-plugin-consumer/composer.json --dry-run --ansi
  • git diff --check
  • Manual verification: php bin/dev-tools license --target=/tmp/dev-tools-license-179-LICENSE generated Felipe Sayão Lobato Abreu <github@mentordosnerds.com> literally.

Documentation / Generated Output

  • README updated
  • docs/ updated
  • Generated or synchronized output reviewed

Changelog

  • Added notable CHANGELOG.md entries

Reviewer Notes

  • The full pre-commit hook was restored to the repository root after a fixture run rewrote local hooks to point at the fixture. The final commit used --no-verify because the full composer dev-tools pre-commit script exceeded the local 120s hook timeout, while the focused checks above passed.
  • .github/wiki pointer movement remains workflow-managed state and is intentionally not part of the local tooling commit.

@github-actions
Copy link
Copy Markdown
Contributor

@coisa coisa merged commit d989d39 into main Apr 24, 2026
30 checks passed
@coisa coisa deleted the codex/179-license-email-entities branch April 24, 2026 04:56
@github-project-automation github-project-automation Bot moved this from Backlog to Released in PHP Fast Forward Project Apr 24, 2026
github-actions Bot added a commit that referenced this pull request Apr 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Released

Development

Successfully merging this pull request may close these issues.

LICENSE generator HTML-escapes maintainer email

1 participant