Skip to content

CI: test the full supported PHP range and make lint blocking #53

Description

@HafizMMoaz

Three things in .github/workflows/ci.yml reduce what CI actually tells us.

Only PHP 8.4 is tested. composer.json declares "php": ">=8.2", so 8.2 and 8.3 are supported and untested. A matrix over 8.2, 8.3 and 8.4 costs nothing here since the suite is fast.

The lint job cannot fail. It carries continue-on-error: true, so php-cs-fixer and PHPStan results are advisory only. PHPStan was just raised to level 10 and passes cleanly, which makes this a good moment to make it blocking, otherwise the level silently rots.

The test job starts MariaDB, Redis and Memcached, and installs redis, memcached, apcu, mysqli, gd, sodium, zip and intl. None of them are used by this library or its test suite (the only extension functions in src/ are mb_strlen() and PCRE). It looks copied from a database oriented package. Dropping the three service containers and the unused extensions makes each run noticeably faster and removes three flaky dependencies from a suite that never touches them.

Also worth adding while in there: run the suite on windows-latest as well, since it currently fails there (see the test portability issue).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions