Skip to content

[3.0.x.x] .php-cs-fixer.php#13388

Merged
AJenbo merged 9 commits intoopencart:3.0.x.xfrom
condor2:patch-1
Jan 4, 2024
Merged

[3.0.x.x] .php-cs-fixer.php#13388
AJenbo merged 9 commits intoopencart:3.0.x.xfrom
condor2:patch-1

Conversation

@condor2
Copy link
Copy Markdown
Contributor

@condor2 condor2 commented Jan 3, 2024

@condor2
Copy link
Copy Markdown
Contributor Author

condor2 commented Jan 3, 2024

@AJenbo

More fast :))

@AJenbo AJenbo changed the title Create .php-cs-fixer.php [3.0.x.x] .php-cs-fixer.php Jan 3, 2024
@AJenbo
Copy link
Copy Markdown
Contributor

AJenbo commented Jan 3, 2024

This will now pass the correct code, but I also noticed now that it is likely scanning the vendor folder so maybe we didn't have to disable as many rules as i did.

@condor2
Copy link
Copy Markdown
Contributor Author

condor2 commented Jan 4, 2024

This will now pass the correct code, but I also noticed now that it is likely scanning the vendor folder.

@AJenbo Maybe because there is no exclude folder? At the end of php-cs fixer

@mhcwebdesign
Copy link
Copy Markdown
Contributor

These tools should not scan the vendor folder. We have to be careful with the latter, the 3rd party vendor libraries all have to support the PHP versions 7.4 to 8.3.

@AJenbo
Copy link
Copy Markdown
Contributor

AJenbo commented Jan 4, 2024

This will now pass the correct code, but I also noticed now that it is likely scanning the vendor folder.

@AJenbo Maybe because there is no exclude folder? At the end of php-cs fixer

Yeah, it just got to late for me to work on it any further.

These tools should not scan the vendor folder. We have to be careful with the latter, the 3rd party vendor libraries all have to support the PHP versions 7.4 to 8.3.

Right, thought the compat is set to 7.4 so it shouldn't cause any issues for older versions, but we should not be trying to style them to OC uses, it's a waist of time and would probably reduce the number of rules that can be applied.

@AJenbo
Copy link
Copy Markdown
Contributor

AJenbo commented Jan 4, 2024

Ok, looks like it wasn't causing much of an issue and the initial run with the larger rule set was done properly so the rules I disabled where valid. I fixed the config and this should now work correctly.

@AJenbo AJenbo merged commit 7ed1948 into opencart:3.0.x.x Jan 4, 2024
@AJenbo
Copy link
Copy Markdown
Contributor

AJenbo commented Jan 4, 2024

@condor2 I have enabled 117 rules that the code already abides by, that leaves 93 that you can evaluate and see which to leave out and which would be ok to adjust to for the 3.0 branch.

@condor2
Copy link
Copy Markdown
Contributor Author

condor2 commented Jan 4, 2024

@AJenbo I am not the boss for 3.0.x.x :)

@AJenbo
Copy link
Copy Markdown
Contributor

AJenbo commented Jan 4, 2024

Ok, my guess it that it will just stay like this then :)

Do you intent to solve the 56 issues found by PHPStan?

@condor2
Copy link
Copy Markdown
Contributor Author

condor2 commented Jan 4, 2024

@AJenbo I made a test on a repo with some commands disabled after I have ignored some files.....
And this I have get...maybe for 3.0.x.x maintainers looks cosmetics....

https://github.com/condor2/3.0.x.x-testing-only/commit/8a964a38c5bab419cf94afc6970b0cd6eff35191

Maybe @mhcwebdesign will fix that 56 issues :)

@AJenbo
Copy link
Copy Markdown
Contributor

AJenbo commented Jan 4, 2024

Ok, You will need to create a PR and have the regular 3.0 maintainer evaluate this since I'm not well versed enough in how it works to evaluate if it's breaking or an acceptable level of change.

@condor2 condor2 deleted the patch-1 branch January 4, 2024 13:58
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