Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this only for autoimport + remove, nothing todo with rename, so you can move these fixture tests to tests/Issues/NamespacedUseAutoImport which only check on this functionality for auto import + remove unused import:

https://github.com/rectorphp/rector-src/tree/main/tests/Issues/NamespacedUseAutoImport/Fixture


declare(strict_types=1);

namespace Rector\Tests\Renaming\Rector\Name\RenameClassRector\Source;

use Carbon\Carbon;
use Carbon\CarbonInterface;

/**
* @property \Carbon\CarbonInterface|null $deleted_at
*/
class MergedImportError
{
public function demoFunction(): array
{
return [Carbon::parse('2026-01-01 11:16:01')];
}
}

?>
-----
<?php

declare(strict_types=1);

namespace Rector\Tests\Renaming\Rector\Name\RenameClassRector\Source;

use Carbon\Carbon;
use Carbon\CarbonInterface;

/**
* @property CarbonInterface|null $deleted_at
*/
class MergedImportError
{
public function demoFunction(): array
{
return [Carbon::parse('2026-01-01 11:16:01')];
}
}

?>
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php

declare(strict_types=1);

namespace Rector\Tests\Renaming\Rector\Name\RenameClassRector\Source;

use Illuminate\Support\Carbon;
use Carbon\CarbonInterface;

/**
* @property \Carbon\CarbonInterface|null $deleted_at
*/
class MergedImportErrorOtherVariety
{
public function demoFunction(): array
{
return [Carbon::parse('2026-01-01 11:16:01')];
}
}

?>
-----
<?php

declare(strict_types=1);

namespace Rector\Tests\Renaming\Rector\Name\RenameClassRector\Source;

use Illuminate\Support\Carbon;
use Carbon\CarbonInterface;

/**
* @property CarbonInterface|null $deleted_at
*/
class MergedImportErrorOtherVariety
{
public function demoFunction(): array
{
return [Carbon::parse('2026-01-01 11:16:01')];
}
}

?>
Loading