Merge branch '3.4' into 4.3
* 3.4: cs fix Partially Revert "Remove trailing space in all markdown files" [Intl] Explicit check Fix getMaxFilesize() returning zero [DI] fix docblocks in Container* Fixed markdown file [TwigBridge] Replaced plain doc block copies with inheritdoc. [Intl] Cleanup unused language aliases entry
This commit is contained in:
commit
cda8a67df8
@ -760,7 +760,7 @@ Symfony is the result of the work of many people who made the code better
|
|||||||
- Thomas Ploch
|
- Thomas Ploch
|
||||||
- Benjamin Grandfond (benjamin)
|
- Benjamin Grandfond (benjamin)
|
||||||
- Tiago Brito (blackmx)
|
- Tiago Brito (blackmx)
|
||||||
-
|
-
|
||||||
- Richard van den Brand (ricbra)
|
- Richard van den Brand (ricbra)
|
||||||
- develop
|
- develop
|
||||||
- flip111
|
- flip111
|
||||||
|
@ -33,9 +33,7 @@ class RoutingExtension extends AbstractExtension
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a list of functions to add to the existing list.
|
* {@inheritdoc}
|
||||||
*
|
|
||||||
* @return array An array of functions
|
|
||||||
*/
|
*/
|
||||||
public function getFunctions()
|
public function getFunctions()
|
||||||
{
|
{
|
||||||
|
@ -29,11 +29,7 @@ use Twig\Token;
|
|||||||
class TransChoiceTokenParser extends TransTokenParser
|
class TransChoiceTokenParser extends TransTokenParser
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Parses a token and returns a node.
|
* {@inheritdoc}
|
||||||
*
|
|
||||||
* @return Node
|
|
||||||
*
|
|
||||||
* @throws SyntaxError
|
|
||||||
*/
|
*/
|
||||||
public function parse(Token $token)
|
public function parse(Token $token)
|
||||||
{
|
{
|
||||||
@ -86,9 +82,7 @@ class TransChoiceTokenParser extends TransTokenParser
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the tag name associated with this token parser.
|
* {@inheritdoc}
|
||||||
*
|
|
||||||
* @return string The tag name
|
|
||||||
*/
|
*/
|
||||||
public function getTag()
|
public function getTag()
|
||||||
{
|
{
|
||||||
|
@ -24,9 +24,7 @@ use Twig\TokenParser\AbstractTokenParser;
|
|||||||
class TransDefaultDomainTokenParser extends AbstractTokenParser
|
class TransDefaultDomainTokenParser extends AbstractTokenParser
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Parses a token and returns a node.
|
* {@inheritdoc}
|
||||||
*
|
|
||||||
* @return Node
|
|
||||||
*/
|
*/
|
||||||
public function parse(Token $token)
|
public function parse(Token $token)
|
||||||
{
|
{
|
||||||
@ -38,9 +36,7 @@ class TransDefaultDomainTokenParser extends AbstractTokenParser
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the tag name associated with this token parser.
|
* {@inheritdoc}
|
||||||
*
|
|
||||||
* @return string The tag name
|
|
||||||
*/
|
*/
|
||||||
public function getTag()
|
public function getTag()
|
||||||
{
|
{
|
||||||
|
@ -28,11 +28,7 @@ use Twig\TokenParser\AbstractTokenParser;
|
|||||||
class TransTokenParser extends AbstractTokenParser
|
class TransTokenParser extends AbstractTokenParser
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Parses a token and returns a node.
|
* {@inheritdoc}
|
||||||
*
|
|
||||||
* @return Node
|
|
||||||
*
|
|
||||||
* @throws SyntaxError
|
|
||||||
*/
|
*/
|
||||||
public function parse(Token $token)
|
public function parse(Token $token)
|
||||||
{
|
{
|
||||||
@ -90,9 +86,7 @@ class TransTokenParser extends AbstractTokenParser
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the tag name associated with this token parser.
|
* {@inheritdoc}
|
||||||
*
|
|
||||||
* @return string The tag name
|
|
||||||
*/
|
*/
|
||||||
public function getTag()
|
public function getTag()
|
||||||
{
|
{
|
||||||
|
@ -9,7 +9,7 @@ CHANGELOG
|
|||||||
3.4.0
|
3.4.0
|
||||||
-----
|
-----
|
||||||
|
|
||||||
* WebServer can now use '*' as a wildcard to bind to 0.0.0.0 (INADDR_ANY)
|
* WebServer can now use `*` as a wildcard to bind to 0.0.0.0 (INADDR_ANY)
|
||||||
|
|
||||||
3.3.0
|
3.3.0
|
||||||
-----
|
-----
|
||||||
|
@ -58,7 +58,7 @@ CHANGELOG
|
|||||||
with value optional explicitly passed empty
|
with value optional explicitly passed empty
|
||||||
* added console.error event to catch exceptions thrown by other listeners
|
* added console.error event to catch exceptions thrown by other listeners
|
||||||
* deprecated console.exception event in favor of console.error
|
* deprecated console.exception event in favor of console.error
|
||||||
* added ability to handle `CommandNotFoundException` through the
|
* added ability to handle `CommandNotFoundException` through the
|
||||||
`console.error` event
|
`console.error` event
|
||||||
* deprecated default validation in `SymfonyQuestionHelper::ask`
|
* deprecated default validation in `SymfonyQuestionHelper::ask`
|
||||||
|
|
||||||
@ -74,7 +74,7 @@ CHANGELOG
|
|||||||
-----
|
-----
|
||||||
|
|
||||||
* added truncate method to FormatterHelper
|
* added truncate method to FormatterHelper
|
||||||
* added setColumnWidth(s) method to Table
|
* added setColumnWidth(s) method to Table
|
||||||
|
|
||||||
2.8.3
|
2.8.3
|
||||||
-----
|
-----
|
||||||
|
@ -141,8 +141,8 @@ class Container implements ResettableContainerInterface
|
|||||||
* Setting a synthetic service to null resets it: has() returns false and get()
|
* Setting a synthetic service to null resets it: has() returns false and get()
|
||||||
* behaves in the same way as if the service was never created.
|
* behaves in the same way as if the service was never created.
|
||||||
*
|
*
|
||||||
* @param string $id The service identifier
|
* @param string $id The service identifier
|
||||||
* @param object $service The service instance
|
* @param object|null $service The service instance
|
||||||
*/
|
*/
|
||||||
public function set($id, $service)
|
public function set($id, $service)
|
||||||
{
|
{
|
||||||
@ -210,7 +210,7 @@ class Container implements ResettableContainerInterface
|
|||||||
* @param string $id The service identifier
|
* @param string $id The service identifier
|
||||||
* @param int $invalidBehavior The behavior when the service does not exist
|
* @param int $invalidBehavior The behavior when the service does not exist
|
||||||
*
|
*
|
||||||
* @return object The associated service
|
* @return object|null The associated service
|
||||||
*
|
*
|
||||||
* @throws ServiceCircularReferenceException When a circular reference is detected
|
* @throws ServiceCircularReferenceException When a circular reference is detected
|
||||||
* @throws ServiceNotFoundException When the service is not defined
|
* @throws ServiceNotFoundException When the service is not defined
|
||||||
|
@ -488,8 +488,8 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||||||
/**
|
/**
|
||||||
* Sets a service.
|
* Sets a service.
|
||||||
*
|
*
|
||||||
* @param string $id The service identifier
|
* @param string $id The service identifier
|
||||||
* @param object $service The service instance
|
* @param object|null $service The service instance
|
||||||
*
|
*
|
||||||
* @throws BadMethodCallException When this ContainerBuilder is compiled
|
* @throws BadMethodCallException When this ContainerBuilder is compiled
|
||||||
*/
|
*/
|
||||||
@ -540,7 +540,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||||||
* @param string $id The service identifier
|
* @param string $id The service identifier
|
||||||
* @param int $invalidBehavior The behavior when the service does not exist
|
* @param int $invalidBehavior The behavior when the service does not exist
|
||||||
*
|
*
|
||||||
* @return object The associated service
|
* @return object|null The associated service
|
||||||
*
|
*
|
||||||
* @throws InvalidArgumentException when no definitions are available
|
* @throws InvalidArgumentException when no definitions are available
|
||||||
* @throws ServiceCircularReferenceException When a circular reference is detected
|
* @throws ServiceCircularReferenceException When a circular reference is detected
|
||||||
@ -1070,7 +1070,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||||||
* @param string $id The service identifier
|
* @param string $id The service identifier
|
||||||
* @param bool $tryProxy Whether to try proxying the service with a lazy proxy
|
* @param bool $tryProxy Whether to try proxying the service with a lazy proxy
|
||||||
*
|
*
|
||||||
* @return object The service described by the service definition
|
* @return mixed The service described by the service definition
|
||||||
*
|
*
|
||||||
* @throws RuntimeException When the factory definition is incomplete
|
* @throws RuntimeException When the factory definition is incomplete
|
||||||
* @throws RuntimeException When the service is a synthetic service
|
* @throws RuntimeException When the service is a synthetic service
|
||||||
@ -1636,7 +1636,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
|
|||||||
* Shares a given service in the container.
|
* Shares a given service in the container.
|
||||||
*
|
*
|
||||||
* @param Definition $definition
|
* @param Definition $definition
|
||||||
* @param object $service
|
* @param mixed $service
|
||||||
* @param string|null $id
|
* @param string|null $id
|
||||||
*/
|
*/
|
||||||
private function shareService(Definition $definition, $service, $id, array &$inlineServices)
|
private function shareService(Definition $definition, $service, $id, array &$inlineServices)
|
||||||
|
@ -33,8 +33,8 @@ interface ContainerInterface extends PsrContainerInterface
|
|||||||
/**
|
/**
|
||||||
* Sets a service.
|
* Sets a service.
|
||||||
*
|
*
|
||||||
* @param string $id The service identifier
|
* @param string $id The service identifier
|
||||||
* @param object $service The service instance
|
* @param object|null $service The service instance
|
||||||
*/
|
*/
|
||||||
public function set($id, $service);
|
public function set($id, $service);
|
||||||
|
|
||||||
@ -44,7 +44,7 @@ interface ContainerInterface extends PsrContainerInterface
|
|||||||
* @param string $id The service identifier
|
* @param string $id The service identifier
|
||||||
* @param int $invalidBehavior The behavior when the service does not exist
|
* @param int $invalidBehavior The behavior when the service does not exist
|
||||||
*
|
*
|
||||||
* @return object The associated service
|
* @return object|null The associated service
|
||||||
*
|
*
|
||||||
* @throws ServiceCircularReferenceException When a circular reference is detected
|
* @throws ServiceCircularReferenceException When a circular reference is detected
|
||||||
* @throws ServiceNotFoundException When the service is not defined
|
* @throws ServiceNotFoundException When the service is not defined
|
||||||
|
@ -44,9 +44,8 @@ abstract class IteratorTestCase extends TestCase
|
|||||||
* $a and $b such that $a goes before $b in $expected, the method
|
* $a and $b such that $a goes before $b in $expected, the method
|
||||||
* asserts that any element of $a goes before any element of $b
|
* asserts that any element of $a goes before any element of $b
|
||||||
* in the sequence generated by $iterator
|
* in the sequence generated by $iterator
|
||||||
* @param \Traversable $iterator
|
|
||||||
*/
|
*/
|
||||||
protected function assertOrderedIteratorForGroups($expected, \Traversable $iterator)
|
protected function assertOrderedIteratorForGroups(array $expected, \Traversable $iterator)
|
||||||
{
|
{
|
||||||
$values = array_values(array_map(function (\SplFileInfo $fileinfo) { return $fileinfo->getPathname(); }, iterator_to_array($iterator)));
|
$values = array_values(array_map(function (\SplFileInfo $fileinfo) { return $fileinfo->getPathname(); }, iterator_to_array($iterator)));
|
||||||
|
|
||||||
@ -63,11 +62,8 @@ abstract class IteratorTestCase extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Same as IteratorTestCase::assertIterator with foreach usage.
|
* Same as IteratorTestCase::assertIterator with foreach usage.
|
||||||
*
|
|
||||||
* @param array $expected
|
|
||||||
* @param \Traversable $iterator
|
|
||||||
*/
|
*/
|
||||||
protected function assertIteratorInForeach($expected, \Traversable $iterator)
|
protected function assertIteratorInForeach(array $expected, \Traversable $iterator)
|
||||||
{
|
{
|
||||||
$values = [];
|
$values = [];
|
||||||
foreach ($iterator as $file) {
|
foreach ($iterator as $file) {
|
||||||
@ -83,11 +79,8 @@ abstract class IteratorTestCase extends TestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Same as IteratorTestCase::assertOrderedIterator with foreach usage.
|
* Same as IteratorTestCase::assertOrderedIterator with foreach usage.
|
||||||
*
|
|
||||||
* @param array $expected
|
|
||||||
* @param \Traversable $iterator
|
|
||||||
*/
|
*/
|
||||||
protected function assertOrderedIteratorInForeach($expected, \Traversable $iterator)
|
protected function assertOrderedIteratorInForeach(array $expected, \Traversable $iterator)
|
||||||
{
|
{
|
||||||
$values = [];
|
$values = [];
|
||||||
foreach ($iterator as $file) {
|
foreach ($iterator as $file) {
|
||||||
|
@ -246,7 +246,7 @@ class UploadedFile extends File
|
|||||||
$sizePostMax = self::parseFilesize(ini_get('post_max_size'));
|
$sizePostMax = self::parseFilesize(ini_get('post_max_size'));
|
||||||
$sizeUploadMax = self::parseFilesize(ini_get('upload_max_filesize'));
|
$sizeUploadMax = self::parseFilesize(ini_get('upload_max_filesize'));
|
||||||
|
|
||||||
return min([$sizePostMax, $sizeUploadMax]);
|
return min($sizePostMax ?: PHP_INT_MAX, $sizeUploadMax ?: PHP_INT_MAX);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -353,4 +353,18 @@ class UploadedFileTest extends TestCase
|
|||||||
|
|
||||||
$this->assertFalse($file->isValid());
|
$this->assertFalse($file->isValid());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testGetMaxFilesize()
|
||||||
|
{
|
||||||
|
$size = UploadedFile::getMaxFilesize();
|
||||||
|
|
||||||
|
$this->assertIsInt($size);
|
||||||
|
$this->assertGreaterThan(0, $size);
|
||||||
|
|
||||||
|
if (0 === (int) ini_get('post_max_size') && 0 === (int) ini_get('upload_max_filesize')) {
|
||||||
|
$this->assertSame(PHP_INT_MAX, $size);
|
||||||
|
} else {
|
||||||
|
$this->assertLessThan(PHP_INT_MAX, $size);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -164,7 +164,6 @@ class LanguageDataGenerator extends AbstractDataGenerator
|
|||||||
return [
|
return [
|
||||||
'Version' => $rootBundle['Version'],
|
'Version' => $rootBundle['Version'],
|
||||||
'Languages' => $this->languageCodes,
|
'Languages' => $this->languageCodes,
|
||||||
'Aliases' => array_column(iterator_to_array($metadataBundle['alias']['language']), 'replacement'),
|
|
||||||
'Alpha2ToAlpha3' => $this->generateAlpha2ToAlpha3Mapping($metadataBundle),
|
'Alpha2ToAlpha3' => $this->generateAlpha2ToAlpha3Mapping($metadataBundle),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@ -179,9 +178,9 @@ class LanguageDataGenerator extends AbstractDataGenerator
|
|||||||
$aliases = iterator_to_array($metadataBundle['alias']['language']);
|
$aliases = iterator_to_array($metadataBundle['alias']['language']);
|
||||||
$alpha2ToAlpha3 = [];
|
$alpha2ToAlpha3 = [];
|
||||||
|
|
||||||
foreach ($aliases as $alias => $language) {
|
foreach ($aliases as $alias => $data) {
|
||||||
$language = $language['replacement'];
|
$language = $data['replacement'];
|
||||||
if (2 === \strlen($language) && 3 === \strlen($alias)) {
|
if (2 === \strlen($language) && 3 === \strlen($alias) && 'overlong' === $data['reason']) {
|
||||||
if (isset(self::$preferredAlpha2ToAlpha3Mapping[$language])) {
|
if (isset(self::$preferredAlpha2ToAlpha3Mapping[$language])) {
|
||||||
// Validate to prevent typos
|
// Validate to prevent typos
|
||||||
if (!isset($aliases[self::$preferredAlpha2ToAlpha3Mapping[$language]])) {
|
if (!isset($aliases[self::$preferredAlpha2ToAlpha3Mapping[$language]])) {
|
||||||
|
@ -619,7 +619,6 @@
|
|||||||
"zun",
|
"zun",
|
||||||
"zza"
|
"zza"
|
||||||
],
|
],
|
||||||
"Aliases": [],
|
|
||||||
"Alpha2ToAlpha3": {
|
"Alpha2ToAlpha3": {
|
||||||
"aa": "aar",
|
"aa": "aar",
|
||||||
"ab": "abk",
|
"ab": "abk",
|
||||||
|
@ -6,7 +6,7 @@ A Ldap client for PHP on top of PHP's ldap extension.
|
|||||||
Disclaimer
|
Disclaimer
|
||||||
----------
|
----------
|
||||||
|
|
||||||
This component is only stable since Symfony 3.1. Earlier versions
|
This component is only stable since Symfony 3.1. Earlier versions
|
||||||
have been marked as internal as they still needed some work.
|
have been marked as internal as they still needed some work.
|
||||||
Breaking changes were introduced in Symfony 3.1, so code relying on
|
Breaking changes were introduced in Symfony 3.1, so code relying on
|
||||||
previous version of the component will break with this version.
|
previous version of the component will break with this version.
|
||||||
|
@ -138,7 +138,7 @@ CHANGELOG
|
|||||||
|
|
||||||
* added `$context` support for XMLEncoder.
|
* added `$context` support for XMLEncoder.
|
||||||
* [DEPRECATION] JsonEncode and JsonDecode where modified to throw
|
* [DEPRECATION] JsonEncode and JsonDecode where modified to throw
|
||||||
an exception if error found. No need for get*Error() functions
|
an exception if error found. No need for `get*Error()` functions
|
||||||
|
|
||||||
2.3.0
|
2.3.0
|
||||||
-----
|
-----
|
||||||
|
Reference in New Issue
Block a user