mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 17:10:53 +00:00
Remove error suppression to fix unit tests
This commit is contained in:
parent
fabd42ce32
commit
9878afb30e
3 changed files with 8 additions and 3 deletions
2
ecs.php
2
ecs.php
|
|
@ -13,6 +13,7 @@ declare(strict_types=1);
|
|||
|
||||
use PhpCsFixer\Fixer\ClassNotation\VisibilityRequiredFixer;
|
||||
use PhpCsFixer\Fixer\Comment\HeaderCommentFixer;
|
||||
use PhpCsFixer\Fixer\LanguageConstruct\ErrorSuppressionFixer;
|
||||
use PhpCsFixer\Fixer\Phpdoc\PhpdocSeparationFixer;
|
||||
use SlevomatCodingStandard\Sniffs\Commenting\InlineDocCommentDeclarationSniff;
|
||||
use Symplify\EasyCodingStandard\Config\ECSConfig;
|
||||
|
|
@ -26,6 +27,7 @@ return static function (ECSConfig $config): void {
|
|||
InlineDocCommentDeclarationSniff::class . '.MissingVariable',
|
||||
InlineDocCommentDeclarationSniff::class . '.NoAssignment',
|
||||
VisibilityRequiredFixer::class => ['*Spec.php'],
|
||||
ErrorSuppressionFixer::class => 'src/Sylius/Bundle/CoreBundle/DependencyInjection/Compiler/BackwardsCompatibility/CancelOrderStateMachineCallbackPass.php',
|
||||
'**/var/*',
|
||||
]);
|
||||
$config->ruleWithConfiguration(PhpdocSeparationFixer::class, ['groups' => [['Given', 'When', 'Then']]]);
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ final class CancelOrderStateMachineCallbackPass implements CompilerPassInterface
|
|||
$smConfigs = $container->getParameter('sm.configs');
|
||||
|
||||
if (isset($smConfigs['sylius_order']['callbacks']['after']['sylis_cancel_order'])) {
|
||||
@trigger_error(
|
||||
trigger_error(
|
||||
sprintf(
|
||||
'Callback "%s" was renamed to "%s". The old name will be removed in Sylius 2.0, use the new name to override it.',
|
||||
'winzou_state_machine.sylius_order.callbacks.after.sylis_cancel_order',
|
||||
|
|
|
|||
|
|
@ -74,7 +74,9 @@ class CancelOrderStateMachineCallbackPassTest extends AbstractCompilerPassTestCa
|
|||
],
|
||||
];
|
||||
|
||||
public function test_it_triggers_deprecation_error_when_old_callback_name_is_used(): void
|
||||
|
||||
/** @test */
|
||||
public function it_triggers_deprecation_error_when_old_callback_name_is_used(): void
|
||||
{
|
||||
$this->setParameter('sm.configs', $this->smConfigs);
|
||||
|
||||
|
|
@ -88,7 +90,8 @@ class CancelOrderStateMachineCallbackPassTest extends AbstractCompilerPassTestCa
|
|||
$this->compile();
|
||||
}
|
||||
|
||||
public function test_it_converts_from_old_name_to_new_name(): void
|
||||
/** @test */
|
||||
public function it_converts_from_old_name_to_new_name(): void
|
||||
{
|
||||
$this->setParameter('sm.configs', $this->smConfigs);
|
||||
$this->expectDeprecation();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue