Updated Rector to commit b84fe9524aa20e200f743f13f6925d93225c6280

b84fe9524a [Php56] Reduce origNode check on UndefinedVariableResolver (#4033)
This commit is contained in:
Tomas Votruba 2023-05-31 00:18:13 +00:00
parent 3342a558a3
commit 089eca6986
22 changed files with 175 additions and 137 deletions

2
vendor/autoload.php vendored
View File

@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit0ea88f9b1da4440ccfa80f19914a6ed3::getLoader();
return ComposerAutoloaderInitcbdb7971236cba6ea5ce52127a57d78e::getLoader();

View File

@ -1079,6 +1079,7 @@ return array(
'RectorPrefix202305\\Symfony\\Contracts\\Service\\ServiceSubscriberInterface' => $vendorDir . '/symfony/contracts/Service/ServiceSubscriberInterface.php',
'RectorPrefix202305\\Symfony\\Contracts\\Service\\ServiceSubscriberTrait' => $vendorDir . '/symfony/contracts/Service/ServiceSubscriberTrait.php',
'RectorPrefix202305\\Symfony\\Contracts\\Service\\Test\\ServiceLocatorTest' => $vendorDir . '/symfony/contracts/Service/Test/ServiceLocatorTest.php',
'RectorPrefix202305\\Symfony\\Contracts\\Service\\Test\\ServiceLocatorTestCase' => $vendorDir . '/symfony/contracts/Service/Test/ServiceLocatorTestCase.php',
'RectorPrefix202305\\Symfony\\Contracts\\Translation\\LocaleAwareInterface' => $vendorDir . '/symfony/contracts/Translation/LocaleAwareInterface.php',
'RectorPrefix202305\\Symfony\\Contracts\\Translation\\Test\\TranslatorTest' => $vendorDir . '/symfony/contracts/Translation/Test/TranslatorTest.php',
'RectorPrefix202305\\Symfony\\Contracts\\Translation\\TranslatableInterface' => $vendorDir . '/symfony/contracts/Translation/TranslatableInterface.php',

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit0ea88f9b1da4440ccfa80f19914a6ed3
class ComposerAutoloaderInitcbdb7971236cba6ea5ce52127a57d78e
{
private static $loader;
@ -22,17 +22,17 @@ class ComposerAutoloaderInit0ea88f9b1da4440ccfa80f19914a6ed3
return self::$loader;
}
spl_autoload_register(array('ComposerAutoloaderInit0ea88f9b1da4440ccfa80f19914a6ed3', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInitcbdb7971236cba6ea5ce52127a57d78e', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInit0ea88f9b1da4440ccfa80f19914a6ed3', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInitcbdb7971236cba6ea5ce52127a57d78e', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit0ea88f9b1da4440ccfa80f19914a6ed3::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInitcbdb7971236cba6ea5ce52127a57d78e::getInitializer($loader));
$loader->setClassMapAuthoritative(true);
$loader->register(true);
$filesToLoad = \Composer\Autoload\ComposerStaticInit0ea88f9b1da4440ccfa80f19914a6ed3::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInitcbdb7971236cba6ea5ce52127a57d78e::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInit0ea88f9b1da4440ccfa80f19914a6ed3
class ComposerStaticInitcbdb7971236cba6ea5ce52127a57d78e
{
public static $files = array (
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
@ -1321,6 +1321,7 @@ class ComposerStaticInit0ea88f9b1da4440ccfa80f19914a6ed3
'RectorPrefix202305\\Symfony\\Contracts\\Service\\ServiceSubscriberInterface' => __DIR__ . '/..' . '/symfony/contracts/Service/ServiceSubscriberInterface.php',
'RectorPrefix202305\\Symfony\\Contracts\\Service\\ServiceSubscriberTrait' => __DIR__ . '/..' . '/symfony/contracts/Service/ServiceSubscriberTrait.php',
'RectorPrefix202305\\Symfony\\Contracts\\Service\\Test\\ServiceLocatorTest' => __DIR__ . '/..' . '/symfony/contracts/Service/Test/ServiceLocatorTest.php',
'RectorPrefix202305\\Symfony\\Contracts\\Service\\Test\\ServiceLocatorTestCase' => __DIR__ . '/..' . '/symfony/contracts/Service/Test/ServiceLocatorTestCase.php',
'RectorPrefix202305\\Symfony\\Contracts\\Translation\\LocaleAwareInterface' => __DIR__ . '/..' . '/symfony/contracts/Translation/LocaleAwareInterface.php',
'RectorPrefix202305\\Symfony\\Contracts\\Translation\\Test\\TranslatorTest' => __DIR__ . '/..' . '/symfony/contracts/Translation/Test/TranslatorTest.php',
'RectorPrefix202305\\Symfony\\Contracts\\Translation\\TranslatableInterface' => __DIR__ . '/..' . '/symfony/contracts/Translation/TranslatableInterface.php',
@ -3068,9 +3069,9 @@ class ComposerStaticInit0ea88f9b1da4440ccfa80f19914a6ed3
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit0ea88f9b1da4440ccfa80f19914a6ed3::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit0ea88f9b1da4440ccfa80f19914a6ed3::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit0ea88f9b1da4440ccfa80f19914a6ed3::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInitcbdb7971236cba6ea5ce52127a57d78e::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitcbdb7971236cba6ea5ce52127a57d78e::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitcbdb7971236cba6ea5ce52127a57d78e::$classMap;
}, null, ClassLoader::class);
}

View File

@ -1920,12 +1920,12 @@
"source": {
"type": "git",
"url": "https:\/\/github.com\/rectorphp\/rector-downgrade-php.git",
"reference": "36f54614208d563d290d2c8eb5e4dba92c053a1a"
"reference": "b9b87e1cc777a055d6e1c883a6fb541384f43da1"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/36f54614208d563d290d2c8eb5e4dba92c053a1a",
"reference": "36f54614208d563d290d2c8eb5e4dba92c053a1a",
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-downgrade-php\/zipball\/b9b87e1cc777a055d6e1c883a6fb541384f43da1",
"reference": "b9b87e1cc777a055d6e1c883a6fb541384f43da1",
"shasum": ""
},
"require": {
@ -1949,7 +1949,7 @@
"tomasvotruba\/type-coverage": "^0.2",
"tomasvotruba\/unused-public": "^0.1"
},
"time": "2023-05-30T15:48:28+00:00",
"time": "2023-05-31T00:12:23+00:00",
"default-branch": true,
"type": "rector-extension",
"extra": {
@ -2365,17 +2365,17 @@
},
{
"name": "symfony\/contracts",
"version": "v3.2.1",
"version_normalized": "3.2.1.0",
"version": "v3.3.0",
"version_normalized": "3.3.0.0",
"source": {
"type": "git",
"url": "https:\/\/github.com\/symfony\/contracts.git",
"reference": "8ec95320f72fd012bf6335498c8f6c8d64957346"
"reference": "9e4b5e4e44e7620475dbceecf7c72c3883f3ea35"
},
"dist": {
"type": "zip",
"url": "https:\/\/api.github.com\/repos\/symfony\/contracts\/zipball\/8ec95320f72fd012bf6335498c8f6c8d64957346",
"reference": "8ec95320f72fd012bf6335498c8f6c8d64957346",
"url": "https:\/\/api.github.com\/repos\/symfony\/contracts\/zipball\/9e4b5e4e44e7620475dbceecf7c72c3883f3ea35",
"reference": "9e4b5e4e44e7620475dbceecf7c72c3883f3ea35",
"shasum": ""
},
"require": {
@ -2398,18 +2398,11 @@
"require-dev": {
"symfony\/polyfill-intl-idn": "^1.10"
},
"suggest": {
"symfony\/cache-implementation": "",
"symfony\/event-dispatcher-implementation": "",
"symfony\/http-client-implementation": "",
"symfony\/service-implementation": "",
"symfony\/translation-implementation": ""
},
"time": "2023-03-01T10:32:47+00:00",
"time": "2023-05-30T17:17:10+00:00",
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "3.3-dev"
"dev-main": "3.4-dev"
}
},
"installation-source": "dist",
@ -2449,7 +2442,7 @@
"standards"
],
"support": {
"source": "https:\/\/github.com\/symfony\/contracts\/tree\/v3.2.1"
"source": "https:\/\/github.com\/symfony\/contracts\/tree\/v3.3.0"
},
"funding": [
{

File diff suppressed because one or more lines are too long

View File

@ -9,7 +9,7 @@ namespace Rector\RectorInstaller;
*/
final class GeneratedConfig
{
public const EXTENSIONS = array('rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 7f0656f'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 36f5461'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main e276dee'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 2348d4f'));
public const EXTENSIONS = array('rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 7f0656f'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main b9b87e1'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main e276dee'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 2348d4f'));
private function __construct()
{
}

View File

@ -10,6 +10,7 @@ use PhpParser\Node\Expr\Closure;
use PhpParser\Node\Expr\ClosureUse;
use PhpParser\Node\Expr\FuncCall;
use PhpParser\Node\Expr\StaticCall;
use PhpParser\Node\Stmt;
use PhpParser\Node\Stmt\Expression;
use PhpParser\Node\Stmt\Return_;
use Rector\Core\Rector\AbstractRector;
@ -37,7 +38,7 @@ final class DowngradeClosureFromCallableRector extends AbstractRector
*/
public function getNodeTypes() : array
{
return [Expression::class];
return [Expression::class, Return_::class];
}
public function getRuleDefinition() : RuleDefinition
{
@ -53,10 +54,14 @@ CODE_SAMPLE
)]);
}
/**
* @param Expression $node
* @param Expression|Return_ $node
* @return Stmt[]|null
*/
public function refactor(Node $node)
public function refactor(Node $node) : ?array
{
if ($node instanceof Return_) {
return $this->refactorReturn($node);
}
if (!$node->expr instanceof Assign) {
return null;
}
@ -79,7 +84,30 @@ CODE_SAMPLE
$closure->stmts[] = new Return_($innerFuncCall);
$assign->expr = $closure;
return [$assignExpression, new Expression($assign)];
// return $closure;
}
/**
* @return Stmt[]|null
*/
private function refactorReturn(Return_ $return) : ?array
{
if (!$return->expr instanceof StaticCall) {
return null;
}
$staticCall = $return->expr;
if ($this->shouldSkipStaticCall($staticCall)) {
return null;
}
if (!isset($staticCall->getArgs()[0])) {
return null;
}
$tempVariable = $this->namedVariableFactory->createVariable($staticCall, 'callable');
$assignExpression = new Expression(new Assign($tempVariable, $staticCall->getArgs()[0]->value));
$innerFuncCall = new FuncCall($tempVariable, [new Arg($this->nodeFactory->createFuncCall('func_get_args'), \false, \true)]);
$closure = new Closure();
$closure->uses[] = new ClosureUse($tempVariable);
$closure->stmts[] = new Return_($innerFuncCall);
$return->expr = $closure;
return [$assignExpression, $return];
}
private function shouldSkipStaticCall(StaticCall $staticCall) : bool
{

View File

@ -1,6 +1,11 @@
CHANGELOG
=========
3.3
---
* Add option `crypto_method` to `HttpClientInterface` to define the minimum TLS version to accept
3.2
---

View File

@ -26,9 +26,6 @@
"php": ">=8.1",
"psr\/cache": "^3.0"
},
"suggest": {
"symfony\/cache-implementation": ""
},
"autoload": {
"psr-4": {
"RectorPrefix202305\\Symfony\\Contracts\\Cache\\": ""
@ -37,7 +34,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-main": "3.3-dev"
"dev-main": "3.4-dev"
},
"thanks": {
"name": "symfony\/contracts",

View File

@ -25,7 +25,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-main": "3.3-dev"
"dev-main": "3.4-dev"
},
"thanks": {
"name": "symfony\/contracts",

View File

@ -26,9 +26,6 @@
"php": ">=8.1",
"psr\/event-dispatcher": "^1"
},
"suggest": {
"symfony\/event-dispatcher-implementation": ""
},
"autoload": {
"psr-4": {
"RectorPrefix202305\\Symfony\\Contracts\\EventDispatcher\\": ""
@ -37,7 +34,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-main": "3.3-dev"
"dev-main": "3.4-dev"
},
"thanks": {
"name": "symfony\/contracts",

View File

@ -66,9 +66,9 @@ interface HttpClientInterface
'no_proxy' => null,
// string - a comma separated list of hosts that do not require a proxy to be reached
'timeout' => null,
// float - the idle timeout - defaults to ini_get('default_socket_timeout')
// float - the idle timeout (in seconds) - defaults to ini_get('default_socket_timeout')
'max_duration' => 0,
// float - the maximum execution time for the request+response as a whole;
// float - the maximum execution time (in seconds) for the request+response as a whole;
// a value lower than or equal to 0 means it is unlimited
'bindto' => '0',
// string - the interface or the local socket to bind to
@ -83,6 +83,8 @@ interface HttpClientInterface
'ciphers' => null,
'peer_fingerprint' => null,
'capture_peer_cert_chain' => \false,
'crypto_method' => \STREAM_CRYPTO_METHOD_TLSv1_2_CLIENT,
// STREAM_CRYPTO_METHOD_TLSv*_CLIENT - minimum TLS version
'extra' => [],
];
/**

View File

@ -74,6 +74,11 @@ switch ($vars['REQUEST_URI']) {
case '/301/invalid':
\header('Location: //?foo=bar', \true, 301);
break;
case '/301/proxy':
case 'http://localhost:8057/301/proxy':
case 'http://127.0.0.1:8057/301/proxy':
\header('Location: http://localhost:8057/', \true, 301);
break;
case '/302':
if (!isset($vars['HTTP_AUTHORIZATION'])) {
\header('Location: http://localhost:8057/', \true, 302);

View File

@ -684,6 +684,10 @@ abstract class HttpClientTestCase extends TestCase
} finally {
unset($_SERVER['http_proxy']);
}
$response = $client->request('GET', 'http://localhost:8057/301/proxy', ['proxy' => 'http://localhost:8057']);
$body = $response->toArray();
$this->assertSame('localhost:8057', $body['HTTP_HOST']);
$this->assertMatchesRegularExpression('#^http://(localhost|127\\.0\\.0\\.1):8057/$#', $body['REQUEST_URI']);
}
public function testNoProxy()
{

View File

@ -25,9 +25,6 @@
"require": {
"php": ">=8.1"
},
"suggest": {
"symfony\/http-client-implementation": ""
},
"autoload": {
"psr-4": {
"RectorPrefix202305\\Symfony\\Contracts\\HttpClient\\": ""
@ -39,7 +36,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-main": "3.3-dev"
"dev-main": "3.4-dev"
},
"thanks": {
"name": "symfony\/contracts",

View File

@ -10,74 +10,12 @@
*/
namespace RectorPrefix202305\Symfony\Contracts\Service\Test;
use PHPUnit\Framework\TestCase;
use RectorPrefix202305\Psr\Container\ContainerInterface;
use RectorPrefix202305\Symfony\Contracts\Service\ServiceLocatorTrait;
abstract class ServiceLocatorTest extends TestCase
{
protected function getServiceLocator(array $factories) : ContainerInterface
\class_alias(ServiceLocatorTestCase::class, ServiceLocatorTest::class);
if (\false) {
/**
* @deprecated since PHPUnit 9.6
*/
class ServiceLocatorTest
{
return new class($factories) implements ContainerInterface
{
use ServiceLocatorTrait;
};
}
public function testHas()
{
$locator = $this->getServiceLocator(['foo' => function () {
return 'bar';
}, 'bar' => function () {
return 'baz';
}, function () {
return 'dummy';
}]);
$this->assertTrue($locator->has('foo'));
$this->assertTrue($locator->has('bar'));
$this->assertFalse($locator->has('dummy'));
}
public function testGet()
{
$locator = $this->getServiceLocator(['foo' => function () {
return 'bar';
}, 'bar' => function () {
return 'baz';
}]);
$this->assertSame('bar', $locator->get('foo'));
$this->assertSame('baz', $locator->get('bar'));
}
public function testGetDoesNotMemoize()
{
$i = 0;
$locator = $this->getServiceLocator(['foo' => function () use(&$i) {
++$i;
return 'bar';
}]);
$this->assertSame('bar', $locator->get('foo'));
$this->assertSame('bar', $locator->get('foo'));
$this->assertSame(2, $i);
}
public function testThrowsOnUndefinedInternalService()
{
if (!$this->getExpectedException()) {
$this->expectException(\RectorPrefix202305\Psr\Container\NotFoundExceptionInterface::class);
$this->expectExceptionMessage('The service "foo" has a dependency on a non-existent service "bar". This locator only knows about the "foo" service.');
}
$locator = $this->getServiceLocator(['foo' => function () use(&$locator) {
return $locator->get('bar');
}]);
$locator->get('foo');
}
public function testThrowsOnCircularReference()
{
$this->expectException(\RectorPrefix202305\Psr\Container\ContainerExceptionInterface::class);
$this->expectExceptionMessage('Circular reference detected for service "bar", path: "bar -> baz -> bar".');
$locator = $this->getServiceLocator(['foo' => function () use(&$locator) {
return $locator->get('bar');
}, 'bar' => function () use(&$locator) {
return $locator->get('baz');
}, 'baz' => function () use(&$locator) {
return $locator->get('bar');
}]);
$locator->get('foo');
}
}

View File

@ -0,0 +1,83 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace RectorPrefix202305\Symfony\Contracts\Service\Test;
use PHPUnit\Framework\TestCase;
use RectorPrefix202305\Psr\Container\ContainerInterface;
use RectorPrefix202305\Symfony\Contracts\Service\ServiceLocatorTrait;
abstract class ServiceLocatorTestCase extends TestCase
{
protected function getServiceLocator(array $factories) : ContainerInterface
{
return new class($factories) implements ContainerInterface
{
use ServiceLocatorTrait;
};
}
public function testHas()
{
$locator = $this->getServiceLocator(['foo' => function () {
return 'bar';
}, 'bar' => function () {
return 'baz';
}, function () {
return 'dummy';
}]);
$this->assertTrue($locator->has('foo'));
$this->assertTrue($locator->has('bar'));
$this->assertFalse($locator->has('dummy'));
}
public function testGet()
{
$locator = $this->getServiceLocator(['foo' => function () {
return 'bar';
}, 'bar' => function () {
return 'baz';
}]);
$this->assertSame('bar', $locator->get('foo'));
$this->assertSame('baz', $locator->get('bar'));
}
public function testGetDoesNotMemoize()
{
$i = 0;
$locator = $this->getServiceLocator(['foo' => function () use(&$i) {
++$i;
return 'bar';
}]);
$this->assertSame('bar', $locator->get('foo'));
$this->assertSame('bar', $locator->get('foo'));
$this->assertSame(2, $i);
}
public function testThrowsOnUndefinedInternalService()
{
if (!$this->getExpectedException()) {
$this->expectException(\RectorPrefix202305\Psr\Container\NotFoundExceptionInterface::class);
$this->expectExceptionMessage('The service "foo" has a dependency on a non-existent service "bar". This locator only knows about the "foo" service.');
}
$locator = $this->getServiceLocator(['foo' => function () use(&$locator) {
return $locator->get('bar');
}]);
$locator->get('foo');
}
public function testThrowsOnCircularReference()
{
$this->expectException(\RectorPrefix202305\Psr\Container\ContainerExceptionInterface::class);
$this->expectExceptionMessage('Circular reference detected for service "bar", path: "bar -> baz -> bar".');
$locator = $this->getServiceLocator(['foo' => function () use(&$locator) {
return $locator->get('bar');
}, 'bar' => function () use(&$locator) {
return $locator->get('baz');
}, 'baz' => function () use(&$locator) {
return $locator->get('bar');
}]);
$locator->get('foo');
}
}

View File

@ -29,9 +29,6 @@
"conflict": {
"ext-psr": "<1.1|>=2"
},
"suggest": {
"symfony\/service-implementation": ""
},
"autoload": {
"psr-4": {
"RectorPrefix202305\\Symfony\\Contracts\\Service\\": ""
@ -43,7 +40,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-main": "3.3-dev"
"dev-main": "3.4-dev"
},
"thanks": {
"name": "symfony\/contracts",

View File

@ -198,13 +198,13 @@ class TranslatorTest extends TestCase
new-line in it. Selector = 0.|{1}This is a text with a
new-line in it. Selector = 1.|[1,Inf]This is a text with a
new-line in it. Selector > 1.', 5],
// with double-quotes and id split accros lines
// with double-quotes and id split across lines
['This is a text with a
new-line in it. Selector = 1.', '{0}This is a text with a
new-line in it. Selector = 0.|{1}This is a text with a
new-line in it. Selector = 1.|[1,Inf]This is a text with a
new-line in it. Selector > 1.', 1],
// with single-quotes and id split accros lines
// with single-quotes and id split across lines
['This is a text with a
new-line in it. Selector > 1.', '{0}This is a text with a
new-line in it. Selector = 0.|{1}This is a text with a
@ -212,7 +212,7 @@ class TranslatorTest extends TestCase
new-line in it. Selector > 1.', 5],
// with single-quotes and \n in text
['This is a text with a\\nnew-line in it. Selector = 0.', '{0}This is a text with a\\nnew-line in it. Selector = 0.|{1}This is a text with a\\nnew-line in it. Selector = 1.|[1,Inf]This is a text with a\\nnew-line in it. Selector > 1.', 0],
// with double-quotes and id split accros lines
// with double-quotes and id split across lines
["This is a text with a\nnew-line in it. Selector = 1.", "{0}This is a text with a\nnew-line in it. Selector = 0.|{1}This is a text with a\nnew-line in it. Selector = 1.|[1,Inf]This is a text with a\nnew-line in it. Selector > 1.", 1],
// escape pipe
['This is a text with | in it. Selector = 0.', '{0}This is a text with || in it. Selector = 0.|{1}This is a text with || in it. Selector = 1.', 0],

View File

@ -25,9 +25,6 @@
"require": {
"php": ">=8.1"
},
"suggest": {
"symfony\/translation-implementation": ""
},
"autoload": {
"psr-4": {
"RectorPrefix202305\\Symfony\\Contracts\\Translation\\": ""
@ -39,7 +36,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-main": "3.3-dev"
"dev-main": "3.4-dev"
},
"thanks": {
"name": "symfony\/contracts",

View File

@ -42,13 +42,6 @@
"symfony\/service-contracts": "self.version",
"symfony\/translation-contracts": "self.version"
},
"suggest": {
"symfony\/cache-implementation": "",
"symfony\/event-dispatcher-implementation": "",
"symfony\/http-client-implementation": "",
"symfony\/service-implementation": "",
"symfony\/translation-implementation": ""
},
"autoload": {
"psr-4": {
"RectorPrefix202305\\Symfony\\Contracts\\": ""
@ -63,7 +56,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-main": "3.3-dev"
"dev-main": "3.4-dev"
}
}
}