-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
apply rector: set variable name to camel case #3680
Conversation
From the first look - I think we would need a rule that leaves the initial underscore, e.g. replacing |
we can extends the rule with skip variable with _ in first char if needed. |
@michalsn I've added |
This is looking great! I'm going to apply this to a few projects as well. |
This looks really good. Only Travis seem to have some hiccup - all tests hanged at the same time. We have to try to rerun this. |
33ad399
to
fc1f0ab
Compare
close reopen to restart travis build |
a85a267
to
fc1f0ab
Compare
it seems the dependency cause a very long running phpunit |
trying with distributed rector-prefixed phar with require-dev nette/utils |
Travis build green 🎉 |
Yay, you made the tests work! I think this is a good start and this can be merged. It would be great if we could check the possibility of handling the parameters for functions as well in the separate PR. @MGatner do you think that this type of change would be a good idea? Of course there is no hurry. |
@michalsn I've updated to update both parameter and |
All green 🎉 🎉 🎉 |
It looks great to me! Let's wait if others have anything to add. |
|
||
- name: Validate composer.json | ||
run: composer validate --strict | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should use the Composer cache so it can benefit from all the other running workflows. E.g from test-phpstan.yml:
- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Create composer cache directory
run: mkdir -p ${{ steps.composer-cache.outputs.dir }}
- name: Cache composer dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
implemented.
9a06db4
to
0b4e27f
Compare
…scoreToCamelCaseVariableNameRector with reason comment
…or UnderscoreToCamelCaseVariableNameRector with reason comment" This reverts commit c95d52e.
I think it is ready. We can try use |
@MGatner here I try apply variable name to camel case checker with Rector.
Checklist: