Merge branch '4.2' into 4.3
This commit is contained in:
commit
2bc88ee744
@ -100,7 +100,6 @@ use Symfony\Component\Serializer\Encoder\DecoderInterface;
|
|||||||
use Symfony\Component\Serializer\Encoder\EncoderInterface;
|
use Symfony\Component\Serializer\Encoder\EncoderInterface;
|
||||||
use Symfony\Component\Serializer\Mapping\ClassDiscriminatorFromClassMetadata;
|
use Symfony\Component\Serializer\Mapping\ClassDiscriminatorFromClassMetadata;
|
||||||
use Symfony\Component\Serializer\Normalizer\ConstraintViolationListNormalizer;
|
use Symfony\Component\Serializer\Normalizer\ConstraintViolationListNormalizer;
|
||||||
use Symfony\Component\Serializer\Normalizer\DateIntervalNormalizer;
|
|
||||||
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
|
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
|
||||||
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
|
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
|
||||||
use Symfony\Component\Stopwatch\Stopwatch;
|
use Symfony\Component\Stopwatch\Stopwatch;
|
||||||
@ -226,7 +225,7 @@ class FrameworkExtension extends Extension
|
|||||||
|
|
||||||
if ($this->isConfigEnabled($container, $config['session'])) {
|
if ($this->isConfigEnabled($container, $config['session'])) {
|
||||||
if (!\extension_loaded('session')) {
|
if (!\extension_loaded('session')) {
|
||||||
throw new \LogicException('PHP extension "session" is required.');
|
throw new LogicException('Session support cannot be enabled as the session extension is not installed. See https://www.php.net/session.installation for instructions.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->sessionConfigEnabled = true;
|
$this->sessionConfigEnabled = true;
|
||||||
@ -1433,10 +1432,6 @@ class FrameworkExtension extends Extension
|
|||||||
{
|
{
|
||||||
$loader->load('serializer.xml');
|
$loader->load('serializer.xml');
|
||||||
|
|
||||||
if (!class_exists(DateIntervalNormalizer::class)) {
|
|
||||||
$container->removeDefinition('serializer.normalizer.dateinterval');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!class_exists(ConstraintViolationListNormalizer::class)) {
|
if (!class_exists(ConstraintViolationListNormalizer::class)) {
|
||||||
$container->removeDefinition('serializer.normalizer.constraint_violation_list');
|
$container->removeDefinition('serializer.normalizer.constraint_violation_list');
|
||||||
}
|
}
|
||||||
|
@ -1194,10 +1194,6 @@ abstract class FrameworkExtensionTest extends TestCase
|
|||||||
|
|
||||||
public function testDateIntervalNormalizerRegistered()
|
public function testDateIntervalNormalizerRegistered()
|
||||||
{
|
{
|
||||||
if (!class_exists(DateIntervalNormalizer::class)) {
|
|
||||||
$this->markTestSkipped('The DateIntervalNormalizer has been introduced in the Serializer Component version 3.4.');
|
|
||||||
}
|
|
||||||
|
|
||||||
$container = $this->createContainerFromFile('full');
|
$container = $this->createContainerFromFile('full');
|
||||||
|
|
||||||
$definition = $container->getDefinition('serializer.normalizer.dateinterval');
|
$definition = $container->getDefinition('serializer.normalizer.dateinterval');
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
$this->load('merge_import.php', $container);
|
$this->load('merge_import.php');
|
||||||
|
|
||||||
$container->loadFromExtension('security', [
|
$container->loadFromExtension('security', [
|
||||||
'providers' => [
|
'providers' => [
|
||||||
|
@ -25,8 +25,7 @@ abstract class AbstractGuardAuthenticator implements AuthenticatorInterface
|
|||||||
* Shortcut to create a PostAuthenticationGuardToken for you, if you don't really
|
* Shortcut to create a PostAuthenticationGuardToken for you, if you don't really
|
||||||
* care about which authenticated token you're using.
|
* care about which authenticated token you're using.
|
||||||
*
|
*
|
||||||
* @param UserInterface $user
|
* @param string $providerKey
|
||||||
* @param string $providerKey
|
|
||||||
*
|
*
|
||||||
* @return PostAuthenticationGuardToken
|
* @return PostAuthenticationGuardToken
|
||||||
*/
|
*/
|
||||||
|
@ -37,8 +37,6 @@ interface AuthenticatorInterface extends AuthenticationEntryPointInterface
|
|||||||
*
|
*
|
||||||
* If this returns false, the authenticator will be skipped.
|
* If this returns false, the authenticator will be skipped.
|
||||||
*
|
*
|
||||||
* @param Request $request
|
|
||||||
*
|
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function supports(Request $request);
|
public function supports(Request $request);
|
||||||
@ -60,8 +58,6 @@ interface AuthenticatorInterface extends AuthenticationEntryPointInterface
|
|||||||
*
|
*
|
||||||
* return ['api_key' => $request->headers->get('X-API-TOKEN')];
|
* return ['api_key' => $request->headers->get('X-API-TOKEN')];
|
||||||
*
|
*
|
||||||
* @param Request $request
|
|
||||||
*
|
|
||||||
* @return mixed Any non-null value
|
* @return mixed Any non-null value
|
||||||
*
|
*
|
||||||
* @throws \UnexpectedValueException If null is returned
|
* @throws \UnexpectedValueException If null is returned
|
||||||
|
Reference in New Issue
Block a user