mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-18 22:08:00 +01:00
drop laravel-to-symfony level, too poor to be useful
This commit is contained in:
parent
65a0b5bed3
commit
583a8b5ef3
@ -1,11 +0,0 @@
|
||||
services:
|
||||
Rector\Rector\Class_\ClassReplacerRector:
|
||||
$oldToNewClasses:
|
||||
'Illuminate\Http\Response': 'Symfony\Component\HttpFoundation\Response'
|
||||
'App\Http\Controllers\Controller': 'Symfony\Bundle\FrameworkBundle\Controller\Controller'
|
||||
|
||||
|
||||
# view('...') => $this->render('...')
|
||||
Rector\Rector\Function_\FunctionToMethodCallRector:
|
||||
$functionToMethodCall:
|
||||
'view': ['this', 'render']
|
@ -1,14 +0,0 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace App\Controller;
|
||||
|
||||
use \Symfony\Bundle\FrameworkBundle\Controller\Controller;
|
||||
use \Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
class UserController extends \Symfony\Bundle\FrameworkBundle\Controller\Controller
|
||||
{
|
||||
public function show(): \Symfony\Component\HttpFoundation\Response
|
||||
{
|
||||
return $this->render('user.profile');
|
||||
}
|
||||
}
|
@ -1,27 +0,0 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace Rector\Tests\Rector\FrameworkMigration\LaravelToSymfony;
|
||||
|
||||
use Iterator;
|
||||
use Rector\Testing\PHPUnit\AbstractRectorTestCase;
|
||||
|
||||
final class LaravelToSymfonyTest extends AbstractRectorTestCase
|
||||
{
|
||||
/**
|
||||
* @dataProvider provideWrongToFixedFiles()
|
||||
*/
|
||||
public function test(string $wrong, string $fixed): void
|
||||
{
|
||||
$this->doTestFileMatchesExpectedContent($wrong, $fixed);
|
||||
}
|
||||
|
||||
public function provideWrongToFixedFiles(): Iterator
|
||||
{
|
||||
yield [__DIR__ . '/Wrong/wrong.php.inc', __DIR__ . '/Correct/correct.php.inc'];
|
||||
}
|
||||
|
||||
protected function provideConfig(): string
|
||||
{
|
||||
return __DIR__ . '/config.yml';
|
||||
}
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
namespace App\Controller;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Response;
|
||||
|
||||
class UserController extends Controller
|
||||
{
|
||||
public function show(): Response
|
||||
{
|
||||
return view('user.profile');
|
||||
}
|
||||
}
|
@ -1,2 +0,0 @@
|
||||
imports:
|
||||
- { resource: '../../../../config/level/framework-migration/laravel-to-symfony.yml' }
|
Loading…
x
Reference in New Issue
Block a user