-
Notifications
You must be signed in to change notification settings - Fork 2k
Convert tabs to spaces #4771
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
Convert tabs to spaces #4771
Conversation
|
So CI4 will now be using spaces for both indentation and alignment? |
0eb7bb1 to
c91ee66
Compare
Per discussion, we'll start adopting PSR-12. |
lonnieezell
left a comment
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.
Looks good from what I can tell. My knowledge of Nexus is slim, but everything else seems appropriate.
|
composer.json seems conflict with latest change by dependabot. |
c91ee66 to
aa34bd2
Compare
aa34bd2 to
e60f74b
Compare
|
This should be update too @paulbalandan ? |
|
in CI4.1.3, framework & sppstarter still use tabs. |
This is intended. These changes will have a dedicated release. |
|
Honestly this doesn't seem like a good idea. For example accessibility will suffer (tabs allow users to set their preferred indentation according to the settings that make sense for them. Forcing spaces may have a detrimental effect for those people. |
|
Hi! Thanks for your insight. However, this conversion to spaces applies only to the framework code. End users are not forced to convert their existing code to use spaces. They can still use their preference here. As such, I see no detrimental effect of this to end users as they are not directly affected. Again, this change is internal. |
|
Long looong time Code Igniter user here going back to 2008 with multiple major sites on Code Igniter. Got the EllisLab tattoo and all... I would highly advise a revert as it forces a style change of everything built on Code Igniter going back to V1.
Why even do it then? Seriously restrain yourself from making changes to just "pad out" your github man.
Nobody here modifies Code Igniter or writes add-ons? Your "contribution" just wonked up the entire Code Igniter ecosystem. What was the win? |
|
On that note I am disliking this recent trend of people joining a project just to add/remove white space. It ends up being quite disruptive to those who use the projects. |
|
@gnat You can see Paul's contributions to CodeIgniter4: |
It is because all maintainers agreed with switching to PSR-12. |
|
I have also used CodeIgniter since pretty close to that same time, version 1.6 IIRC. Glad to see you still around!
This doesn't force a style change on anything except the internal code for CodeIgniter. Developers not contributing code to the framework itself are not affected at all. I understand tabs vs spaces is a hot topic for a lot of people. I used to be on the tabs side, myself. Over the years I've found that using a decent IDE makes it not matter anymore.
We chose to adopt PSR-12 to take advantage of the many bits of tooling and automation that can come with that. We understand the PSR's are not for everyone, and they were never meant to be. They were specifically developed to aid in framework interoperability.
Again - unless you are contributing code to the core of the framework, this really doesn't affect you. If you write addons you can format it however you choose. If you edit the core files, then there might be a small irritation and that's understandable. But there's usually better solutions than modifying the core for your project. You don't have to like spaces, which obviously you don't, and that's totally cool. Continuing using tabs in your own code and enjoy. |
|
Thank you for the chill responses. It's reassuring to hear this was by consensus of the current team of maintainers. Yeah, Code Igniter is still one of my all time favorites. Glad to see people still passionate about it. Was pretty shocked to do a pull and see this major changeset on every file in the repo. It is what it is. |
Description
Depends on #4770 .
This enables the
indentation_typerule to convert usages of tabs to 4 spaces for indentations.Note: Changes are purely conversion of tabs to spaces as generated by php-cs-fixer. No other manual changes done except for the errant
\App\Config\Appused inConfig\Readerinadmin/module/.Checklist: