summaryrefslogtreecommitdiff
path: root/vendor/symfony/http-kernel
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@webtrees.net>2019-09-07 08:17:24 +0100
committerGreg Roach <fisharebest@webtrees.net>2019-09-07 08:17:24 +0100
commit43e2cc54543d9f79c9805f752e78e25c351646ff (patch)
treef8f252a8f0f6ff6061c177456865102c50a04810 /vendor/symfony/http-kernel
parent4e96702fabf715ae955aafd54002fb5c57a109cf (diff)
downloadwebtrees-43e2cc54543d9f79c9805f752e78e25c351646ff.tar.gz
webtrees-43e2cc54543d9f79c9805f752e78e25c351646ff.tar.bz2
webtrees-43e2cc54543d9f79c9805f752e78e25c351646ff.zip
Update vendor dependencies
Diffstat (limited to 'vendor/symfony/http-kernel')
-rw-r--r--vendor/symfony/http-kernel/Bundle/Bundle.php11
-rw-r--r--vendor/symfony/http-kernel/CacheWarmer/CacheWarmerAggregate.php4
-rw-r--r--vendor/symfony/http-kernel/Controller/ArgumentResolverInterface.php1
-rw-r--r--vendor/symfony/http-kernel/Controller/ArgumentValueResolverInterface.php6
-rw-r--r--vendor/symfony/http-kernel/Controller/ContainerControllerResolver.php2
-rw-r--r--vendor/symfony/http-kernel/Controller/ControllerResolver.php24
-rw-r--r--vendor/symfony/http-kernel/ControllerMetadata/ArgumentMetadata.php2
-rw-r--r--vendor/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactory.php12
-rw-r--r--vendor/symfony/http-kernel/DataCollector/ConfigDataCollector.php2
-rw-r--r--vendor/symfony/http-kernel/DataCollector/DataCollector.php3
-rw-r--r--vendor/symfony/http-kernel/DataCollector/EventDataCollector.php2
-rw-r--r--vendor/symfony/http-kernel/DataCollector/ExceptionDataCollector.php2
-rw-r--r--vendor/symfony/http-kernel/DataCollector/LoggerDataCollector.php5
-rw-r--r--vendor/symfony/http-kernel/DataCollector/TimeDataCollector.php9
-rw-r--r--vendor/symfony/http-kernel/Debug/FileLinkFormatter.php2
-rw-r--r--vendor/symfony/http-kernel/Debug/TraceableEventDispatcher.php9
-rw-r--r--vendor/symfony/http-kernel/Event/FilterControllerArgumentsEvent.php2
-rw-r--r--vendor/symfony/http-kernel/EventListener/AbstractSessionListener.php2
-rw-r--r--vendor/symfony/http-kernel/EventListener/ExceptionListener.php4
-rw-r--r--vendor/symfony/http-kernel/EventListener/RouterListener.php3
-rw-r--r--vendor/symfony/http-kernel/EventListener/SessionListener.php2
-rw-r--r--vendor/symfony/http-kernel/EventListener/TestSessionListener.php2
-rw-r--r--vendor/symfony/http-kernel/Exception/AccessDeniedHttpException.php1
-rw-r--r--vendor/symfony/http-kernel/Exception/BadRequestHttpException.php1
-rw-r--r--vendor/symfony/http-kernel/Exception/ConflictHttpException.php1
-rw-r--r--vendor/symfony/http-kernel/Exception/GoneHttpException.php1
-rw-r--r--vendor/symfony/http-kernel/Exception/LengthRequiredHttpException.php1
-rw-r--r--vendor/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php1
-rw-r--r--vendor/symfony/http-kernel/Exception/NotAcceptableHttpException.php1
-rw-r--r--vendor/symfony/http-kernel/Exception/NotFoundHttpException.php1
-rw-r--r--vendor/symfony/http-kernel/Exception/PreconditionFailedHttpException.php1
-rw-r--r--vendor/symfony/http-kernel/Exception/PreconditionRequiredHttpException.php1
-rw-r--r--vendor/symfony/http-kernel/Exception/ServiceUnavailableHttpException.php1
-rw-r--r--vendor/symfony/http-kernel/Exception/TooManyRequestsHttpException.php1
-rw-r--r--vendor/symfony/http-kernel/Exception/UnauthorizedHttpException.php1
-rw-r--r--vendor/symfony/http-kernel/Exception/UnprocessableEntityHttpException.php1
-rw-r--r--vendor/symfony/http-kernel/Exception/UnsupportedMediaTypeHttpException.php1
-rw-r--r--vendor/symfony/http-kernel/Fragment/FragmentHandler.php2
-rw-r--r--vendor/symfony/http-kernel/Fragment/HIncludeFragmentRenderer.php1
-rw-r--r--vendor/symfony/http-kernel/Fragment/InlineFragmentRenderer.php2
-rw-r--r--vendor/symfony/http-kernel/HttpCache/AbstractSurrogate.php2
-rw-r--r--vendor/symfony/http-kernel/HttpCache/Esi.php2
-rw-r--r--vendor/symfony/http-kernel/HttpCache/HttpCache.php9
-rw-r--r--vendor/symfony/http-kernel/HttpCache/Ssi.php2
-rw-r--r--vendor/symfony/http-kernel/HttpCache/Store.php17
-rw-r--r--vendor/symfony/http-kernel/Kernel.php21
-rw-r--r--vendor/symfony/http-kernel/KernelInterface.php2
-rw-r--r--vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php4
-rw-r--r--vendor/symfony/http-kernel/Profiler/Profile.php11
-rw-r--r--vendor/symfony/http-kernel/Profiler/Profiler.php18
-rw-r--r--vendor/symfony/http-kernel/Profiler/ProfilerStorageInterface.php2
-rw-r--r--vendor/symfony/http-kernel/Tests/Bundle/BundleTest.php5
-rw-r--r--vendor/symfony/http-kernel/Tests/CacheClearer/ChainCacheClearerTest.php4
-rw-r--r--vendor/symfony/http-kernel/Tests/CacheClearer/Psr6CacheClearerTest.php6
-rw-r--r--vendor/symfony/http-kernel/Tests/CacheWarmer/CacheWarmerAggregateTest.php4
-rw-r--r--vendor/symfony/http-kernel/Tests/CacheWarmer/CacheWarmerTest.php8
-rw-r--r--vendor/symfony/http-kernel/Tests/Controller/ArgumentResolver/NotTaggedControllerValueResolverTest.php24
-rw-r--r--vendor/symfony/http-kernel/Tests/Controller/ArgumentResolver/ServiceValueResolverTest.php6
-rw-r--r--vendor/symfony/http-kernel/Tests/Controller/ArgumentResolverTest.php26
-rw-r--r--vendor/symfony/http-kernel/Tests/Controller/ContainerControllerResolverTest.php42
-rw-r--r--vendor/symfony/http-kernel/Tests/Controller/ControllerResolverTest.php12
-rw-r--r--vendor/symfony/http-kernel/Tests/ControllerMetadata/ArgumentMetadataFactoryTest.php2
-rw-r--r--vendor/symfony/http-kernel/Tests/ControllerMetadata/ArgumentMetadataTest.php4
-rw-r--r--vendor/symfony/http-kernel/Tests/DataCollector/LoggerDataCollectorTest.php2
-rw-r--r--vendor/symfony/http-kernel/Tests/DataCollector/MemoryDataCollectorTest.php4
-rw-r--r--vendor/symfony/http-kernel/Tests/DataCollector/TimeDataCollectorTest.php2
-rw-r--r--vendor/symfony/http-kernel/Tests/Debug/TraceableEventDispatcherTest.php4
-rw-r--r--vendor/symfony/http-kernel/Tests/DependencyInjection/FragmentRendererPassTest.php3
-rw-r--r--vendor/symfony/http-kernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php48
-rw-r--r--vendor/symfony/http-kernel/Tests/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPassTest.php2
-rw-r--r--vendor/symfony/http-kernel/Tests/DependencyInjection/ResettableServicePassTest.php6
-rw-r--r--vendor/symfony/http-kernel/Tests/DependencyInjection/ServicesResetterTest.php2
-rw-r--r--vendor/symfony/http-kernel/Tests/EventListener/AddRequestFormatsListenerTest.php4
-rw-r--r--vendor/symfony/http-kernel/Tests/EventListener/FragmentListenerTest.php8
-rw-r--r--vendor/symfony/http-kernel/Tests/EventListener/LocaleAwareListenerTest.php2
-rw-r--r--vendor/symfony/http-kernel/Tests/EventListener/LocaleListenerTest.php2
-rw-r--r--vendor/symfony/http-kernel/Tests/EventListener/ResponseListenerTest.php4
-rw-r--r--vendor/symfony/http-kernel/Tests/EventListener/RouterListenerTest.php12
-rw-r--r--vendor/symfony/http-kernel/Tests/EventListener/TestSessionListenerTest.php2
-rw-r--r--vendor/symfony/http-kernel/Tests/EventListener/TranslatorListenerTest.php2
-rw-r--r--vendor/symfony/http-kernel/Tests/EventListener/ValidateRequestListenerTest.php6
-rw-r--r--vendor/symfony/http-kernel/Tests/Fixtures/BaseBundle/Resources/hide.txt0
-rw-r--r--vendor/symfony/http-kernel/Tests/Fixtures/Bundle1Bundle/Resources/.gitkeep (renamed from vendor/symfony/http-kernel/Tests/Fixtures/BaseBundle/Resources/foo.txt)0
-rw-r--r--vendor/symfony/http-kernel/Tests/Fixtures/Bundle1Bundle/Resources/foo.txt0
-rw-r--r--vendor/symfony/http-kernel/Tests/Fixtures/Bundle1Bundle/bar.txt0
-rw-r--r--vendor/symfony/http-kernel/Tests/Fixtures/Bundle2Bundle/foo.txt0
-rw-r--r--vendor/symfony/http-kernel/Tests/Fixtures/ChildBundle/Resources/foo.txt0
-rw-r--r--vendor/symfony/http-kernel/Tests/Fixtures/ChildBundle/Resources/hide.txt0
-rw-r--r--vendor/symfony/http-kernel/Tests/Fixtures/Resources/BaseBundle/hide.txt0
-rw-r--r--vendor/symfony/http-kernel/Tests/Fixtures/Resources/Bundle1Bundle/foo.txt0
-rw-r--r--vendor/symfony/http-kernel/Tests/Fixtures/Resources/ChildBundle/foo.txt0
-rw-r--r--vendor/symfony/http-kernel/Tests/Fragment/EsiFragmentRendererTest.php8
-rw-r--r--vendor/symfony/http-kernel/Tests/Fragment/FragmentHandlerTest.php16
-rw-r--r--vendor/symfony/http-kernel/Tests/Fragment/HIncludeFragmentRendererTest.php4
-rw-r--r--vendor/symfony/http-kernel/Tests/Fragment/InlineFragmentRendererTest.php4
-rw-r--r--vendor/symfony/http-kernel/Tests/Fragment/RoutableFragmentRendererTest.php4
-rw-r--r--vendor/symfony/http-kernel/Tests/Fragment/SsiFragmentRendererTest.php8
-rw-r--r--vendor/symfony/http-kernel/Tests/HttpCache/EsiTest.php32
-rw-r--r--vendor/symfony/http-kernel/Tests/HttpCache/HttpCacheTest.php14
-rw-r--r--vendor/symfony/http-kernel/Tests/HttpCache/HttpCacheTestCase.php4
-rw-r--r--vendor/symfony/http-kernel/Tests/HttpCache/SsiTest.php8
-rw-r--r--vendor/symfony/http-kernel/Tests/HttpCache/StoreTest.php4
-rw-r--r--vendor/symfony/http-kernel/Tests/HttpCache/SubRequestHandlerTest.php4
-rw-r--r--vendor/symfony/http-kernel/Tests/HttpKernelBrowserTest.php2
-rw-r--r--vendor/symfony/http-kernel/Tests/HttpKernelTest.php18
-rw-r--r--vendor/symfony/http-kernel/Tests/KernelTest.php35
-rw-r--r--vendor/symfony/http-kernel/Tests/Log/LoggerTest.php18
-rw-r--r--vendor/symfony/http-kernel/Tests/Logger.php2
-rw-r--r--vendor/symfony/http-kernel/Tests/Profiler/FileProfilerStorageTest.php4
-rw-r--r--vendor/symfony/http-kernel/Tests/Profiler/ProfilerTest.php4
-rw-r--r--vendor/symfony/http-kernel/Tests/UriSignerTest.php6
111 files changed, 295 insertions, 383 deletions
diff --git a/vendor/symfony/http-kernel/Bundle/Bundle.php b/vendor/symfony/http-kernel/Bundle/Bundle.php
index 26dea9b205..a769e96034 100644
--- a/vendor/symfony/http-kernel/Bundle/Bundle.php
+++ b/vendor/symfony/http-kernel/Bundle/Bundle.php
@@ -18,8 +18,7 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
/**
- * An implementation of BundleInterface that adds a few conventions
- * for DependencyInjection extensions and Console commands.
+ * An implementation of BundleInterface that adds a few conventions for DependencyInjection extensions.
*
* @author Fabien Potencier <fabien@symfony.com>
*/
@@ -87,9 +86,7 @@ abstract class Bundle implements BundleInterface
}
}
- if ($this->extension) {
- return $this->extension;
- }
+ return $this->extension ?: null;
}
/**
@@ -154,9 +151,7 @@ abstract class Bundle implements BundleInterface
*/
protected function createContainerExtension()
{
- if (class_exists($class = $this->getContainerExtensionClass())) {
- return new $class();
- }
+ return class_exists($class = $this->getContainerExtensionClass()) ? new $class() : null;
}
private function parseClassName()
diff --git a/vendor/symfony/http-kernel/CacheWarmer/CacheWarmerAggregate.php b/vendor/symfony/http-kernel/CacheWarmer/CacheWarmerAggregate.php
index f28fbd60cc..57292e07f9 100644
--- a/vendor/symfony/http-kernel/CacheWarmer/CacheWarmerAggregate.php
+++ b/vendor/symfony/http-kernel/CacheWarmer/CacheWarmerAggregate.php
@@ -60,7 +60,7 @@ class CacheWarmerAggregate implements CacheWarmerInterface
if (isset($collectedLogs[$message])) {
++$collectedLogs[$message]['count'];
- return;
+ return null;
}
$backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 3);
@@ -80,6 +80,8 @@ class CacheWarmerAggregate implements CacheWarmerInterface
'trace' => $backtrace,
'count' => 1,
];
+
+ return null;
});
}
diff --git a/vendor/symfony/http-kernel/Controller/ArgumentResolverInterface.php b/vendor/symfony/http-kernel/Controller/ArgumentResolverInterface.php
index 5c51230966..ba97775a90 100644
--- a/vendor/symfony/http-kernel/Controller/ArgumentResolverInterface.php
+++ b/vendor/symfony/http-kernel/Controller/ArgumentResolverInterface.php
@@ -24,7 +24,6 @@ interface ArgumentResolverInterface
/**
* Returns the arguments to pass to the controller.
*
- * @param Request $request
* @param callable $controller
*
* @return array An array of arguments to pass to the controller
diff --git a/vendor/symfony/http-kernel/Controller/ArgumentValueResolverInterface.php b/vendor/symfony/http-kernel/Controller/ArgumentValueResolverInterface.php
index fd7b09ecf2..6b14ed5be3 100644
--- a/vendor/symfony/http-kernel/Controller/ArgumentValueResolverInterface.php
+++ b/vendor/symfony/http-kernel/Controller/ArgumentValueResolverInterface.php
@@ -24,9 +24,6 @@ interface ArgumentValueResolverInterface
/**
* Whether this resolver can resolve the value for the given ArgumentMetadata.
*
- * @param Request $request
- * @param ArgumentMetadata $argument
- *
* @return bool
*/
public function supports(Request $request, ArgumentMetadata $argument);
@@ -34,9 +31,6 @@ interface ArgumentValueResolverInterface
/**
* Returns the possible value(s).
*
- * @param Request $request
- * @param ArgumentMetadata $argument
- *
* @return \Generator
*/
public function resolve(Request $request, ArgumentMetadata $argument);
diff --git a/vendor/symfony/http-kernel/Controller/ContainerControllerResolver.php b/vendor/symfony/http-kernel/Controller/ContainerControllerResolver.php
index 4f80921cf5..e1da17388d 100644
--- a/vendor/symfony/http-kernel/Controller/ContainerControllerResolver.php
+++ b/vendor/symfony/http-kernel/Controller/ContainerControllerResolver.php
@@ -47,6 +47,8 @@ class ContainerControllerResolver extends ControllerResolver
*/
protected function instantiateController($class)
{
+ $class = ltrim($class, '\\');
+
if ($this->container->has($class)) {
return $this->container->get($class);
}
diff --git a/vendor/symfony/http-kernel/Controller/ControllerResolver.php b/vendor/symfony/http-kernel/Controller/ControllerResolver.php
index 3cebfb3e8b..7291c25da7 100644
--- a/vendor/symfony/http-kernel/Controller/ControllerResolver.php
+++ b/vendor/symfony/http-kernel/Controller/ControllerResolver.php
@@ -82,7 +82,11 @@ class ControllerResolver implements ControllerResolverInterface
return $controller;
}
- $callable = $this->createController($controller);
+ try {
+ $callable = $this->createController($controller);
+ } catch (\InvalidArgumentException $e) {
+ throw new \InvalidArgumentException(sprintf('The controller for URI "%s" is not callable. %s', $request->getPathInfo(), $e->getMessage()));
+ }
if (!\is_callable($callable)) {
throw new \InvalidArgumentException(sprintf('The controller for URI "%s" is not callable. %s', $request->getPathInfo(), $this->getControllerError($callable)));
@@ -97,17 +101,25 @@ class ControllerResolver implements ControllerResolverInterface
* @param string $controller A Controller string
*
* @return callable A PHP callable
+ *
+ * @throws \InvalidArgumentException When the controller cannot be created
*/
protected function createController($controller)
{
if (false === strpos($controller, '::')) {
- return $this->instantiateController($controller);
+ $controller = $this->instantiateController($controller);
+
+ if (!\is_callable($controller)) {
+ throw new \InvalidArgumentException($this->getControllerError($controller));
+ }
+
+ return $controller;
}
list($class, $method) = explode('::', $controller, 2);
try {
- return [$this->instantiateController($class), $method];
+ $controller = [$this->instantiateController($class), $method];
} catch (\Error | \LogicException $e) {
try {
if ((new \ReflectionMethod($class, $method))->isStatic()) {
@@ -119,6 +131,12 @@ class ControllerResolver implements ControllerResolverInterface
throw $e;
}
+
+ if (!\is_callable($controller)) {
+ throw new \InvalidArgumentException($this->getControllerError($controller));
+ }
+
+ return $controller;
}
/**
diff --git a/vendor/symfony/http-kernel/ControllerMetadata/ArgumentMetadata.php b/vendor/symfony/http-kernel/ControllerMetadata/ArgumentMetadata.php
index 4ea8ea643f..e73b848e60 100644
--- a/vendor/symfony/http-kernel/ControllerMetadata/ArgumentMetadata.php
+++ b/vendor/symfony/http-kernel/ControllerMetadata/ArgumentMetadata.php
@@ -50,7 +50,7 @@ class ArgumentMetadata
*
* The type is the PHP class in 5.5+ and additionally the basic type in PHP 7.0+.
*
- * @return string
+ * @return string|null
*/
public function getType()
{
diff --git a/vendor/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactory.php b/vendor/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactory.php
index 8ee9b0b938..44fe477945 100644
--- a/vendor/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactory.php
+++ b/vendor/symfony/http-kernel/ControllerMetadata/ArgumentMetadataFactory.php
@@ -42,15 +42,11 @@ final class ArgumentMetadataFactory implements ArgumentMetadataFactoryInterface
/**
* Returns an associated type to the given parameter if available.
- *
- * @param \ReflectionParameter $parameter
- *
- * @return string|null
*/
- private function getType(\ReflectionParameter $parameter, \ReflectionFunctionAbstract $function)
+ private function getType(\ReflectionParameter $parameter, \ReflectionFunctionAbstract $function): ?string
{
if (!$type = $parameter->getType()) {
- return;
+ return null;
}
$name = $type->getName();
$lcName = strtolower($name);
@@ -59,7 +55,7 @@ final class ArgumentMetadataFactory implements ArgumentMetadataFactoryInterface
return $name;
}
if (!$function instanceof \ReflectionMethod) {
- return;
+ return null;
}
if ('self' === $lcName) {
return $function->getDeclaringClass()->name;
@@ -67,5 +63,7 @@ final class ArgumentMetadataFactory implements ArgumentMetadataFactoryInterface
if ($parent = $function->getDeclaringClass()->getParentClass()) {
return $parent->name;
}
+
+ return null;
}
}
diff --git a/vendor/symfony/http-kernel/DataCollector/ConfigDataCollector.php b/vendor/symfony/http-kernel/DataCollector/ConfigDataCollector.php
index c3c3f94ead..7000e70d5c 100644
--- a/vendor/symfony/http-kernel/DataCollector/ConfigDataCollector.php
+++ b/vendor/symfony/http-kernel/DataCollector/ConfigDataCollector.php
@@ -131,7 +131,7 @@ class ConfigDataCollector extends DataCollector implements LateDataCollectorInte
/**
* Gets the token.
*
- * @return string The token
+ * @return string|null The token
*/
public function getToken()
{
diff --git a/vendor/symfony/http-kernel/DataCollector/DataCollector.php b/vendor/symfony/http-kernel/DataCollector/DataCollector.php
index d3020a312e..52ab90c669 100644
--- a/vendor/symfony/http-kernel/DataCollector/DataCollector.php
+++ b/vendor/symfony/http-kernel/DataCollector/DataCollector.php
@@ -28,6 +28,9 @@ use Symfony\Component\VarDumper\Cloner\VarCloner;
*/
abstract class DataCollector implements DataCollectorInterface
{
+ /**
+ * @var array|Data
+ */
protected $data = [];
/**
diff --git a/vendor/symfony/http-kernel/DataCollector/EventDataCollector.php b/vendor/symfony/http-kernel/DataCollector/EventDataCollector.php
index d918ddf786..639757024c 100644
--- a/vendor/symfony/http-kernel/DataCollector/EventDataCollector.php
+++ b/vendor/symfony/http-kernel/DataCollector/EventDataCollector.php
@@ -99,8 +99,6 @@ class EventDataCollector extends DataCollector implements LateDataCollectorInter
/**
* Sets the not called listeners.
*
- * @param array $listeners
- *
* @see TraceableEventDispatcher
*/
public function setNotCalledListeners(array $listeners)
diff --git a/vendor/symfony/http-kernel/DataCollector/ExceptionDataCollector.php b/vendor/symfony/http-kernel/DataCollector/ExceptionDataCollector.php
index c76e7f45bd..f9be5bddff 100644
--- a/vendor/symfony/http-kernel/DataCollector/ExceptionDataCollector.php
+++ b/vendor/symfony/http-kernel/DataCollector/ExceptionDataCollector.php
@@ -55,7 +55,7 @@ class ExceptionDataCollector extends DataCollector
/**
* Gets the exception.
*
- * @return \Exception The exception
+ * @return \Exception|FlattenException
*/
public function getException()
{
diff --git a/vendor/symfony/http-kernel/DataCollector/LoggerDataCollector.php b/vendor/symfony/http-kernel/DataCollector/LoggerDataCollector.php
index 405a951526..d6cca047b9 100644
--- a/vendor/symfony/http-kernel/DataCollector/LoggerDataCollector.php
+++ b/vendor/symfony/http-kernel/DataCollector/LoggerDataCollector.php
@@ -75,11 +75,6 @@ class LoggerDataCollector extends DataCollector implements LateDataCollectorInte
$this->currentRequest = null;
}
- /**
- * Gets the logs.
- *
- * @return array An array of logs
- */
public function getLogs()
{
return isset($this->data['logs']) ? $this->data['logs'] : [];
diff --git a/vendor/symfony/http-kernel/DataCollector/TimeDataCollector.php b/vendor/symfony/http-kernel/DataCollector/TimeDataCollector.php
index 7ab14b7cb8..cb490c2bb3 100644
--- a/vendor/symfony/http-kernel/DataCollector/TimeDataCollector.php
+++ b/vendor/symfony/http-kernel/DataCollector/TimeDataCollector.php
@@ -15,10 +15,9 @@ use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\KernelInterface;
use Symfony\Component\Stopwatch\Stopwatch;
+use Symfony\Component\Stopwatch\StopwatchEvent;
/**
- * TimeDataCollector.
- *
* @author Fabien Potencier <fabien@symfony.com>
*/
class TimeDataCollector extends DataCollector implements LateDataCollectorInterface
@@ -77,7 +76,7 @@ class TimeDataCollector extends DataCollector implements LateDataCollectorInterf
/**
* Sets the request events.
*
- * @param array $events The request events
+ * @param StopwatchEvent[] $events The request events
*/
public function setEvents(array $events)
{
@@ -91,7 +90,7 @@ class TimeDataCollector extends DataCollector implements LateDataCollectorInterf
/**
* Gets the request events.
*
- * @return array The request events
+ * @return StopwatchEvent[] The request events
*/
public function getEvents()
{
@@ -133,7 +132,7 @@ class TimeDataCollector extends DataCollector implements LateDataCollectorInterf
/**
* Gets the request time.
*
- * @return int The time
+ * @return float
*/
public function getStartTime()
{
diff --git a/vendor/symfony/http-kernel/Debug/FileLinkFormatter.php b/vendor/symfony/http-kernel/Debug/FileLinkFormatter.php
index eb24167529..236bbd09b8 100644
--- a/vendor/symfony/http-kernel/Debug/FileLinkFormatter.php
+++ b/vendor/symfony/http-kernel/Debug/FileLinkFormatter.php
@@ -101,5 +101,7 @@ class FileLinkFormatter
];
}
}
+
+ return null;
}
}
diff --git a/vendor/symfony/http-kernel/Debug/TraceableEventDispatcher.php b/vendor/symfony/http-kernel/Debug/TraceableEventDispatcher.php
index 6c96afdff3..ce4ddb35d3 100644
--- a/vendor/symfony/http-kernel/Debug/TraceableEventDispatcher.php
+++ b/vendor/symfony/http-kernel/Debug/TraceableEventDispatcher.php
@@ -41,6 +41,9 @@ class TraceableEventDispatcher extends BaseTraceableEventDispatcher
break;
case KernelEvents::TERMINATE:
$token = $event->getResponse()->headers->get('X-Debug-Token');
+ if (null === $token) {
+ break;
+ }
// There is a very special case when using built-in AppCache class as kernel wrapper, in the case
// of an ESI request leading to a `stale` response [B] inside a `fresh` cached response [A].
// In this case, `$token` contains the [B] debug token, but the open `stopwatch` section ID
@@ -65,12 +68,18 @@ class TraceableEventDispatcher extends BaseTraceableEventDispatcher
break;
case KernelEvents::RESPONSE:
$token = $event->getResponse()->headers->get('X-Debug-Token');
+ if (null === $token) {
+ break;
+ }
$this->stopwatch->stopSection($token);
break;
case KernelEvents::TERMINATE:
// In the special case described in the `preDispatch` method above, the `$token` section
// does not exist, then closing it throws an exception which must be caught.
$token = $event->getResponse()->headers->get('X-Debug-Token');
+ if (null === $token) {
+ break;
+ }
try {
$this->stopwatch->stopSection($token);
} catch (\LogicException $e) {
diff --git a/vendor/symfony/http-kernel/Event/FilterControllerArgumentsEvent.php b/vendor/symfony/http-kernel/Event/FilterControllerArgumentsEvent.php
index ac8e0263ca..f3c5dc34aa 100644
--- a/vendor/symfony/http-kernel/Event/FilterControllerArgumentsEvent.php
+++ b/vendor/symfony/http-kernel/Event/FilterControllerArgumentsEvent.php
@@ -17,7 +17,7 @@ use Symfony\Component\HttpKernel\HttpKernelInterface;
/**
* @deprecated since Symfony 4.3, use ControllerArgumentsEvent instead
*/
-class FilterControllerArgumentsEvent extends ControllerEvent
+class FilterControllerArgumentsEvent extends FilterControllerEvent
{
private $arguments;
diff --git a/vendor/symfony/http-kernel/EventListener/AbstractSessionListener.php b/vendor/symfony/http-kernel/EventListener/AbstractSessionListener.php
index d89bc813f7..3595249891 100644
--- a/vendor/symfony/http-kernel/EventListener/AbstractSessionListener.php
+++ b/vendor/symfony/http-kernel/EventListener/AbstractSessionListener.php
@@ -106,7 +106,7 @@ abstract class AbstractSessionListener implements EventSubscriberInterface
* the one above. But by saving the session before long-running things in the terminate event,
* we ensure the session is not blocked longer than needed.
* * When regenerating the session ID no locking is involved in PHPs session design. See
- * https://bugs.php.net/bug.php?id=61470 for a discussion. So in this case, the session must
+ * https://bugs.php.net/61470 for a discussion. So in this case, the session must
* be saved anyway before sending the headers with the new session ID. Otherwise session
* data could get lost again for concurrent requests with the new ID. One result could be
* that you get logged out after just logging in.
diff --git a/vendor/symfony/http-kernel/EventListener/ExceptionListener.php b/vendor/symfony/http-kernel/EventListener/ExceptionListener.php
index f8044537a8..ab5f65cb63 100644
--- a/vendor/symfony/http-kernel/EventListener/ExceptionListener.php
+++ b/vendor/symfony/http-kernel/EventListener/ExceptionListener.php
@@ -48,10 +48,6 @@ class ExceptionListener implements EventSubscriberInterface
$this->logException($event->getException(), sprintf('Uncaught PHP Exception %s: "%s" at %s line %s', $e->getClass(), $e->getMessage(), $e->getFile(), $e->getLine()));
}
- /**
- * @param string $eventName
- * @param EventDispatcherInterface $eventDispatcher
- */
public function onKernelException(GetResponseForExceptionEvent $event)
{
if (null === $this->controller) {
diff --git a/vendor/symfony/http-kernel/EventListener/RouterListener.php b/vendor/symfony/http-kernel/EventListener/RouterListener.php
index 01a95ebffb..2f1735d26f 100644
--- a/vendor/symfony/http-kernel/EventListener/RouterListener.php
+++ b/vendor/symfony/http-kernel/EventListener/RouterListener.php
@@ -55,7 +55,6 @@ class RouterListener implements EventSubscriberInterface
* @param RequestContext|null $context The RequestContext (can be null when $matcher implements RequestContextAwareInterface)
* @param LoggerInterface|null $logger The logger
* @param string $projectDir
- * @param bool $debug
*
* @throws \InvalidArgumentException
*/
@@ -91,8 +90,6 @@ class RouterListener implements EventSubscriberInterface
/**
* After a sub-request is done, we need to reset the routing context to the parent request so that the URL generator
* operates on the correct context again.
- *
- * @param FinishRequestEvent $event
*/
public function onKernelFinishRequest(FinishRequestEvent $event)
{
diff --git a/vendor/symfony/http-kernel/EventListener/SessionListener.php b/vendor/symfony/http-kernel/EventListener/SessionListener.php
index c466fb7c9e..019ccee49f 100644
--- a/vendor/symfony/http-kernel/EventListener/SessionListener.php
+++ b/vendor/symfony/http-kernel/EventListener/SessionListener.php
@@ -35,7 +35,7 @@ class SessionListener extends AbstractSessionListener
protected function getSession()
{
if (!$this->container->has('session')) {
- return;
+ return null;
}
if ($this->container->has('session_storage')
diff --git a/vendor/symfony/http-kernel/EventListener/TestSessionListener.php b/vendor/symfony/http-kernel/EventListener/TestSessionListener.php
index 46323ae2a8..a0a52c2a75 100644
--- a/vendor/symfony/http-kernel/EventListener/TestSessionListener.php
+++ b/vendor/symfony/http-kernel/EventListener/TestSessionListener.php
@@ -33,7 +33,7 @@ class TestSessionListener extends AbstractTestSessionListener
protected function getSession()
{
if (!$this->container->has('session')) {
- return;
+ return null;
}
return $this->container->get('session');
diff --git a/vendor/symfony/http-kernel/Exception/AccessDeniedHttpException.php b/vendor/symfony/http-kernel/Exception/AccessDeniedHttpException.php
index 326e9361ef..65e5f8c786 100644
--- a/vendor/symfony/http-kernel/Exception/AccessDeniedHttpException.php
+++ b/vendor/symfony/http-kernel/Exception/AccessDeniedHttpException.php
@@ -21,7 +21,6 @@ class AccessDeniedHttpException extends HttpException
* @param string $message The internal exception message
* @param \Throwable $previous The previous exception
* @param int $code The internal exception code
- * @param array $headers
*/
public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = [])
{
diff --git a/vendor/symfony/http-kernel/Exception/BadRequestHttpException.php b/vendor/symfony/http-kernel/Exception/BadRequestHttpException.php
index db031bea7d..7de91054b4 100644
--- a/vendor/symfony/http-kernel/Exception/BadRequestHttpException.php
+++ b/vendor/symfony/http-kernel/Exception/BadRequestHttpException.php
@@ -20,7 +20,6 @@ class BadRequestHttpException extends HttpException
* @param string $message The internal exception message
* @param \Throwable $previous The previous exception
* @param int $code The internal exception code
- * @param array $headers
*/
public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = [])
{
diff --git a/vendor/symfony/http-kernel/Exception/ConflictHttpException.php b/vendor/symfony/http-kernel/Exception/ConflictHttpException.php
index e1542cd056..ebb86ba6e9 100644
--- a/vendor/symfony/http-kernel/Exception/ConflictHttpException.php
+++ b/vendor/symfony/http-kernel/Exception/ConflictHttpException.php
@@ -20,7 +20,6 @@ class ConflictHttpException extends HttpException
* @param string $message The internal exception message
* @param \Throwable $previous The previous exception
* @param int $code The internal exception code
- * @param array $headers
*/
public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = [])
{
diff --git a/vendor/symfony/http-kernel/Exception/GoneHttpException.php b/vendor/symfony/http-kernel/Exception/GoneHttpException.php
index 5d75f92b19..aea283a961 100644
--- a/vendor/symfony/http-kernel/Exception/GoneHttpException.php
+++ b/vendor/symfony/http-kernel/Exception/GoneHttpException.php
@@ -20,7 +20,6 @@ class GoneHttpException extends HttpException
* @param string $message The internal exception message
* @param \Throwable $previous The previous exception
* @param int $code The internal exception code
- * @param array $headers
*/
public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = [])
{
diff --git a/vendor/symfony/http-kernel/Exception/LengthRequiredHttpException.php b/vendor/symfony/http-kernel/Exception/LengthRequiredHttpException.php
index 5e6eda04db..44fb770b60 100644
--- a/vendor/symfony/http-kernel/Exception/LengthRequiredHttpException.php
+++ b/vendor/symfony/http-kernel/Exception/LengthRequiredHttpException.php
@@ -20,7 +20,6 @@ class LengthRequiredHttpException extends HttpException
* @param string $message The internal exception message
* @param \Throwable $previous The previous exception
* @param int $code The internal exception code
- * @param array $headers
*/
public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = [])
{
diff --git a/vendor/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php b/vendor/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php
index 388c8c704e..c15e46ffc3 100644
--- a/vendor/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php
+++ b/vendor/symfony/http-kernel/Exception/MethodNotAllowedHttpException.php
@@ -21,7 +21,6 @@ class MethodNotAllowedHttpException extends HttpException
* @param string $message The internal exception message
* @param \Throwable $previous The previous exception
* @param int $code The internal exception code
- * @param array $headers
*/
public function __construct(array $allow, string $message = null, \Throwable $previous = null, ?int $code = 0, array $headers = [])
{
diff --git a/vendor/symfony/http-kernel/Exception/NotAcceptableHttpException.php b/vendor/symfony/http-kernel/Exception/NotAcceptableHttpException.php
index 5bdacf6914..c5f5324b1a 100644
--- a/vendor/symfony/http-kernel/Exception/NotAcceptableHttpException.php
+++ b/vendor/symfony/http-kernel/Exception/NotAcceptableHttpException.php
@@ -20,7 +20,6 @@ class NotAcceptableHttpException extends HttpException
* @param string $message The internal exception message
* @param \Throwable $previous The previous exception
* @param int $code The internal exception code
- * @param array $headers
*/
public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = [])
{
diff --git a/vendor/symfony/http-kernel/Exception/NotFoundHttpException.php b/vendor/symfony/http-kernel/Exception/NotFoundHttpException.php
index c52587d37f..146b908a1e 100644
--- a/vendor/symfony/http-kernel/Exception/NotFoundHttpException.php
+++ b/vendor/symfony/http-kernel/Exception/NotFoundHttpException.php
@@ -20,7 +20,6 @@ class NotFoundHttpException extends HttpException
* @param string $message The internal exception message
* @param \Throwable $previous The previous exception
* @param int $code The internal exception code
- * @param array $headers
*/
public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = [])
{
diff --git a/vendor/symfony/http-kernel/Exception/PreconditionFailedHttpException.php b/vendor/symfony/http-kernel/Exception/PreconditionFailedHttpException.php
index 9bd895c88f..e878b10ad3 100644
--- a/vendor/symfony/http-kernel/Exception/PreconditionFailedHttpException.php
+++ b/vendor/symfony/http-kernel/Exception/PreconditionFailedHttpException.php
@@ -20,7 +20,6 @@ class PreconditionFailedHttpException extends HttpException
* @param string $message The internal exception message
* @param \Throwable $previous The previous exception
* @param int $code The internal exception code
- * @param array $headers
*/
public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = [])
{
diff --git a/vendor/symfony/http-kernel/Exception/PreconditionRequiredHttpException.php b/vendor/symfony/http-kernel/Exception/PreconditionRequiredHttpException.php
index 6aed73406e..a6cb2f09a7 100644
--- a/vendor/symfony/http-kernel/Exception/PreconditionRequiredHttpException.php
+++ b/vendor/symfony/http-kernel/Exception/PreconditionRequiredHttpException.php
@@ -22,7 +22,6 @@ class PreconditionRequiredHttpException extends HttpException
* @param string $message The internal exception message
* @param \Throwable $previous The previous exception
* @param int $code The internal exception code
- * @param array $headers
*/
public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = [])
{
diff --git a/vendor/symfony/http-kernel/Exception/ServiceUnavailableHttpException.php b/vendor/symfony/http-kernel/Exception/ServiceUnavailableHttpException.php
index 34a749fa47..c786ccf5f7 100644
--- a/vendor/symfony/http-kernel/Exception/ServiceUnavailableHttpException.php
+++ b/vendor/symfony/http-kernel/Exception/ServiceUnavailableHttpException.php
@@ -21,7 +21,6 @@ class ServiceUnavailableHttpException extends HttpException
* @param string $message The internal exception message
* @param \Throwable $previous The previous exception
* @param int $code The internal exception code
- * @param array $headers
*/
public function __construct($retryAfter = null, string $message = null, \Throwable $previous = null, ?int $code = 0, array $headers = [])
{
diff --git a/vendor/symfony/http-kernel/Exception/TooManyRequestsHttpException.php b/vendor/symfony/http-kernel/Exception/TooManyRequestsHttpException.php
index e69961b7de..b709f1a2f1 100644
--- a/vendor/symfony/http-kernel/Exception/TooManyRequestsHttpException.php
+++ b/vendor/symfony/http-kernel/Exception/TooManyRequestsHttpException.php
@@ -23,7 +23,6 @@ class TooManyRequestsHttpException extends HttpException
* @param string $message The internal exception message
* @param \Throwable $previous The previous exception
* @param int $code The internal exception code
- * @param array $headers
*/
public function __construct($retryAfter = null, string $message = null, \Throwable $previous = null, ?int $code = 0, array $headers = [])
{
diff --git a/vendor/symfony/http-kernel/Exception/UnauthorizedHttpException.php b/vendor/symfony/http-kernel/Exception/UnauthorizedHttpException.php
index 7f7d0b4739..fb86c1ea95 100644
--- a/vendor/symfony/http-kernel/Exception/UnauthorizedHttpException.php
+++ b/vendor/symfony/http-kernel/Exception/UnauthorizedHttpException.php
@@ -21,7 +21,6 @@ class UnauthorizedHttpException extends HttpException
* @param string $message The internal exception message
* @param \Throwable $previous The previous exception
* @param int $code The internal exception code
- * @param array $headers
*/
public function __construct(string $challenge, string $message = null, \Throwable $previous = null, ?int $code = 0, array $headers = [])
{
diff --git a/vendor/symfony/http-kernel/Exception/UnprocessableEntityHttpException.php b/vendor/symfony/http-kernel/Exception/UnprocessableEntityHttpException.php
index 7fbc7eff0c..93d4bcef69 100644
--- a/vendor/symfony/http-kernel/Exception/UnprocessableEntityHttpException.php
+++ b/vendor/symfony/http-kernel/Exception/UnprocessableEntityHttpException.php
@@ -20,7 +20,6 @@ class UnprocessableEntityHttpException extends HttpException
* @param string $message The internal exception message
* @param \Throwable $previous The previous exception
* @param int $code The internal exception code
- * @param array $headers
*/
public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = [])
{
diff --git a/vendor/symfony/http-kernel/Exception/UnsupportedMediaTypeHttpException.php b/vendor/symfony/http-kernel/Exception/UnsupportedMediaTypeHttpException.php
index 3bfac7f481..7cda3a6202 100644
--- a/vendor/symfony/http-kernel/Exception/UnsupportedMediaTypeHttpException.php
+++ b/vendor/symfony/http-kernel/Exception/UnsupportedMediaTypeHttpException.php
@@ -20,7 +20,6 @@ class UnsupportedMediaTypeHttpException extends HttpException
* @param string $message The internal exception message
* @param \Throwable $previous The previous exception
* @param int $code The internal exception code
- * @param array $headers
*/
public function __construct(string $message = null, \Throwable $previous = null, int $code = 0, array $headers = [])
{
diff --git a/vendor/symfony/http-kernel/Fragment/FragmentHandler.php b/vendor/symfony/http-kernel/Fragment/FragmentHandler.php
index 758f0e8fc1..1ae550fe45 100644
--- a/vendor/symfony/http-kernel/Fragment/FragmentHandler.php
+++ b/vendor/symfony/http-kernel/Fragment/FragmentHandler.php
@@ -108,5 +108,7 @@ class FragmentHandler
}
$response->sendContent();
+
+ return null;
}
}
diff --git a/vendor/symfony/http-kernel/Fragment/HIncludeFragmentRenderer.php b/vendor/symfony/http-kernel/Fragment/HIncludeFragmentRenderer.php
index 9a700a9b11..9915e2c112 100644
--- a/vendor/symfony/http-kernel/Fragment/HIncludeFragmentRenderer.php
+++ b/vendor/symfony/http-kernel/Fragment/HIncludeFragmentRenderer.php
@@ -36,7 +36,6 @@ class HIncludeFragmentRenderer extends RoutableFragmentRenderer
* @param EngineInterface|Environment $templating An EngineInterface or a Twig instance
* @param UriSigner $signer A UriSigner instance
* @param string $globalDefaultTemplate The global default content (it can be a template name or the content)
- * @param string $charset
*/
public function __construct($templating = null, UriSigner $signer = null, string $globalDefaultTemplate = null, string $charset = 'utf-8')
{
diff --git a/vendor/symfony/http-kernel/Fragment/InlineFragmentRenderer.php b/vendor/symfony/http-kernel/Fragment/InlineFragmentRenderer.php
index 7d6243552a..8f89733b59 100644
--- a/vendor/symfony/http-kernel/Fragment/InlineFragmentRenderer.php
+++ b/vendor/symfony/http-kernel/Fragment/InlineFragmentRenderer.php
@@ -122,7 +122,7 @@ class InlineFragmentRenderer extends RoutableFragmentRenderer
static $setSession;
if (null === $setSession) {
- $setSession = \Closure::bind(function ($subRequest, $request) { $subRequest->session = $request->session; }, null, Request::class);
+ $setSession = \Closure::bind(static function ($subRequest, $request) { $subRequest->session = $request->session; }, null, Request::class);
}
$setSession($subRequest, $request);
diff --git a/vendor/symfony/http-kernel/HttpCache/AbstractSurrogate.php b/vendor/symfony/http-kernel/HttpCache/AbstractSurrogate.php
index 8918a30570..9b4541793f 100644
--- a/vendor/symfony/http-kernel/HttpCache/AbstractSurrogate.php
+++ b/vendor/symfony/http-kernel/HttpCache/AbstractSurrogate.php
@@ -109,6 +109,8 @@ abstract class AbstractSurrogate implements SurrogateInterface
throw $e;
}
}
+
+ return '';
}
/**
diff --git a/vendor/symfony/http-kernel/HttpCache/Esi.php b/vendor/symfony/http-kernel/HttpCache/Esi.php
index dc62990b40..96e6ca4bfe 100644
--- a/vendor/symfony/http-kernel/HttpCache/Esi.php
+++ b/vendor/symfony/http-kernel/HttpCache/Esi.php
@@ -111,5 +111,7 @@ class Esi extends AbstractSurrogate
// remove ESI/1.0 from the Surrogate-Control header
$this->removeFromControl($response);
+
+ return $response;
}
}
diff --git a/vendor/symfony/http-kernel/HttpCache/HttpCache.php b/vendor/symfony/http-kernel/HttpCache/HttpCache.php
index 051285aeba..ab178ed42c 100644
--- a/vendor/symfony/http-kernel/HttpCache/HttpCache.php
+++ b/vendor/symfony/http-kernel/HttpCache/HttpCache.php
@@ -98,8 +98,8 @@ class HttpCache implements HttpKernelInterface, TerminableInterface
'trace_header' => 'X-Symfony-Cache',
], $options);
- if (!isset($options['trace_level']) && $this->options['debug']) {
- $this->options['trace_level'] = 'full';
+ if (!isset($options['trace_level'])) {
+ $this->options['trace_level'] = $this->options['debug'] ? 'full' : 'none';
}
}
@@ -462,9 +462,8 @@ class HttpCache implements HttpKernelInterface, TerminableInterface
* All backend requests (cache passes, fetches, cache validations)
* run through this method.
*
- * @param Request $request A Request instance
- * @param bool $catch Whether to catch exceptions or not
- * @param Response $entry A Response instance (the stale entry if present, null otherwise)
+ * @param bool $catch Whether to catch exceptions or not
+ * @param Response|null $entry A Response instance (the stale entry if present, null otherwise)
*
* @return Response A Response instance
*/
diff --git a/vendor/symfony/http-kernel/HttpCache/Ssi.php b/vendor/symfony/http-kernel/HttpCache/Ssi.php
index eaaa230b50..40aac64f2a 100644
--- a/vendor/symfony/http-kernel/HttpCache/Ssi.php
+++ b/vendor/symfony/http-kernel/HttpCache/Ssi.php
@@ -94,5 +94,7 @@ class Ssi extends AbstractSurrogate
// remove SSI/1.0 from the Surrogate-Control header
$this->removeFromControl($response);
+
+ return $response;
}
}
diff --git a/vendor/symfony/http-kernel/HttpCache/Store.php b/vendor/symfony/http-kernel/HttpCache/Store.php
index 0ca14c7590..7026ac3c7d 100644
--- a/vendor/symfony/http-kernel/HttpCache/Store.php
+++ b/vendor/symfony/http-kernel/HttpCache/Store.php
@@ -132,7 +132,7 @@ class Store implements StoreInterface
$key = $this->getCacheKey($request);
if (!$entries = $this->getMetadata($key)) {
- return;
+ return null;
}
// find a cached entry that matches the request.
@@ -146,7 +146,7 @@ class Store implements StoreInterface
}
if (null === $match) {
- return;
+ return null;
}
$headers = $match[1];
@@ -157,6 +157,7 @@ class Store implements StoreInterface
// TODO the metaStore referenced an entity that doesn't exist in
// the entityStore. We definitely want to return nil but we should
// also purge the entry from the meta-store when this is detected.
+ return null;
}
/**
@@ -178,7 +179,7 @@ class Store implements StoreInterface
if (!$response->headers->has('X-Content-Digest')) {
$digest = $this->generateContentDigest($response);
- if (false === $this->save($digest, $response->getContent())) {
+ if (!$this->save($digest, $response->getContent())) {
throw new \RuntimeException('Unable to store the entity.');
}
@@ -207,7 +208,7 @@ class Store implements StoreInterface
array_unshift($entries, [$storedEnv, $headers]);
- if (false === $this->save($key, serialize($entries))) {
+ if (!$this->save($key, serialize($entries))) {
throw new \RuntimeException('Unable to store the metadata.');
}
@@ -246,7 +247,7 @@ class Store implements StoreInterface
}
}
- if ($modified && false === $this->save($key, serialize($entries))) {
+ if ($modified && !$this->save($key, serialize($entries))) {
throw new \RuntimeException('Unable to store the metadata.');
}
}
@@ -347,13 +348,13 @@ class Store implements StoreInterface
*
* @param string $key The store key
*
- * @return string The data associated with the key
+ * @return string|null The data associated with the key
*/
private function load($key)
{
$path = $this->getPath($key);
- return file_exists($path) ? file_get_contents($path) : false;
+ return file_exists($path) && false !== ($contents = file_get_contents($path)) ? $contents : null;
}
/**
@@ -406,6 +407,8 @@ class Store implements StoreInterface
}
@chmod($path, 0666 & ~umask());
+
+ return true;
}
public function getPath($key)
diff --git a/vendor/symfony/http-kernel/Kernel.php b/vendor/symfony/http-kernel/Kernel.php
index 65476f80e3..881afc0f3d 100644
--- a/vendor/symfony/http-kernel/Kernel.php
+++ b/vendor/symfony/http-kernel/Kernel.php
@@ -73,11 +73,11 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl
private $requestStackSize = 0;
private $resetServices = false;
- const VERSION = '4.3.3';
- const VERSION_ID = 40303;
+ const VERSION = '4.3.4';
+ const VERSION_ID = 40304;
const MAJOR_VERSION = 4;
const MINOR_VERSION = 3;
- const RELEASE_VERSION = 3;
+ const RELEASE_VERSION = 4;
const EXTRA_VERSION = '';
const END_OF_MAINTENANCE = '01/2020';
@@ -204,7 +204,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl
/**
* Gets a HTTP kernel from the container.
*
- * @return HttpKernel
+ * @return HttpKernelInterface
*/
protected function getHttpKernel()
{
@@ -377,7 +377,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl
*/
public function getStartTime()
{
- return $this->debug ? $this->startTime : -INF;
+ return $this->debug && null !== $this->startTime ? $this->startTime : -INF;
}
/**
@@ -503,10 +503,9 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl
return;
}
- if ($this->debug) {
+ if ($collectDeprecations = $this->debug && !\defined('PHPUNIT_COMPOSER_INSTALL')) {
$collectedLogs = [];
- $previousHandler = \defined('PHPUNIT_COMPOSER_INSTALL');
- $previousHandler = $previousHandler ?: set_error_handler(function ($type, $message, $file, $line) use (&$collectedLogs, &$previousHandler) {
+ $previousHandler = set_error_handler(function ($type, $message, $file, $line) use (&$collectedLogs, &$previousHandler) {
if (E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type) {
return $previousHandler ? $previousHandler($type, $message, $file, $line) : false;
}
@@ -514,7 +513,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl
if (isset($collectedLogs[$message])) {
++$collectedLogs[$message]['count'];
- return;
+ return null;
}
$backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 5);
@@ -541,6 +540,8 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl
'trace' => [$backtrace[0]],
'count' => 1,
];
+
+ return null;
});
}
@@ -549,7 +550,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl
$container = $this->buildContainer();
$container->compile();
} finally {
- if ($this->debug && true !== $previousHandler) {
+ if ($collectDeprecations) {
restore_error_handler();
file_put_contents($cacheDir.'/'.$class.'Deprecations.log', serialize(array_values($collectedLogs)));
diff --git a/vendor/symfony/http-kernel/KernelInterface.php b/vendor/symfony/http-kernel/KernelInterface.php
index ead6920e77..f9089dc61e 100644
--- a/vendor/symfony/http-kernel/KernelInterface.php
+++ b/vendor/symfony/http-kernel/KernelInterface.php
@@ -140,7 +140,7 @@ interface KernelInterface extends HttpKernelInterface
/**
* Gets the request start time (not available if debug is disabled).
*
- * @return int The request start timestamp
+ * @return float The request start timestamp
*/
public function getStartTime();
diff --git a/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php b/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php
index 863998fd31..541187cfec 100644
--- a/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php
+++ b/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php
@@ -116,7 +116,7 @@ class FileProfilerStorage implements ProfilerStorageInterface
public function read($token)
{
if (!$token || !file_exists($file = $this->getFilename($token))) {
- return;
+ return null;
}
return $this->createProfileFromData($token, unserialize(file_get_contents($file)));
@@ -227,7 +227,7 @@ class FileProfilerStorage implements ProfilerStorageInterface
$position = ftell($file);
if (0 === $position) {
- return;
+ return null;
}
while (true) {
diff --git a/vendor/symfony/http-kernel/Profiler/Profile.php b/vendor/symfony/http-kernel/Profiler/Profile.php
index f896c00e52..01cdc89442 100644
--- a/vendor/symfony/http-kernel/Profiler/Profile.php
+++ b/vendor/symfony/http-kernel/Profiler/Profile.php
@@ -99,7 +99,7 @@ class Profile
/**
* Returns the IP.
*
- * @return string The IP
+ * @return string|null The IP
*/
public function getIp()
{
@@ -119,7 +119,7 @@ class Profile
/**
* Returns the request method.
*
- * @return string The request method
+ * @return string|null The request method
*/
public function getMethod()
{
@@ -134,13 +134,16 @@ class Profile
/**
* Returns the URL.
*
- * @return string The URL
+ * @return string|null The URL
*/
public function getUrl()
{
return $this->url;
}
+ /**
+ * @param string $url
+ */
public function setUrl($url)
{
$this->url = $url;
@@ -177,7 +180,7 @@ class Profile
}
/**
- * @return int
+ * @return int|null
*/
public function getStatusCode()
{
diff --git a/vendor/symfony/http-kernel/Profiler/Profiler.php b/vendor/symfony/http-kernel/Profiler/Profiler.php
index 4a32c78420..87a4996392 100644
--- a/vendor/symfony/http-kernel/Profiler/Profiler.php
+++ b/vendor/symfony/http-kernel/Profiler/Profiler.php
@@ -63,12 +63,12 @@ class Profiler implements ResetInterface
/**
* Loads the Profile for the given Response.
*
- * @return Profile|false A Profile instance
+ * @return Profile|null A Profile instance
*/
public function loadProfileFromResponse(Response $response)
{
if (!$token = $response->headers->get('X-Debug-Token')) {
- return false;
+ return null;
}
return $this->loadProfile($token);
@@ -79,7 +79,7 @@ class Profiler implements ResetInterface
*
* @param string $token A token
*
- * @return Profile A Profile instance
+ * @return Profile|null A Profile instance
*/
public function loadProfile($token)
{
@@ -128,7 +128,7 @@ class Profiler implements ResetInterface
*
* @return array An array of tokens
*
- * @see http://php.net/manual/en/datetime.formats.php for the supported date/time formats
+ * @see https://php.net/datetime.formats for the supported date/time formats
*/
public function find($ip, $url, $limit, $method, $start, $end, $statusCode = null)
{
@@ -143,7 +143,7 @@ class Profiler implements ResetInterface
public function collect(Request $request, Response $response, \Exception $exception = null)
{
if (false === $this->enabled) {
- return;
+ return null;
}
$profile = new Profile(substr(hash('sha256', uniqid(mt_rand(), true)), 0, 6));
@@ -242,16 +242,16 @@ class Profiler implements ResetInterface
return $this->collectors[$name];
}
- private function getTimestamp($value)
+ private function getTimestamp(?string $value): ?int
{
- if (null === $value || '' == $value) {
- return;
+ if (null === $value || '' === $value) {
+ return null;
}
try {
$value = new \DateTime(is_numeric($value) ? '@'.$value : $value);
} catch (\Exception $e) {
- return;
+ return null;
}
return $value->getTimestamp();
diff --git a/vendor/symfony/http-kernel/Profiler/ProfilerStorageInterface.php b/vendor/symfony/http-kernel/Profiler/ProfilerStorageInterface.php
index b78bae847f..c97e640b60 100644
--- a/vendor/symfony/http-kernel/Profiler/ProfilerStorageInterface.php
+++ b/vendor/symfony/http-kernel/Profiler/ProfilerStorageInterface.php
@@ -47,7 +47,7 @@ interface ProfilerStorageInterface
*
* @param string $token A token
*
- * @return Profile The profile associated with token
+ * @return Profile|null The profile associated with token
*/
public function read($token);
diff --git a/vendor/symfony/http-kernel/Tests/Bundle/BundleTest.php b/vendor/symfony/http-kernel/Tests/Bundle/BundleTest.php
index 394e7ed7c6..46dcee2162 100644
--- a/vendor/symfony/http-kernel/Tests/Bundle/BundleTest.php
+++ b/vendor/symfony/http-kernel/Tests/Bundle/BundleTest.php
@@ -29,11 +29,12 @@ class BundleTest extends TestCase
}
/**
- * @expectedException \LogicException
- * @expectedExceptionMessage must implement Symfony\Component\DependencyInjection\Extension\ExtensionInterface
+ * @group legacy
*/
public function testGetContainerExtensionWithInvalidClass()
{
+ $this->expectException('LogicException');
+ $this->expectExceptionMessage('must implement Symfony\Component\DependencyInjection\Extension\ExtensionInterface');
$bundle = new ExtensionNotValidBundle();
$bundle->getContainerExtension();
}
diff --git a/vendor/symfony/http-kernel/Tests/CacheClearer/ChainCacheClearerTest.php b/vendor/symfony/http-kernel/Tests/CacheClearer/ChainCacheClearerTest.php
index 9892db20ea..b97559e321 100644
--- a/vendor/symfony/http-kernel/Tests/CacheClearer/ChainCacheClearerTest.php
+++ b/vendor/symfony/http-kernel/Tests/CacheClearer/ChainCacheClearerTest.php
@@ -18,12 +18,12 @@ class ChainCacheClearerTest extends TestCase
{
protected static $cacheDir;
- public static function setUpBeforeClass()
+ public static function setUpBeforeClass(): void
{
self::$cacheDir = tempnam(sys_get_temp_dir(), 'sf_cache_clearer_dir');
}
- public static function tearDownAfterClass()
+ public static function tearDownAfterClass(): void
{
@unlink(self::$cacheDir);
}
diff --git a/vendor/symfony/http-kernel/Tests/CacheClearer/Psr6CacheClearerTest.php b/vendor/symfony/http-kernel/Tests/CacheClearer/Psr6CacheClearerTest.php
index d24131dae5..cdf4a97d34 100644
--- a/vendor/symfony/http-kernel/Tests/CacheClearer/Psr6CacheClearerTest.php
+++ b/vendor/symfony/http-kernel/Tests/CacheClearer/Psr6CacheClearerTest.php
@@ -37,12 +37,10 @@ class Psr6CacheClearerTest extends TestCase
(new Psr6CacheClearer(['pool' => $pool]))->clearPool('pool');
}
- /**
- * @expectedException \InvalidArgumentException
- * @expectedExceptionMessage Cache pool not found: unknown
- */
public function testClearPoolThrowsExceptionOnUnreferencedPool()
{
+ $this->expectException('InvalidArgumentException');
+ $this->expectExceptionMessage('Cache pool not found: unknown');
(new Psr6CacheClearer())->clearPool('unknown');
}
}
diff --git a/vendor/symfony/http-kernel/Tests/CacheWarmer/CacheWarmerAggregateTest.php b/vendor/symfony/http-kernel/Tests/CacheWarmer/CacheWarmerAggregateTest.php
index 27e8f9f2af..4266c0a182 100644
--- a/vendor/symfony/http-kernel/Tests/CacheWarmer/CacheWarmerAggregateTest.php
+++ b/vendor/symfony/http-kernel/Tests/CacheWarmer/CacheWarmerAggregateTest.php
@@ -18,12 +18,12 @@ class CacheWarmerAggregateTest extends TestCase
{
protected static $cacheDir;
- public static function setUpBeforeClass()
+ public static function setUpBeforeClass(): void
{
self::$cacheDir = tempnam(sys_get_temp_dir(), 'sf_cache_warmer_dir');
}
- public static function tearDownAfterClass()
+ public static function tearDownAfterClass(): void
{
@unlink(self::$cacheDir);
}
diff --git a/vendor/symfony/http-kernel/Tests/CacheWarmer/CacheWarmerTest.php b/vendor/symfony/http-kernel/Tests/CacheWarmer/CacheWarmerTest.php
index cee8b55034..b5acb12618 100644
--- a/vendor/symfony/http-kernel/Tests/CacheWarmer/CacheWarmerTest.php
+++ b/vendor/symfony/http-kernel/Tests/CacheWarmer/CacheWarmerTest.php
@@ -18,12 +18,12 @@ class CacheWarmerTest extends TestCase
{
protected static $cacheFile;
- public static function setUpBeforeClass()
+ public static function setUpBeforeClass(): void
{
self::$cacheFile = tempnam(sys_get_temp_dir(), 'sf_cache_warmer_dir');
}
- public static function tearDownAfterClass()
+ public static function tearDownAfterClass(): void
{
@unlink(self::$cacheFile);
}
@@ -36,11 +36,9 @@ class CacheWarmerTest extends TestCase
$this->assertFileExists(self::$cacheFile);
}
- /**
- * @expectedException \RuntimeException
- */
public function testWriteNonWritableCacheFileThrowsARuntimeException()
{
+ $this->expectException('RuntimeException');
$nonWritableFile = '/this/file/is/very/probably/not/writable';
$warmer = new TestCacheWarmer($nonWritableFile);
$warmer->warmUp(\dirname($nonWritableFile));
diff --git a/vendor/symfony/http-kernel/Tests/Controller/ArgumentResolver/NotTaggedControllerValueResolverTest.php b/vendor/symfony/http-kernel/Tests/Controller/ArgumentResolver/NotTaggedControllerValueResolverTest.php
index bd22adde91..4f85b0f351 100644
--- a/vendor/symfony/http-kernel/Tests/Controller/ArgumentResolver/NotTaggedControllerValueResolverTest.php
+++ b/vendor/symfony/http-kernel/Tests/Controller/ArgumentResolver/NotTaggedControllerValueResolverTest.php
@@ -53,12 +53,10 @@ class NotTaggedControllerValueResolverTest extends TestCase
$this->assertFalse($resolver->supports($request, $argument));
}
- /**
- * @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException
- * @expectedExceptionMessage Could not resolve argument $dummy of "App\Controller\Mine::method()", maybe you forgot to register the controller as a service or missed tagging it with the "controller.service_arguments"?
- */
public function testController()
{
+ $this->expectException('Symfony\Component\DependencyInjection\Exception\RuntimeException');
+ $this->expectExceptionMessage('Could not resolve argument $dummy of "App\Controller\Mine::method()", maybe you forgot to register the controller as a service or missed tagging it with the "controller.service_arguments"?');
$resolver = new NotTaggedControllerValueResolver(new ServiceLocator([]));
$argument = new ArgumentMetadata('dummy', \stdClass::class, false, false, null);
$request = $this->requestWithAttributes(['_controller' => 'App\\Controller\\Mine::method']);
@@ -66,12 +64,10 @@ class NotTaggedControllerValueResolverTest extends TestCase
$resolver->resolve($request, $argument);
}
- /**
- * @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException
- * @expectedExceptionMessage Could not resolve argument $dummy of "App\Controller\Mine::method()", maybe you forgot to register the controller as a service or missed tagging it with the "controller.service_arguments"?
- */
public function testControllerWithATrailingBackSlash()
{
+ $this->expectException('Symfony\Component\DependencyInjection\Exception\RuntimeException');
+ $this->expectExceptionMessage('Could not resolve argument $dummy of "App\Controller\Mine::method()", maybe you forgot to register the controller as a service or missed tagging it with the "controller.service_arguments"?');
$resolver = new NotTaggedControllerValueResolver(new ServiceLocator([]));
$argument = new ArgumentMetadata('dummy', \stdClass::class, false, false, null);
$request = $this->requestWithAttributes(['_controller' => '\\App\\Controller\\Mine::method']);
@@ -79,12 +75,10 @@ class NotTaggedControllerValueResolverTest extends TestCase
$resolver->resolve($request, $argument);
}
- /**
- * @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException
- * @expectedExceptionMessage Could not resolve argument $dummy of "App\Controller\Mine::method()", maybe you forgot to register the controller as a service or missed tagging it with the "controller.service_arguments"?
- */
public function testControllerWithMethodNameStartUppercase()
{
+ $this->expectException('Symfony\Component\DependencyInjection\Exception\RuntimeException');
+ $this->expectExceptionMessage('Could not resolve argument $dummy of "App\Controller\Mine::method()", maybe you forgot to register the controller as a service or missed tagging it with the "controller.service_arguments"?');
$resolver = new NotTaggedControllerValueResolver(new ServiceLocator([]));
$argument = new ArgumentMetadata('dummy', \stdClass::class, false, false, null);
$request = $this->requestWithAttributes(['_controller' => 'App\\Controller\\Mine::Method']);
@@ -92,12 +86,10 @@ class NotTaggedControllerValueResolverTest extends TestCase
$resolver->resolve($request, $argument);
}
- /**
- * @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException
- * @expectedExceptionMessage Could not resolve argument $dummy of "App\Controller\Mine::method()", maybe you forgot to register the controller as a service or missed tagging it with the "controller.service_arguments"?
- */
public function testControllerNameIsAnArray()
{
+ $this->expectException('Symfony\Component\DependencyInjection\Exception\RuntimeException');
+ $this->expectExceptionMessage('Could not resolve argument $dummy of "App\Controller\Mine::method()", maybe you forgot to register the controller as a service or missed tagging it with the "controller.service_arguments"?');
$resolver = new NotTaggedControllerValueResolver(new ServiceLocator([]));
$argument = new ArgumentMetadata('dummy', \stdClass::class, false, false, null);
$request = $this->requestWithAttributes(['_controller' => ['App\\Controller\\Mine', 'method']]);
diff --git a/vendor/symfony/http-kernel/Tests/Controller/ArgumentResolver/ServiceValueResolverTest.php b/vendor/symfony/http-kernel/Tests/Controller/ArgumentResolver/ServiceValueResolverTest.php
index f1915961ff..4036727bce 100644
--- a/vendor/symfony/http-kernel/Tests/Controller/ArgumentResolver/ServiceValueResolverTest.php
+++ b/vendor/symfony/http-kernel/Tests/Controller/ArgumentResolver/ServiceValueResolverTest.php
@@ -105,12 +105,10 @@ class ServiceValueResolverTest extends TestCase
$this->assertYieldEquals([new DummyService()], $resolver->resolve($request, $argument));
}
- /**
- * @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException
- * @expectedExceptionMessage Cannot autowire argument $dummy of "Symfony\Component\HttpKernel\Tests\Controller\ArgumentResolver\DummyController::index()": it references class "Symfony\Component\HttpKernel\Tests\Controller\ArgumentResolver\DummyService" but no such service exists.
- */
public function testErrorIsTruncated()
{
+ $this->expectException('Symfony\Component\DependencyInjection\Exception\RuntimeException');
+ $this->expectExceptionMessage('Cannot autowire argument $dummy of "Symfony\Component\HttpKernel\Tests\Controller\ArgumentResolver\DummyController::index()": it references class "Symfony\Component\HttpKernel\Tests\Controller\ArgumentResolver\DummyService" but no such service exists.');
$container = new ContainerBuilder();
$container->addCompilerPass(new RegisterControllerArgumentLocatorsPass());
diff --git a/vendor/symfony/http-kernel/Tests/Controller/ArgumentResolverTest.php b/vendor/symfony/http-kernel/Tests/Controller/ArgumentResolverTest.php
index 45aa9ef26a..8ee9108b1b 100644
--- a/vendor/symfony/http-kernel/Tests/Controller/ArgumentResolverTest.php
+++ b/vendor/symfony/http-kernel/Tests/Controller/ArgumentResolverTest.php
@@ -30,7 +30,7 @@ class ArgumentResolverTest extends TestCase
/** @var ArgumentResolver */
private static $resolver;
- public static function setUpBeforeClass()
+ public static function setUpBeforeClass(): void
{
$factory = new ArgumentMetadataFactory();
@@ -162,11 +162,9 @@ class ArgumentResolverTest extends TestCase
$this->assertEquals(['foo', 'foo', 'bar'], self::$resolver->getArguments($request, $controller));
}
- /**
- * @expectedException \InvalidArgumentException
- */
public function testGetVariadicArgumentsWithoutArrayInRequest()
{
+ $this->expectException('InvalidArgumentException');
$request = Request::create('/');
$request->attributes->set('foo', 'foo');
$request->attributes->set('bar', 'foo');
@@ -175,11 +173,9 @@ class ArgumentResolverTest extends TestCase
self::$resolver->getArguments($request, $controller);
}
- /**
- * @expectedException \InvalidArgumentException
- */
public function testGetArgumentWithoutArray()
{
+ $this->expectException('InvalidArgumentException');
$factory = new ArgumentMetadataFactory();
$valueResolver = $this->getMockBuilder(ArgumentValueResolverInterface::class)->getMock();
$resolver = new ArgumentResolver($factory, [$valueResolver]);
@@ -194,11 +190,9 @@ class ArgumentResolverTest extends TestCase
$resolver->getArguments($request, $controller);
}
- /**
- * @expectedException \RuntimeException
- */
public function testIfExceptionIsThrownWhenMissingAnArgument()
{
+ $this->expectException('RuntimeException');
$request = Request::create('/');
$controller = [$this, 'controllerWithFoo'];
@@ -255,11 +249,9 @@ class ArgumentResolverTest extends TestCase
$this->assertEquals([$session], self::$resolver->getArguments($request, $controller));
}
- /**
- * @expectedException \RuntimeException
- */
public function testGetSessionMissMatchWithInterface()
{
+ $this->expectException('RuntimeException');
$session = $this->getMockBuilder(SessionInterface::class)->getMock();
$request = Request::create('/');
$request->setSession($session);
@@ -268,11 +260,9 @@ class ArgumentResolverTest extends TestCase
self::$resolver->getArguments($request, $controller);
}
- /**
- * @expectedException \RuntimeException
- */
public function testGetSessionMissMatchWithImplementation()
{
+ $this->expectException('RuntimeException');
$session = new Session(new MockArraySessionStorage());
$request = Request::create('/');
$request->setSession($session);
@@ -281,11 +271,9 @@ class ArgumentResolverTest extends TestCase
self::$resolver->getArguments($request, $controller);
}
- /**
- * @expectedException \RuntimeException
- */
public function testGetSessionMissMatchOnNull()
{
+ $this->expectException('RuntimeException');
$request = Request::create('/');
$controller = [$this, 'controllerWithExtendingSession'];
diff --git a/vendor/symfony/http-kernel/Tests/Controller/ContainerControllerResolverTest.php b/vendor/symfony/http-kernel/Tests/Controller/ContainerControllerResolverTest.php
index 27f35b64c6..956adb9613 100644
--- a/vendor/symfony/http-kernel/Tests/Controller/ContainerControllerResolverTest.php
+++ b/vendor/symfony/http-kernel/Tests/Controller/ContainerControllerResolverTest.php
@@ -120,13 +120,39 @@ class ContainerControllerResolverTest extends ControllerResolverTest
}
/**
- * Tests where the fallback instantiation fails due to required constructor arguments.
- *
- * @expectedException \InvalidArgumentException
- * @expectedExceptionMessage Controller "Symfony\Component\HttpKernel\Tests\Controller\ControllerTestService" cannot be fetched from the container because it is private. Did you forget to tag the service with "controller.service_arguments"?
+ * @dataProvider getControllers
*/
+ public function testInstantiateControllerWhenControllerStartsWithABackslash($controller)
+ {
+ $service = new ControllerTestService('foo');
+ $class = ControllerTestService::class;
+
+ $container = $this->createMockContainer();
+ $container->expects($this->once())->method('has')->with($class)->willReturn(true);
+ $container->expects($this->once())->method('get')->with($class)->willReturn($service);
+
+ $resolver = $this->createControllerResolver(null, $container);
+ $request = Request::create('/');
+ $request->attributes->set('_controller', $controller);
+
+ $controller = $resolver->getController($request);
+
+ $this->assertInstanceOf(ControllerTestService::class, $controller[0]);
+ $this->assertSame('action', $controller[1]);
+ }
+
+ public function getControllers()
+ {
+ return [
+ ['\\'.ControllerTestService::class.'::action'],
+ ['\\'.ControllerTestService::class.':action'],
+ ];
+ }
+
public function testExceptionWhenUsingRemovedControllerServiceWithClassNameAsName()
{
+ $this->expectException('InvalidArgumentException');
+ $this->expectExceptionMessage('Controller "Symfony\Component\HttpKernel\Tests\Controller\ControllerTestService" cannot be fetched from the container because it is private. Did you forget to tag the service with "controller.service_arguments"?');
$container = $this->getMockBuilder(Container::class)->getMock();
$container->expects($this->once())
->method('has')
@@ -147,14 +173,10 @@ class ContainerControllerResolverTest extends ControllerResolverTest
$resolver->getController($request);
}
- /**
- * Tests where the fallback instantiation fails due to non-existing class.
- *
- * @expectedException \InvalidArgumentException
- * @expectedExceptionMessage Controller "app.my_controller" cannot be fetched from the container because it is private. Did you forget to tag the service with "controller.service_arguments"?
- */
public function testExceptionWhenUsingRemovedControllerService()
{
+ $this->expectException('InvalidArgumentException');
+ $this->expectExceptionMessage('Controller "app.my_controller" cannot be fetched from the container because it is private. Did you forget to tag the service with "controller.service_arguments"?');
$container = $this->getMockBuilder(Container::class)->getMock();
$container->expects($this->once())
->method('has')
diff --git a/vendor/symfony/http-kernel/Tests/Controller/ControllerResolverTest.php b/vendor/symfony/http-kernel/Tests/Controller/ControllerResolverTest.php
index 1ba7e9e20a..77ce524fc6 100644
--- a/vendor/symfony/http-kernel/Tests/Controller/ControllerResolverTest.php
+++ b/vendor/symfony/http-kernel/Tests/Controller/ControllerResolverTest.php
@@ -92,11 +92,9 @@ class ControllerResolverTest extends TestCase
$this->assertInstanceOf(InvokableController::class, $controller);
}
- /**
- * @expectedException \InvalidArgumentException
- */
public function testGetControllerOnObjectWithoutInvokeMethod()
{
+ $this->expectException('InvalidArgumentException');
$resolver = $this->createControllerResolver();
$request = Request::create('/');
@@ -159,12 +157,8 @@ class ControllerResolverTest extends TestCase
public function testGetControllerWithUndefinedController($controller, $exceptionName = null, $exceptionMessage = null)
{
$resolver = $this->createControllerResolver();
- if (method_exists($this, 'expectException')) {
- $this->expectException($exceptionName);
- $this->expectExceptionMessage($exceptionMessage);
- } else {
- $this->setExpectedException($exceptionName, $exceptionMessage);
- }
+ $this->expectException($exceptionName);
+ $this->expectExceptionMessage($exceptionMessage);
$request = Request::create('/');
$request->attributes->set('_controller', $controller);
diff --git a/vendor/symfony/http-kernel/Tests/ControllerMetadata/ArgumentMetadataFactoryTest.php b/vendor/symfony/http-kernel/Tests/ControllerMetadata/ArgumentMetadataFactoryTest.php
index 199d3a0e4b..f77b6759af 100644
--- a/vendor/symfony/http-kernel/Tests/ControllerMetadata/ArgumentMetadataFactoryTest.php
+++ b/vendor/symfony/http-kernel/Tests/ControllerMetadata/ArgumentMetadataFactoryTest.php
@@ -26,7 +26,7 @@ class ArgumentMetadataFactoryTest extends TestCase
*/
private $factory;
- protected function setUp()
+ protected function setUp(): void
{
$this->factory = new ArgumentMetadataFactory();
}
diff --git a/vendor/symfony/http-kernel/Tests/ControllerMetadata/ArgumentMetadataTest.php b/vendor/symfony/http-kernel/Tests/ControllerMetadata/ArgumentMetadataTest.php
index 05351445e0..5ce4b1f76b 100644
--- a/vendor/symfony/http-kernel/Tests/ControllerMetadata/ArgumentMetadataTest.php
+++ b/vendor/symfony/http-kernel/Tests/ControllerMetadata/ArgumentMetadataTest.php
@@ -32,11 +32,9 @@ class ArgumentMetadataTest extends TestCase
$this->assertSame('default value', $argument->getDefaultValue());
}
- /**
- * @expectedException \LogicException
- */
public function testDefaultValueUnavailable()
{
+ $this->expectException('LogicException');
$argument = new ArgumentMetadata('foo', 'string', false, false, null, false);
$this->assertFalse($argument->isNullable());
diff --git a/vendor/symfony/http-kernel/Tests/DataCollector/LoggerDataCollectorTest.php b/vendor/symfony/http-kernel/Tests/DataCollector/LoggerDataCollectorTest.php
index 261f098a72..faa2c7ef37 100644
--- a/vendor/symfony/http-kernel/Tests/DataCollector/LoggerDataCollectorTest.php
+++ b/vendor/symfony/http-kernel/Tests/DataCollector/LoggerDataCollectorTest.php
@@ -27,7 +27,7 @@ class LoggerDataCollectorTest extends TestCase
->getMockBuilder('Symfony\Component\HttpKernel\Log\DebugLoggerInterface')
->setMethods(['countErrors', 'getLogs', 'clear'])
->getMock();
- $logger->expects($this->once())->method('countErrors')->willReturn('foo');
+ $logger->expects($this->once())->method('countErrors')->willReturn(123);
$logger->expects($this->exactly(2))->method('getLogs')->willReturn([]);
$c = new LoggerDataCollector($logger, __DIR__.'/');
diff --git a/vendor/symfony/http-kernel/Tests/DataCollector/MemoryDataCollectorTest.php b/vendor/symfony/http-kernel/Tests/DataCollector/MemoryDataCollectorTest.php
index c434ed1e11..63dd62ce70 100644
--- a/vendor/symfony/http-kernel/Tests/DataCollector/MemoryDataCollectorTest.php
+++ b/vendor/symfony/http-kernel/Tests/DataCollector/MemoryDataCollectorTest.php
@@ -23,8 +23,8 @@ class MemoryDataCollectorTest extends TestCase
$collector = new MemoryDataCollector();
$collector->collect(new Request(), new Response());
- $this->assertInternalType('integer', $collector->getMemory());
- $this->assertInternalType('integer', $collector->getMemoryLimit());
+ $this->assertIsInt($collector->getMemory());
+ $this->assertIsInt($collector->getMemoryLimit());
$this->assertSame('memory', $collector->getName());
}
diff --git a/vendor/symfony/http-kernel/Tests/DataCollector/TimeDataCollectorTest.php b/vendor/symfony/http-kernel/Tests/DataCollector/TimeDataCollectorTest.php
index e044e5e1ad..9de9eb599a 100644
--- a/vendor/symfony/http-kernel/Tests/DataCollector/TimeDataCollectorTest.php
+++ b/vendor/symfony/http-kernel/Tests/DataCollector/TimeDataCollectorTest.php
@@ -44,7 +44,7 @@ class TimeDataCollectorTest extends TestCase
$this->assertEquals(0, $c->getStartTime());
$kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\KernelInterface')->getMock();
- $kernel->expects($this->once())->method('getStartTime')->willReturn(123456);
+ $kernel->expects($this->once())->method('getStartTime')->willReturn(123456.0);
$c = new TimeDataCollector($kernel);
$request = new Request();
diff --git a/vendor/symfony/http-kernel/Tests/Debug/TraceableEventDispatcherTest.php b/vendor/symfony/http-kernel/Tests/Debug/TraceableEventDispatcherTest.php
index eb16d6e988..cf8a3b8a1e 100644
--- a/vendor/symfony/http-kernel/Tests/Debug/TraceableEventDispatcherTest.php
+++ b/vendor/symfony/http-kernel/Tests/Debug/TraceableEventDispatcherTest.php
@@ -62,15 +62,13 @@ class TraceableEventDispatcherTest extends TestCase
public function testStopwatchStopControllerOnRequestEvent()
{
$stopwatch = $this->getMockBuilder('Symfony\Component\Stopwatch\Stopwatch')
- ->setMethods(['isStarted', 'stop', 'stopSection'])
+ ->setMethods(['isStarted', 'stop'])
->getMock();
$stopwatch->expects($this->once())
->method('isStarted')
->willReturn(true);
$stopwatch->expects($this->once())
->method('stop');
- $stopwatch->expects($this->once())
- ->method('stopSection');
$dispatcher = new TraceableEventDispatcher(new EventDispatcher(), $stopwatch);
diff --git a/vendor/symfony/http-kernel/Tests/DependencyInjection/FragmentRendererPassTest.php b/vendor/symfony/http-kernel/Tests/DependencyInjection/FragmentRendererPassTest.php
index 087c666596..1d521368e1 100644
--- a/vendor/symfony/http-kernel/Tests/DependencyInjection/FragmentRendererPassTest.php
+++ b/vendor/symfony/http-kernel/Tests/DependencyInjection/FragmentRendererPassTest.php
@@ -25,11 +25,10 @@ class FragmentRendererPassTest extends TestCase
/**
* Tests that content rendering not implementing FragmentRendererInterface
* triggers an exception.
- *
- * @expectedException \InvalidArgumentException
*/
public function testContentRendererWithoutInterface()
{
+ $this->expectException('InvalidArgumentException');
$builder = new ContainerBuilder();
$fragmentHandlerDefinition = $builder->register('fragment.handler');
$builder->register('my_content_renderer', 'Symfony\Component\DependencyInjection\Definition')
diff --git a/vendor/symfony/http-kernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php b/vendor/symfony/http-kernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php
index 948311556c..3c5b197837 100644
--- a/vendor/symfony/http-kernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php
+++ b/vendor/symfony/http-kernel/Tests/DependencyInjection/RegisterControllerArgumentLocatorsPassTest.php
@@ -25,12 +25,10 @@ use Symfony\Component\HttpKernel\DependencyInjection\RegisterControllerArgumentL
class RegisterControllerArgumentLocatorsPassTest extends TestCase
{
- /**
- * @expectedException \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException
- * @expectedExceptionMessage Class "Symfony\Component\HttpKernel\Tests\DependencyInjection\NotFound" used for service "foo" cannot be found.
- */
public function testInvalidClass()
{
+ $this->expectException('Symfony\Component\DependencyInjection\Exception\InvalidArgumentException');
+ $this->expectExceptionMessage('Class "Symfony\Component\HttpKernel\Tests\DependencyInjection\NotFound" used for service "foo" cannot be found.');
$container = new ContainerBuilder();
$container->register('argument_resolver.service')->addArgument([]);
@@ -42,12 +40,10 @@ class RegisterControllerArgumentLocatorsPassTest extends TestCase
$pass->process($container);
}
- /**
- * @expectedException \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException
- * @expectedExceptionMessage Missing "action" attribute on tag "controller.service_arguments" {"argument":"bar"} for service "foo".
- */
public function testNoAction()
{
+ $this->expectException('Symfony\Component\DependencyInjection\Exception\InvalidArgumentException');
+ $this->expectExceptionMessage('Missing "action" attribute on tag "controller.service_arguments" {"argument":"bar"} for service "foo".');
$container = new ContainerBuilder();
$container->register('argument_resolver.service')->addArgument([]);
@@ -59,12 +55,10 @@ class RegisterControllerArgumentLocatorsPassTest extends TestCase
$pass->process($container);
}
- /**
- * @expectedException \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException
- * @expectedExceptionMessage Missing "argument" attribute on tag "controller.service_arguments" {"action":"fooAction"} for service "foo".
- */
public function testNoArgument()
{
+ $this->expectException('Symfony\Component\DependencyInjection\Exception\InvalidArgumentException');
+ $this->expectExceptionMessage('Missing "argument" attribute on tag "controller.service_arguments" {"action":"fooAction"} for service "foo".');
$container = new ContainerBuilder();
$container->register('argument_resolver.service')->addArgument([]);
@@ -76,12 +70,10 @@ class RegisterControllerArgumentLocatorsPassTest extends TestCase
$pass->process($container);
}
- /**
- * @expectedException \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException
- * @expectedExceptionMessage Missing "id" attribute on tag "controller.service_arguments" {"action":"fooAction","argument":"bar"} for service "foo".
- */
public function testNoService()
{
+ $this->expectException('Symfony\Component\DependencyInjection\Exception\InvalidArgumentException');
+ $this->expectExceptionMessage('Missing "id" attribute on tag "controller.service_arguments" {"action":"fooAction","argument":"bar"} for service "foo".');
$container = new ContainerBuilder();
$container->register('argument_resolver.service')->addArgument([]);
@@ -93,12 +85,10 @@ class RegisterControllerArgumentLocatorsPassTest extends TestCase
$pass->process($container);
}
- /**
- * @expectedException \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException
- * @expectedExceptionMessage Invalid "action" attribute on tag "controller.service_arguments" for service "foo": no public "barAction()" method found on class "Symfony\Component\HttpKernel\Tests\DependencyInjection\RegisterTestController".
- */
public function testInvalidMethod()
{
+ $this->expectException('Symfony\Component\DependencyInjection\Exception\InvalidArgumentException');
+ $this->expectExceptionMessage('Invalid "action" attribute on tag "controller.service_arguments" for service "foo": no public "barAction()" method found on class "Symfony\Component\HttpKernel\Tests\DependencyInjection\RegisterTestController".');
$container = new ContainerBuilder();
$container->register('argument_resolver.service')->addArgument([]);
@@ -110,12 +100,10 @@ class RegisterControllerArgumentLocatorsPassTest extends TestCase
$pass->process($container);
}
- /**
- * @expectedException \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException
- * @expectedExceptionMessage Invalid "controller.service_arguments" tag for service "foo": method "fooAction()" has no "baz" argument on class "Symfony\Component\HttpKernel\Tests\DependencyInjection\RegisterTestController".
- */
public function testInvalidArgument()
{
+ $this->expectException('Symfony\Component\DependencyInjection\Exception\InvalidArgumentException');
+ $this->expectExceptionMessage('Invalid "controller.service_arguments" tag for service "foo": method "fooAction()" has no "baz" argument on class "Symfony\Component\HttpKernel\Tests\DependencyInjection\RegisterTestController".');
$container = new ContainerBuilder();
$container->register('argument_resolver.service')->addArgument([]);
@@ -207,12 +195,10 @@ class RegisterControllerArgumentLocatorsPassTest extends TestCase
$this->assertSame(['foo::fooAction'], array_keys($locator));
}
- /**
- * @expectedException \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException
- * @expectedExceptionMessage Cannot determine controller argument for "Symfony\Component\HttpKernel\Tests\DependencyInjection\NonExistentClassController::fooAction()": the $nonExistent argument is type-hinted with the non-existent class or interface: "Symfony\Component\HttpKernel\Tests\DependencyInjection\NonExistentClass". Did you forget to add a use statement?
- */
public function testExceptionOnNonExistentTypeHint()
{
+ $this->expectException('Symfony\Component\DependencyInjection\Exception\InvalidArgumentException');
+ $this->expectExceptionMessage('Cannot determine controller argument for "Symfony\Component\HttpKernel\Tests\DependencyInjection\NonExistentClassController::fooAction()": the $nonExistent argument is type-hinted with the non-existent class or interface: "Symfony\Component\HttpKernel\Tests\DependencyInjection\NonExistentClass". Did you forget to add a use statement?');
$container = new ContainerBuilder();
$container->register('argument_resolver.service')->addArgument([]);
@@ -223,12 +209,10 @@ class RegisterControllerArgumentLocatorsPassTest extends TestCase
$pass->process($container);
}
- /**
- * @expectedException \Symfony\Component\DependencyInjection\Exception\InvalidArgumentException
- * @expectedExceptionMessage Cannot determine controller argument for "Symfony\Component\HttpKernel\Tests\DependencyInjection\NonExistentClassDifferentNamespaceController::fooAction()": the $nonExistent argument is type-hinted with the non-existent class or interface: "Acme\NonExistentClass".
- */
public function testExceptionOnNonExistentTypeHintDifferentNamespace()
{
+ $this->expectException('Symfony\Component\DependencyInjection\Exception\InvalidArgumentException');
+ $this->expectExceptionMessage('Cannot determine controller argument for "Symfony\Component\HttpKernel\Tests\DependencyInjection\NonExistentClassDifferentNamespaceController::fooAction()": the $nonExistent argument is type-hinted with the non-existent class or interface: "Acme\NonExistentClass".');
$container = new ContainerBuilder();
$container->register('argument_resolver.service')->addArgument([]);
diff --git a/vendor/symfony/http-kernel/Tests/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPassTest.php b/vendor/symfony/http-kernel/Tests/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPassTest.php
index 56fe6baf76..b5e55bdea9 100644
--- a/vendor/symfony/http-kernel/Tests/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPassTest.php
+++ b/vendor/symfony/http-kernel/Tests/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPassTest.php
@@ -26,7 +26,7 @@ class RemoveEmptyControllerArgumentLocatorsPassTest extends TestCase
$resolver = $container->register('argument_resolver.service')->addArgument([]);
$container->register('stdClass', 'stdClass');
- $container->register(parent::class, 'stdClass');
+ $container->register(TestCase::class, 'stdClass');
$container->register('c1', RemoveTestController1::class)->addTag('controller.service_arguments');
$container->register('c2', RemoveTestController2::class)->addTag('controller.service_arguments')
->addMethodCall('setTestCase', [new Reference('c1')]);
diff --git a/vendor/symfony/http-kernel/Tests/DependencyInjection/ResettableServicePassTest.php b/vendor/symfony/http-kernel/Tests/DependencyInjection/ResettableServicePassTest.php
index 9b23ad003d..d3c6869320 100644
--- a/vendor/symfony/http-kernel/Tests/DependencyInjection/ResettableServicePassTest.php
+++ b/vendor/symfony/http-kernel/Tests/DependencyInjection/ResettableServicePassTest.php
@@ -48,12 +48,10 @@ class ResettableServicePassTest extends TestCase
);
}
- /**
- * @expectedException \Symfony\Component\DependencyInjection\Exception\RuntimeException
- * @expectedExceptionMessage Tag kernel.reset requires the "method" attribute to be set.
- */
public function testMissingMethod()
{
+ $this->expectException('Symfony\Component\DependencyInjection\Exception\RuntimeException');
+ $this->expectExceptionMessage('Tag kernel.reset requires the "method" attribute to be set.');
$container = new ContainerBuilder();
$container->register(ResettableService::class)
->addTag('kernel.reset');
diff --git a/vendor/symfony/http-kernel/Tests/DependencyInjection/ServicesResetterTest.php b/vendor/symfony/http-kernel/Tests/DependencyInjection/ServicesResetterTest.php
index 86f1abdb05..5be6026c90 100644
--- a/vendor/symfony/http-kernel/Tests/DependencyInjection/ServicesResetterTest.php
+++ b/vendor/symfony/http-kernel/Tests/DependencyInjection/ServicesResetterTest.php
@@ -18,7 +18,7 @@ use Symfony\Component\HttpKernel\Tests\Fixtures\ResettableService;
class ServicesResetterTest extends TestCase
{
- protected function setUp()
+ protected function setUp(): void
{
ResettableService::$counter = 0;
ClearableService::$counter = 0;
diff --git a/vendor/symfony/http-kernel/Tests/EventListener/AddRequestFormatsListenerTest.php b/vendor/symfony/http-kernel/Tests/EventListener/AddRequestFormatsListenerTest.php
index 5bc1ff51ff..da8dc6fb0b 100644
--- a/vendor/symfony/http-kernel/Tests/EventListener/AddRequestFormatsListenerTest.php
+++ b/vendor/symfony/http-kernel/Tests/EventListener/AddRequestFormatsListenerTest.php
@@ -29,12 +29,12 @@ class AddRequestFormatsListenerTest extends TestCase
*/
private $listener;
- protected function setUp()
+ protected function setUp(): void
{
$this->listener = new AddRequestFormatsListener(['csv' => ['text/csv', 'text/plain']]);
}
- protected function tearDown()
+ protected function tearDown(): void
{
$this->listener = null;
}
diff --git a/vendor/symfony/http-kernel/Tests/EventListener/FragmentListenerTest.php b/vendor/symfony/http-kernel/Tests/EventListener/FragmentListenerTest.php
index 40da65d240..5b045a8fc4 100644
--- a/vendor/symfony/http-kernel/Tests/EventListener/FragmentListenerTest.php
+++ b/vendor/symfony/http-kernel/Tests/EventListener/FragmentListenerTest.php
@@ -50,11 +50,9 @@ class FragmentListenerTest extends TestCase
$this->assertEquals($expected, $request->attributes->all());
}
- /**
- * @expectedException \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException
- */
public function testAccessDeniedWithNonSafeMethods()
{
+ $this->expectException('Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException');
$request = Request::create('http://example.com/_fragment', 'POST');
$listener = new FragmentListener(new UriSigner('foo'));
@@ -63,11 +61,9 @@ class FragmentListenerTest extends TestCase
$listener->onKernelRequest($event);
}
- /**
- * @expectedException \Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException
- */
public function testAccessDeniedWithWrongSignature()
{
+ $this->expectException('Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException');
$request = Request::create('http://example.com/_fragment', 'GET', [], [], [], ['REMOTE_ADDR' => '10.0.0.1']);
$listener = new FragmentListener(new UriSigner('foo'));
diff --git a/vendor/symfony/http-kernel/Tests/EventListener/LocaleAwareListenerTest.php b/vendor/symfony/http-kernel/Tests/EventListener/LocaleAwareListenerTest.php
index 489b02151c..ef3b7d1b42 100644
--- a/vendor/symfony/http-kernel/Tests/EventListener/LocaleAwareListenerTest.php
+++ b/vendor/symfony/http-kernel/Tests/EventListener/LocaleAwareListenerTest.php
@@ -26,7 +26,7 @@ class LocaleAwareListenerTest extends TestCase
private $localeAwareService;
private $requestStack;
- protected function setUp()
+ protected function setUp(): void
{
$this->localeAwareService = $this->getMockBuilder(LocaleAwareInterface::class)->getMock();
$this->requestStack = new RequestStack();
diff --git a/vendor/symfony/http-kernel/Tests/EventListener/LocaleListenerTest.php b/vendor/symfony/http-kernel/Tests/EventListener/LocaleListenerTest.php
index 925eb6f20e..a83b81741b 100644
--- a/vendor/symfony/http-kernel/Tests/EventListener/LocaleListenerTest.php
+++ b/vendor/symfony/http-kernel/Tests/EventListener/LocaleListenerTest.php
@@ -23,7 +23,7 @@ class LocaleListenerTest extends TestCase
{
private $requestStack;
- protected function setUp()
+ protected function setUp(): void
{
$this->requestStack = $this->getMockBuilder('Symfony\Component\HttpFoundation\RequestStack')->disableOriginalConstructor()->getMock();
}
diff --git a/vendor/symfony/http-kernel/Tests/EventListener/ResponseListenerTest.php b/vendor/symfony/http-kernel/Tests/EventListener/ResponseListenerTest.php
index fbb2512c53..1aaa64bc89 100644
--- a/vendor/symfony/http-kernel/Tests/EventListener/ResponseListenerTest.php
+++ b/vendor/symfony/http-kernel/Tests/EventListener/ResponseListenerTest.php
@@ -26,7 +26,7 @@ class ResponseListenerTest extends TestCase
private $kernel;
- protected function setUp()
+ protected function setUp(): void
{
$this->dispatcher = new EventDispatcher();
$listener = new ResponseListener('UTF-8');
@@ -35,7 +35,7 @@ class ResponseListenerTest extends TestCase
$this->kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock();
}
- protected function tearDown()
+ protected function tearDown(): void
{
$this->dispatcher = null;
$this->kernel = null;
diff --git a/vendor/symfony/http-kernel/Tests/EventListener/RouterListenerTest.php b/vendor/symfony/http-kernel/Tests/EventListener/RouterListenerTest.php
index e416bb3582..ea88d4b34f 100644
--- a/vendor/symfony/http-kernel/Tests/EventListener/RouterListenerTest.php
+++ b/vendor/symfony/http-kernel/Tests/EventListener/RouterListenerTest.php
@@ -31,7 +31,7 @@ class RouterListenerTest extends TestCase
{
private $requestStack;
- protected function setUp()
+ protected function setUp(): void
{
$this->requestStack = $this->getMockBuilder('Symfony\Component\HttpFoundation\RequestStack')->disableOriginalConstructor()->getMock();
}
@@ -79,11 +79,9 @@ class RouterListenerTest extends TestCase
return new RequestEvent($kernel, $request, HttpKernelInterface::MASTER_REQUEST);
}
- /**
- * @expectedException \InvalidArgumentException
- */
public function testInvalidMatcher()
{
+ $this->expectException('InvalidArgumentException');
new RouterListener(new \stdClass(), $this->requestStack);
}
@@ -201,14 +199,12 @@ class RouterListenerTest extends TestCase
$request = Request::create('http://localhost/');
$response = $kernel->handle($request);
$this->assertSame(404, $response->getStatusCode());
- $this->assertContains('Welcome', $response->getContent());
+ $this->assertStringContainsString('Welcome', $response->getContent());
}
- /**
- * @expectedException \Symfony\Component\HttpKernel\Exception\BadRequestHttpException
- */
public function testRequestWithBadHost()
{
+ $this->expectException('Symfony\Component\HttpKernel\Exception\BadRequestHttpException');
$kernel = $this->getMockBuilder(HttpKernelInterface::class)->getMock();
$request = Request::create('http://bad host %22/');
$event = new RequestEvent($kernel, $request, HttpKernelInterface::MASTER_REQUEST);
diff --git a/vendor/symfony/http-kernel/Tests/EventListener/TestSessionListenerTest.php b/vendor/symfony/http-kernel/Tests/EventListener/TestSessionListenerTest.php
index 1f0a6c628b..1ae3bb38b5 100644
--- a/vendor/symfony/http-kernel/Tests/EventListener/TestSessionListenerTest.php
+++ b/vendor/symfony/http-kernel/Tests/EventListener/TestSessionListenerTest.php
@@ -40,7 +40,7 @@ class TestSessionListenerTest extends TestCase
*/
private $session;
- protected function setUp()
+ protected function setUp(): void
{
$this->listener = $this->getMockForAbstractClass('Symfony\Component\HttpKernel\EventListener\AbstractTestSessionListener');
$this->session = $this->getSession();
diff --git a/vendor/symfony/http-kernel/Tests/EventListener/TranslatorListenerTest.php b/vendor/symfony/http-kernel/Tests/EventListener/TranslatorListenerTest.php
index 9a833ce374..17bf4261f9 100644
--- a/vendor/symfony/http-kernel/Tests/EventListener/TranslatorListenerTest.php
+++ b/vendor/symfony/http-kernel/Tests/EventListener/TranslatorListenerTest.php
@@ -28,7 +28,7 @@ class TranslatorListenerTest extends TestCase
private $translator;
private $requestStack;
- protected function setUp()
+ protected function setUp(): void
{
$this->translator = $this->getMockBuilder(LocaleAwareInterface::class)->getMock();
$this->requestStack = $this->getMockBuilder('Symfony\Component\HttpFoundation\RequestStack')->getMock();
diff --git a/vendor/symfony/http-kernel/Tests/EventListener/ValidateRequestListenerTest.php b/vendor/symfony/http-kernel/Tests/EventListener/ValidateRequestListenerTest.php
index bbd596bc78..7cec68143b 100644
--- a/vendor/symfony/http-kernel/Tests/EventListener/ValidateRequestListenerTest.php
+++ b/vendor/symfony/http-kernel/Tests/EventListener/ValidateRequestListenerTest.php
@@ -21,16 +21,14 @@ use Symfony\Component\HttpKernel\KernelEvents;
class ValidateRequestListenerTest extends TestCase
{
- protected function tearDown()
+ protected function tearDown(): void
{
Request::setTrustedProxies([], -1);
}
- /**
- * @expectedException \Symfony\Component\HttpFoundation\Exception\ConflictingHeadersException
- */
public function testListenerThrowsWhenMasterRequestHasInconsistentClientIps()
{
+ $this->expectException('Symfony\Component\HttpFoundation\Exception\ConflictingHeadersException');
$dispatcher = new EventDispatcher();
$kernel = $this->getMockBuilder('Symfony\Component\HttpKernel\HttpKernelInterface')->getMock();
diff --git a/vendor/symfony/http-kernel/Tests/Fixtures/BaseBundle/Resources/hide.txt b/vendor/symfony/http-kernel/Tests/Fixtures/BaseBundle/Resources/hide.txt
deleted file mode 100644
index e69de29bb2..0000000000
--- a/vendor/symfony/http-kernel/Tests/Fixtures/BaseBundle/Resources/hide.txt
+++ /dev/null
diff --git a/vendor/symfony/http-kernel/Tests/Fixtures/BaseBundle/Resources/foo.txt b/vendor/symfony/http-kernel/Tests/Fixtures/Bundle1Bundle/Resources/.gitkeep
index e69de29bb2..e69de29bb2 100644
--- a/vendor/symfony/http-kernel/Tests/Fixtures/BaseBundle/Resources/foo.txt
+++ b/vendor/symfony/http-kernel/Tests/Fixtures/Bundle1Bundle/Resources/.gitkeep
diff --git a/vendor/symfony/http-kernel/Tests/Fixtures/Bundle1Bundle/Resources/foo.txt b/vendor/symfony/http-kernel/Tests/Fixtures/Bundle1Bundle/Resources/foo.txt
deleted file mode 100644
index e69de29bb2..0000000000
--- a/vendor/symfony/http-kernel/Tests/Fixtures/Bundle1Bundle/Resources/foo.txt
+++ /dev/null
diff --git a/vendor/symfony/http-kernel/Tests/Fixtures/Bundle1Bundle/bar.txt b/vendor/symfony/http-kernel/Tests/Fixtures/Bundle1Bundle/bar.txt
deleted file mode 100644
index e69de29bb2..0000000000
--- a/vendor/symfony/http-kernel/Tests/Fixtures/Bundle1Bundle/bar.txt
+++ /dev/null
diff --git a/vendor/symfony/http-kernel/Tests/Fixtures/Bundle2Bundle/foo.txt b/vendor/symfony/http-kernel/Tests/Fixtures/Bundle2Bundle/foo.txt
deleted file mode 100644
index e69de29bb2..0000000000
--- a/vendor/symfony/http-kernel/Tests/Fixtures/Bundle2Bundle/foo.txt
+++ /dev/null
diff --git a/vendor/symfony/http-kernel/Tests/Fixtures/ChildBundle/Resources/foo.txt b/vendor/symfony/http-kernel/Tests/Fixtures/ChildBundle/Resources/foo.txt
deleted file mode 100644
index e69de29bb2..0000000000
--- a/vendor/symfony/http-kernel/Tests/Fixtures/ChildBundle/Resources/foo.txt
+++ /dev/null
diff --git a/vendor/symfony/http-kernel/Tests/Fixtures/ChildBundle/Resources/hide.txt b/vendor/symfony/http-kernel/Tests/Fixtures/ChildBundle/Resources/hide.txt
deleted file mode 100644
index e69de29bb2..0000000000
--- a/vendor/symfony/http-kernel/Tests/Fixtures/ChildBundle/Resources/hide.txt
+++ /dev/null
diff --git a/vendor/symfony/http-kernel/Tests/Fixtures/Resources/BaseBundle/hide.txt b/vendor/symfony/http-kernel/Tests/Fixtures/Resources/BaseBundle/hide.txt
deleted file mode 100644
index e69de29bb2..0000000000
--- a/vendor/symfony/http-kernel/Tests/Fixtures/Resources/BaseBundle/hide.txt
+++ /dev/null
diff --git a/vendor/symfony/http-kernel/Tests/Fixtures/Resources/Bundle1Bundle/foo.txt b/vendor/symfony/http-kernel/Tests/Fixtures/Resources/Bundle1Bundle/foo.txt
deleted file mode 100644
index e69de29bb2..0000000000
--- a/vendor/symfony/http-kernel/Tests/Fixtures/Resources/Bundle1Bundle/foo.txt
+++ /dev/null
diff --git a/vendor/symfony/http-kernel/Tests/Fixtures/Resources/ChildBundle/foo.txt b/vendor/symfony/http-kernel/Tests/Fixtures/Resources/ChildBundle/foo.txt
deleted file mode 100644
index e69de29bb2..0000000000
--- a/vendor/symfony/http-kernel/Tests/Fixtures/Resources/ChildBundle/foo.txt
+++ /dev/null
diff --git a/vendor/symfony/http-kernel/Tests/Fragment/EsiFragmentRendererTest.php b/vendor/symfony/http-kernel/Tests/Fragment/EsiFragmentRendererTest.php
index d8006e1707..df74ade154 100644
--- a/vendor/symfony/http-kernel/Tests/Fragment/EsiFragmentRendererTest.php
+++ b/vendor/symfony/http-kernel/Tests/Fragment/EsiFragmentRendererTest.php
@@ -65,11 +65,9 @@ class EsiFragmentRendererTest extends TestCase
);
}
- /**
- * @expectedException \LogicException
- */
public function testRenderControllerReferenceWithoutSignerThrowsException()
{
+ $this->expectException('LogicException');
$strategy = new EsiFragmentRenderer(new Esi(), $this->getInlineStrategy());
$request = Request::create('/');
@@ -79,11 +77,9 @@ class EsiFragmentRendererTest extends TestCase
$strategy->render(new ControllerReference('main_controller'), $request);
}
- /**
- * @expectedException \LogicException
- */
public function testRenderAltControllerReferenceWithoutSignerThrowsException()
{
+ $this->expectException('LogicException');
$strategy = new EsiFragmentRenderer(new Esi(), $this->getInlineStrategy());
$request = Request::create('/');
diff --git a/vendor/symfony/http-kernel/Tests/Fragment/FragmentHandlerTest.php b/vendor/symfony/http-kernel/Tests/Fragment/FragmentHandlerTest.php
index e2e72df00c..15e543a214 100644
--- a/vendor/symfony/http-kernel/Tests/Fragment/FragmentHandlerTest.php
+++ b/vendor/symfony/http-kernel/Tests/Fragment/FragmentHandlerTest.php
@@ -23,7 +23,7 @@ class FragmentHandlerTest extends TestCase
{
private $requestStack;
- protected function setUp()
+ protected function setUp(): void
{
$this->requestStack = $this->getMockBuilder('Symfony\\Component\\HttpFoundation\\RequestStack')
->disableOriginalConstructor()
@@ -36,31 +36,25 @@ class FragmentHandlerTest extends TestCase
;
}
- /**
- * @expectedException \InvalidArgumentException
- */
public function testRenderWhenRendererDoesNotExist()
{
+ $this->expectException('InvalidArgumentException');
$handler = new FragmentHandler($this->requestStack);
$handler->render('/', 'foo');
}
- /**
- * @expectedException \InvalidArgumentException
- */
public function testRenderWithUnknownRenderer()
{
+ $this->expectException('InvalidArgumentException');
$handler = $this->getHandler($this->returnValue(new Response('foo')));
$handler->render('/', 'bar');
}
- /**
- * @expectedException \RuntimeException
- * @expectedExceptionMessage Error when rendering "http://localhost/" (Status code is 404).
- */
public function testDeliverWithUnsuccessfulResponse()
{
+ $this->expectException('RuntimeException');
+ $this->expectExceptionMessage('Error when rendering "http://localhost/" (Status code is 404).');
$handler = $this->getHandler($this->returnValue(new Response('foo', 404)));
$handler->render('/', 'foo');
diff --git a/vendor/symfony/http-kernel/Tests/Fragment/HIncludeFragmentRendererTest.php b/vendor/symfony/http-kernel/Tests/Fragment/HIncludeFragmentRendererTest.php
index f80f5f811a..cdef37565b 100644
--- a/vendor/symfony/http-kernel/Tests/Fragment/HIncludeFragmentRendererTest.php
+++ b/vendor/symfony/http-kernel/Tests/Fragment/HIncludeFragmentRendererTest.php
@@ -21,11 +21,9 @@ use Twig\Loader\ArrayLoader;
class HIncludeFragmentRendererTest extends TestCase
{
- /**
- * @expectedException \LogicException
- */
public function testRenderExceptionWhenControllerAndNoSigner()
{
+ $this->expectException('LogicException');
$strategy = new HIncludeFragmentRenderer();
$strategy->render(new ControllerReference('main_controller', [], []), Request::create('/'));
}
diff --git a/vendor/symfony/http-kernel/Tests/Fragment/InlineFragmentRendererTest.php b/vendor/symfony/http-kernel/Tests/Fragment/InlineFragmentRendererTest.php
index ce71804187..a064a76c7d 100644
--- a/vendor/symfony/http-kernel/Tests/Fragment/InlineFragmentRendererTest.php
+++ b/vendor/symfony/http-kernel/Tests/Fragment/InlineFragmentRendererTest.php
@@ -69,11 +69,9 @@ class InlineFragmentRendererTest extends TestCase
Request::setTrustedProxies([], -1);
}
- /**
- * @expectedException \RuntimeException
- */
public function testRenderExceptionNoIgnoreErrors()
{
+ $this->expectException('RuntimeException');
$dispatcher = $this->getMockBuilder(EventDispatcherInterface::class)->getMock();
$dispatcher->expects($this->never())->method('dispatch');
diff --git a/vendor/symfony/http-kernel/Tests/Fragment/RoutableFragmentRendererTest.php b/vendor/symfony/http-kernel/Tests/Fragment/RoutableFragmentRendererTest.php
index c03e8c4a92..151adb0e97 100644
--- a/vendor/symfony/http-kernel/Tests/Fragment/RoutableFragmentRendererTest.php
+++ b/vendor/symfony/http-kernel/Tests/Fragment/RoutableFragmentRendererTest.php
@@ -56,11 +56,11 @@ class RoutableFragmentRendererTest extends TestCase
}
/**
- * @expectedException \LogicException
- * @dataProvider getGenerateFragmentUriDataWithNonScalar
+ * @dataProvider getGenerateFragmentUriDataWithNonScalar
*/
public function testGenerateFragmentUriWithNonScalar($controller)
{
+ $this->expectException('LogicException');
$this->callGenerateFragmentUriMethod($controller, Request::create('/'));
}
diff --git a/vendor/symfony/http-kernel/Tests/Fragment/SsiFragmentRendererTest.php b/vendor/symfony/http-kernel/Tests/Fragment/SsiFragmentRendererTest.php
index b2181725ed..df30e67727 100644
--- a/vendor/symfony/http-kernel/Tests/Fragment/SsiFragmentRendererTest.php
+++ b/vendor/symfony/http-kernel/Tests/Fragment/SsiFragmentRendererTest.php
@@ -56,11 +56,9 @@ class SsiFragmentRendererTest extends TestCase
);
}
- /**
- * @expectedException \LogicException
- */
public function testRenderControllerReferenceWithoutSignerThrowsException()
{
+ $this->expectException('LogicException');
$strategy = new SsiFragmentRenderer(new Ssi(), $this->getInlineStrategy());
$request = Request::create('/');
@@ -70,11 +68,9 @@ class SsiFragmentRendererTest extends TestCase
$strategy->render(new ControllerReference('main_controller'), $request);
}
- /**
- * @expectedException \LogicException
- */
public function testRenderAltControllerReferenceWithoutSignerThrowsException()
{
+ $this->expectException('LogicException');
$strategy = new SsiFragmentRenderer(new Ssi(), $this->getInlineStrategy());
$request = Request::create('/');
diff --git a/vendor/symfony/http-kernel/Tests/HttpCache/EsiTest.php b/vendor/symfony/http-kernel/Tests/HttpCache/EsiTest.php
index ef717c63f5..cdf729e331 100644
--- a/vendor/symfony/http-kernel/Tests/HttpCache/EsiTest.php
+++ b/vendor/symfony/http-kernel/Tests/HttpCache/EsiTest.php
@@ -88,7 +88,7 @@ class EsiTest extends TestCase
$request = Request::create('/');
$response = new Response();
$response->headers->set('Content-Type', 'text/plain');
- $esi->process($request, $response);
+ $this->assertSame($response, $esi->process($request, $response));
$this->assertFalse($response->headers->has('x-body-eval'));
}
@@ -99,7 +99,7 @@ class EsiTest extends TestCase
$request = Request::create('/');
$response = new Response('<esi:remove> <a href="http://www.example.com">www.example.com</a> </esi:remove> Keep this'."<esi:remove>\n <a>www.example.com</a> </esi:remove> And this");
- $esi->process($request, $response);
+ $this->assertSame($response, $esi->process($request, $response));
$this->assertEquals(' Keep this And this', $response->getContent());
}
@@ -110,7 +110,7 @@ class EsiTest extends TestCase
$request = Request::create('/');
$response = new Response('<esi:comment text="some comment &gt;" /> Keep this');
- $esi->process($request, $response);
+ $this->assertSame($response, $esi->process($request, $response));
$this->assertEquals(' Keep this', $response->getContent());
}
@@ -121,23 +121,23 @@ class EsiTest extends TestCase
$request = Request::create('/');
$response = new Response('foo <esi:comment text="some comment" /><esi:include src="..." alt="alt" onerror="continue" />');
- $esi->process($request, $response);
+ $this->assertSame($response, $esi->process($request, $response));
$this->assertEquals('foo <?php echo $this->surrogate->handle($this, \'...\', \'alt\', true) ?>'."\n", $response->getContent());
$this->assertEquals('ESI', $response->headers->get('x-body-eval'));
$response = new Response('foo <esi:comment text="some comment" /><esi:include src="foo\'" alt="bar\'" onerror="continue" />');
- $esi->process($request, $response);
+ $this->assertSame($response, $esi->process($request, $response));
$this->assertEquals('foo <?php echo $this->surrogate->handle($this, \'foo\\\'\', \'bar\\\'\', true) ?>'."\n", $response->getContent());
$response = new Response('foo <esi:include src="..." />');
- $esi->process($request, $response);
+ $this->assertSame($response, $esi->process($request, $response));
$this->assertEquals('foo <?php echo $this->surrogate->handle($this, \'...\', \'\', false) ?>'."\n", $response->getContent());
$response = new Response('foo <esi:include src="..."></esi:include>');
- $esi->process($request, $response);
+ $this->assertSame($response, $esi->process($request, $response));
$this->assertEquals('foo <?php echo $this->surrogate->handle($this, \'...\', \'\', false) ?>'."\n", $response->getContent());
}
@@ -148,21 +148,19 @@ class EsiTest extends TestCase
$request = Request::create('/');
$response = new Response('<?php <? <% <script language=php>');
- $esi->process($request, $response);
+ $this->assertSame($response, $esi->process($request, $response));
$this->assertEquals('<?php echo "<?"; ?>php <?php echo "<?"; ?> <?php echo "<%"; ?> <?php echo "<s"; ?>cript language=php>', $response->getContent());
}
- /**
- * @expectedException \RuntimeException
- */
public function testProcessWhenNoSrcInAnEsi()
{
+ $this->expectException('RuntimeException');
$esi = new Esi();
$request = Request::create('/');
$response = new Response('foo <esi:include />');
- $esi->process($request, $response);
+ $this->assertSame($response, $esi->process($request, $response));
}
public function testProcessRemoveSurrogateControlHeader()
@@ -172,16 +170,16 @@ class EsiTest extends TestCase
$request = Request::create('/');
$response = new Response('foo <esi:include src="..." />');
$response->headers->set('Surrogate-Control', 'content="ESI/1.0"');
- $esi->process($request, $response);
+ $this->assertSame($response, $esi->process($request, $response));
$this->assertEquals('ESI', $response->headers->get('x-body-eval'));
$response->headers->set('Surrogate-Control', 'no-store, content="ESI/1.0"');
- $esi->process($request, $response);
+ $this->assertSame($response, $esi->process($request, $response));
$this->assertEquals('ESI', $response->headers->get('x-body-eval'));
$this->assertEquals('no-store', $response->headers->get('surrogate-control'));
$response->headers->set('Surrogate-Control', 'content="ESI/1.0", no-store');
- $esi->process($request, $response);
+ $this->assertSame($response, $esi->process($request, $response));
$this->assertEquals('ESI', $response->headers->get('x-body-eval'));
$this->assertEquals('no-store', $response->headers->get('surrogate-control'));
}
@@ -193,11 +191,9 @@ class EsiTest extends TestCase
$this->assertEquals('foo', $esi->handle($cache, '/', '/alt', true));
}
- /**
- * @expectedException \RuntimeException
- */
public function testHandleWhenResponseIsNot200()
{
+ $this->expectException('RuntimeException');
$esi = new Esi();
$response = new Response('foo');
$response->setStatusCode(404);
diff --git a/vendor/symfony/http-kernel/Tests/HttpCache/HttpCacheTest.php b/vendor/symfony/http-kernel/Tests/HttpCache/HttpCacheTest.php
index 309e8aaaec..c5bbc8c689 100644
--- a/vendor/symfony/http-kernel/Tests/HttpCache/HttpCacheTest.php
+++ b/vendor/symfony/http-kernel/Tests/HttpCache/HttpCacheTest.php
@@ -660,7 +660,7 @@ class HttpCacheTest extends HttpCacheTestCase
$this->assertTraceContains('miss');
$this->assertTraceContains('store');
$this->assertEquals('Hello World', $this->response->getContent());
- $this->assertRegExp('/s-maxage=2/', $this->response->headers->get('Cache-Control'));
+ $this->assertRegExp('/s-maxage=(2|3)/', $this->response->headers->get('Cache-Control'));
$this->request('GET', '/');
$this->assertHttpKernelIsNotCalled();
@@ -668,7 +668,7 @@ class HttpCacheTest extends HttpCacheTestCase
$this->assertTraceContains('fresh');
$this->assertTraceNotContains('store');
$this->assertEquals('Hello World', $this->response->getContent());
- $this->assertRegExp('/s-maxage=2/', $this->response->headers->get('Cache-Control'));
+ $this->assertRegExp('/s-maxage=(2|3)/', $this->response->headers->get('Cache-Control'));
// expires the cache
$values = $this->getMetaStorageValues();
@@ -688,7 +688,7 @@ class HttpCacheTest extends HttpCacheTestCase
$this->assertTraceContains('invalid');
$this->assertTraceContains('store');
$this->assertEquals('Hello World', $this->response->getContent());
- $this->assertRegExp('/s-maxage=2/', $this->response->headers->get('Cache-Control'));
+ $this->assertRegExp('/s-maxage=(2|3)/', $this->response->headers->get('Cache-Control'));
$this->setNextResponse();
@@ -698,7 +698,7 @@ class HttpCacheTest extends HttpCacheTestCase
$this->assertTraceContains('fresh');
$this->assertTraceNotContains('store');
$this->assertEquals('Hello World', $this->response->getContent());
- $this->assertRegExp('/s-maxage=2/', $this->response->headers->get('Cache-Control'));
+ $this->assertRegExp('/s-maxage=(2|3)/', $this->response->headers->get('Cache-Control'));
}
public function testAssignsDefaultTtlWhenResponseHasNoFreshnessInformationAndAfterTtlWasExpiredWithStatus304()
@@ -711,7 +711,7 @@ class HttpCacheTest extends HttpCacheTestCase
$this->assertTraceContains('miss');
$this->assertTraceContains('store');
$this->assertEquals('Hello World', $this->response->getContent());
- $this->assertRegExp('/s-maxage=2/', $this->response->headers->get('Cache-Control'));
+ $this->assertRegExp('/s-maxage=(2|3)/', $this->response->headers->get('Cache-Control'));
$this->request('GET', '/');
$this->assertHttpKernelIsNotCalled();
@@ -739,7 +739,7 @@ class HttpCacheTest extends HttpCacheTestCase
$this->assertTraceContains('store');
$this->assertTraceNotContains('miss');
$this->assertEquals('Hello World', $this->response->getContent());
- $this->assertRegExp('/s-maxage=2/', $this->response->headers->get('Cache-Control'));
+ $this->assertRegExp('/s-maxage=(2|3)/', $this->response->headers->get('Cache-Control'));
$this->request('GET', '/');
$this->assertHttpKernelIsNotCalled();
@@ -747,7 +747,7 @@ class HttpCacheTest extends HttpCacheTestCase
$this->assertTraceContains('fresh');
$this->assertTraceNotContains('store');
$this->assertEquals('Hello World', $this->response->getContent());
- $this->assertRegExp('/s-maxage=2/', $this->response->headers->get('Cache-Control'));
+ $this->assertRegExp('/s-maxage=(2|3)/', $this->response->headers->get('Cache-Control'));
}
public function testDoesNotAssignDefaultTtlWhenResponseHasMustRevalidateDirective()
diff --git a/vendor/symfony/http-kernel/Tests/HttpCache/HttpCacheTestCase.php b/vendor/symfony/http-kernel/Tests/HttpCache/HttpCacheTestCase.php
index fde389c28f..a73a327b53 100644
--- a/vendor/symfony/http-kernel/Tests/HttpCache/HttpCacheTestCase.php
+++ b/vendor/symfony/http-kernel/Tests/HttpCache/HttpCacheTestCase.php
@@ -35,7 +35,7 @@ class HttpCacheTestCase extends TestCase
*/
protected $store;
- protected function setUp()
+ protected function setUp(): void
{
$this->kernel = null;
@@ -53,7 +53,7 @@ class HttpCacheTestCase extends TestCase
$this->clearDirectory(sys_get_temp_dir().'/http_cache');
}
- protected function tearDown()
+ protected function tearDown(): void
{
if ($this->cache) {
$this->cache->getStore()->cleanup();
diff --git a/vendor/symfony/http-kernel/Tests/HttpCache/SsiTest.php b/vendor/symfony/http-kernel/Tests/HttpCache/SsiTest.php
index 4411427028..3d68052cdc 100644
--- a/vendor/symfony/http-kernel/Tests/HttpCache/SsiTest.php
+++ b/vendor/symfony/http-kernel/Tests/HttpCache/SsiTest.php
@@ -120,11 +120,9 @@ class SsiTest extends TestCase
$this->assertEquals('<?php echo "<?"; ?>php <?php echo "<?"; ?> <?php echo "<%"; ?> <?php echo "<s"; ?>cript language=php>', $response->getContent());
}
- /**
- * @expectedException \RuntimeException
- */
public function testProcessWhenNoSrcInAnSsi()
{
+ $this->expectException('RuntimeException');
$ssi = new Ssi();
$request = Request::create('/');
@@ -160,11 +158,9 @@ class SsiTest extends TestCase
$this->assertEquals('foo', $ssi->handle($cache, '/', '/alt', true));
}
- /**
- * @expectedException \RuntimeException
- */
public function testHandleWhenResponseIsNot200()
{
+ $this->expectException('RuntimeException');
$ssi = new Ssi();
$response = new Response('foo');
$response->setStatusCode(404);
diff --git a/vendor/symfony/http-kernel/Tests/HttpCache/StoreTest.php b/vendor/symfony/http-kernel/Tests/HttpCache/StoreTest.php
index fc47ff2c88..2887c14f5d 100644
--- a/vendor/symfony/http-kernel/Tests/HttpCache/StoreTest.php
+++ b/vendor/symfony/http-kernel/Tests/HttpCache/StoreTest.php
@@ -26,7 +26,7 @@ class StoreTest extends TestCase
*/
protected $store;
- protected function setUp()
+ protected function setUp(): void
{
$this->request = Request::create('/');
$this->response = new Response('hello world', 200, []);
@@ -36,7 +36,7 @@ class StoreTest extends TestCase
$this->store = new Store(sys_get_temp_dir().'/http_cache');
}
- protected function tearDown()
+ protected function tearDown(): void
{
$this->store = null;
$this->request = null;
diff --git a/vendor/symfony/http-kernel/Tests/HttpCache/SubRequestHandlerTest.php b/vendor/symfony/http-kernel/Tests/HttpCache/SubRequestHandlerTest.php
index 67b637bfe3..61e6beded5 100644
--- a/vendor/symfony/http-kernel/Tests/HttpCache/SubRequestHandlerTest.php
+++ b/vendor/symfony/http-kernel/Tests/HttpCache/SubRequestHandlerTest.php
@@ -21,12 +21,12 @@ class SubRequestHandlerTest extends TestCase
{
private static $globalState;
- protected function setUp()
+ protected function setUp(): void
{
self::$globalState = $this->getGlobalState();
}
- protected function tearDown()
+ protected function tearDown(): void
{
Request::setTrustedProxies(self::$globalState[0], self::$globalState[1]);
}
diff --git a/vendor/symfony/http-kernel/Tests/HttpKernelBrowserTest.php b/vendor/symfony/http-kernel/Tests/HttpKernelBrowserTest.php
index 37d471e815..5a2faf4243 100644
--- a/vendor/symfony/http-kernel/Tests/HttpKernelBrowserTest.php
+++ b/vendor/symfony/http-kernel/Tests/HttpKernelBrowserTest.php
@@ -160,7 +160,7 @@ class HttpKernelBrowserTest extends TestCase
;
$file->expects($this->any())
->method('getClientSize')
- ->willReturn(INF)
+ ->willReturn(PHP_INT_MAX)
;
$client->request('POST', '/', [], [$file]);
diff --git a/vendor/symfony/http-kernel/Tests/HttpKernelTest.php b/vendor/symfony/http-kernel/Tests/HttpKernelTest.php
index 457b525dd2..9a6170c086 100644
--- a/vendor/symfony/http-kernel/Tests/HttpKernelTest.php
+++ b/vendor/symfony/http-kernel/Tests/HttpKernelTest.php
@@ -29,21 +29,17 @@ use Symfony\Component\HttpKernel\KernelEvents;
class HttpKernelTest extends TestCase
{
- /**
- * @expectedException \RuntimeException
- */
public function testHandleWhenControllerThrowsAnExceptionAndCatchIsTrue()
{
+ $this->expectException('RuntimeException');
$kernel = $this->getHttpKernel(new EventDispatcher(), function () { throw new \RuntimeException(); });
$kernel->handle(new Request(), HttpKernelInterface::MASTER_REQUEST, true);
}
- /**
- * @expectedException \RuntimeException
- */
public function testHandleWhenControllerThrowsAnExceptionAndCatchIsFalseAndNoListenerIsRegistered()
{
+ $this->expectException('RuntimeException');
$kernel = $this->getHttpKernel(new EventDispatcher(), function () { throw new \RuntimeException(); });
$kernel->handle(new Request(), HttpKernelInterface::MASTER_REQUEST, false);
@@ -158,11 +154,9 @@ class HttpKernelTest extends TestCase
$this->assertEquals('hello', $kernel->handle(new Request())->getContent());
}
- /**
- * @expectedException \Symfony\Component\HttpKernel\Exception\NotFoundHttpException
- */
public function testHandleWhenNoControllerIsFound()
{
+ $this->expectException('Symfony\Component\HttpKernel\Exception\NotFoundHttpException');
$dispatcher = new EventDispatcher();
$kernel = $this->getHttpKernel($dispatcher, false);
@@ -224,7 +218,7 @@ class HttpKernelTest extends TestCase
// `file` index the array starting at 0, and __FILE__ starts at 1
$line = file($first['file'])[$first['line'] - 2];
- $this->assertContains('// call controller', $line);
+ $this->assertStringContainsString('// call controller', $line);
}
}
@@ -319,11 +313,9 @@ class HttpKernelTest extends TestCase
$kernel->handle($request, HttpKernelInterface::MASTER_REQUEST);
}
- /**
- * @expectedException \Symfony\Component\HttpKernel\Exception\BadRequestHttpException
- */
public function testInconsistentClientIpsOnMasterRequests()
{
+ $this->expectException('Symfony\Component\HttpKernel\Exception\BadRequestHttpException');
$request = new Request();
$request->setTrustedProxies(['1.1.1.1'], Request::HEADER_X_FORWARDED_FOR | Request::HEADER_FORWARDED);
$request->server->set('REMOTE_ADDR', '1.1.1.1');
diff --git a/vendor/symfony/http-kernel/Tests/KernelTest.php b/vendor/symfony/http-kernel/Tests/KernelTest.php
index f97074e1cd..20e2eb6b7f 100644
--- a/vendor/symfony/http-kernel/Tests/KernelTest.php
+++ b/vendor/symfony/http-kernel/Tests/KernelTest.php
@@ -21,6 +21,7 @@ use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Bundle\BundleInterface;
use Symfony\Component\HttpKernel\DependencyInjection\ResettableServicePass;
use Symfony\Component\HttpKernel\DependencyInjection\ServicesResetter;
+use Symfony\Component\HttpKernel\HttpKernel;
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\HttpKernel\Tests\Fixtures\KernelForOverrideName;
@@ -30,7 +31,7 @@ use Symfony\Component\HttpKernel\Tests\Fixtures\ResettableService;
class KernelTest extends TestCase
{
- public static function tearDownAfterClass()
+ public static function tearDownAfterClass(): void
{
$fs = new Filesystem();
$fs->remove(__DIR__.'/Fixtures/var');
@@ -64,12 +65,10 @@ class KernelTest extends TestCase
$this->assertNull($clone->getContainer());
}
- /**
- * @expectedException \InvalidArgumentException
- * @expectedExceptionMessage The environment "test.env" contains invalid characters, it can only contain characters allowed in PHP class names.
- */
public function testClassNameValidityGetter()
{
+ $this->expectException('InvalidArgumentException');
+ $this->expectExceptionMessage('The environment "test.env" contains invalid characters, it can only contain characters allowed in PHP class names.');
// We check the classname that will be generated by using a $env that
// contains invalid characters.
$env = 'test.env';
@@ -348,35 +347,27 @@ EOF;
$this->assertEquals($expected, serialize($kernel));
}
- /**
- * @expectedException \InvalidArgumentException
- */
public function testLocateResourceThrowsExceptionWhenNameIsNotValid()
{
+ $this->expectException('InvalidArgumentException');
$this->getKernel()->locateResource('Foo');
}
- /**
- * @expectedException \RuntimeException
- */
public function testLocateResourceThrowsExceptionWhenNameIsUnsafe()
{
+ $this->expectException('RuntimeException');
$this->getKernel()->locateResource('@FooBundle/../bar');
}
- /**
- * @expectedException \InvalidArgumentException
- */
public function testLocateResourceThrowsExceptionWhenBundleDoesNotExist()
{
+ $this->expectException('InvalidArgumentException');
$this->getKernel()->locateResource('@FooBundle/config/routing.xml');
}
- /**
- * @expectedException \InvalidArgumentException
- */
public function testLocateResourceThrowsExceptionWhenResourceDoesNotExist()
{
+ $this->expectException('InvalidArgumentException');
$kernel = $this->getKernel(['getBundle']);
$kernel
->expects($this->once())
@@ -464,14 +455,12 @@ EOF;
);
}
- /**
- * @expectedException \LogicException
- * @expectedExceptionMessage Trying to register two bundles with the same name "DuplicateName"
- */
public function testInitializeBundleThrowsExceptionWhenRegisteringTwoBundlesWithTheSameName()
{
- $fooBundle = $this->getBundle(null, null, 'FooBundle', 'DuplicateName');
- $barBundle = $this->getBundle(null, null, 'BarBundle', 'DuplicateName');
+ $this->expectException('LogicException');
+ $this->expectExceptionMessage('Trying to register two bundles with the same name "DuplicateName"');
+ $fooBundle = $this->getBundle(__DIR__.'/Fixtures/FooBundle', null, 'FooBundle', 'DuplicateName');
+ $barBundle = $this->getBundle(__DIR__.'/Fixtures/BarBundle', null, 'BarBundle', 'DuplicateName');
$kernel = $this->getKernel([], [$fooBundle, $barBundle]);
$kernel->boot();
diff --git a/vendor/symfony/http-kernel/Tests/Log/LoggerTest.php b/vendor/symfony/http-kernel/Tests/Log/LoggerTest.php
index 3a5a8ade54..79b79cc69c 100644
--- a/vendor/symfony/http-kernel/Tests/Log/LoggerTest.php
+++ b/vendor/symfony/http-kernel/Tests/Log/LoggerTest.php
@@ -32,13 +32,13 @@ class LoggerTest extends TestCase
*/
private $tmpFile;
- protected function setUp()
+ protected function setUp(): void
{
$this->tmpFile = tempnam(sys_get_temp_dir(), 'log');
$this->logger = new Logger(LogLevel::DEBUG, $this->tmpFile);
}
- protected function tearDown()
+ protected function tearDown(): void
{
if (!@unlink($this->tmpFile)) {
file_put_contents($this->tmpFile, '');
@@ -107,27 +107,21 @@ class LoggerTest extends TestCase
$this->assertSame([], $this->getLogs());
}
- /**
- * @expectedException \Psr\Log\InvalidArgumentException
- */
public function testThrowsOnInvalidLevel()
{
+ $this->expectException('Psr\Log\InvalidArgumentException');
$this->logger->log('invalid level', 'Foo');
}
- /**
- * @expectedException \Psr\Log\InvalidArgumentException
- */
public function testThrowsOnInvalidMinLevel()
{
+ $this->expectException('Psr\Log\InvalidArgumentException');
new Logger('invalid');
}
- /**
- * @expectedException \Psr\Log\InvalidArgumentException
- */
public function testInvalidOutput()
{
+ $this->expectException('Psr\Log\InvalidArgumentException');
new Logger(LogLevel::DEBUG, '/');
}
@@ -145,7 +139,7 @@ class LoggerTest extends TestCase
if (method_exists($this, 'createPartialMock')) {
$dummy = $this->createPartialMock(DummyTest::class, ['__toString']);
} else {
- $dummy = $this->getMock(DummyTest::class, ['__toString']);
+ $dummy = $this->createPartialMock(DummyTest::class, ['__toString']);
}
$dummy->expects($this->atLeastOnce())
->method('__toString')
diff --git a/vendor/symfony/http-kernel/Tests/Logger.php b/vendor/symfony/http-kernel/Tests/Logger.php
index 8ae756132c..8453cfbd57 100644
--- a/vendor/symfony/http-kernel/Tests/Logger.php
+++ b/vendor/symfony/http-kernel/Tests/Logger.php
@@ -22,7 +22,7 @@ class Logger implements LoggerInterface
$this->clear();
}
- public function getLogs($level = false)
+ public function getLogs($level = false): array
{
return false === $level ? $this->logs : $this->logs[$level];
}
diff --git a/vendor/symfony/http-kernel/Tests/Profiler/FileProfilerStorageTest.php b/vendor/symfony/http-kernel/Tests/Profiler/FileProfilerStorageTest.php
index bf4cd17d16..f088fe044d 100644
--- a/vendor/symfony/http-kernel/Tests/Profiler/FileProfilerStorageTest.php
+++ b/vendor/symfony/http-kernel/Tests/Profiler/FileProfilerStorageTest.php
@@ -20,7 +20,7 @@ class FileProfilerStorageTest extends TestCase
private $tmpDir;
private $storage;
- protected function setUp()
+ protected function setUp(): void
{
$this->tmpDir = sys_get_temp_dir().'/sf_profiler_file_storage';
if (is_dir($this->tmpDir)) {
@@ -30,7 +30,7 @@ class FileProfilerStorageTest extends TestCase
$this->storage->purge();
}
- protected function tearDown()
+ protected function tearDown(): void
{
self::cleanDir();
}
diff --git a/vendor/symfony/http-kernel/Tests/Profiler/ProfilerTest.php b/vendor/symfony/http-kernel/Tests/Profiler/ProfilerTest.php
index 35aa8ea5dc..2128ea9bcd 100644
--- a/vendor/symfony/http-kernel/Tests/Profiler/ProfilerTest.php
+++ b/vendor/symfony/http-kernel/Tests/Profiler/ProfilerTest.php
@@ -82,7 +82,7 @@ class ProfilerTest extends TestCase
$this->assertCount(0, $profiler->find(null, null, null, null, null, null, '204'));
}
- protected function setUp()
+ protected function setUp(): void
{
$this->tmp = tempnam(sys_get_temp_dir(), 'sf_profiler');
if (file_exists($this->tmp)) {
@@ -93,7 +93,7 @@ class ProfilerTest extends TestCase
$this->storage->purge();
}
- protected function tearDown()
+ protected function tearDown(): void
{
if (null !== $this->storage) {
$this->storage->purge();
diff --git a/vendor/symfony/http-kernel/Tests/UriSignerTest.php b/vendor/symfony/http-kernel/Tests/UriSignerTest.php
index 9b7fe08a99..b2eb59206b 100644
--- a/vendor/symfony/http-kernel/Tests/UriSignerTest.php
+++ b/vendor/symfony/http-kernel/Tests/UriSignerTest.php
@@ -20,9 +20,9 @@ class UriSignerTest extends TestCase
{
$signer = new UriSigner('foobar');
- $this->assertContains('?_hash=', $signer->sign('http://example.com/foo'));
- $this->assertContains('?_hash=', $signer->sign('http://example.com/foo?foo=bar'));
- $this->assertContains('&foo=', $signer->sign('http://example.com/foo?foo=bar'));
+ $this->assertStringContainsString('?_hash=', $signer->sign('http://example.com/foo'));
+ $this->assertStringContainsString('?_hash=', $signer->sign('http://example.com/foo?foo=bar'));
+ $this->assertStringContainsString('&foo=', $signer->sign('http://example.com/foo?foo=bar'));
}
public function testCheck()