Conversation
Co-authored-by: dasco144 <10575019+dasco144@users.noreply.github.com>
WalkthroughAdds a new GitHub Actions workflow (.github/workflows/ci.yml) named "CI" that runs on push and pull_request events targeting main and executes a test job on ubuntu-latest across PHP versions 8.2, 8.3 and 8.4. Steps: checkout, setup PHP, composer validate, cache vendor, composer install, and run vendor/bin/phpunit. Updates composer.json (removed version field, bumped phpunit require-dev to ^9.0), updates phpunit.xml schema and coverage include settings, and adds .phpunit.result.cache to .gitignore. Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Assessment against linked issues
Poem
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
.github/workflows/ci.yml (2)
40-41: Run Composer non-interactively for CI stabilityAdd the
--no-interactionflag to avoid any accidental prompts blocking the job.- run: composer install --prefer-dist --no-progress + run: composer install --prefer-dist --no-progress --no-interaction
44-44: Missing newline at end of fileYAML linters complain when the final newline is absent.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
.github/workflows/ci.yml(1 hunks).gitignore(1 hunks)composer.json(1 hunks)phpunit.xml(1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.7)
.github/workflows/ci.yml
33-33: the runner of "actions/cache@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)
🪛 YAMLlint (1.37.1)
.github/workflows/ci.yml
[error] 44-44: no new line character at the end of file
(new-line-at-end-of-file)
🔇 Additional comments (3)
.gitignore (1)
5-5: Add-on ignored correctlyIgnoring
.phpunit.result.cacheprevents build artefacts from polluting the repo. Looks good.composer.json (1)
24-25: Declare the minimum supported PHP versionPHPUnit 9 requires PHP ≥ 7.3, so please add a PHP platform constraint to your
composer.jsonto avoid confusing resolution errors:"require": { + "php": ">=7.3", "guzzlehttp/guzzle": "^6.3.3", "netresearch/jsonmapper": "^1.4" },• File: composer.json, under the
"require"section
• Lines: around 24–25Please confirm that this new constraint aligns with all officially supported PHP runtimes for the SDK.
phpunit.xml (1)
2-7: PHPUnit config upgrade looks soundThe schema bump to 9.3 and the new
<coverage>block are correct for PHPUnit 9. No issues spotted.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
echarrod
left a comment
There was a problem hiding this comment.
LGTM after suggested changes
Co-authored-by: Ed Harrod <echarrod@users.noreply.github.com>
Co-authored-by: Ed Harrod <echarrod@users.noreply.github.com>
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 2
♻️ Duplicate comments (1)
🧹 Nitpick comments (6)
.github/workflows/ci.yml (6)
22-27: Enable Composer v2 + cache in setup-php for speed and stability.Leverage setup-php’s first-class Composer support instead of a manual vendor cache.
Suggested setup (replace current with block below):
with: php-version: ${{ matrix.php-version }} coverage: none tools: composer:v2 cache: composer
14-17: Run the full matrix even if one job fails.Add fail-fast: false so failures on one PHP version don’t mask others.
strategy: + fail-fast: false matrix: php-version: ['8.2', '8.3', '8.4']
3-9: Add concurrency to cancel superseded runs on pushes to the same ref.This saves CI minutes and speeds feedback on active PRs.
pull_request: branches: [ main ] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true
9-13: Harden workflow permissions (principle of least privilege).Explicitly declare minimal permissions at the workflow level.
on: push: branches: [ main ] pull_request: branches: [ main ] +permissions: + contents: read
40-41: Use non-interactive Composer install.Prevents any prompts from stalling the job and is standard for CI.
- run: composer install --prefer-dist --no-progress + run: composer install --prefer-dist --no-progress --no-interaction
44-44: Add a trailing newline at EOF.Fixes the YAML lint error and aligns with POSIX tooling expectations.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/ci.yml(1 hunks)
🧰 Additional context used
🪛 YAMLlint (1.37.1)
.github/workflows/ci.yml
[error] 44-44: no new line character at the end of file
(new-line-at-end-of-file)
This PR adds comprehensive CI checks to automatically run the complete test suite on every pull request and commit to the main branch.
Changes Made
CI Configuration
.github/workflows/ci.ymlwith GitHub Actions workflowmain/masterbranches and all pull requestsPHPUnit Compatibility
7.1.4to^9.0to support modern PHP versions (including PHP 8.3)Project Cleanup
versionfield fromcomposer.json(not needed for Packagist libraries).phpunit.result.cacheto.gitignoreto exclude build artifactsCI Features
composer.jsonandcomposer.lockintegrityThe workflow will now automatically catch regressions and ensure code quality on every change.
Fixes #42.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/repos/cweiske/jsonmapper/zipball/0d4d1b48d682a93b6bfedf60b88c7750e9cb0b06/usr/bin/php8.3 -n -c /tmp/HBeEor /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/guzzle/guzzle/zipball/a52f0440530b54fa079ce76e8c5d196a42cad981/usr/bin/php8.3 -n -c /tmp/HBeEor /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/guzzle/promises/zipball/67ab6e18aaa14d753cc148911d273f6e6cb6721e/usr/bin/php8.3 -n -c /tmp/HBeEor /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/guzzle/psr7/zipball/e4490cabc77465aaee90b20cfc9a770f8c04be6b/usr/bin/php8.3 -n -c /tmp/HBeEor /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/php-fig/http-message/zipball/cb6ce4845ce34a8ad9e68117c10ee90a29919eba/usr/bin/php8.3 -n -c /tmp/HBeEor /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822/usr/bin/php8.3 -n -c /tmp/jhJdal /usr/bin/composer install(http block)/usr/bin/php8.3 -n -c /tmp/HBeEor /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed/usr/bin/php8.3 -n -c /tmp/HBeEor /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/exporter/zipball/78c00df8f170e02473b682df15bfcdacc3d32d72/usr/bin/php8.3 -n -c /tmp/HBeEor /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/global-state/zipball/bca7df1f32ee6fe93b4d4a9abbf69e13a4ada2c9/usr/bin/php8.3 -n -c /tmp/HBeEor /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71/usr/bin/php8.3 -n -c /tmp/HBeEor /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7/usr/bin/php8.3 -n -c /tmp/HBeEor /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1/usr/bin/php8.3 -n -c /tmp/HBeEor /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/05d5692a7993ecccd56a03e40cd7e5b09b1d404e/usr/bin/php8.3 -n -c /tmp/HBeEor /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7/usr/bin/php8.3 -n -c /tmp/HBeEor /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c/usr/bin/php8.3 -n -c /tmp/HBeEor /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/9614ac4d8061dc257ecc64cba1b140873dce8ad3/usr/bin/php8.3 -n -c /tmp/HBeEor /usr/bin/composer install --no-interaction(http block)https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/3833d7255cc303546435cb650316bff708a1c75c/usr/bin/php8.3 -n -c /tmp/jhJdal /usr/bin/composer install(http block)/usr/bin/php8.3 -n -c /tmp/HBeEor /usr/bin/composer install --no-interaction(http block)If you need me to access, download, or install something from one of these locations, you can either:
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
Summary by CodeRabbit