Skip to content

fix cs check in CI - #829

Merged
garak merged 1 commit into
KnpLabs:masterfrom
garak:fix-ci-cs
Apr 16, 2025
Merged

garak merged 1 commit into
KnpLabs:masterfrom
garak:fix-ci-cs

Conversation

@garak

@garak garak commented Apr 15, 2025

Copy link
Copy Markdown
Collaborator

Our current build of php-cs-fixer in CI fixes the source code instead of checking it: if a file has a wrong coding style, it is changed. That's useless, since the file is only changed in the build instance, and mainly it doesn't exit with a failing code.

I also added the latest version of PHPUnit

@garak
garak requested review from alexpozzi and Copilot April 15, 2025 06:11

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request updates the CI configuration so that PHP-CS-Fixer only checks coding style without modifying source files, and also updates PHPUnit to its latest version.

  • Configure PHP-CS-Fixer with dry-run mode to display diffs without applying fixes.
  • Upgrade PHPUnit to the latest version.
Files not reviewed (1)
  • composer.json: Language not supported
Comments suppressed due to low confidence (1)

.github/workflows/build.yaml:29

  • Ensure that using '--diff --dry-run' causes PHP-CS-Fixer to exit with a non-zero code when coding style issues are found, so that the CI build fails appropriately.
args: --diff --dry-run

@garak

garak commented Apr 15, 2025

Copy link
Copy Markdown
Collaborator Author

The failure visible in https://github.com/KnpLabs/KnpPaginatorBundle/actions/runs/14462535518/job/40557680604?pr=829 shows exactly what I mean.
I'll fix the CS and squash the commits

@alexpozzi alexpozzi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you!

@garak
garak merged commit a9d9a49 into KnpLabs:master Apr 16, 2025
@garak
garak deleted the fix-ci-cs branch April 16, 2025 16:04
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