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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to official coding standard #5038

Merged
merged 2 commits into from
Sep 2, 2021

Conversation

paulbalandan
Copy link
Member

Checklist:

  • Securely signed commits

@sfadschm
Copy link
Contributor

Awesome to finally see this, thanks for the crazy work!

Will the SpaceAfterCommentStartFixer be transferred, too, or will it stay with the framework?

@paulbalandan
Copy link
Member Author

It might stay for a while, while I'm working on a generic way to easily support custom fixers.

@MGatner
Copy link
Member

MGatner commented Aug 30, 2021

So exciting!

@paulbalandan
Copy link
Member Author

I'm going to defer merging this, to catch up with the new fixers and options introduced in php cs fixer v3.1

@sfadschm
Copy link
Contributor

That will mean fixing the docs again, doesn't it?
I think I read sometime ago that rst allows code blocks to be included from php files. Could this be an option to pull out the examples to a subfolder of php files so the cs-fixer can simply be run on them?

@paulbalandan
Copy link
Member Author

That will mean fixing the docs again, doesn't it?
I think I read sometime ago that rst allows code blocks to be included from php files. Could this be an option to pull out the examples to a subfolder of php files so the cs-fixer can simply be run on them?

I don't think the docs will be changed as new fixers don't affect them. I'm intrigued by this rst capability. Can you share some links to docs for that?

@sfadschm
Copy link
Contributor

I think this is either the include directive or raw with file:
https://docutils.sourceforge.io/docs/ref/rst/directives.html#include
https://docutils.sourceforge.io/docs/ref/rst/directives.html#raw-data-pass-through

My best guess would be somthing like:

.. include:: example.php
   :code: php

But I would have to try that 😄

@MGatner MGatner mentioned this pull request Aug 31, 2021
1 task
@paulbalandan
Copy link
Member Author

Requesting for re-review

  • Bump to php-cs-fixer v3.1, coding-standard v1.1, cs-config v3.3
  • Used more robust SpaceAfterCommentStartFixer
  • Used FixerGenerator for easy registration of custom fixers
  • Removed code smell from commented out code
  • Removed unneeded comments

Co-authored-by: Abdul Malik Ikhsan <samsonasik@gmail.com>
@paulbalandan paulbalandan merged commit 4ab9d66 into codeigniter4:develop Sep 2, 2021
@paulbalandan paulbalandan deleted the official-cs-switch branch September 2, 2021 04:32
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.

4 participants