Improve open-source readiness: docs, CI, contribution guides - #3
Merged
Merged
Conversation
- Fix misleading "zero core overrides" claim in README (it is a DI preference override) - Document Magento Marketplace auth.json requirement for composer install - Add CHANGELOG.md, CONTRIBUTING.md, SECURITY.md - Add phpunit.xml.dist and composer test script - Add GitHub Actions CI workflow (composer validate + unit tests)
Align with the pattern used in magento2-logstream: run PHPStan, PHP-CS-Fixer and PHPUnit through mohaelmrabet/magento-php-qa-action on the mohelmrabet/magento-frankenphp image, instead of a bespoke composer install/validate workflow.
The CI workflow's phpstan and cs-fixer jobs need vendor/bin/phpstan and vendor/bin/php-cs-fixer available, plus config files to run against.
The repo doesn't have a repo-level COMPOSER_AUTH secret like magento2-logstream does. It does have the org-wide MAGENTO_AUTH_USERNAME/MAGENTO_AUTH_PASSWORD secrets (available to all repos), so build the composer-auth JSON from those instead.
DevTestsRunCommand reads Magento's BP constant and app/etc/vendor_path.php, which only exist inside a real Magento installation. The module's own unit tests never ran standalone before (no CI existed), so this was never exercised. Bootstrap now fakes a minimal Magento directory layout in a temp dir so the tests can run outside a full Magento app.
- Add a PHPStan bootstrap stub declaring BP so it can resolve the constant statically without a real Magento installation - Apply PSR12 blank_line_after_opening_tag across PHP files - Remove a duplicate blank line before require_once in the test file
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.
Summary
auth.jsonrequirement forcomposer installcomposer testscriptTest plan
MAGENTO_USERNAME/MAGENTO_PASSWORDrepo secrets to installmagento/module-developer)composer validate --strictpassescomposer testpasses locally