Skip to content

Fix Composer development autoload metadata - #57

Merged
vanderlee merged 2 commits into
masterfrom
agent/fix-composer-metadata
Sep 21, 2026
Merged

vanderlee merged 2 commits into
masterfrom
agent/fix-composer-metadata

Conversation

@vanderlee

Copy link
Copy Markdown
Owner

What changed

  • Add an autoload-dev section for the test suite.
  • Keep test-only classes out of the package's production autoload map while making them discoverable during development.

Why

The package already separates PHPUnit into require-dev, but its test classes were not declared in Composer's development autoload metadata. Declaring tests/ as a development-only classmap makes the Composer metadata explicit and avoids treating test code as production autoloadable code.

Validation

The existing GitHub Actions workflow runs composer validate --strict, installs dependencies, and executes the test suite across PHP 8.0–8.6.

@weirdan

weirdan commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

It would also be nice if tests had export-ignore attribute: https://php.watch/articles/composer-gitattributes

@vanderlee
vanderlee merged commit d898128 into master Sep 21, 2026
7 checks passed
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