8000 Merge branch '4.4' · symfony/symfony@14dda41 · GitHub
[go: up one dir, main page]

Skip to content

Commit 14dda41

Browse files
committed
Merge branch '4.4'
* 4.4: [HttpKernel] fix wrong removal of the just generated container dir bug #34024 [Routing] fix route loading with wildcard, but dir or file is empty (gseidel) [Routing] fix route loading with wildcard, but dir or file is empty bump Form component compatibility versions execute all compatible tests across versions [Mailer][MailchimpBridge] Fix NamedAddress obsolete paths
2 parents 99098f8 + c50d0b6 commit 14dda41

File tree

11 files changed

+15
-17
lines changed

11 files changed

+15
-17
lines changed

src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypePerformanceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class EntityTypePerformanceTest extends FormPerformanceTestCase
3030
*/
3131
private $em;
3232

33-
protected static $supportedFeatureSetVersion = 304;
33+
protected static $supportedFeatureSetVersion = 404;
3434

3535
protected function getExtensions()
3636
{

src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class EntityTypeTest extends BaseTypeTest
5858
*/
5959
private $emRegistry;
6060

61-
protected static $supportedFeatureSetVersion = 304;
61+
protected static $supportedFeatureSetVersion = 404;
6262

6363
protected function setUp(): void
6464
{

src/Symfony/Bridge/Twig/Tests/Extension/AbstractBootstrap3LayoutTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
abstract class AbstractBootstrap3LayoutTest extends AbstractLayoutTest
1919
{
20-
protected static $supportedFeatureSetVersion = 403;
20+
protected static $supportedFeatureSetVersion = 404;
2121

2222
public function testLabelOnForm()
2323
{

src/Symfony/Component/Form/Tests/VersionAwareTest.php

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

1414
trait VersionAwareTest
1515
{
16-
protected static $supportedFeatureSetVersion = 304;
16+
protected static $supportedFeatureSetVersion = 404;
1717

1818
/**
1919
* @param int $requiredFeatureSetVersion

src/Symfony/Component/HttpKernel/Kernel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ protected function dumpContainer(ConfigCache $cache, ContainerBuilder $container
718718
$fs->dumpFile($dir.$file, $code);
719719
@chmod($dir.$file, 0666 & ~umask());
720720
}
721-
$legacyFile = \dirname($dir.$file).'.legacy';
721+
$legacyFile = \dirname($dir.key($content)).'.legacy';
722722
if (file_exists($legacyFile)) {
723723
@unlink($legacyFile);
724724
}

src/Symfony/Component/Mailer/Bridge/Mailchimp/Transport/MandrillApiTransport.php

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
use Symfony\Component\Mailer\SentMessage;
1818
use Symfony\Component\Mailer\Transport\AbstractApiTransport;
1919
use Symfony\Component\Mime\Email;
20-
use Symfony\Component\Mime\NamedAddress;
2120
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;
2221
use Symfony\Contracts\HttpClient\HttpClientInterface;
2322
use Symfony\Contracts\HttpClient\ResponseInterface;
@@ -76,15 +75,12 @@ private function getPayload(Email $email, Envelope $envelope): array
7675
'html' => $email->getHtmlBody(),
7776
'text' => $email->getTextBody(),
7877
'subject' => $email->getSubject(),
78+
'from_name' => $envelope->getSender()->getName(),
7979
'from_email' => $envelope->getSender()->getAddress(),
8080
'to' => $this->getRecipients($email, $envelope),
8181
],
8282
];
8383

84-
if ($envelope->getSender() instanceof NamedAddress) {
85-
$payload['message']['from_name'] = $envelope->getSender()->getName();
86-
}
87-
8884
foreach ($email->getAttachments() as $attachment) {
8985
$headers = $attachment->getPreparedHeaders();
9086
$disposition = $headers->getHeaderBody('Content-Disposition');
@@ -126,13 +122,10 @@ protected function getRecipients(Email $email, Envelope $envelope): array
126122

127123
$recipientPayload = [
128124
'email' => $recipient->getAddress(),
125+
'name' => $recipient->getName(),
129126
'type' => $type,
130127
];
131128

132-
if ($recipient instanceof NamedAddress) {
133-
$recipientPayload['name'] = $recipient->getName();
134-
}
135-
136129
$recipients[] = $recipientPayload;
137130
}
138131

src/Symfony/Component/Routing/Loader/Configurator/RoutingConfigurator.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ public function __construct(RouteCollection $collection, PhpFileLoader $loader,
3636
final public function import($resource, string $type = null, bool $ignoreErrors = false): ImportConfigurator
3737
{
3838
$this->loader->setCurrentDir(\dirname($this->path));
39-
$imported = $this->loader->import($resource, $type, $ignoreErrors, $this->file);
39+
$imported = $this->loader->import($resource, $type, $ignoreErrors, $this->file) ?: [];
40+
4041
if (!\is_array($imported)) {
4142
return new ImportConfigurator($this->collection, $imported);
4243
}

src/Symfony/Component/Routing/Loader/XmlFileLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ protected function parseImport(RouteCollection $collection, \DOMElement $node, s
166166
$this->setCurrentDir(\dirname($path));
167167

168168
/** @var RouteCollection[] $imported */
169-
$imported = $this->import($resource, ('' !== $type ? $type : null), false, $file);
169+
$imported = $this->import($resource, ('' !== $type ? $type : null), false, $file) ?: [];
170170

171171
if (!\is_array($imported)) {
172172
$imported = [$imported];

src/Symfony/Component/Routing/Loader/YamlFileLoader.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ protected function parseImport(RouteCollection $collection, array $config, strin
185185

186186
$this->setCurrentDir(\dirname($path));
187187

188-
$imported = $this->import($config['resource'], $type, false, $file);
188+
$imported = $this->import($config['resource'], $type, false, $file) ?: [];
189189

190190
if (!\is_array($imported)) {
191191
$imported = [$imported];

src/Symfony/Component/Routing/Tests/Fixtures/controller/empty_wildcard/.gitignore

Whitespace-only changes.

src/Symfony/Component/Routing/Tests/Fixtures/import_with_name_prefix/routing.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,7 @@ api:
55
resource: ../controller/routing.yml
66
name_prefix: api_
77
prefix: /api
8+
9+
empty_wildcard:
10+
resource: ../controller/empty_wildcard/*
11+
prefix: /empty_wildcard

0 commit comments

Comments
 (0)
0