Skip to content

Enhance CI workflow with PHP compatibility checks and coverage updates - #56

Merged
adbario merged 2 commits into
3.xfrom
ci/improve-compatibility
Aug 28, 2026
Merged

Enhance CI workflow with PHP compatibility checks and coverage updates#56
adbario merged 2 commits into
3.xfrom
ci/improve-compatibility

Conversation

@adbario

@adbario adbario commented Aug 27, 2026

Copy link
Copy Markdown
Owner

This pull request introduces several improvements and refinements across the codebase, documentation, and developer tooling for the project. The main focus is on enhancing static analysis, code quality, and documentation accuracy, while also updating the CI workflow and adding developer conveniences. Below are the most significant changes grouped by theme.

Static Analysis, Linting, and Testing Improvements:

  • Increased PHPStan analysis level to 8, included phpstan-phpunit extensions, and adjusted configuration to better match the project's needs (phpstan.neon.dist, composer.json). [1] [2] [3]
  • Added PHP compatibility checks and improved code style enforcement by including phpcompatibility/php-compatibility and related plugins, and updated phpcs.xml.dist to enforce compatibility with PHP 7.4+ (composer.json, phpcs.xml.dist). [1] [2]
  • Enhanced PHPUnit configuration to fail on warnings and risky tests, updated schema, and improved coverage settings (phpunit.xml.dist). [1] [2]
  • Refined and expanded the test suite to cover new behaviors, such as handling of non-array values in push, integer key handling in set, and more granular count behaviors (tests/DotTest.php). [1] [2] [3] [4] [5]

Continuous Integration and Workflow Updates:

  • Improved the GitHub Actions workflow: added concurrency control, explicit permissions, switched to composer install action, improved test matrix, and modernized coverage reporting with Coveralls (.github/workflows/tests.yml). [1] [2]
  • Updated .gitattributes to exclude composer.lock from exports, reducing unnecessary files in distribution (.gitattributes).

Codebase Enhancements and Bug Fixes:

  • Improved the Dot class: fixed type annotations, improved handling of non-string keys in set, clarified behavior of push and count, and added PHPStan ignore for a specific type inference issue (src/Dot.php). [1] [2] [3] [4] [5] [6] [7]
  • Enhanced the dot() helper to allow calling without arguments (src/helpers.php).

Documentation Updates:

  • Clarified documentation in README.md for count, push, and replace methods, updated PHP code examples for modern syntax, and improved instructions for static analysis and JSON output options (README.md). [1] [2] [3] [4] [5] [6] [7]

Developer Tooling:

  • Added a .editorconfig for consistent editor settings and expanded Makefile with more targets and improved phony handling (.editorconfig, Makefile). [1] [2]

- Add root declaration to .editorconfig
- Add concurrency control and read permissions to tests workflow
- Enable fail-fast: false for matrix builds
- Use ramsey/composer-install action for dependency caching
- Separate coverage runs from regular test runs to speed up CI
- Add php-coveralls as a pre-installed tool for analysis job
- Bump actions/checkout to v7
- Add phpcompatibility/php-compatibility for PHP version checks
- Export-ignore composer.lock in .gitattributes
Replace php-coveralls tool with the official coverallsapp/github-action
for uploading coverage results. Also bump ramsey/composer-install to v4.

This simplifies the workflow by removing the need to install the
php-coveralls tool separately.
@adbario
adbario merged commit 8ee7850 into 3.x Aug 28, 2026
14 checks passed
@adbario
adbario deleted the ci/improve-compatibility branch August 28, 2026 05:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant