Replace Travis with GitHub Actions + Codecov + Scrutinizer (roadmap #2)#13
Merged
Conversation
Roadmap item #1. - composer.json: require PHP >= 8.1, require-dev phpunit/phpunit ^10.5, switch autoload from PSR-0 to PSR-4, add PSR-4 autoload-dev mapping for tests. - Relocate src/Inflect/Inflect.php to src/Inflect.php to conform to PSR-4 (namespace Inflect, class Inflect). - Rewrite phpunit.xml.dist against the PHPUnit 10 schema (new <source> element, Composer autoload bootstrap, failOnWarning/failOnNotice). Rename phpunit.xml-dist -> phpunit.xml.dist per PHPUnit 10 conventions. - Port tests to namespaced PHPUnit\Framework\TestCase with strict types, #[DataProvider] attributes, and assertSame. Tests now live in the Inflect\Tests namespace. - Drop autoload.php.dist (obsoleted by Composer PSR-4 autoload + the PHPUnit 10 bootstrap pointing at vendor/autoload.php). - Ignore .phpunit.result.cache and .phpunit.cache/. Note: .travis.yml still references PHP 5.3/5.4 and will fail until the CI modernization (roadmap item #2) replaces it with GitHub Actions. Verified: 109 tests / 109 assertions pass on PHP 8.1 and 8.3. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Roadmap item #2. - Delete .travis.yml (pinned to PHP 5.3/5.4 and the pre-PSR-4 test layout). - Add .github/workflows/ci.yml running a matrix of PHP 8.1/8.2/8.3/8.4 on every push to master and every pull request. Runs composer validate, installs dependencies with Composer cache, and executes PHPUnit with Clover coverage. - Upload coverage to Codecov (PHP 8.3 matrix leg) via codecov-action@v4. - Upload coverage to Scrutinizer (PHP 8.3 matrix leg) via ocular.phar; marked continue-on-error so a Scrutinizer outage does not fail the build. - Add .scrutinizer.yml with php-scrutinizer-run + phpcs-run analysis and external_code_coverage wired up. - Add CI, Codecov, and Scrutinizer badges to README.md. Stacked on top of the roadmap #1 PHP baseline modernization — this PR targets the modernize-php-baseline branch and should merge after #12. Codecov and Scrutinizer need repo registration; Codecov also needs CODECOV_TOKEN as a repo secret (optional for public repos but recommended by the action). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Addresses ROADMAP.md item #2. Stacked on top of #12.
Changes
.travis.yml(broken — still pinned to PHP 5.3/5.4 and the pre-PSR-4 test layout)..github/workflows/ci.yml:masterand on every PR..scrutinizer.ymlwith `php-scrutinizer-run` + `phpcs-run` analysis and `external_code_coverage` hooked up.README.mdwith CI, Codecov, and Scrutinizer badges.Setup needed (out-of-repo, one-time)
Test plan
🤖 Generated with Claude Code