Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for PHP 7.4 #19

Closed
simbig opened this issue Dec 7, 2024 · 2 comments
Closed

Support for PHP 7.4 #19

simbig opened this issue Dec 7, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@simbig
Copy link
Contributor

simbig commented Dec 7, 2024

Problem

The phpstan-baseline-per-identifier library currently only supports PHP 8.0. Unfortunately, one of my current projects is limited to using PHP 7.4. This prevents me from utilizing the valuable features of this library.

Suggestion

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.

If the project maintainers are interested in exploring this option, I would be happy to contribute a pull request to implement it.

@janedbal
Copy link
Member

janedbal commented Dec 7, 2024

For such a small lib I think it is easier to just downgrade the syntax used.

If you submit a PR, I'll accept it.

@janedbal
Copy link
Member

janedbal commented Dec 8, 2024

Released as 2.1.0, thank you!

@janedbal janedbal closed this as completed Dec 8, 2024
@janedbal janedbal added the enhancement New feature or request label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants