Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3bd625f

Browse filesBrowse files
Merge branch '6.4' into 7.4
* 6.4: [AssetMapper] Render an empty import map as a JSON object [Translation] Fix test failing without the intl extension [Mailer] [Mailchimp] Fix tests on low-deps [HttpFoundation] Add RFC6598 Shared Address Space to IpUtils::PRIVATE_SUBNETS Fix Content-Type key in createRequest method
2 parents 0e92289 + db3c26b commit 3bd625f
Copy full SHA for 3bd625f

7 files changed

+24-2Lines changed: 24 additions & 2 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/Symfony/Component/AssetMapper/ImportMap/ImportMapRenderer.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Component/AssetMapper/ImportMap/ImportMapRenderer.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function render(string|array $entryPoint, array $attributes = []): string
104104
}
105105

106106
$scriptAttributes = $attributes || $this->scriptAttributes ? ' '.$this->createAttributesString($attributes) : '';
107-
$importMapJson = json_encode(['imports' => $importMap], \JSON_THROW_ON_ERROR | \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES | \JSON_HEX_TAG);
107+
$importMapJson = json_encode(['imports' => $importMap ?: new \stdClass()], \JSON_THROW_ON_ERROR | \JSON_PRETTY_PRINT | \JSON_UNESCAPED_SLASHES | \JSON_HEX_TAG);
108108
$output .= <<<HTML
109109
110110
<script type="importmap"$scriptAttributes>
Collapse file

‎src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapRendererTest.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Component/AssetMapper/Tests/ImportMap/ImportMapRendererTest.php
+15Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,4 +229,19 @@ public function testItAddsPreloadLinks()
229229
$this->assertSame(['as' => 'style'], $linkProvider->getLinks()[0]->getAttributes());
230230
$this->assertSame('/assets/styles/app-preload-d1g35t.css', $linkProvider->getLinks()[0]->getHref());
231231
}
232+
233+
public function testEmptyImportMapRendersAsJsonObject()
234+
{
235+
$importMapGenerator = $this->createMock(ImportMapGenerator::class);
236+
$importMapGenerator->expects($this->once())
237+
->method('getImportMapData')
238+
->with([])
239+
->willReturn([]);
240+
241+
$renderer = new ImportMapRenderer($importMapGenerator);
242+
$html = $renderer->render([]);
243+
244+
$this->assertStringContainsString('"imports": {}', $html);
245+
$this->assertStringNotContainsString('"imports": []', $html);
246+
}
232247
}
Collapse file

‎src/Symfony/Component/HttpFoundation/IpUtils.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpFoundation/IpUtils.php
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class IpUtils
2626
'169.254.0.0/16', // RFC3927
2727
'0.0.0.0/8', // RFC5735
2828
'240.0.0.0/4', // RFC1112
29+
'100.64.0.0/10', // RFC6598
2930
'::1/128', // Loopback
3031
'fc00::/7', // Unique Local Address
3132
'fe80::/10', // Link Local Address
Collapse file

‎src/Symfony/Component/HttpFoundation/Tests/IpUtilsTest.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpFoundation/Tests/IpUtilsTest.php
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ public static function getIsPrivateIpData(): array
237237
['169.254.0.1', true],
238238
['0.0.0.1', true],
239239
['240.0.0.1', true],
240+
['100.64.0.1', true],
240241
['::1', true],
241242
['fc00::1', true],
242243
['fe80::1', true],
Collapse file

‎src/Symfony/Component/Mailer/Bridge/Mailchimp/composer.json‎

Copy file name to clipboardExpand all lines: src/Symfony/Component/Mailer/Bridge/Mailchimp/composer.json
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
"conflict": {
2727
"symfony/webhook": "<7.2"
2828
},
29+
"conflict": {
30+
"symfony/mime": "<6.2"
31+
},
2932
"autoload": {
3033
"psr-4": { "Symfony\\Component\\Mailer\\Bridge\\Mailchimp\\": "" },
3134
"exclude-from-classmap": [
Collapse file

‎src/Symfony/Component/Translation/Tests/Catalogue/AbstractOperationTestCase.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Component/Translation/Tests/Catalogue/AbstractOperationTestCase.php
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Symfony\Component\Translation\Tests\Catalogue;
1313

14+
use PHPUnit\Framework\Attributes\RequiresPhpExtension;
1415
use PHPUnit\Framework\TestCase;
1516
use Symfony\Component\Translation\Catalogue\AbstractOperation;
1617
use Symfony\Component\Translation\Exception\LogicException;
@@ -82,6 +83,7 @@ public function testSourceAndTargetWithDifferentLocales()
8283
);
8384
}
8485

86+
#[RequiresPhpExtension('intl')]
8587
public function testMovingMessagesToIntlDomainsKeepsCatalogueMetadata()
8688
{
8789
$target = new MessageCatalogue('en', ['messages' => ['foo' => 'bar']]);
Collapse file

‎src/Symfony/Component/Webhook/Test/AbstractRequestParserTestCase.php‎

Copy file name to clipboardExpand all lines: src/Symfony/Component/Webhook/Test/AbstractRequestParserTestCase.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ protected function getSecret(): string
6363
protected function createRequest(string $payload): Request
6464
{
6565
return Request::create('/', 'POST', [], [], [], [
66-
'Content-Type' => 'application/json',
66+
'CONTENT_TYPE' => 'application/json',
6767
], $payload);
6868
}
6969

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.