Bug Report
| Subject |
Details |
| Rector version |
last dev-main |
| Installed as |
composer dependency |
Minimal PHP Code Causing Issue
See https://getrector.com/demo/313b144d-037f-4b7e-95b6-709f181d40cc
<?php
/*
* This file is part of the Alice package.
*
* (c) Nelmio <hello@nelm.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Nelmio\Alice\Generator\Resolver;
use Nelmio\Alice\Definition\Value\UniqueValue;
use Nelmio\Alice\Entity\StdClassFactory;
use PHPUnit\Framework\TestCase;
use stdClass;
/**
* @covers \Nelmio\Alice\Generator\Resolver\UniqueValuesPool
* @internal
*/
final class UniqueValuesPoolTest extends TestCase
{
/**
* @depends \Nelmio\Alice\Definition\Value\UniqueValueTest::testIsImmutable
*/
public function testIsImmutable(): void
{
self::assertTrue(true, 'Nothing to do.');
}
}
Responsible rules
AnnotationWithValueToAttributeRector
CoversAnnotationWithValueToAttributeRector
Expected Behavior
The @depends here should be transformed into #[DependsExternal]:
- /**
- * @depends \Nelmio\Alice\Definition\Value\UniqueValueTest::testIsImmutable
- */
+ #[\PHPUnit\Framework\Attributes\DependsExternal(\Nelmio\Alice\Definition\Value\UniqueValueTest::class, 'testIsImmutable')]
Currently rector gives:
- /**
- * @depends \Nelmio\Alice\Definition\Value\UniqueValueTest::testIsImmutable
- */
+ #[\PHPUnit\Framework\Attributes\Depends(\Nelmio\Alice\Definition\Value\UniqueValueTest::testIsImmutable)]
Which is incorrect.
Bug Report
Minimal PHP Code Causing Issue
See https://getrector.com/demo/313b144d-037f-4b7e-95b6-709f181d40cc
Responsible rules
AnnotationWithValueToAttributeRectorCoversAnnotationWithValueToAttributeRectorExpected Behavior
The
@dependshere should be transformed into#[DependsExternal]:Currently rector gives:
Which is incorrect.