Skip to content

Enable PHP 8.1 Features with Backward Compatibility #43

@simbig

Description

@simbig

Is your feature request related to a problem? Please describe.

Currently, phputils supports PHP ^8 but doesn't fully utilize its features due to compatibility with PHP ^7.4.

Describe the solution you'd like

To enable the use of PHP ^8 features while maintaining backward compatibility with PHP 7.4, I'd propose implementing a strategy similar to the one outlined in this blog post: https://tomasvotruba.com/blog/how-to-release-php-81-and-72-package-in-the-same-repository/ and done in this repo: https://github.com/TomasVotruba/cognitive-complexity/blob/main/.github/workflows/downgraded_release.yaml

This approach involves:

  • Maintaining a Single Codebase: Continue developing in a single repository.
  • Downgrading for PHP 7.4 Releases: Implement a build process to downgrade the codebase and dependencies to PHP 7.4 for specific releases.

Describe alternatives you've considered

Keeping the current setup without full PHP ^8 utilization.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions