Skip to content

Commit e44cac0

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: Added progressive jpeg to mime types guesser [Yaml] Fix wrong line number when comments are inserted in the middle of a block. Fixed singular of committee Do not inject web debug toolbar on attachments bumped Symfony version to 2.7.15 updated VERSION for 2.7.14 update CONTRIBUTORS for 2.7.14 updated CHANGELOG for 2.7.14 [Console] [SymfonyStyle] Replace long word wrapping test to directly test output
2 parents b98b214 + 326465d commit e44cac0

File tree

14 files changed

+200
-36
lines changed

14 files changed

+200
-36
lines changed

CHANGELOG-2.7.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,32 @@ in 2.7 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/v2.7.0...v2.7.1
99

10+
* 2.7.14 (2016-06-06)
11+
12+
* bug #18908 [DependencyInjection] force enabling the external XML entity loaders (xabbuh)
13+
* bug #18893 [DependencyInjection] Skip deep reference check for 'service_container' (RobertMe)
14+
* bug #18812 Catch \Throwable (fprochazka)
15+
* bug #18821 [Form] Removed UTC specification with timestamp (francisbesset)
16+
* bug #18861 Fix for #18843 (inso)
17+
* bug #18907 [Routing] Fix the annotation loader taking a class constant as a beginning of a class name (jakzal, nicolas-grekas)
18+
* bug #18879 [Console] SymfonyStyle: Align multi-line/very-long-line blocks (chalasr)
19+
* bug #18864 [Console][DX] Fixed ambiguous error message when using a duplicate option shortcut (peterrehm)
20+
* bug #18883 Fix js comment in profiler (linnaea)
21+
* bug #18844 [Yaml] fix exception contexts (xabbuh)
22+
* bug #18840 [Yaml] properly handle unindented collections (xabbuh)
23+
* bug #18813 Catch \Throwable (fprochazka)
24+
* bug #18839 People - person singularization (Keeo)
25+
* bug #18828 [Yaml] chomp newlines only at the end of YAML documents (xabbuh)
26+
* bug #18814 Fixed server status command when port has been omitted (peterrehm)
27+
* bug #18799 Use levenshtein level for better Bundle matching (j0k3r)
28+
* bug #18413 [WebProfilerBundle] Fix CORS ajax security issues (romainneutron)
29+
* bug #18507 [BUG] Delete class 'control-group' in bootstrap 3 (Philippe Degeeter)
30+
* bug #18747 [Form] Modified iterator_to_array's 2nd parameter to false in ViolationMapper (issei-m)
31+
* bug #18635 [Console] Prevent fatal error when calling Command::getHelper without helperSet (chalasr)
32+
* bug #18686 [console][table] adjust width of colspanned cell. (aitboudad)
33+
* bug #18761 [Form] Modified iterator_to_array's 2nd parameter to false in ViolationMapper (issei-m)
34+
* bug #18737 [Debug] Fix fatal error handlers on PHP 7 (nicolas-grekas)
35+
1036
* 2.7.13 (2016-05-09)
1137

1238
* security #18733 limited the maximum length of a submitted username (fabpot)

CONTRIBUTORS.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ Symfony is the result of the work of many people who made the code better
3939
- Maxime Steinhausser (ogizanagi)
4040
- Alexandre Salomé (alexandresalome)
4141
- William Durand (couac)
42-
- ornicar
4342
- Jules Pietri (heah)
43+
- ornicar
4444
- stealth35 ‏ (stealth35)
4545
- Alexander Mols (asm89)
4646
- Francis Besset (francisbesset)
@@ -65,9 +65,9 @@ Symfony is the result of the work of many people who made the code better
6565
- Dariusz Górecki (canni)
6666
- Arnout Boks (aboks)
6767
- Iltar van der Berg (kjarli)
68+
- Charles Sarrazin (csarrazi)
6869
- Ener-Getick (energetick)
6970
- Douglas Greenshields (shieldo)
70-
- Charles Sarrazin (csarrazi)
7171
- Lee McDermott
7272
- Brandon Turner
7373
- Luis Cordova (cordoval)
@@ -187,6 +187,7 @@ Symfony is the result of the work of many people who made the code better
187187
- Loïc Faugeron
188188
- Jannik Zschiesche (apfelbox)
189189
- Marco Pivetta (ocramius)
190+
- Teoh Han Hui (teohhanhui)
190191
- julien pauli (jpauli)
191192
- Michael Lee (zerustech)
192193
- Lorenz Schori
@@ -213,6 +214,7 @@ Symfony is the result of the work of many people who made the code better
213214
- Pierre-Yves LEBECQ (pylebecq)
214215
- Daniel Espendiller
215216
- Jakub Kucharovic (jkucharovic)
217+
- Robin Chalas (chalas_r)
216218
- Eugene Leonovich (rybakit)
217219
- Filippo Tessarotto
218220
- Joseph Rouff (rouffj)
@@ -275,7 +277,6 @@ Symfony is the result of the work of many people who made the code better
275277
- janschoenherr
276278
- Thomas Schulz (king2500)
277279
- Berny Cantos (xphere81)
278-
- Teoh Han Hui (teohhanhui)
279280
- Ricard Clau (ricardclau)
280281
- Mark Challoner (markchalloner)
281282
- Gregor Harlan (gharlan)
@@ -310,7 +311,6 @@ Symfony is the result of the work of many people who made the code better
310311
- Philipp Kräutli (pkraeutli)
311312
- Kirill chEbba Chebunin (chebba)
312313
- Greg Thornton (xdissent)
313-
- Robin Chalas (chalas_r)
314314
- Costin Bereveanu (schniper)
315315
- Loïc Chardonnet (gnusat)
316316
- Marek Kalnik (marekkalnik)
@@ -1414,6 +1414,7 @@ Symfony is the result of the work of many people who made the code better
14141414
- Damon Jones (damon__jones)
14151415
- David Badura (davidbadura)
14161416
- Daniel Londero (dlondero)
1417+
- Sebastian Landwehr (dword123)
14171418
- Adel ELHAIBA (eadel)
14181419
- Damián Nohales (eagleoneraptor)
14191420
- Elliot Anderson (elliot)

src/Symfony/Bundle/WebProfilerBundle/EventListener/WebDebugToolbarListener.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ public function onKernelResponse(FilterResponseEvent $event)
9898
|| $response->isRedirection()
9999
|| ($response->headers->has('Content-Type') && false === strpos($response->headers->get('Content-Type'), 'html'))
100100
|| 'html' !== $request->getRequestFormat()
101+
|| false !== stripos($response->headers->get('Content-Disposition'), 'attachment;')
101102
) {
102103
return;
103104
}

src/Symfony/Bundle/WebProfilerBundle/Tests/EventListener/WebDebugToolbarListenerTest.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,21 @@ public function testToolbarIsInjected()
8282
$this->assertEquals("<html><head></head><body>\nWDT\n</body></html>", $response->getContent());
8383
}
8484

85+
/**
86+
* @depends testToolbarIsInjected
87+
*/
88+
public function testToolbarIsNotInjectedOnContentDispositionAttachment()
89+
{
90+
$response = new Response('<html><head></head><body></body></html>');
91+
$response->headers->set('Content-Disposition', 'attachment; filename=test.html');
92+
$event = new FilterResponseEvent($this->getKernelMock(), $this->getRequestMock(false, 'html'), HttpKernelInterface::MASTER_REQUEST, $response);
93+
94+
$listener = new WebDebugToolbarListener($this->getTwigMock());
95+
$listener->onKernelResponse($event);
96+
97+
$this->assertEquals('<html><head></head><body></body></html>', $response->getContent());
98+
}
99+
85100
/**
86101
* @depends testToolbarIsInjected
87102
* @dataProvider provideRedirects

src/Symfony/Component/Console/Tests/Fixtures/Style/SymfonyStyle/command/command_11.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44
use Symfony\Component\Console\Output\OutputInterface;
55
use Symfony\Component\Console\Tests\Style\SymfonyStyleWithForcedLineLength;
66

7-
//Ensure that all lines are aligned to the begin of the first one and start with '//' in a very long line comment
7+
// ensure long words are properly wrapped in blocks
88
return function (InputInterface $input, OutputInterface $output) {
9-
$output = new SymfonyStyleWithForcedLineLength($input, $output);
10-
$output->comment(
11-
'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum'
12-
);
9+
$word = 'Lopadotemachoselachogaleokranioleipsanodrimhypotrimmatosilphioparaomelitokatakechymenokichlepikossyphophattoperisteralektryonoptekephalliokigklopeleiolagoiosiraiobaphetraganopterygon';
10+
$sfStyle = new SymfonyStyleWithForcedLineLength($input, $output);
11+
$sfStyle->block($word, 'CUSTOM', 'fg=white;bg=blue', ' § ', false);
1312
};
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
use Symfony\Component\Console\Input\InputInterface;
4+
use Symfony\Component\Console\Output\OutputInterface;
5+
use Symfony\Component\Console\Tests\Style\SymfonyStyleWithForcedLineLength;
6+
7+
// ensure that all lines are aligned to the begin of the first one and start with '//' in a very long line comment
8+
return function (InputInterface $input, OutputInterface $output) {
9+
$output = new SymfonyStyleWithForcedLineLength($input, $output);
10+
$output->comment(
11+
'Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum'
12+
);
13+
};
Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11

2-
// Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
3-
// aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
4-
// Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur
5-
// sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
2+
§ [CUSTOM] Lopadotemachoselachogaleokranioleipsanodrimhypotrimmatosilphioparaomelitokatakechymenokichlepikossyphophatto
3+
§ peristeralektryonoptekephalliokigklopeleiolagoiosiraiobaphetraganopterygon
64

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
2+
// Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
3+
// aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
4+
// Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur
5+
// sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
6+

src/Symfony/Component/Console/Tests/Style/SymfonyStyleTest.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -54,22 +54,6 @@ public function inputCommandToOutputFilesProvider()
5454

5555
return array_map(null, glob($baseDir.'/command/command_*.php'), glob($baseDir.'/output/output_*.txt'));
5656
}
57-
58-
public function testLongWordsBlockWrapping()
59-
{
60-
$word = 'Lopadotemachoselachogaleokranioleipsanodrimhypotrimmatosilphioparaomelitokatakechymenokichlepikossyphophattoperisteralektryonoptekephalliokigklopeleiolagoiosiraiobaphetraganopterygovgollhjvhvljfezefeqifzeiqgiqzhrsdgihqzridghqridghqirshdghdghieridgheirhsdgehrsdvhqrsidhqshdgihrsidvqhneriqsdvjzergetsrfhgrstsfhsetsfhesrhdgtesfhbzrtfbrztvetbsdfbrsdfbrn';
61-
$wordLength = strlen($word);
62-
$maxLineLength = SymfonyStyle::MAX_LINE_LENGTH - 3;
63-
64-
$this->command->setCode(function (InputInterface $input, OutputInterface $output) use ($word) {
65-
$sfStyle = new SymfonyStyleWithForcedLineLength($input, $output);
66-
$sfStyle->block($word, 'CUSTOM', 'fg=white;bg=blue', ' § ', false);
67-
});
68-
69-
$this->tester->execute(array(), array('interactive' => false, 'decorated' => false));
70-
$expectedCount = (int) ceil($wordLength / ($maxLineLength)) + (int) ($wordLength > $maxLineLength - 5);
71-
$this->assertSame($expectedCount, substr_count($this->tester->getDisplay(true), ' § '));
72-
}
7357
}
7458

7559
/**

src/Symfony/Component/HttpFoundation/File/MimeType/MimeTypeExtensionGuesser.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,7 @@ class MimeTypeExtensionGuesser implements ExtensionGuesserInterface
661661
'image/gif' => 'gif',
662662
'image/ief' => 'ief',
663663
'image/jpeg' => 'jpeg',
664+
'image/pjpeg' => 'jpeg',
664665
'image/ktx' => 'ktx',
665666
'image/png' => 'png',
666667
'image/prs.btif' => 'btif',

0 commit comments

Comments
 (0)