Skip to content

Commit 1781048

Browse files
Merge branch '5.2' into 5.3
* 5.2: Backport type fixes Fix CS Avoid triggering the autoloader in Deprecation::isLegacy() fix markdown markup Backport type fixes uzb translation [DependencyInjection] Fix doc blocks [DependencyInjection] Turn $defaultDeprecationTemplate into a constant [Form] better form doc types to support static analysis
2 parents e7e0ad9 + 27d3963 commit 1781048

14 files changed

+16
-25
lines changed

CacheWarmer/CachePoolClearerCacheWarmer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function __construct(Psr6CacheClearer $poolClearer, array $pools = [])
3939
*
4040
* @return string[]
4141
*/
42-
public function warmUp($cacheDirectory): array
42+
public function warmUp(string $cacheDirectory): array
4343
{
4444
foreach ($this->pools as $pool) {
4545
if ($this->poolClearer->hasPool($pool)) {

Console/Application.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ protected function doRunCommand(Command $command, InputInterface $input, OutputI
109109
/**
110110
* {@inheritdoc}
111111
*/
112-
public function find($name)
112+
public function find(string $name)
113113
{
114114
$this->registerCommands();
115115

@@ -119,7 +119,7 @@ public function find($name)
119119
/**
120120
* {@inheritdoc}
121121
*/
122-
public function get($name)
122+
public function get(string $name)
123123
{
124124
$this->registerCommands();
125125

@@ -135,7 +135,7 @@ public function get($name)
135135
/**
136136
* {@inheritdoc}
137137
*/
138-
public function all($namespace = null)
138+
public function all(string $namespace = null)
139139
{
140140
$this->registerCommands();
141141

Console/Descriptor/Descriptor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ abstract protected function describeContainerTags(ContainerBuilder $builder, arr
113113
*
114114
* @param Definition|Alias|object $service
115115
*/
116-
abstract protected function describeContainerService($service, array $options = [], ContainerBuilder $builder = null);
116+
abstract protected function describeContainerService(object $service, array $options = [], ContainerBuilder $builder = null);
117117

118118
/**
119119
* Describes container services.

Console/Descriptor/JsonDescriptor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ protected function describeContainerTags(ContainerBuilder $builder, array $optio
6767
$this->writeData($data, $options);
6868
}
6969

70-
protected function describeContainerService($service, array $options = [], ContainerBuilder $builder = null)
70+
protected function describeContainerService(object $service, array $options = [], ContainerBuilder $builder = null)
7171
{
7272
if (!isset($options['id'])) {
7373
throw new \InvalidArgumentException('An "id" option must be provided.');

Console/Descriptor/MarkdownDescriptor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ protected function describeContainerTags(ContainerBuilder $builder, array $optio
8888
}
8989
}
9090

91-
protected function describeContainerService($service, array $options = [], ContainerBuilder $builder = null)
91+
protected function describeContainerService(object $service, array $options = [], ContainerBuilder $builder = null)
9292
{
9393
if (!isset($options['id'])) {
9494
throw new \InvalidArgumentException('An "id" option must be provided.');

Console/Descriptor/TextDescriptor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ protected function describeContainerTags(ContainerBuilder $builder, array $optio
141141
}
142142
}
143143

144-
protected function describeContainerService($service, array $options = [], ContainerBuilder $builder = null)
144+
protected function describeContainerService(object $service, array $options = [], ContainerBuilder $builder = null)
145145
{
146146
if (!isset($options['id'])) {
147147
throw new \InvalidArgumentException('An "id" option must be provided.');

Console/Descriptor/XmlDescriptor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ protected function describeContainerTags(ContainerBuilder $builder, array $optio
5353
$this->writeDocument($this->getContainerTagsDocument($builder, isset($options['show_hidden']) && $options['show_hidden']));
5454
}
5555

56-
protected function describeContainerService($service, array $options = [], ContainerBuilder $builder = null)
56+
protected function describeContainerService(object $service, array $options = [], ContainerBuilder $builder = null)
5757
{
5858
if (!isset($options['id'])) {
5959
throw new \InvalidArgumentException('An "id" option must be provided.');
@@ -255,7 +255,7 @@ private function getContainerTagsDocument(ContainerBuilder $builder, bool $showH
255255
return $dom;
256256
}
257257

258-
private function getContainerServiceDocument($service, string $id, ContainerBuilder $builder = null, bool $showArguments = false): \DOMDocument
258+
private function getContainerServiceDocument(object $service, string $id, ContainerBuilder $builder = null, bool $showArguments = false): \DOMDocument
259259
{
260260
$dom = new \DOMDocument('1.0', 'UTF-8');
261261

Controller/AbstractController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ protected function isCsrfTokenValid(string $id, ?string $token): bool
428428
*
429429
* @param object|Envelope $message The message or the message pre-wrapped in an envelope
430430
*/
431-
protected function dispatchMessage($message, array $stamps = []): Envelope
431+
protected function dispatchMessage(object $message, array $stamps = []): Envelope
432432
{
433433
if (!$this->container->has('messenger.default_bus')) {
434434
$message = class_exists(Envelope::class) ? 'You need to define the "messenger.default_bus" configuration option.' : 'Try running "composer require symfony/messenger".';

Controller/ControllerResolver.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,10 @@ class ControllerResolver extends ContainerControllerResolver
2424
/**
2525
* {@inheritdoc}
2626
*/
27-
protected function instantiateController($class): object
27+
protected function instantiateController(string $class): object
2828
{
29-
return $this->configureController(parent::instantiateController($class), $class);
30-
}
29+
$controller = parent::instantiateController($class);
3130

32-
private function configureController($controller, string $class): object
33-
{
3431
if ($controller instanceof ContainerAwareInterface) {
3532
$controller->setContainer($this->container);
3633
}

DataCollector/RouterDataCollector.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
use Symfony\Component\HttpKernel\DataCollector\RouterDataCollector as BaseRouterDataCollector;
1717

1818
/**
19-
* RouterDataCollector.
20-
*
2119
* @author Fabien Potencier <fabien@symfony.com>
2220
*
2321
* @final

0 commit comments

Comments
 (0)