Skip to content

Move RectorCakePHP rules here #197

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

Conversation

samsonasik
Copy link
Contributor

@samsonasik samsonasik commented Oct 15, 2022

The RectorCakePHP is no longer exists in latest rector/rector:dev-main scoped vendor, so it moved the rules here.

Ref deprecated-packages/rector-cakephp#27

composer.json Outdated
@@ -6,11 +6,13 @@
"license": "MIT",
"require": {
"cakephp/console": "^4.0",
"rector/rector": "^0.14.5"
"rector/rector": "dev-main",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@othercorey @markstory this can be updated to next rector relase

@@ -6,11 +6,13 @@
"license": "MIT",
"require": {
"cakephp/console": "^4.0",
"rector/rector": "^0.14.5"
"rector/rector": "dev-main",
"webmozart/assert": "^1.11"
Copy link
Contributor Author

@samsonasik samsonasik Oct 15, 2022

Choose a reason for hiding this comment

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

this is needed as because the Webmozart\Assert\Assert that used in the rules are not scoped

@@ -6,11 +6,14 @@
"license": "MIT",
"require": {
"cakephp/console": "^4.0",
"rector/rector": "^0.14.5"
"nette/utils": "^3.2",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is needed as because the Nette\Utils\Strings that used in the rules are not scoped

"rector/rector": "^0.14.5"
"nette/utils": "^3.2",
"rector/rector": "dev-main",
"symfony/string": "^6.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is needed as use Symfony\Component\String\UnicodeString in ChangeSnakedFixtureNameToPascalRector rule.

@samsonasik
Copy link
Contributor Author

@othercorey @markstory it should be ready now, feel free to take over :)

@@ -5,17 +5,23 @@
"homepage": "http://cakephp.org",
"license": "MIT",
"require": {
"php": "^8.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The CI seems uses minimal php 8.0, so I added php requirement here.

Choose a reason for hiding this comment

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

Hi @samsonasik I think it would be a problem for PHP7.4 users.

CakePHP 3.x has PHP requirement like this "php": ">=5.6.0,<8.0.0", Where as CakePHP 4.x "php": ">=7.4.0",

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This repo CI is using php 8.0 for minimal php version

php-version: ['8.0', '8.1']

so I downgraded the rules to use php 8.0 syntax.

@samsonasik
Copy link
Contributor Author

@othercorey @markstory Rector 0.14.6 released https://github.com/rectorphp/rector/releases/tag/0.14.6 .

I think it is ready now, I updated the requirement to ^0.14.6 too for it d5952c0

@markstory
Copy link
Member

Wow thank you for taking the time to do this @samsonasik 🙇

@markstory
Copy link
Member

Looks good to me. Any concerns @othercorey @ADmad ?

@othercorey
Copy link
Member

Looks good to me. Any concerns @othercorey @ADmad ?

No. I'm sure we can work out any issues.

@ADmad
Copy link
Member

ADmad commented Oct 23, 2022

Looks good to me. Any concerns @othercorey @ADmad ?

None from me.

@othercorey othercorey changed the base branch from 4.x to import-rector-package October 28, 2022 04:32
@othercorey
Copy link
Member

Merging this into a separate branch.

@othercorey othercorey merged commit c2cda67 into cakephp:import-rector-package Oct 28, 2022
@samsonasik samsonasik deleted the move-rector-cakephp-rules-here branch October 28, 2022 05:14
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.

5 participants