drop laravel-to-symfony level, too poor to be useful

This commit is contained in:
Tomas Votruba 2018-08-04 22:20:19 +02:00
parent 65a0b5bed3
commit 583a8b5ef3
5 changed files with 0 additions and 68 deletions

View File

@ -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']

View File

@ -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');
}
}

View File

@ -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';
}
}

View File

@ -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');
}
}

View File

@ -1,2 +0,0 @@
imports:
- { resource: '../../../../config/level/framework-migration/laravel-to-symfony.yml' }