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: replace PHP_VERSION by PHP_VERSION_ID #8618

Merged
merged 3 commits into from
Mar 12, 2024

Conversation

justbyitself
Copy link
Contributor

PHP_VERSION_ID is shorter and the most commonly used in this repository.

PHP_VERSION_ID is prefered at CodeIgniter4 repository.
@justbyitself justbyitself changed the title refactor: Replace PHP_VERSION by PHP_VERSION_ID refactor: replace PHP_VERSION by PHP_VERSION_ID Mar 11, 2024
@samsonasik
Copy link
Member

samsonasik commented Mar 11, 2024

There is already VersionCompareFuncCallToConstantRector rector rule for that

https://github.com/rectorphp/rector/blob/main/docs/rector_rules_overview.md#versioncomparefunccalltoconstantrector

Could you add to the rector.php so it will be detected automatically in the future? Thank you.

justbyitself added a commit to justbyitself/CodeIgniter4 that referenced this pull request Mar 11, 2024
justbyitself added a commit to justbyitself/CodeIgniter4 that referenced this pull request Mar 11, 2024
@samsonasik
Copy link
Member

It seems you commit in separate branch, you can commit new change here that the PR include rector.php + code change

Add Rector rule in order to replace PHP_VERSION by PHP_VERSION_ID.
@samsonasik suggestion: codeigniter4#8619
@justbyitself
Copy link
Contributor Author

@samsonasik OK, done. Thank you.

@paulbalandan
Copy link
Member

paulbalandan commented Mar 11, 2024

@justbyitself please run the following in your terminal:

composer cs-fix
vendor/bin/rector process system

Then commit and push the changes.

@kenjis kenjis added the refactor Pull requests that refactor code label Mar 12, 2024
Copy link
Member

@kenjis kenjis left a comment

Choose a reason for hiding this comment

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

LGTM!

@samsonasik samsonasik merged commit de073e2 into codeigniter4:develop Mar 12, 2024
62 checks passed
@samsonasik
Copy link
Member

Thank you @justbyitself

@justbyitself
Copy link
Contributor Author

Thank you @samsonasik @paulbalandan @kenjis

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.

4 participants