Skip to content

Commit 5abffbb

Browse files
Merge branch '4.1'
* 4.1: (22 commits) [HttpKernel] Fix restoring trusted proxies in tests Update UPGRADE-4.0.md [Messenger] Fix suggested enqueue adapter package bumped Symfony version to 4.1.1 updated VERSION for 4.1.0 updated CHANGELOG for 4.1.0 Insert correct parameter_bag service in AbstractController Revert "feature symfony#26702 Mark ExceptionInterfaces throwable (ostrolucky)" CODEOWNERS: some more rules removed unneeded comments in tests removed unneeded comments in tests Change PHPDoc in ResponseHeaderBag::getCookies() to help IDEs [HttpKernel] fix registering IDE links update UPGRADE-4.1 for feature symfony#26332 Form field help option [HttpKernel] Set first trusted proxy as REMOTE_ADDR in InlineFragmentRenderer. [Process] Consider \"executable\" suffixes first on Windows Triggering RememberMe's loginFail() when token cannot be created bumped Symfony version to 4.1.0 updated VERSION for 4.1.0-BETA3 updated CHANGELOG for 4.1.0-BETA3 ...
2 parents 5937566 + 8bbd738 commit 5abffbb

File tree

49 files changed

+359
-106
lines changed

Some content is hidden

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

49 files changed

+359
-106
lines changed

.github/CODEOWNERS

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
1+
# Console
2+
/src/Symfony/Component/Console/Logger/ConsoleLogger.php @dunglas
3+
# DependencyInjection
4+
/src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php @dunglas
5+
# HttpKernel
6+
/src/Symfony/Component/HttpKernel/Log/Logger.php @dunglas
17
# LDAP
28
/src/Symfony/Component/Ldap/* @csarrazi
39
# Lock
410
/src/Symfony/Component/Lock/* @jderusse
511
# Messenger
612
/src/Symfony/Bridge/Doctrine/Messenger/* @sroze
713
/src/Symfony/Component/Messenger/* @sroze
14+
# PropertyInfo
15+
/src/Symfony/Component/PropertyInfo/* @dunglas
16+
/src/Symfony/Bridge/Doctrine/PropertyInfo/* @dunglas
17+
# Serializer
18+
/src/Symfony/Component/Serializer/* @dunglas
19+
# WebLink
20+
/src/Symfony/Component/WebLink/* @dunglas
821
# Workflow
922
/src/Symfony/Bridge/Twig/Extension/WorkflowExtension.php @lyrixx
1023
/src/Symfony/Bridge/Twig/Tests/Extension/WorkflowExtensionTest.php @lyrixx

CHANGELOG-4.1.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,35 @@ in 4.1 minor versions.
77
To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash
88
To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v4.1.0...v4.1.1
99

10+
* 4.1.0 (2018-05-30)
11+
12+
* bug #27420 Revert "feature #26702 Mark ExceptionInterfaces throwable (ostrolucky)" (nicolas-grekas)
13+
* bug #27415 Insert correct parameter_bag service in AbstractController (curry684)
14+
15+
* 4.1.0-BETA3 (2018-05-26)
16+
17+
* bug #27388 [Routing] Account for greediness when merging route patterns (nicolas-grekas)
18+
* bug #27344 [HttpKernel] reset kernel start time on reboot (kiler129)
19+
* bug #27365 [Serializer] Check the value of enable_max_depth if defined (dunglas)
20+
* bug #27358 [PhpUnitBridge] silence some stderr outputs (ostrolucky)
21+
* bug #27366 [DI] never inline lazy services (nicolas-grekas)
22+
* bug #27352 Remove reference to the test container after kernel shutdown (stof)
23+
* bug #27350 [HttpKernel] fix deprecation in AbstractTestSessionListener (alekitto)
24+
* bug #27367 [FrameworkBundle] cleanup generated test container (nicolas-grekas)
25+
* bug #27379 [FrameworkBundle] Fix using test.service_container when Client is rebooted (nicolas-grekas)
26+
* bug #27364 [DI] Fix bad exception on uninitialized references to non-shared services (nicolas-grekas)
27+
* bug #27359 [HttpFoundation] Fix perf issue during MimeTypeGuesser intialization (nicolas-grekas)
28+
* security #cve-2018-11408 [SecurityBundle] Fail if security.http_utils cannot be configured
29+
* security #cve-2018-11406 clear CSRF tokens when the user is logged out
30+
* security #cve-2018-11385 migrating session for UsernamePasswordJsonAuthenticationListener
31+
* security #cve-2018-11385 migrating session for UsernamePasswordJsonAuthenticationListener
32+
* security #cve-2018-11385 Adding session authentication strategy to Guard to avoid session fixation
33+
* security #cve-2018-11385 Adding session strategy to ALL listeners to avoid *any* possible fixation
34+
* security #cve-2018-11386 [HttpFoundation] Break infinite loop in PdoSessionHandler when MySQL is in loose mode
35+
* bug #27341 [WebProfilerBundle] Fixed validator/dump trace CSS (yceruto)
36+
* bug #27337 [FrameworkBundle] fix typo in CacheClearCommand (emilielorenzo)
37+
* bug #27292 [Serializer] Fix and improve constraintViolationListNormalizer's RFC7807 compliance (dunglas)
38+
1039
* 4.1.0-BETA2 (2018-05-21)
1140

1241
* bug #27312 Supress deprecation notices thrown when getting private servies from container in tests (arderyp)

UPGRADE-4.0.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -759,6 +759,9 @@ Security
759759
* The `GuardAuthenticatorInterface` interface has been removed.
760760
Use `AuthenticatorInterface` instead.
761761

762+
* When extending `AbstractGuardAuthenticator` getCredentials() cannot return
763+
`null` anymore, return false from `supports()` if no credentials available instead.
764+
762765
SecurityBundle
763766
--------------
764767

UPGRADE-4.1.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ Form
6464
}
6565
```
6666

67+
* Added `help` option to the form field. If you have custom Form extension for it, you should remove it.
68+
Also remove it from the custom form theme.
69+
6770
FrameworkBundle
6871
---------------
6972

src/Symfony/Bridge/Monolog/Tests/Processor/WebProcessorTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ public function testUseRequestClientIp()
4949
$this->assertEquals($server['REQUEST_METHOD'], $record['extra']['http_method']);
5050
$this->assertEquals($server['SERVER_NAME'], $record['extra']['server']);
5151
$this->assertEquals($server['HTTP_REFERER'], $record['extra']['referrer']);
52+
53+
Request::setTrustedProxies(array(), -1);
5254
}
5355

5456
public function testCanBeConstructedWithExtraFields()

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use Psr\Container\ContainerInterface;
1515
use Doctrine\Common\Persistence\ManagerRegistry;
16+
use Symfony\Component\DependencyInjection\ParameterBag\ContainerBagInterface;
1617
use Symfony\Component\DependencyInjection\ServiceSubscriberInterface;
1718
use Symfony\Component\Form\FormFactoryInterface;
1819
use Symfony\Component\HttpFoundation\RequestStack;
@@ -84,7 +85,7 @@ public static function getSubscribedServices()
8485
'form.factory' => '?'.FormFactoryInterface::class,
8586
'security.token_storage' => '?'.TokenStorageInterface::class,
8687
'security.csrf.token_manager' => '?'.CsrfTokenManagerInterface::class,
87-
'parameter_bag' => '?'.ContainerInterface::class,
88+
'parameter_bag' => '?'.ContainerBagInterface::class,
8889
'message_bus' => '?'.MessageBusInterface::class,
8990
);
9091
}

src/Symfony/Bundle/FrameworkBundle/FrameworkBundle.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,6 @@ class FrameworkBundle extends Bundle
6464
{
6565
public function boot()
6666
{
67-
if (!ini_get('xdebug.file_link_format') && !get_cfg_var('xdebug.file_link_format')) {
68-
ini_set('xdebug.file_link_format', $this->container->getParameter('debug.file_link_format'));
69-
}
7067
ErrorHandler::register(null, false)->throwAt($this->container->getParameter('debug.error_handler.throw_at'), true);
7168

7269
if ($this->container->getParameter('kernel.http_method_override')) {
@@ -102,7 +99,7 @@ public function build(ContainerBuilder $container)
10299
$this->addCompilerPassIfExists($container, AddConstraintValidatorsPass::class, PassConfig::TYPE_BEFORE_REMOVING);
103100
$container->addCompilerPass(new AddAnnotationsCachedReaderPass(), PassConfig::TYPE_AFTER_REMOVING, -255);
104101
$this->addCompilerPassIfExists($container, AddValidatorInitializersPass::class);
105-
$this->addCompilerPassIfExists($container, AddConsoleCommandPass::class);
102+
$this->addCompilerPassIfExists($container, AddConsoleCommandPass::class, PassConfig::TYPE_BEFORE_REMOVING);
106103
$this->addCompilerPassIfExists($container, TranslatorPass::class);
107104
$container->addCompilerPass(new LoggingTranslatorPass());
108105
$container->addCompilerPass(new AddExpressionLanguageProvidersPass());

src/Symfony/Bundle/FrameworkBundle/Resources/config/web.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
<argument type="service" id="logger" on-invalid="null" />
7575
<argument>%kernel.debug%</argument>
7676
<argument>%kernel.charset%</argument>
77+
<argument>%debug.file_link_format%</argument>
7778
</service>
7879

7980
<service id="validate_request_listener" class="Symfony\Component\HttpKernel\EventListener\ValidateRequestListener">

src/Symfony/Bundle/FrameworkBundle/Tests/Controller/AbstractControllerTest.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,32 @@ protected function createController()
2424
return new TestAbstractController();
2525
}
2626

27+
/**
28+
* This test protects the default subscribed core services against accidental modification.
29+
*/
30+
public function testSubscribedServices()
31+
{
32+
$subscribed = AbstractController::getSubscribedServices();
33+
$expectedServices = array(
34+
'router' => '?Symfony\\Component\\Routing\\RouterInterface',
35+
'request_stack' => '?Symfony\\Component\\HttpFoundation\\RequestStack',
36+
'http_kernel' => '?Symfony\\Component\\HttpKernel\\HttpKernelInterface',
37+
'serializer' => '?Symfony\\Component\\Serializer\\SerializerInterface',
38+
'session' => '?Symfony\\Component\\HttpFoundation\\Session\\SessionInterface',
39+
'security.authorization_checker' => '?Symfony\\Component\\Security\\Core\\Authorization\\AuthorizationCheckerInterface',
40+
'templating' => '?Symfony\\Component\\Templating\\EngineInterface',
41+
'twig' => '?Twig\\Environment',
42+
'doctrine' => '?Doctrine\\Common\\Persistence\\ManagerRegistry',
43+
'form.factory' => '?Symfony\\Component\\Form\\FormFactoryInterface',
44+
'parameter_bag' => '?Symfony\\Component\\DependencyInjection\\ParameterBag\\ContainerBagInterface',
45+
'message_bus' => '?Symfony\\Component\\Messenger\\MessageBusInterface',
46+
'security.token_storage' => '?Symfony\\Component\\Security\\Core\\Authentication\\Token\\Storage\\TokenStorageInterface',
47+
'security.csrf.token_manager' => '?Symfony\\Component\\Security\\Csrf\\CsrfTokenManagerInterface',
48+
);
49+
50+
$this->assertEquals($expectedServices, $subscribed, 'Subscribed core services in AbstractController have changed');
51+
}
52+
2753
public function testGetParameter()
2854
{
2955
$container = new Container(new FrozenParameterBag(array('foo' => 'bar')));

src/Symfony/Bundle/WebProfilerBundle/Controller/ExceptionController.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ class ExceptionController
3030
protected $twig;
3131
protected $debug;
3232
protected $profiler;
33+
private $fileLinkFormat;
3334

3435
public function __construct(Profiler $profiler = null, Environment $twig, bool $debug, FileLinkFormatter $fileLinkFormat = null)
3536
{

0 commit comments

Comments
 (0)