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

[5.3] add composer scripts for cs check and add excludes to php-cs-fixer config #44498

Open
wants to merge 2 commits into
base: 5.3-dev
Choose a base branch
from

Conversation

LadySolveig
Copy link
Contributor

@LadySolveig LadySolveig commented Nov 21, 2024

Pull Request for Issue # .

Summary of Changes

Add commands

  • composer run phpcs
  • composer run csfixer
    to composer.json for running cs check same way as it is configured in our automated testing setup, to make it easy for contributors to run it locally.

Add excludes for cacheand logsdirectory to php-cs-fixer configuration as we have the same exlcudes for phpcs.
Improvement for our nice contributors.

Testing Instructions

Open a terminal (and step into the cloned joomla developement folder)

  • If not already done: type composer i
  • type composer run phpcs
  • type composer run csfixer

Actual result BEFORE applying this Pull Request

grafik

Expected result AFTER applying this Pull Request

grafik

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org: Update codestyle.md Manual#337

  • No documentation changes for manual.joomla.org needed

@brianteeman
Copy link
Contributor

brianteeman commented Nov 21, 2024

is it expected to get this error at the end of running phpcs?

image

and this error at the end of running csfixer

image

@LadySolveig
Copy link
Contributor Author

No, absolutely not an expected result.
I have tried to replicate your issue but unfortunately I can't recreate it at the moment.

I have seen you run it directly on Windows.
Since I usually use Linux, I have now installed php 8.3 and composer directly on Windows.

But for me it runs without errors here too.

composer run phpcs
Screenshot 2024-11-22 084946
Screenshot 2024-11-22 084428

composer run csfixer
Screenshot 2024-11-22 084803

Is your IDE or your Git client possibly doing something with the line endings?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants