Repository navigation
Keep tests and dev tooling out of installed packages - #23
Merged
Merged
Conversation
added 3 commits
October 21, 2026 17:54
Composer installs a release from its GitHub archive, which had everything, so tests/ (including tests/fixtures/echo-server.php, which echoes requests back), .github/ and phpstan/phpunit config were installed into every consumer's vendor/. The WordPress plugin 2.2.0 shipped them to sites. export-ignore leaves them out of git archive and so of the dist download.
…ontents in CI A copy installed by 1.1.0, a git clone or --prefer-source still has the fixture, which would echo a visitor's cookies back under a web server. CI now fails if git archive holds anything beyond LICENSE, README.md, composer.json, owa-autoloader.php and src/.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Composer installs a release from its GitHub archive, and the archive had the whole repository. Every consumer's
vendor/therefore got:tests/, includingtests/fixtures/echo-server.php;.github/;phpstan.neonandphpunit.xml.The WordPress plugin 2.2.0 shipped them to sites. The echo server returns any request it receives as JSON, headers included, so on a web server it returns the caller's
Cookieheader,HttpOnlycookies too.export-ignorein.gitattributesleaves these out ofgit archive, and so out of the dist download:.github,tests,phpstan.neon,phpunit.xml,composer.lock, the git dotfiles,CODE_OF_CONDUCT.md,CONTRIBUTING.md.git archive HEADnow containsLICENSE,README.md,composer.json,owa-autoloader.phpandsrc/only. CI checks out the repository rather than an archive, so it is unaffected.Takes effect for consumers with the next tag. The plugin excludes the files itself from 2.2.1 (Open-Web-Analytics/owa-wordpress-plugin#13).
Also
tests/fixtures/echo-server.phpanswers 404 unless it runs underphp -S, so copies already installed from 1.1.0, a git clone or--prefer-sourcecannot echo requests.git archive HEADholds anything beyondLICENSE,README.md,composer.json,owa-autoloader.phpandsrc/. The check fails on the 1.1.0 tag and passes here.