Conversation
…rom composer install
- phpstan.dist.neon (shared options) -> phpstan.neon (local options) - phpunit.xml.dist (shared options) -> phpunit.xml (local options)
There was a problem hiding this comment.
Pull request overview
Standardizes project tooling configuration and distribution behavior by introducing default PHPUnit/PHPStan config templates and adjusting Composer scripts and export rules.
Changes:
- Add default config templates:
phpunit.xml.distandphpstan.dist.neon. - Update Composer scripts to auto-copy
*.distconfigs into localphpunit.xml/phpstan.neonwhen missing, and adjust the PHPStan lint command. - Update
.gitignoreand.gitattributesto reflect the new config strategy and exported package contents.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
phpunit.xml.dist |
Adds default PHPUnit configuration (bootstrap, suites, coverage, strictness). |
phpstan.dist.neon |
Adds default PHPStan configuration (level, paths, exclusions, baseline include). |
composer.json |
Updates lint command and adds post-install copying of local config files. |
.gitignore |
Ignores local (non-dist) PHPStan/PHPUnit config files. |
.gitattributes |
Adjusts export-ignore rules for packaging/distribution. |
You can also share your feedback on Copilot code review. Take the survey.
n0nag0n
left a comment
There was a problem hiding this comment.
I'm not totally sure why you like setting up .dist files and then copying them over as the real file and ignoring it. I understand that you CAN do it, not sure why it needs to be done or what real benefit it has besides just adding some more complexity to things. Maybe I just need to ask @copilot and he'll explain it to me haha
|
ok, I'll tell you my real usage of .dist files, not theory unusable...
|
|
the most useful use case is for the phpunit.xml.dist
|
|
ok, I actually can get behind that! The one change I would ask then is if you could change the name to phpstan.neon.dist instead. Looks like that's more standard around projects (similar to how you have it for phpunit.xml.dist). Then I can merge this guy. |


This pull request introduces several improvements to the project's configuration files, primarily to standardize and modernize the handling of code quality tools and test configuration. The main changes include adding new default configuration files for PHPStan and PHPUnit, updating
.gitattributesto better manage exported files, and enhancing the Composer scripts to ensure necessary config files are available after installation.Configuration management improvements:
phpstan.dist.neonas the new default PHPStan configuration file, specifying analysis level, included paths, and exclusions.phpunit.xml.distas the new default PHPUnit configuration file, defining test suites, coverage options, and strictness settings.composer.jsonto automatically copyphpstan.dist.neontophpstan.neonandphpunit.xml.disttophpunit.xmlif they do not exist, ensuring consistent local configuration for developers.Export and distribution adjustments:
.gitattributesto exclude new configuration files (phpstan.dist.neon,phpunit.xml.dist, etc.) and other files from package exports, while removing obsolete or renamed entries.