Skip to content

Support PHP 8.2 and newer #68

Open

Description

@pekral

Problem

pekral/phpcs-rules declares "php": "^8.4" in require. A project that still supports PHP 8.2 or 8.3 therefore cannot install it as a dev dependency on those versions: composer install fails to resolve on PHP 8.2/8.3 even with --no-dev, because Composer resolves require-dev while locking.

PHP 8.2 and 8.3 are still officially supported (security fixes) — see https://www.php.net/supported-versions.php.

Real case: ecomailcz/flexibee-client supports PHP ^8.2. Its CI can run the pekral checkers only on PHP 8.4/8.5, and on 8.2/8.3 it is limited to a syntax lint plus a dev-free dependency resolve (Ecomailcz/flexibee-client#48).

Proposal

Lower the PHP requirement of pekral/phpcs-rules to ^8.2 so it can be installed in any project running a currently supported PHP version.

Acceptance criteria

  • composer.json require.php is ^8.2.
  • Every runtime dependency in require resolves on PHP 8.2 and 8.3. Development-only tooling may keep needing a newer PHP, but it must not block consumers.
  • The shipped code uses no syntax or API newer than PHP 8.2, for example property hooks, asymmetric visibility, new without parentheses, typed class constants, #[\Override] or json_validate().
  • CI covers PHP 8.2 and 8.3, at least a lint of the shipped sources and a resolve of the runtime dependencies. A full run is preferable where the dev tooling allows it.
  • The README requirements section lists PHP 8.2+.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions