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

refactor: upgrade to use phpstan 2 and rector 2 #9322

Conversation

samsonasik
Copy link
Member

Description

This PR upgrade to use PHPStan 2 and Rector 2.

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

@samsonasik
Copy link
Member Author

/cc @ddevsr

@samsonasik samsonasik marked this pull request as draft December 14, 2024 21:32
@samsonasik
Copy link
Member Author

phpstan-codeigniter seems stil require phpstan v1, so in there should be updated first:

  Problem 1
    - Root composer.json requires codeigniter/phpstan-codeigniter ^1.4 -> satisfiable by codeigniter/phpstan-codeigniter[v1.4.0, ..., v1.5.1].
    - codeigniter/phpstan-codeigniter[v1.4.0, ..., v1.4.2.70400] require phpstan/phpstan ^1.10 -> found phpstan/phpstan[1.10.0, ..., 1.12.12] but it conflicts with your root composer.json require (^2.0).

@samsonasik
Copy link
Member Author

Ok, bump to use phpstan-codeigniter 1.5.1 is the way 9b6d9bf

@samsonasik
Copy link
Member Author

install seems got codeigniter ^4.5 conflict notice:

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 codeigniter/phpstan-codeigniter ^1.5.1 -> satisfiable by codeigniter/phpstan-codeigniter[v1.5.1].
    - codeigniter/phpstan-codeigniter v1.5.1 requires codeigniter4/framework ^4.5 -> found codeigniter4/framework[v4.5.0, ..., v4.5.5] but these were not loaded, likely because it conflicts with another require.

ref https://github.com/codeigniter4/CodeIgniter4/actions/runs/12333325314/job/34422197398?pr=9322

@paulbalandan @kenjis any idea?

@paulbalandan
Copy link
Member

@samsonasik that should be taken care of in #9299, i just need to get @kenjis ' approval

@paulbalandan
Copy link
Member

@samsonasik pls rebase in latest develop. probably you would just need to update rector version

@samsonasik samsonasik force-pushed the refactor-upgrade-phpstan-2-rector-2 branch from 9b6d9bf to 1147411 Compare December 15, 2024 05:33
@samsonasik
Copy link
Member Author

Rebased 👍

@samsonasik
Copy link
Member Author

Setup PHP error seems unrelated:

==> Setup PHP
✗ PHP Could not setup PHP 8.3
Error: The process '/usr/bin/bash' failed with exit code 1

Copy link
Collaborator

@ddevsr ddevsr left a comment

Choose a reason for hiding this comment

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

LGTM

@ddevsr ddevsr added the refactor Pull requests that refactor code label Dec 15, 2024
@paulbalandan paulbalandan marked this pull request as ready for review December 15, 2024 18:02
Copy link
Member

@paulbalandan paulbalandan left a comment

Choose a reason for hiding this comment

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

I think this is good to go. I'm merging this.

@paulbalandan paulbalandan merged commit 61881bd into codeigniter4:develop Dec 15, 2024
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Pull requests that refactor code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants