Skip to content

Commit 7581f71

Browse files
Merge branch '3.1'
* 3.1: (30 commits) Fix merge [HttpFoundation] Use UPSERT for sessions stored in PgSql >= 9.5 [Console] fixed PHPDoc [Cache] Fix double fetch in ProxyAdapter [travis] HHVM 3.12 LTS Fix feature detection for IE [Form] Fixed collapsed choice attributes [Console] added explanation of messages usage in a progress bar force enabling the external XML entity loaders [Yaml] properly count skipped comment lines [WebProfilerBundle] Fix invalid CSS style 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 Fixed singular of committee Do not inject web debug toolbar on attachments Fixed issue with legacy client initialization [FrameworkBundle] Remove unused variable bumped Symfony version to 3.0.8 updated VERSION for 3.0.7 ...
2 parents 5c91f6e + de03922 commit 7581f71

File tree

42 files changed

+599
-109
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+599
-109
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ env:
2020
matrix:
2121
include:
2222
# Use the newer stack for HHVM as HHVM does not support Precise anymore since a long time and so Precise has an outdated version
23-
- php: hhvm
23+
- php: hhvm-3.12
2424
sudo: required
2525
dist: trusty
2626
group: edge

CHANGELOG-3.0.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,37 @@ in 3.0 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/v3.0.0...v3.0.1
99

10+
* 3.0.7 (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 #18889 [Console] SymfonyStyle: Fix alignment/prefixing of multi-line comments (chalasr)
18+
* bug #18907 [Routing] Fix the annotation loader taking a class constant as a beginning of a class name (jakzal, nicolas-grekas)
19+
* bug #18879 [Console] SymfonyStyle: Align multi-line/very-long-line blocks (chalasr)
20+
* bug #18864 [Console][DX] Fixed ambiguous error message when using a duplicate option shortcut (peterrehm)
21+
* bug #18883 Fix js comment in profiler (linnaea)
22+
* bug #18844 [Yaml] fix exception contexts (xabbuh)
23+
* bug #18840 [Yaml] properly handle unindented collections (xabbuh)
24+
* bug #18765 Catch \Throwable (fprochazka)
25+
* bug #18813 Catch \Throwable (fprochazka)
26+
* bug #18839 People - person singularization (Keeo)
27+
* bug #18828 [Yaml] chomp newlines only at the end of YAML documents (xabbuh)
28+
* bug #18814 Fixed server status command when port has been omitted (peterrehm)
29+
* bug #18759 [Validator] Support for DateTimeImmutable (krzysiekpiasecki)
30+
* bug #18799 Use levenshtein level for better Bundle matching (j0k3r)
31+
* bug #18413 [WebProfilerBundle] Fix CORS ajax security issues (romainneutron)
32+
* bug #18774 [console][table] adjust width of colspanned cell. (aitboudad)
33+
* bug #18507 [BUG] Delete class 'control-group' in bootstrap 3 (Philippe Degeeter)
34+
* bug #18747 [Form] Modified iterator_to_array's 2nd parameter to false in ViolationMapper (issei-m)
35+
* bug #18635 [Console] Prevent fatal error when calling Command::getHelper without helperSet (chalasr)
36+
* bug #18686 [console][table] adjust width of colspanned cell. (aitboudad)
37+
* bug #18761 [Form] Modified iterator_to_array's 2nd parameter to false in ViolationMapper (issei-m)
38+
* bug #18745 [MonologBridge] Uninstallable together with symfony/http-kernel in 3.0.6 (ymc-dabe)
39+
* bug #18737 [Debug] Fix fatal error handlers on PHP 7 (nicolas-grekas)
40+
1041
* 3.0.6 (2016-05-10)
1142

1243
* security #18736 Fixed issue with blank password with Ldap (csarrazi)

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/Bridge/Doctrine/DependencyInjection/AbstractDoctrineExtension.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,7 @@ protected function loadCacheDriver($cacheName, $objectManagerName, array $cacheD
372372
$cacheDef->addMethodCall('setRedis', array(new Reference($this->getObjectManagerElementName(sprintf('%s_redis_instance', $objectManagerName)))));
373373
break;
374374
case 'apc':
375+
case 'apcu':
375376
case 'array':
376377
case 'xcache':
377378
case 'wincache':

src/Symfony/Bridge/Doctrine/HttpFoundation/DbalSessionHandler.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ public function write($sessionId, $data)
180180
$updateStmt->bindValue(':time', time(), \PDO::PARAM_INT);
181181
$updateStmt->execute();
182182

183-
// When MERGE is not supported, like in Postgres, we have to use this approach that can result in
183+
// When MERGE is not supported, like in Postgres < 9.5, we have to use this approach that can result in
184184
// duplicate key errors when the same session is written simultaneously. We can just catch such an
185185
// error and re-execute the update. This is similar to a serializable transaction with retry logic
186186
// on serialization failures but without the overhead and without possible false positives due to
@@ -224,11 +224,11 @@ private function getMergeSql()
224224
{
225225
$platform = $this->con->getDatabasePlatform()->getName();
226226

227-
switch ($platform) {
228-
case 'mysql':
227+
switch (true) {
228+
case 'mysql' === $platform:
229229
return "INSERT INTO $this->table ($this->idCol, $this->dataCol, $this->timeCol) VALUES (:id, :data, :time) ".
230230
"ON DUPLICATE KEY UPDATE $this->dataCol = VALUES($this->dataCol), $this->timeCol = VALUES($this->timeCol)";
231-
case 'oracle':
231+
case 'oracle' === $platform:
232232
// DUAL is Oracle specific dummy table
233233
return "MERGE INTO $this->table USING DUAL ON ($this->idCol = :id) ".
234234
"WHEN NOT MATCHED THEN INSERT ($this->idCol, $this->dataCol, $this->timeCol) VALUES (:id, :data, :time) ".
@@ -239,8 +239,11 @@ private function getMergeSql()
239239
return "MERGE INTO $this->table WITH (HOLDLOCK) USING (SELECT 1 AS dummy) AS src ON ($this->idCol = :id) ".
240240
"WHEN NOT MATCHED THEN INSERT ($this->idCol, $this->dataCol, $this->timeCol) VALUES (:id, :data, :time) ".
241241
"WHEN MATCHED THEN UPDATE SET $this->dataCol = :data, $this->timeCol = :time;";
242-
case 'sqlite':
242+
case 'sqlite' === $platform:
243243
return "INSERT OR REPLACE INTO $this->table ($this->idCol, $this->dataCol, $this->timeCol) VALUES (:id, :data, :time)";
244+
case 'postgresql' === $platform && version_compare($this->con->getServerVersion(), '9.5', '>='):
245+
return "INSERT INTO $this->table ($this->idCol, $this->dataCol, $this->timeCol) VALUES (:id, :data, :time) ".
246+
"ON CONFLICT ($this->idCol) DO UPDATE SET ($this->dataCol, $this->timeCol) = (:data, :time) WHERE $this->idCol = :id";
244247
}
245248
}
246249
}

src/Symfony/Bridge/Doctrine/Tests/DependencyInjection/DoctrineExtensionTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ public function providerBasicDrivers()
174174
{
175175
return array(
176176
array('doctrine.orm.cache.apc.class', array('type' => 'apc')),
177+
array('doctrine.orm.cache.apcu.class', array('type' => 'apcu')),
177178
array('doctrine.orm.cache.array.class', array('type' => 'array')),
178179
array('doctrine.orm.cache.xcache.class', array('type' => 'xcache')),
179180
array('doctrine.orm.cache.wincache.class', array('type' => 'wincache')),

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ public function load(array $configs, ContainerBuilder $container)
128128
$this->registerFragmentsConfiguration($config['fragments'], $container, $loader);
129129
$this->registerTranslatorConfiguration($config['translator'], $container);
130130
$this->registerProfilerConfiguration($config['profiler'], $container, $loader);
131-
$this->registerCacheConfiguration($config['cache'], $container, $loader);
131+
$this->registerCacheConfiguration($config['cache'], $container);
132132

133133
if ($this->isConfigEnabled($container, $config['router'])) {
134134
$this->registerRouterConfiguration($config['router'], $container, $loader);
@@ -1037,7 +1037,7 @@ private function registerPropertyInfoConfiguration(array $config, ContainerBuild
10371037
}
10381038
}
10391039

1040-
private function registerCacheConfiguration(array $config, ContainerBuilder $container, XmlFileLoader $loader)
1040+
private function registerCacheConfiguration(array $config, ContainerBuilder $container)
10411041
{
10421042
$version = substr(str_replace('/', '-', base64_encode(md5(uniqid(mt_rand(), true), true))), 0, -2);
10431043
$container->getDefinition('cache.adapter.apcu')->replaceArgument(2, $version);
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
id="<?php echo $view->escape($id) ?>" name="<?php echo $view->escape($full_name) ?>"
2+
<?php if ($disabled): ?>disabled="disabled" <?php endif ?>
3+
<?php foreach ($choice_attr as $k => $v): ?>
4+
<?php if ($v === true): ?>
5+
<?php printf('%s="%s" ', $view->escape($k), $view->escape($k)) ?>
6+
<?php elseif ($v !== false): ?>
7+
<?php printf('%s="%s" ', $view->escape($k), $view->escape($v)) ?>
8+
<?php endif ?>
9+
<?php endforeach ?>

src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_widget_options.html.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
<?php echo $formHelper->block($form, 'choice_widget_options', array('choices' => $choice)) ?>
99
</optgroup>
1010
<?php else: ?>
11-
<option value="<?php echo $view->escape($choice->value) ?>" <?php echo $view['form']->block($form, 'attributes', array('attr' => $choice->attr)) ?><?php if ($is_selected($choice->value, $value)): ?> selected="selected"<?php endif?>><?php echo $view->escape(false !== $choice_translation_domain ? $translatorHelper->trans($choice->label, array(), $choice_translation_domain) : $choice->label) ?></option>
11+
<option value="<?php echo $view->escape($choice->value) ?>" <?php echo $formHelper->block($form, 'choice_attributes', array('choice_attr' => $choice->attr)) ?><?php if ($is_selected($choice->value, $value)): ?> selected="selected"<?php endif?>><?php echo $view->escape(false !== $choice_translation_domain ? $translatorHelper->trans($choice->label, array(), $choice_translation_domain) : $choice->label) ?></option>
1212
<?php endif ?>
1313
<?php endforeach ?>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ public function onKernelResponse(FilterResponseEvent $event)
103103
|| $response->isRedirection()
104104
|| ($response->headers->has('Content-Type') && false === strpos($response->headers->get('Content-Type'), 'html'))
105105
|| 'html' !== $request->getRequestFormat()
106+
|| false !== stripos($response->headers->get('Content-Disposition'), 'attachment;')
106107
) {
107108
return;
108109
}

0 commit comments

Comments
 (0)