-
Notifications
You must be signed in to change notification settings - Fork 4
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
Update CoreAPI major version bump tasks #63
Comments
Should you consider to deal with all the changes in just one PR? |
Hi, Probably best to do things in small chunks although some of these may be interdependent. Try to pull from dev once again before starting as I have updated the style to avoid conflicts. |
Great! I am using PHPStorm as of now and I found it difficult to align the style... I will appreciate any tools or suggestions :) |
It is basically PSR 2 with tabs for indentation and spaces for alignment. Working on making this easier to adopt using composer but I need to test. You could temporarily do the following:
Code your stuff as usual and before commit, run...
This will take quite a lot of time due to the large number of files checked. Step 2 takes the bulk of this time and Step 3 will speed up on subsequent runs. The style rules are already in the package and this will pick them up. The pre-commit hook will only pass changed files so will be much less time. I just need to run a few tests first. The file you have here: https://raw.githubusercontent.com/miceno/gallery2-ahpn/develop/.phpstorm.cs.xml seems to be reasonably close. Main things I see from a quick look are:
I don't actually use PHPStorm so this is an estimate. So a manual run for now and later the hook will take care of things. |
Thank you!!I will manage with these commands. There are tutorials on how to integrate those tools in PHPstorm.I was using a WordPress set of rules, I didn't try with PSR 2.The pre commit hook is a great idea.I think it will be enough to run the fixer on the files I plan to commit, or in any folder I add and not in all the code, since you have already formatted it.Regards.On Jan 19, 2019 09:40, dakanji <[email protected]> wrote:It is basically PSR 2 with tabs for indentation and spaces for alignment.
Working on making this easier to adopt using composer but I need to test.
You could temporarily do the following:
composer global require "squizlabs/php_codesniffer=*"composer global require friendsofphp/php-cs-fixer
Code your stuff as usual and before commit, run...
cd /full/server/path/to/the/G2Project-repophpcbf /full/server/path/to/the/G2Project-repophp-cs-fixer fix
This will take quite a lot of time due to the large number of files checked. Step 2 takes the bulk of this time and Step 3 will speed up on subsequent runs.
The style rules are already in the package and this will pick them up.
The pre-commit hook will only pass changed files so will be much less time. I just need to run a few tests first.
The file you have here: https://raw.githubusercontent.com/miceno/gallery2-ahpn/develop/.phpstorm.cs.xml seems to be reasonably close.
Main things I see from a quick look are:
TAB_SIZE = 4
CONTINUATION_INDENT_SIZE = 4
SPACE_AFTER_TYPE_CAST = false
KEEP_SIMPLE_METHODS_IN_ONE_LINE = false
Keep indents on empty lines = false
Braces placement = End of line
I don't actually use PHPStorm so this is an estimate.
So a manual run for now and later the hook will take care of things.
—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or mute the thread.
|
That should work...
Unfortunately both tools are needed as neither gives a full result alone as of now. |
Please pull the dev branch and see contributing.md for instructions on setting up the dev environment |
The text was updated successfully, but these errors were encountered: