Skip to content

[2.0] Add PHP-CS-Ffixer #120

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

Merged
merged 7 commits into from
Nov 20, 2018
Merged

[2.0] Add PHP-CS-Ffixer #120

merged 7 commits into from
Nov 20, 2018

Conversation

Jean85
Copy link
Contributor

@Jean85 Jean85 commented Nov 20, 2018

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Related tickets #115
License MIT

What's in this PR?

As suggested in #117 (comment), we can add PHP-CS-Fixer for better DX an stricter CS.

I'm also migrating to Travis CI jobs structure, to allow better flow in the CS (and CS/AST checks too if needed).

Example Usage

$ composer cs-check
> vendor/bin/php-cs-fixer fix --dry-run
Loaded config default from "/home/alai/workspace/OSS/client-common/.php_cs".
Using cache file ".php_cs.cache".
   1) src/Deferred.php

Checked all files in 0.029 seconds, 10.000 MB memory used
Script vendor/bin/php-cs-fixer fix --dry-run handling the cs-check event returned with error code 8

To Do

  • Add Pretty CI

@Jean85 Jean85 changed the base branch from master to 2.x November 20, 2018 15:56
Copy link
Contributor

@dbu dbu left a comment

Choose a reason for hiding this comment

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

looks good to me. the settings are slightly different from php-http/boilerplate#27 - i want to be consistent on all projects. but i think the fix here is to update the rules in boilerplate.

@dbu
Copy link
Contributor

dbu commented Nov 20, 2018

and imho we should delete .styleci.yml and disable the hook after this is merged.

@Jean85
Copy link
Contributor Author

Jean85 commented Nov 20, 2018

StyleCI config removed. Let me know if I have to do anything else, or if we should add other CS rules.

I don't think I can add PrettyCI though. Should I add the CS check in Travis in the meantime?

@Jean85 Jean85 changed the title [WIP] [2.0] Add PHP-CS-Ffixer [2.0] Add PHP-CS-Ffixer Nov 20, 2018
@dbu
Copy link
Contributor

dbu commented Nov 20, 2018

no, if you have run the php-cs-fixer on the cli that is good enough. i will merge this and enable pretty-ci.

@dbu dbu merged commit bb98f24 into php-http:2.x Nov 20, 2018
@Jean85 Jean85 deleted the add-cs-fixer branch November 20, 2018 16:41
@Jean85 Jean85 mentioned this pull request Nov 20, 2018
3 tasks
dbu added a commit to php-http/boilerplate that referenced this pull request Nov 20, 2018
@dbu
Copy link
Contributor

dbu commented Nov 20, 2018

the settings are slightly different from php-http/boilerplate#27 - i want to be consistent on all projects. but i think the fix here is to update the rules in boilerplate.

php-http/boilerplate#28

@dbu
Copy link
Contributor

dbu commented Nov 20, 2018

disabled styleci and enabled prettyci

@sagikazarmark sagikazarmark added this to the v2.0.0 milestone Nov 22, 2018
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.

3 participants