Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b88728a

Browse files
Merge branch '4.1' into 4.2
* 4.1: Fix typos in doc blocks [Debug] ignore underscore vs backslash namespaces in DebugClassLoader [TwigBridge][Form] Prevent multiple rendering of form collection prototypes [FrameworkBundle] fix describing routes with no controllers [DI] move RegisterServiceSubscribersPass before DecoratorServicePass Update ValidationListener.php [Yaml] ensures that the mb_internal_encoding is reset to its initial value [WebLink] Fixed documentation link [Security] getTargetPath of TargetPathTrait must return string or null [Hackday][Serializer] Deserialization ignores argument type hint from phpdoc for array in constructor argument Optimize perf by replacing call_user_func with dynamic vars [Routing] fix dumping same-path routes with placeholders [Security] defer log message in guard authenticator [Validator] Added IBAN format for Vatican City State merge conflicts filter out invalid Intl values filter out invalid language values [Validator] Fixed grouped composite constraints [Form] Filter arrays out of scalar form types Fix HeaderBag::get phpdoc
2 parents 0b99a8e + 547bf26 commit b88728a

File tree

88 files changed

+468
-186
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+468
-186
lines changed

src/Symfony/Bridge/Doctrine/Form/Type/DoctrineType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ public function configureOptions(OptionsResolver $resolver)
213213
// for equal query builders
214214
$queryBuilderNormalizer = function (Options $options, $queryBuilder) {
215215
if (\is_callable($queryBuilder)) {
216-
$queryBuilder = \call_user_func($queryBuilder, $options['em']->getRepository($options['class']));
216+
$queryBuilder = $queryBuilder($options['em']->getRepository($options['class']));
217217
}
218218

219219
return $queryBuilder;

src/Symfony/Bridge/Doctrine/Form/Type/EntityType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function configureOptions(OptionsResolver $resolver)
2929
// for equal query builders
3030
$queryBuilderNormalizer = function (Options $options, $queryBuilder) {
3131
if (\is_callable($queryBuilder)) {
32-
$queryBuilder = \call_user_func($queryBuilder, $options['em']->getRepository($options['class']));
32+
$queryBuilder = $queryBuilder($options['em']->getRepository($options['class']));
3333

3434
if (null !== $queryBuilder && !$queryBuilder instanceof QueryBuilder) {
3535
throw new UnexpectedTypeException($queryBuilder, 'Doctrine\ORM\QueryBuilder');

src/Symfony/Bridge/Monolog/Handler/ServerLogHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ private function formatRecord(array $record)
102102
{
103103
if ($this->processors) {
104104
foreach ($this->processors as $processor) {
105-
$record = \call_user_func($processor, $record);
105+
$record = $processor($record);
106106
}
107107
}
108108

src/Symfony/Bridge/ProxyManager/LazyProxy/Instantiator/RuntimeInstantiator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function instantiateProxy(ContainerInterface $container, Definition $defi
4343
return $this->factory->createProxy(
4444
$this->factory->getGenerator()->getProxifiedClass($definition),
4545
function (&$wrappedInstance, LazyLoadingInterface $proxy) use ($realInstantiator) {
46-
$wrappedInstance = \call_user_func($realInstantiator);
46+
$wrappedInstance = $realInstantiator();
4747

4848
$proxy->setProxyInitializer(null);
4949

src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
{%- endblock form_widget_compound -%}
2929

3030
{%- block collection_widget -%}
31-
{% if prototype is defined %}
31+
{% if prototype is defined and not prototype.rendered %}
3232
{%- set attr = attr|merge({'data-prototype': form_row(prototype) }) -%}
3333
{% endif %}
3434
{{- block('form_widget') -}}

src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ protected function describeRouteCollection(RouteCollection $routes, array $optio
5757

5858
if ($showControllers) {
5959
$controller = $route->getDefault('_controller');
60-
$row[] = $this->formatCallable($controller);
60+
$row[] = $controller ? $this->formatCallable($controller) : '';
6161
}
6262

6363
$tableRows[] = $row;

src/Symfony/Bundle/FrameworkBundle/Controller/RedirectController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function __construct(UrlGeneratorInterface $router = null, int $httpPort
5050
* @param string $route The route name to redirect to
5151
* @param bool $permanent Whether the redirection is permanent
5252
* @param bool|array $ignoreAttributes Whether to ignore attributes or an array of attributes to ignore
53-
* @param bool $keepRequestMethod Wheter redirect action should keep HTTP request method
53+
* @param bool $keepRequestMethod Whether redirect action should keep HTTP request method
5454
*
5555
* @throws HttpException In case the route name is empty
5656
*/
@@ -94,7 +94,7 @@ public function redirectAction(Request $request, string $route, bool $permanent
9494
* @param string|null $scheme The URL scheme (null to keep the current one)
9595
* @param int|null $httpPort The HTTP port (null to keep the current one for the same scheme or the default configured port)
9696
* @param int|null $httpsPort The HTTPS port (null to keep the current one for the same scheme or the default configured port)
97-
* @param bool $keepRequestMethod Wheter redirect action should keep HTTP request method
97+
* @param bool $keepRequestMethod Whether redirect action should keep HTTP request method
9898
*
9999
* @throws HttpException In case the path is empty
100100
*/

src/Symfony/Component/Cache/Tests/Adapter/PhpArrayAdapterTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,13 +146,13 @@ class PhpArrayAdapterWrapper extends PhpArrayAdapter
146146

147147
public function save(CacheItemInterface $item)
148148
{
149-
\call_user_func(\Closure::bind(function () use ($item) {
149+
(\Closure::bind(function () use ($item) {
150150
$key = $item->getKey();
151151
$this->keys[$key] = $id = \count($this->values);
152152
$this->data[$key] = $this->values[$id] = $item->get();
153153
$this->warmUp($this->data);
154154
list($this->keys, $this->values) = eval(substr(file_get_contents($this->file), 6));
155-
}, $this, PhpArrayAdapter::class));
155+
}, $this, PhpArrayAdapter::class))();
156156

157157
return true;
158158
}

src/Symfony/Component/Cache/Tests/CacheItemTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ public function testTag()
6262
$this->assertSame($item, $item->tag('foo'));
6363
$this->assertSame($item, $item->tag(array('bar', 'baz')));
6464

65-
\call_user_func(\Closure::bind(function () use ($item) {
65+
(\Closure::bind(function () use ($item) {
6666
$this->assertSame(array('foo' => 'foo', 'bar' => 'bar', 'baz' => 'baz'), $item->newMetadata[CacheItem::METADATA_TAGS]);
67-
}, $this, CacheItem::class));
67+
}, $this, CacheItem::class))();
6868
}
6969

7070
/**

src/Symfony/Component/Cache/Tests/Simple/PhpArrayCacheTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,11 @@ class PhpArrayCacheWrapper extends PhpArrayCache
134134

135135
public function set($key, $value, $ttl = null)
136136
{
137-
\call_user_func(\Closure::bind(function () use ($key, $value) {
137+
(\Closure::bind(function () use ($key, $value) {
138138
$this->data[$key] = $value;
139139
$this->warmUp($this->data);
140140
list($this->keys, $this->values) = eval(substr(file_get_contents($this->file), 6));
141-
}, $this, PhpArrayCache::class));
141+
}, $this, PhpArrayCache::class))();
142142

143143
return true;
144144
}
@@ -148,13 +148,13 @@ public function setMultiple($values, $ttl = null)
148148
if (!\is_array($values) && !$values instanceof \Traversable) {
149149
return parent::setMultiple($values, $ttl);
150150
}
151-
\call_user_func(\Closure::bind(function () use ($values) {
151+
(\Closure::bind(function () use ($values) {
152152
foreach ($values as $key => $value) {
153153
$this->data[$key] = $value;
154154
}
155155
$this->warmUp($this->data);
156156
list($this->keys, $this->values) = eval(substr(file_get_contents($this->file), 6));
157-
}, $this, PhpArrayCache::class));
157+
}, $this, PhpArrayCache::class))();
158158

159159
return true;
160160
}

0 commit comments

Comments
 (0)