Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fabbot.io tries to apply a patch for #[\Attribute #40149

Closed
@wkania

Description

@wkania

Symfony version(s) affected: 5.x

Description
fabbot is using PHP CS Fixer 2.18, so this should not be a problem. The leading backslash is recommended.

Current code
Patch

diff -ru src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntity.php src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntity.php
--- src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntity.php	2021-02-10 21:32:14.283031188 +0000
+++ src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntity.php	2021-02-10 21:32:15.265010897 +0000
@@ -21,7 +21,7 @@
  *
  * @author Benjamin Eberlei <[email protected]>
  */
-#[\Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
+#[Attribute(\Attribute::TARGET_CLASS | \Attribute::IS_REPEATABLE)]
 class UniqueEntity extends Constraint
 {
     public const NOT_UNIQUE_ERROR = '23bd9dbf-6b9b-41cd-a99e-4844bcf3077f';

How to reproduce

Possible Solution

Additional context
Checks were not successful in the PR.

I checked it locally and there was no problem:

composer require --working-dir=tools/php-cs-fixer friendsofphp/php-cs-fixer:2.18.0
tools/php-cs-fixer/vendor/bin/php-cs-fixer fix src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntity.php 
Loaded config default from ".php_cs.dist".
Using cache file ".php_cs.cache".
Paths from configuration file have been overridden by paths provided as command arguments.

Fixed all files in 0.097 seconds, 12.000 MB memory used

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions