2020-07-18 18:57:24 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
2020-08-18 17:57:30 +02:00
|
|
|
use Rector\Generic\Rector\Class_\RemoveInterfacesRector;
|
2020-08-26 12:54:53 +02:00
|
|
|
|
2020-07-29 01:41:20 +02:00
|
|
|
use Rector\Generic\Rector\ClassMethod\AddReturnTypeDeclarationRector;
|
2020-09-12 23:19:08 +02:00
|
|
|
use Rector\Generic\ValueObject\AddReturnTypeDeclaration;
|
2020-08-18 17:57:30 +02:00
|
|
|
use Rector\NetteToSymfony\Rector\Class_\FormControlToControllerAndFormTypeRector;
|
2020-07-18 18:57:24 +02:00
|
|
|
use Rector\NetteToSymfony\Rector\ClassMethod\RouterListToControllerAnnotationsRector;
|
|
|
|
use Rector\NetteToSymfony\Rector\FileSystem\DeleteFactoryInterfaceRector;
|
|
|
|
use Rector\NetteToSymfony\Rector\MethodCall\FromHttpRequestGetHeaderToHeadersGetRector;
|
|
|
|
use Rector\NetteToSymfony\Rector\MethodCall\FromRequestGetParameterToAttributesGetRector;
|
2020-08-18 17:57:30 +02:00
|
|
|
use Rector\Renaming\Rector\ClassConstFetch\RenameClassConstantRector;
|
2020-07-18 18:57:24 +02:00
|
|
|
use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
|
2020-08-18 17:57:30 +02:00
|
|
|
use Rector\Renaming\Rector\Name\RenameClassRector;
|
2020-08-25 00:26:14 +02:00
|
|
|
use Rector\Renaming\ValueObject\MethodCallRename;
|
2020-09-12 23:19:08 +02:00
|
|
|
use Rector\Renaming\ValueObject\RenameClassConstant;
|
2020-08-25 00:26:14 +02:00
|
|
|
use function Rector\SymfonyPhpConfig\inline_value_objects;
|
2020-07-18 18:57:24 +02:00
|
|
|
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
|
|
|
|
|
|
|
return static function (ContainerConfigurator $containerConfigurator): void {
|
2020-07-21 13:42:17 +02:00
|
|
|
$containerConfigurator->import(__DIR__ . '/nette-to-symfony-doctrine.php');
|
|
|
|
$containerConfigurator->import(__DIR__ . '/nette-control-to-symfony-controller.php');
|
|
|
|
$containerConfigurator->import(__DIR__ . '/nette-tester-to-phpunit.php');
|
|
|
|
$containerConfigurator->import(__DIR__ . '/kdyby-to-symfony.php');
|
2020-07-18 18:57:24 +02:00
|
|
|
|
|
|
|
$services = $containerConfigurator->services();
|
|
|
|
|
|
|
|
$services->set(DeleteFactoryInterfaceRector::class);
|
|
|
|
$services->set(FromHttpRequestGetHeaderToHeadersGetRector::class);
|
|
|
|
$services->set(FromRequestGetParameterToAttributesGetRector::class);
|
|
|
|
$services->set(RouterListToControllerAnnotationsRector::class);
|
|
|
|
|
|
|
|
$services->set(AddReturnTypeDeclarationRector::class)
|
2020-07-30 00:43:06 +02:00
|
|
|
->call('configure', [[
|
2020-08-25 20:34:49 +02:00
|
|
|
AddReturnTypeDeclarationRector::METHOD_RETURN_TYPES => inline_value_objects([
|
2020-09-12 23:19:08 +02:00
|
|
|
new AddReturnTypeDeclaration(
|
2020-08-25 20:34:49 +02:00
|
|
|
'Nette\Application\IPresenter',
|
|
|
|
'run',
|
|
|
|
'Symfony\Component\HttpFoundation\Response'
|
|
|
|
),
|
|
|
|
]),
|
2020-07-30 00:43:06 +02:00
|
|
|
]]);
|
2020-07-18 18:57:24 +02:00
|
|
|
|
|
|
|
$services->set(RenameClassRector::class)
|
2020-07-30 00:43:06 +02:00
|
|
|
->call('configure', [[
|
2020-07-30 01:39:41 +02:00
|
|
|
RenameClassRector::OLD_TO_NEW_CLASSES => [
|
2020-07-30 00:43:06 +02:00
|
|
|
'Nette\Application\Request' => 'Symfony\Component\HttpFoundation\Request',
|
|
|
|
'Nette\Http\Request' => 'Symfony\Component\HttpFoundation\Request',
|
|
|
|
'Nette\Http\IRequest' => 'Symfony\Component\HttpFoundation\Request',
|
|
|
|
'Nette\Application\UI\Presenter' => 'Symfony\Bundle\FrameworkBundle\Controller\AbstractController',
|
|
|
|
'Nette\Application\IResponse' => 'Symfony\Component\HttpFoundation\Response',
|
|
|
|
],
|
|
|
|
]]);
|
2020-07-18 18:57:24 +02:00
|
|
|
|
|
|
|
$services->set(RenameMethodRector::class)
|
2020-07-30 00:43:06 +02:00
|
|
|
->call('configure', [[
|
2020-08-25 00:37:12 +02:00
|
|
|
RenameMethodRector::METHOD_CALL_RENAMES => inline_value_objects([
|
2020-08-25 00:26:14 +02:00
|
|
|
new MethodCallRename('Nette\Application\IPresenter', 'run', '__invoke'),
|
|
|
|
new MethodCallRename('Nette\DI\Container', 'getByType', 'get'),
|
|
|
|
new MethodCallRename('Nette\Configurator', 'addConfig', 'load'),
|
|
|
|
new MethodCallRename('Symfony\Component\Config\Loader\LoaderInterface', 'addConfig', 'load'),
|
|
|
|
]),
|
2020-07-30 00:43:06 +02:00
|
|
|
]]);
|
2020-07-18 18:57:24 +02:00
|
|
|
|
|
|
|
$services->set(RemoveInterfacesRector::class)
|
2020-07-30 00:43:06 +02:00
|
|
|
->call('configure', [[
|
2020-07-30 01:39:41 +02:00
|
|
|
RemoveInterfacesRector::INTERFACES_TO_REMOVE => ['Nette\Application\IPresenter'],
|
2020-07-30 00:43:06 +02:00
|
|
|
]]);
|
2020-07-18 18:57:24 +02:00
|
|
|
|
|
|
|
$services->set(RenameClassConstantRector::class)
|
2020-07-30 00:43:06 +02:00
|
|
|
->call('configure', [[
|
2020-08-26 12:54:53 +02:00
|
|
|
RenameClassConstantRector::CLASS_CONSTANT_RENAME => inline_value_objects([
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S100_CONTINUE',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_CONTINUE'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S101_SWITCHING_PROTOCOLS',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_SWITCHING_PROTOCOLS'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S102_PROCESSING',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_PROCESSING'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S200_OK',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_OK'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S201_CREATED',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_CREATED'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S202_ACCEPTED',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_ACCEPTED'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S203_NON_AUTHORITATIVE_INFORMATION',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_NON_AUTHORITATIVE_INFORMATION'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S204_NO_CONTENT',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_NO_CONTENT'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S205_RESET_CONTENT',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_RESET_CONTENT'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S206_PARTIAL_CONTENT',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_PARTIAL_CONTENT'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S207_MULTI_STATUS',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_MULTI_STATUS'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S208_ALREADY_REPORTED',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_ALREADY_REPORTED'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S226_IM_USED',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_IM_USED'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S300_MULTIPLE_CHOICES',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_MULTIPLE_CHOICES'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S301_MOVED_PERMANENTLY',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_MOVED_PERMANENTLY'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S302_FOUND',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_FOUND'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S303_SEE_OTHER',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_SEE_OTHER'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S303_POST_GET',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_SEE_OTHER'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S304_NOT_MODIFIED',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_NOT_MODIFIED'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S305_USE_PROXY',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_USE_PROXY'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S307_TEMPORARY_REDIRECT',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_TEMPORARY_REDIRECT'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S308_PERMANENT_REDIRECT',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_PERMANENTLY_REDIRECT'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S400_BAD_REQUEST',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_BAD_REQUEST'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S401_UNAUTHORIZED',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_UNAUTHORIZED'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S402_PAYMENT_REQUIRED',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_PAYMENT_REQUIRED'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S403_FORBIDDEN',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_FORBIDDEN'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S404_NOT_FOUND',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_NOT_FOUND'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S405_METHOD_NOT_ALLOWED',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_METHOD_NOT_ALLOWED'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S406_NOT_ACCEPTABLE',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_NOT_ACCEPTABLE'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S407_PROXY_AUTHENTICATION_REQUIRED',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_PROXY_AUTHENTICATION_REQUIRED'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S408_REQUEST_TIMEOUT',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_REQUEST_TIMEOUT'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S409_CONFLICT',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_CONFLICT'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S410_GONE',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_GONE'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S411_LENGTH_REQUIRED',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_LENGTH_REQUIRED'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S412_PRECONDITION_FAILED',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_PRECONDITION_FAILED'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S413_REQUEST_ENTITY_TOO_LARGE',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_REQUEST_ENTITY_TOO_LARGE'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S414_REQUEST_URI_TOO_LONG',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_REQUEST_URI_TOO_LONG'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S415_UNSUPPORTED_MEDIA_TYPE',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_UNSUPPORTED_MEDIA_TYPE'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S416_REQUESTED_RANGE_NOT_SATISFIABLE',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_REQUESTED_RANGE_NOT_SATISFIABLE'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S417_EXPECTATION_FAILED',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_EXPECTATION_FAILED'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S421_MISDIRECTED_REQUEST',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_MISDIRECTED_REQUEST'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S422_UNPROCESSABLE_ENTITY',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_UNPROCESSABLE_ENTITY'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S423_LOCKED',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_LOCKED'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S424_FAILED_DEPENDENCY',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_FAILED_DEPENDENCY'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S426_UPGRADE_REQUIRED',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_UPGRADE_REQUIRED'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S428_PRECONDITION_REQUIRED',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_PRECONDITION_REQUIRED'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S429_TOO_MANY_REQUESTS',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_TOO_MANY_REQUESTS'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S431_REQUEST_HEADER_FIELDS_TOO_LARGE',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S451_UNAVAILABLE_FOR_LEGAL_REASONS',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_UNAVAILABLE_FOR_LEGAL_REASONS'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S500_INTERNAL_SERVER_ERROR',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_INTERNAL_SERVER_ERROR'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S501_NOT_IMPLEMENTED',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_NOT_IMPLEMENTED'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S502_BAD_GATEWAY',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_BAD_GATEWAY'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S503_SERVICE_UNAVAILABLE',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_SERVICE_UNAVAILABLE'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S504_GATEWAY_TIMEOUT',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_GATEWAY_TIMEOUT'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S505_HTTP_VERSION_NOT_SUPPORTED',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_VERSION_NOT_SUPPORTED'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S506_VARIANT_ALSO_NEGOTIATES',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_VARIANT_ALSO_NEGOTIATES_EXPERIMENTAL'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S507_INSUFFICIENT_STORAGE',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_INSUFFICIENT_STORAGE'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S508_LOOP_DETECTED',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_LOOP_DETECTED'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S510_NOT_EXTENDED',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_NOT_EXTENDED'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Response',
|
|
|
|
'S511_NETWORK_AUTHENTICATION_REQUIRED',
|
|
|
|
'Symfony\Component\HttpFoundation\Response::HTTP_NETWORK_AUTHENTICATION_REQUIRED'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Request',
|
|
|
|
'GET',
|
|
|
|
'Symfony\Component\HttpFoundation\Request::METHOD_GET'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Request',
|
|
|
|
'POST',
|
|
|
|
'Symfony\Component\HttpFoundation\Request::METHOD_POST'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Request',
|
|
|
|
'HEAD',
|
|
|
|
'Symfony\Component\HttpFoundation\Request::METHOD_HEAD'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Request',
|
|
|
|
'PUT',
|
|
|
|
'Symfony\Component\HttpFoundation\Request::METHOD_PUT'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Request',
|
|
|
|
'DELETE',
|
|
|
|
'Symfony\Component\HttpFoundation\Request::METHOD_DELETE'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Request',
|
|
|
|
'PATCH',
|
|
|
|
'Symfony\Component\HttpFoundation\Request::METHOD_PATCH'
|
|
|
|
),
|
2020-09-12 23:19:08 +02:00
|
|
|
new RenameClassConstant(
|
2020-08-26 12:54:53 +02:00
|
|
|
'Nette\Http\*Request',
|
|
|
|
'OPTIONS',
|
|
|
|
'Symfony\Component\HttpFoundation\Request::METHOD_OPTIONS'
|
|
|
|
),
|
|
|
|
]),
|
2020-07-30 00:43:06 +02:00
|
|
|
]]);
|
2020-07-18 18:57:24 +02:00
|
|
|
|
|
|
|
$services->set(FormControlToControllerAndFormTypeRector::class);
|
|
|
|
};
|