- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Allow Symfony 6 #6095
Allow Symfony 6 #6095
Conversation
Seems like Prophecy is having some problems here: phpspec/prophecy#527 |
b6de401
to
b5c4547
Compare
b5c4547
to
8a72121
Compare
2e8f0ff
to
07ad3da
Compare
any updates? |
Just FYI, this is last blocker for Symplify and Rector ecosystem to upgrade to Symfony 6. Any ETA on moving this forward? |
Temporary solution to use this PR for those whom need it: {
"require-dev": {
"friendsofphp/php-cs-fixer": "dev-improvement/symfony-6 as 3.3.2"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/derrabus/PHP-CS-Fixer"
}
]
} |
07ad3da
to
f86687c
Compare
Do Simplify and Rector actually need to be installed along with other app's dependencies? If not, I'd suggest using a different installation method, e.g. a dedicated composer.json, which would prevent dependencies conflicts. |
@julienfalque Unfortunately yes, Symplify ECS uses php-cs-fixer directly as it wraps it, and Rector needs coding standard tool to tidy up spaces. |
I get the point that it would be best to install php-cs-fixer separately from the actual project dependencies. Yet, using GrumPHP along with its php-cs-fixer task requires me to install php-cs-fixer as a dev dependency of the main project. Therefore it would be nice to see support for Symfony 6 soon. 😃 |
CI fails because of php-coveralls/php-coveralls#327 now. |
Why is that a dependency for php-cs-fixer ;)? |
The test is not about the process of linting itself but how the result of a Process that does such linting is transformed into a result object. I wander if updating the test into the following would suffice as replacement: <?php
declare(strict_types=1);
/*
* This file is part of PHP CS Fixer.
*
* (c) Fabien Potencier <fabien@symfony.com>
* Dariusz Rumiński <dariusz.ruminski@gmail.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace PhpCsFixer\Tests\Linter;
use PhpCsFixer\Linter\LintingException;
use PhpCsFixer\Linter\ProcessLintingResult;
use PhpCsFixer\Tests\TestCase;
use Symfony\Component\Process\Process;
/**
* @internal
*
* @covers \PhpCsFixer\Linter\ProcessLintingResult
*/
final class ProcessLintingResultTest extends TestCase
{
public function testCheckOK(): void
{
$process = new Process(['ls']);
$process->run();
static::assertTrue($process->isSuccessful(), 'Test setup failure.');
$result = new ProcessLintingResult($process);
$result->check();
}
public function testCheckFail(): void
{
$process = new Process(['foo']);
$process->run();
static::assertFalse($process->isSuccessful(), 'Test setup failure.');
$result = new ProcessLintingResult($process);
$this->expectException(LintingException::class);
$this->expectExceptionCode($process->getExitCode());
$result->check();
}
} |
c0e2371
to
2e57149
Compare
Thank you @derrabus. |
extra note: during the recurring call, we discussed few approaches how to handle Symfony 6 while fix on Prophecy is not there yet. |
Thank you 👍 |
This PR was merged into the master branch. Discussion ---------- DX: drop hack for Prophecy incompatibility https://github.com/phpspec/prophecy/releases/tag/v1.15.0 follows up #6095 Commits ------- 6cb274a DX: drop hack for Prophecy incompatibility
Replaces #5966
This PR allows to install PHP-CS-Fixer in Symfony 6 applications.