Skip to content

Update dependencies - PHP 8.1 - 8.4 #134

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

Merged
merged 12 commits into from
Feb 2, 2025
Merged

Conversation

michalsn
Copy link
Member

@michalsn michalsn commented Jan 28, 2025

Description
This PR updates dependencies for use only with currently supported versions of PHP (8.1 - 8.4).

We still need to call composer with the --ignore-platform-reqs flag for PHP 8.4, as Psalm does not support it yet.

Changes:

  • PHP 8.1 as a minimum version in composer
  • Rector template with the target PHP version set to 8.1
  • PHPUnit, PHPStan, and Rector workflow templates with updated PHP versions

These changes should allow us to use devkit for projects that use PHP 8.4.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@paulbalandan
Copy link
Member

Psalm released v6 just recently. That includes PHP 8.4 support.
https://github.com/vimeo/psalm/releases/tag/6.0.0

@michalsn
Copy link
Member Author

Oh... I hadn't noticed that. I worked on the changes over the weekend and the new version wasn't out then.

Thanks - I'll send the changes tomorrow.

@michalsn michalsn requested review from kenjis and samsonasik January 31, 2025 08:29
@michalsn michalsn merged commit f012093 into codeigniter4:develop Feb 2, 2025
11 checks passed
@michalsn
Copy link
Member Author

michalsn commented Feb 2, 2025

Thank you everyone!

"roave/security-advisories": "dev-latest",
"vimeo/psalm": "^5.0"
"vimeo/psalm": "^6.0"
Copy link
Contributor

@datamweb datamweb Feb 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@michalsn The PHP version in CodeIgniter, DevKit, and other dependencies is defined as ^8.1, while vimeo/psalm version ^6 requires PHP 8.1.17 or higher. This mismatch causes the error.

PS I:\work\Github\shield> composer update
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires codeigniter4/devkit ^1.3 -> satisfiable by codeigniter4/devkit[v1.3.0].
    - codeigniter4/devkit v1.3.0 requires vimeo/psalm ^6.0 -> satisfiable by vimeo/psalm[6.0.0, ..., 6.x-dev].
    - vimeo/psalm[6.0.0, ..., 6.5.0] require php ~8.1.17 || ~8.2.4 || ~8.3.0 || ~8.4.0 -> your php version (8.1.10) does not satisfy that requirement.
    - vimeo/psalm[6.5.1, ..., 6.x-dev] require php ~8.1.31 || ~8.2.27 || ~8.3.16 || ~8.4.3 -> your php version (8.1.10) does not satisfy that requirement.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Would you like to send a fix to the devkit?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR #135 sent.

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.

4 participants