10BC0 Merge branch '5.2' into 5.x · symfony/symfony@47da664 · GitHub
[go: up one dir, main page]

Skip to content

Commit 47da664

Browse files
Merge branch '5.2' into 5.x
* 5.2: Allow psr/cache v3 but on symfony/cache [DI] fix tracking of changes to vendor/ dirs Remove EOLed 5.1 branch from PR template [HttpKernel] [Kernel] Silence deprecations logs writes Update PULL_REQUEST_TEMPLATE.md fix typo [Mailer][Mime] Update inline part names with newly generated ContentId Fixed updating catalogue metadata from intl domain [HttpFoundation] Setting `REQUEST_TIME_FLOAT` when constructing a Request object
2 parents 66a1a8b + 382b10f commit 47da664

File tree

20 files changed

+101
-38
lines changed

20 files changed

+101
-38
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
| Q | A
22
| ------------- | ---
3-
| Branch? | 5.x for features / 4.4, 5.1 or 5.2 for bug fixes <!-- see below -->
3+
| Branch? | 5.x for features / 4.4 or 5.2 for bug fixes <!-- see below -->
44
| Bug fix? | yes/no
55
| New feature? | yes/no <!-- please update src/**/CHANGELOG.md files -->
66
| Deprecations? | yes/no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files -->
@@ -17,4 +17,5 @@ Additionally (see https://symfony.com/releases):
1717
- Bug fixes must be submitted against the lowest maintained branch where they apply
1818
(lowest branches are regularly merged to upper ones so they get the fixes too.)
1919
- Features and deprecations must be submitted against branch 5.x.
20+
- Changelog entry should follow https://symfony.com/doc/current/contributing/code/conventions.html#writing-a-changelog-entry
2021
-->

src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,11 @@ private function filterCatalogue(MessageCatalogue $catalogue, string $domain): M
334334
foreach ($catalogue->getResources() as $resource) {
335335
$filteredCatalogue->addResource($resource);
336336
}
337+
if ($metadata = $catalogue->getMetadata('', $intlDomain)) {
338+
foreach ($metadata as $k => $v) {
339+
$filteredCatalogue->setMetadata($k, $v, $intlDomain);
340+
}
341+
}
337342
if ($metadata = $catalogue->getMetadata('', $domain)) {
338343
foreach ($metadata as $k => $v) {
339344
$filteredCatalogue->setMetadata($k, $v, $domain);

src/Symfony/Component/DependencyInjection/ContainerBuilder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1599,14 +1599,14 @@ private function getExpressionLanguage(): ExpressionLanguage
15991599
private function inVendors(string $path): bool
16001600
{
16011601
if (null === $this->vendors) {
1602-
$resource = new ComposerResource();
1603-
$this->vendors = $resource->getVendors();
1604-
$this->addResource($resource);
1602+
$this->vendors = (new ComposerResource())->getVendors();
16051603
}
16061604
$path = realpath($path) ?: $path;
16071605

16081606
foreach ($this->vendors as $vendor) {
16091607
if (0 === strpos($path, $vendor) && false !== strpbrk(substr($path, \strlen($vendor), 1), '/'.\DIRECTORY_SEPARATOR)) {
1608+
$this->addResource(new FileResource($vendor.'/composer/installed.json'));
1609+
16101610
return true;
16111611
}
16121612
}

src/Symfony/Component/DependencyInjection/Tests/ContainerBuilderTest.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
use PHPUnit\Framework\TestCase;
1919
use Psr\Container\ContainerInterface as PsrContainerInterface;
2020
use Symfony\Bridge\PhpUnit\ExpectDeprecationTrait;
21-
use Symfony\Component\Config\Resource\ComposerResource;
2221
use Symfony\Component\Config\Resource\DirectoryResource;
2322
use Symfony\Component\Config\Resource\FileResource;
2423
use Symfony\Component\Config\Resource\ResourceInterface;
@@ -952,7 +951,7 @@ public function testAddObjectResource()
952951

953952
$resources = $container->getResources();
954953

955-
$this->assertCount(2, $resources, '2 resources were registered');
954+
$this->assertCount(1, $resources);
956955

957956
/* @var $resource \Symfony\Component\Config\Resource\FileResource */
958957
$resource = end($resources);
@@ -981,9 +980,9 @@ public function testGetReflectionClass()
981980

982981
$resources = $container->getResources();
983982

984-
$this->assertCount(3, $resources, '3 resources were registered');
983+
$this->assertCount(2, $resources);
985984

986-
$this->assertSame('reflection.BarClass', (string) $resources[1]);
985+
$this->assertSame('reflection.BarClass', (string) $resources[0]);
987986
$this->assertSame('BarMissingClass', (string) end($resources));
988987
}
989988

@@ -1044,7 +1043,6 @@ public function testResources()
10441043
public function testFileExists()
10451044
{
10461045
$container = new ContainerBuilder();
1047-
$A = new ComposerResource();
10481046
$a = new FileResource(__DIR__.'/Fixtures/xml/services1.xml');
10491047
$b = new FileResource(__DIR__.'/Fixtures/xml/services2.xml');
10501048
$c = new DirectoryResource($dir = \dirname($b));
@@ -1058,7 +1056,7 @@ public function testFileExists()
10581056
}
10591057
}
10601058

1061-
$this->assertEquals([$A, $a, $b, $c], $resources, '->getResources() returns an array of resources read for the current configuration');
1059+
$this->assertEquals([$a, $b, $c], $resources, '->getResources() returns an array of resources read for the current configuration');
10621060
}
10631061

10641062
public function testExtension()

src/Symfony/Component/DependencyInjection/Tests/Loader/GlobFileLoaderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function testLoadAddsTheGlobResourceToTheContainer()
3232
$loader = new GlobFileLoaderWithoutImport($container = new ContainerBuilder(), new FileLocator());
3333
$loader->load(__DIR__.'/../Fixtures/config/*');
3434

35-
$this->assertEquals(new GlobResource(__DIR__.'/../Fixtures/config', '/*', false), $container->getResources()[1]);
35+
$this->assertEquals(new GlobResource(__DIR__.'/../Fixtures/config', '/*', false), $container->getResources()[0]);
3636
}
3737
}
3838

src/Symfony/Component/HttpFoundation/Request.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,7 @@ public static function create(string $uri, string $method = 'GET', array $parame
347347
'SCRIPT_FILENAME' => '',
348348
'SERVER_PROTOCOL' => 'HTTP/1.1',
349349
'REQUEST_TIME' => time(),
350+
'REQUEST_TIME_FLOAT' => microtime(true),
350351
], $server);
351352

352353
$server['PATH_INFO'] = '';

src/Symfony/Component/HttpFoundation/Session/Storage/Handler/MarshallingSessionHandler.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,47 +28,47 @@ public function __construct(AbstractSessionHandler $handler, MarshallerInterface
2828
}
2929

3030
/**
31-
* {@inheritdoc}
31+
* @return bool
3232
*/
3333
public function open($savePath, $name)
3434
{
3535
return $this->handler->open($savePath, $name);
3636
}
3737

3838
/**
39-
* {@inheritdoc}
39+
* @return bool
4040
*/
4141
public function close()
4242
{
4343
return $this->handler->close();
4444
}
4545

4646
/**
47-
* {@inheritdoc}
47+
* @return bool
4848
*/
4949
public function destroy($sessionId)
5050
{
5151
return $this->handler->destroy($sessionId);
5252
}
5353

5454
/**
55-
* {@inheritdoc}
55+
* @return bool
5656
*/
5757
public function gc($maxlifetime)
5858
{
5959
return $this->handler->gc($maxlifetime);
6060
}
6161

6262
/**
63-
* {@inheritdoc}
63+
* @return string
6464
*/
6565
public function read($sessionId)
6666
{
6767
return $this->marshaller->unmarshall($this->handler->read($sessionId));
6868
}
6969

7070
/**
71-
* {@inheritdoc}
71+
* @return bool
7272
*/
7373
public function write($sessionId, $data)
7474
{
@@ -83,15 +83,15 @@ public function write($sessionId, $data)
8383
}
8484

8585
/**
86-
* {@inheritdoc}
86+
* @return bool
8787
*/
8888
public function validateId($sessionId)
8989
{
9090
return $this->handler->validateId($sessionId);
9191
}
9292

9393
/**
94-
* {@inheritdoc}
94+
* @return bool
9595
*/
9696
public function updateTimestamp($sessionId, $data)
9797
{

src/Symfony/Component/HttpKernel/Kernel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -543,8 +543,8 @@ protected function initializeContainer()
543543
if ($collectDeprecations) {
544544
restore_error_handler();
545545

546-
file_put_contents($buildDir.'/'.$class.'Deprecations.log', serialize(array_values($collectedLogs)));
547-
file_put_contents($buildDir.'/'.$class.'Compiler.log', null !== $container ? implode("\n", $container->getCompiler()->getLog()) : '');
546+
@file_put_contents($buildDir.'/'.$class.'Deprecations.log', serialize(array_values($collectedLogs)));
547+
@file_put_contents($buildDir.'/'.$class.'Compiler.log', null !== $container ? implode("\n", $container->getCompiler()->getLog()) : '');
548548
}
549549
}
550550

src/Symfony/Component/HttpKernel/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"symfony/stopwatch": "^4.4|^5.0",
4242
"symfony/translation": "^4.4|^5.0",
4343
"symfony/translation-contracts": "^1.1|^2",
44-
"psr/cache": "^1.0|^2.0",
44+
"psr/cache": "^1.0|^2.0|^3.0",
4545
"twig/twig": "^2.13|^3.0.4"
4646
},
4747
"provide": {

src/Symfony/Component/Lock/Tests/Store/RetryTillSaveStoreTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717

1818
/**
1919
* @author Jérémy Derussé <jeremy@derusse.com>
20+
*
21+
* @group legacy
2022
*/
2123
class RetryTillSaveStoreTest extends AbstractStoreTest
2224
{

0 commit comments

Comments
 (0)
0