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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CakePHP] Add Fixture importing name style rector(for 3.7) #1252

Merged
merged 2 commits into from Mar 24, 2019

Conversation

2 participants
@o0h
Copy link
Contributor

commented Mar 23, 2019

Since CakePHP 3.7, declaring TestCase::$fixtures in underscored has been deprecated.
Now, it should bee declared in SnakeCase.

I think rector is the perfect solution for saving cakephp-er from such a boring work "check and renaming ALL $fixtures = [] VARS in exists test file" 馃槃


Using underscored fixtures names in TestCase::$fixtures is deprecated. Use CamelCased names instead. For e.g. app.FooBar, plugin.MyPlugin.FooBar.
(migration guide)

also see: https://github.com/cakephp/cakephp/pull/12560/files#diff-00c99fa549dd6a8e04203fff9bcc684aR196

@o0h

This comment has been minimized.

Copy link
Contributor Author

commented Mar 23, 2019

Rector\PhpSpecToPHPUnit\Tests\Rector\Class_\PhpSpecToPHPUnitRector\PhpSpecToPHPUnitRectorTest::test

It seems to be occurred in 1fae638 .
Should I solve it in this branch before asking code-review?

@TomasVotruba

This comment has been minimized.

Copy link
Member

commented Mar 23, 2019

Should I solve it in this branch before asking code-review?

No no, I just fixed that on master. Just rebase and it should be fine

@TomasVotruba

This comment has been minimized.

Copy link
Member

commented Mar 23, 2019

Intresting change. I personaly autowire under_score to CamelCase with no problems.

Could you add link to the CakePHP PR above the class? Like this:

* @see https://github.com/sebastianbergmann/phpunit/blob/master/ChangeLog-8.0.md

That way there is reference to source of this change in case we want to investigate in the future.

Thank you :

@o0h o0h force-pushed the o0h:cakephp37-fixture-name branch from 14256e9 to 9e3a0d7 Mar 24, 2019

@o0h

This comment has been minimized.

Copy link
Contributor Author

commented Mar 24, 2019

@TomasVotruba
Thanks for your feedback!
I rebased master & force-pushed, and add commit to link for migration guid 馃殌

@TomasVotruba

This comment has been minimized.

Copy link
Member

commented Mar 24, 2019

Thank you 馃憤

@TomasVotruba TomasVotruba merged commit 7c6176a into rectorphp:master Mar 24, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@o0h o0h deleted the o0h:cakephp37-fixture-name branch Mar 24, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can鈥檛 perform that action at this time.