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 c2c6a01

Browse filesBrowse files
Merge branch '4.4'
* 4.4: [Intl] Improve the error message when country code is wrong Fix tests [Intl][4.3] Cleanup internal api [HttpFoundation] Do not set X-Accel-Redirect for paths outside of X-Accel-Mapping bumped Symfony version to 4.2.10 updated VERSION for 4.2.9 updated CHANGELOG for 4.2.9 Use AsserEquals for floating-point values
2 parents 2bf74ce + 5af3e54 commit c2c6a01
Copy full SHA for c2c6a01

File tree

Expand file treeCollapse file tree

8 files changed

+88
-5
lines changed
Filter options
Expand file treeCollapse file tree

8 files changed

+88
-5
lines changed

‎CHANGELOG-4.2.md

Copy file name to clipboardExpand all lines: CHANGELOG-4.2.md
+29Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,35 @@ in 4.2 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.2.0...v4.2.1
99

10+
* 4.2.9 (2019-05-28)
11+
12+
* bug #31584 [Workflow] Do not trigger extra guards (lyrixx)
13+
* bug #31632 [Messenger] Use "real" memory usage to honor --memory-limit (chalasr)
14+
* bug #31599 [Translation] Fixed issue with new vs old TranslatorInterface in TranslationDataCollector (althaus)
15+
* bug #31349 [WebProfilerBundle] Use absolute URL for profiler links (Alumbrados)
16+
* bug #31541 [DI] fix using bindings with locators of service subscribers (nicolas-grekas)
17+
* bug #31568 [Process] Fix infinite waiting for stopped process (mshavliuk)
18+
* bug #31551 [ProxyManager] isProxyCandidate() does not take into account interfaces (andrerom)
19+
* bug #31335 [Doctrine] Respect parent class contract in ContainerAwareEventManager (Koc)
20+
* bug #31421 [Routing][AnnotationClassLoader] fix utf-8 encoding in default route name (przemyslaw-bogusz)
21+
* bug #31510 Use the current working dir as default first arg in 'link' binary (lyrixx)
22+
* bug #31524 [HttpFoundation] prevent deprecation when filesize matches error code (xabbuh)
23+
* bug #31535 [Debug] Wrap call to require_once in a try/catch (lyrixx)
24+
* bug #31477 [PropertyAccess] Add missing property to PropertyAccessor (vudaltsov)
25+
* bug #31479 [Cache] fix saving unrelated keys in recursive callback calls (nicolas-grekas)
26+
* bug #31438 [Serializer] Fix denormalization of object with variadic constructor typed argument (ajgarlag)
27+
* bug #31445 [Messenger] Making cache rebuild correctly when message subscribers change (weaverryan)
28+
* bug #31442 [Validator] Fix finding translator parent definition in compiler pass (deguif)
29+
* bug #31475 [HttpFoundation] Allow set 'None' on samesite cookie flag (markitosgv)
30+
* bug #31456 Remove deprecated usage of some Twig features (fabpot)
31+
* bug #31207 [Routing] Fixed unexpected 404 NoConfigurationException (yceruto)
32+
* bug #31261 [Console] Commands with an alias should not be recognized as ambiguous when using register (Simperfit)
33+
* bug #31371 [DI] Removes number of elements information in debug mode (jschaedl)
34+
* bug #31418 [FrameworkBundle] clarify the possible class/interface of the cache (xabbuh)
35+
* bug #31411 [Intl] Fix root fallback locale (ro0NL)
36+
* bug #31377 [Console] Fix auto-complete for ChoiceQuestion (multi-select answers) (battye)
37+
* bug #31380 [WebProfilerBundle] Don't filter submitted IP values (javiereguiluz)
38+
1039
* 4.2.8 (2019-05-01)
1140

1241
* bug #31338 Revert "bug #30620 [FrameworkBundle][HttpFoundation] make session service resettable (dmaicher)" (nicolas-grekas)

‎src/Symfony/Component/Form/Tests/Extension/Core/Type/TimezoneTypeTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Form/Tests/Extension/Core/Type/TimezoneTypeTest.php
+22Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,17 @@ public function testIntlTimeZoneInput()
122122
*/
123123
public function testIntlTimeZoneInputWithBc()
124124
{
125+
$reflector = new \ReflectionExtension('intl');
126+
ob_start();
127+
$reflector->info();
128+
$output = strip_tags(ob_get_clean());
129+
preg_match('/^ICU TZData version (?:=>)?(.*)$/m', $output, $matches);
130+
$tzDbVersion = isset($matches[1]) ? (int) trim($matches[1]) : 0;
131+
132+
if (!$tzDbVersion || 2017 <= $tzDbVersion) {
133+
$this->markTestSkipped('"Europe/Saratov" is expired until 2017, current version is '.$tzDbVersion);
134+
}
135+
125136
$form = $this->factory->create(static::TESTED_TYPE, null, ['input' => 'intltimezone']);
126137
$form->submit('Europe/Saratov');
127138

@@ -134,6 +145,17 @@ public function testIntlTimeZoneInputWithBc()
134145
*/
135146
public function testIntlTimeZoneInputWithBcAndIntl()
136147
{
148+
$reflector = new \ReflectionExtension('intl');
149+
ob_start();
150+
$reflector->info();
151+
$output = strip_tags(ob_get_clean());
152+
preg_match('/^ICU TZData version (?:=>)?(.*)$/m', $output, $matches);
153+
$tzDbVersion = isset($matches[1]) ? (int) trim($matches[1]) : 0;
154+
155+
if (!$tzDbVersion || 2017 <= $tzDbVersion) {
156+
$this->markTestSkipped('"Europe/Saratov" is expired until 2017, current version is '.$tzDbVersion);
157+
}
158+
137159
$form = $this->factory->create(static::TESTED_TYPE, null, ['input' => 'intltimezone', 'intl' => true]);
138160
$form->submit('Europe/Saratov');
139161

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpFoundation/BinaryFileResponse.php
+7-2Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,12 +223,17 @@ public function prepare(Request $request)
223223
list($pathPrefix, $location) = $part;
224224
if (substr($path, 0, \strlen($pathPrefix)) === $pathPrefix) {
225225
$path = $location.substr($path, \strlen($pathPrefix));
226+
// Only set X-Accel-Redirect header if a valid URI can be produced
227+
// as nginx does not serve arbitrary file paths.
228+
$this->headers->set($type, $path);
229+
$this->maxlen = 0;
226230
break;
227231
}
228232
}
233+
} else {
234+
$this->headers->set($type, $path);
235+
$this->maxlen = 0;
229236
}
230-
$this->headers->set($type, $path);
231-
$this->maxlen = 0;
232237
} elseif ($request->headers->has('Range')) {
233238
// Process the range headers.
234239
if (!$request->headers->has('If-Range') || $this->hasValidIfRangeHeader($request->headers->get('If-Range'))) {

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,7 @@ public function getSampleXAccelMappings()
339339
['/var/www/var/www/files/foo.txt', '/var/www/=/files/', '/files/var/www/files/foo.txt'],
340340
['/home/Foo/bar.txt', '/var/www/=/files/,/home/Foo/=/baz/', '/baz/bar.txt'],
341341
['/home/Foo/bar.txt', '"/var/www/"="/files/", "/home/Foo/"="/baz/"', '/baz/bar.txt'],
342+
['/tmp/bar.txt', '"/var/www/"="/files/", "/home/Foo/"="/baz/"', null],
342343
];
343344
}
344345

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpFoundation/Tests/JsonResponseTest.php
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ public function testConstructorWithSimpleTypes()
4343
$this->assertSame('0', $response->getContent());
4444

4545
$response = new JsonResponse(0.1);
46-
$this->assertSame('0.1', $response->getContent());
46+
$this->assertEquals('0.1', $response->getContent());
47+
$this->assertInternalType('string', $response->getContent());
4748

4849
$response = new JsonResponse(true);
4950
$this->assertSame('true', $response->getContent());
@@ -131,7 +132,8 @@ public function testStaticCreateWithSimpleTypes()
131132

132133
$response = JsonResponse::create(0.1);
133134
$this->assertInstanceOf('Symfony\Component\HttpFoundation\JsonResponse', $response);
134-
$this->assertSame('0.1', $response->getContent());
135+
$this->assertEquals('0.1', $response->getContent());
136+
$this->assertInternalType('string', $response->getContent());
135137

136138
$response = JsonResponse::create(true);
137139
$this->assertInstanceOf('Symfony\Component\HttpFoundation\JsonResponse', $response);

‎src/Symfony/Component/Intl/Tests/TimezonesTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Intl/Tests/TimezonesTest.php
+9Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,15 @@ public function testForCountryCodeWithUnknownCountry()
603603
Timezones::forCountryCode('foobar');
604604
}
605605

606+
/**
607+
* @expectedException \Symfony\Component\Intl\Exception\MissingResourceException
608+
* @expectedExceptionMessage Country codes must be in uppercase, but "nl" was passed. Try with "NL" country code instead.
609+
*/
610+
public function testForCountryCodeWithWrongCountryCode()
611+
{
612+
Timezones::forCountryCode('nl');
613+
}
614+
606615
/**
607616
* @expectedException \Symfony\Component\Intl\Exception\MissingResourceException
608617
*/

‎src/Symfony/Component/Intl/Timezones.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Intl/Timezones.php
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ public static function forCountryCode(string $country): array
109109
return [];
110110
}
111111

112+
if (Countries::exists(strtoupper($country))) {
113+
throw new MissingResourceException(sprintf('Country codes must be in uppercase, but "%s" was passed. Try with "%s" country code instead.', $country, strtoupper($country)));
114+
}
115+
112116
throw $e;
113117
}
114118
}

‎src/Symfony/Component/Validator/Tests/Constraints/TimezoneValidatorTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Validator/Tests/Constraints/TimezoneValidatorTest.php
+12-1Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function getValidTimezones(): iterable
7676
yield ['PST8PDT'];
7777
yield ['America/Montreal'];
7878

79-
// expired in ICU
79+
// previously expired in ICU
8080
yield ['Europe/Saratov'];
8181

8282
// standard
@@ -316,6 +316,17 @@ public function getDeprecatedTimezones(): iterable
316316
*/
317317
public function testIntlCompatibility()
318318
{
319+
$reflector = new \ReflectionExtension('intl');
320+
ob_start();
321+
$reflector->info();
322+
$output = strip_tags(ob_get_clean());
323+
preg_match('/^ICU TZData version (?:=>)?(.*)$/m', $output, $matches);
324+
$tzDbVersion = isset($matches[1]) ? (int) trim($matches[1]) : 0;
325+
326+
if (!$tzDbVersion || 2017 <= $tzDbVersion) {
327+
$this->markTestSkipped('"Europe/Saratov" is expired until 2017, current version is '.$tzDbVersion);
328+
}
329+
319330
$constraint = new Timezone([
320331
'message' => 'myMessage',
321332
'intlCompatible' => true,

0 commit comments

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