-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Removed friendsofphp/php-cs-fixer from dev dependencies #1174
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
Conversation
|
@OskarStark do you know why tests are failing in PHP 8 with the following message? In 34cadff I've tried to use the most modern PHPUnit 9 version when running tests in PHP 8, but it's not working 😐 |
|
Is there a particular reason for this? It's basically saying that you expect CS fixes to only be handled through a CI workflow, devs wouldn't be able to (easily) run the fixer locally and make corrections themselves. |
|
@mbabker the reasoning is that php-cs-fixer is one of those few tools that are usually installed globally on your system, so most developers can run But please, don't think that I'm telling developers how should they use this or any other tool. Whatever they do, it's fine. Don't allow anybody tell you how you should use your tools. Thanks! |
|
I'm mostly curious, that's all. Personally, I've never heard of it being installed as a global tool, and my workflows (both in OSS and paid work) has it as a per-project tool. I think the "weird" part for me (for lack of better terms) is that it feels like the preferred workflow is make changes locally, push to the repo, and wait for CI to tell you what to fix in your code versus just running |
| name: "${{ matrix.operating-system }} / PHP ${{ matrix.php-version }}" | ||
| runs-on: ${{ matrix.operating-system }} | ||
| continue-on-error: ${{ matrix.allow-failures }} | ||
| continue-on-error: false |
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.
It's continue-on-error: [false] ?
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.
This is fine
34cadff to
bce23b0
Compare
|
GitHub Actions show the following error. Anybody knows how to solve it? Thanks! |
For my part, I have tested different approaches, and they always have advantages and disadvantages. What a surprise... 😄 CI tools installed in the projectIt allows developers to use the tools without having to install anything other than the project. On the other hand, you add dependencies to your project that could potentially conflict. CI tools installed globallyIt allows developers to install tools without conflicting with project dependencies. On the other hand, these tools can still conflict with each other, and it's impossible to control each developer configuration within a team. CI tools with Docker imagesIt allows developers to use different versions of different tools without any risk of conflicts. It will also enable tests to be run under predefined conditions, regardless of the local configuration. On the other hand, you may discover new errors in your pipelines even though you have not modified your source code if you use a dynamic image (e.g. TL;DRChoose wisely according to your own constraints, as always. Furthermore and regardless of the solution used, it must be properly documented to prevent people from exclusively using the pipelines to perform tests. |
Have you tried to declare an environment variable using this syntax? |
.github/workflows/ci.yaml
Outdated
|
|
||
| - if: matrix.php-version == '8.0' | ||
| name: "Install PHPUnit for PHP 8" | ||
| run: SYMFONY_PHPUNIT_VERSION=9.4 vendor/bin/simple-phpunit install |
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.
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.
It worked perfectly! You are a genius! Thanks Oskar.
4188667 to
d36d83b
Compare

We can remove this because we're now using PHP-CS-Fixer via a Docker image created by @OskarStark and run via GitHub Actions (see #1171)