Skip to content

Commit 222701f

Browse files
committed
Merge branch '2.7' into 2.8
* 2.7: [HttpKernel] fixed a regression when no exception listeners are registered renamed some confusing tests propel/propel1 is now useless bumped Symfony version to 2.7.0 updated VERSION for 2.7.0-BETA1 updated CHANGELOG for 2.7.0-BETA1 [2.3] Fix @link annotations [2.7] For @link annotations [2.6] Fix @link annotations [2.7][Console] Count the array instead of [Config][cache factory] check type of callback argument. Fix javascript [2.3][Translation] test refresh cache when resources File change. Added deprecation message and original color back [Translator] Cache does not take fallback locales into consideration
2 parents 38374f9 + 3761140 commit 222701f

File tree

26 files changed

+241
-44
lines changed

26 files changed

+241
-44
lines changed

CHANGELOG-2.7.md

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
CHANGELOG for 2.7.x
2+
===================
3+
4+
This changelog references the relevant changes (bug and security fixes) done
5+
in 2.7 minor versions.
6+
7+
To get the diff for a specific change, go to https://github.com/symfony/symfony/commit/XXX where XXX is the change hash
8+
To get the diff between two versions, go to https://github.com/symfony/symfony/compare/v2.7.0...v2.7.1
9+
10+
* 2.7.0-BETA1 (2015-04-10)
11+
12+
* feature #14229 [WebProfilerBundle] AJAX links (romqin)
13+
* feature #13220 [Console] Made output docopt compatible (WouterJ)
14+
* feature #14178 [Config] Delegate creation of ConfigCache instances to a factory. (mpdude)
15+
* feature #13443 [Translation][Command][FrameworkBundle] Enable translation debugging in directories (xelaris)
16+
* feature #14198 Automatically start server:run if server:start failed (WouterJ)
17+
* feature #13651 [Form][choice] added choice_translation_domain to avoid trans options. (aitboudad)
18+
* feature #14185 [Translation][Profiler]added the number of times a translation has been used. (aitboudad)
19+
* feature #13717 Deprecated precision option in favor of scale (WouterJ)
20+
* feature #14159 [Debug] Add symfony_debug_backtrace() and use it when dealing with fatal errors (jpauli, nicolas-grekas)
21+
* feature #14192 [HttpKernel] Embed the original exception as previous to bounced exceptions (nicolas-grekas)
22+
* feature #13626 [WebProfilerBundle] Added feedback about the current symfony version (WouterJ)
23+
* feature #13554 [TwigBundle] make date formats and number formats configurable (xabbuh)
24+
* feature #14196 Tweaked some console command styles (javiereguiluz)
25+
* feature #14181 [Debug] Updated the default log level when a PHP error occurs (lyrixx)
26+
* feature #14186 [Debug] Renamed "context" key to "scope_vars" to avoid any ambiguity (lyrixx)
27+
* feature #13942 [Translation] generate translation cache at warmup (xavierleune)
28+
* feature #14116 [FrameworkBundle] Move lint commands to lint namespace. (aitboudad)
29+
* feature #14052 [FrameworkBundle] added a protected shortcut getParameter() method in the base Controller class. (hhamon)
30+
* feature #14080 [VarDumper] Add casters for Reflection* classes (nicolas-grekas)
31+
* feature #14050 [Form] Refactored choice lists to support dynamic label, value, index and attribute generation (webmozart)
32+
* feature #14079 [VarDumper] Add and use Caster::PREFIX_* consts (nicolas-grekas)
33+
* feature #14057 [RFC][Console] Added console style guide helpers (v2) (kbond)
34+
* feature #14077 [VarDumper] Add VarDumperTestCase and related trait (nicolas-grekas)
35+
* feature #14058 [VarDumper] Add filters to casters (nicolas-grekas)
36+
* feature #14003 [Translation][Profiler] Added a Translation profiler. (aitboudad)
37+
* feature #14002 [Translation][Extractor] Allow extracting an array of files besides extracting a directory (marcosdsanchez)
38+
* feature #13438 [Console][Table] Add support for colspan/rowspan + multiple header lines (aitboudad)
39+
* feature #14071 [VarDumper] Ctrl+click toggles-all and fix IE8 support (larsborn, nicolas-grekas)
40+
* feature #13981 [Translation] merge all fallback catalogues messages into current catalo... (aitboudad)
41+
* feature #14006 [VarDumper] with-er interface for Cloner\Data (nicolas-grekas)
42+
* feature #14034 [VarDumper] add caster for MongoCursor objects (nicolas-grekas)
43+
* feature #14030 [DependencyInjection] make it possible to dump inlined services to XML (xabbuh)
44+
* feature #14016 Remove the API version in the validator component (saro0h, fabpot, stof)
45+
* feature #13960 [VarDumper] Add Caster for XML-parser resources (nicolas-grekas)
46+
* feature #13937 [FrameworkBundle] Allow to disable Kernel reboot (sroze)
47+
* feature #13892 [DependencyInjection] Improved yaml syntax (hason)
48+
* feature #14000 [SECURITY][ACL] fixed Base ACL exceptions on the RuntimeException (Neophy7e)
49+
* feature #14001 [Security] [ACL] Improved MaskBuilder and PermissionMap (AlexDpy)
50+
* feature #13959 [VarDumper] Add catch-all-objects hook for casters (nicolas-grekas)
51+
* feature #13980 [VarDumper] Added support for amqp (lyrixx)
52+
* feature #12818 [SecurityBundle] Added a command to encode a password (saro0h)
53+
* feature #13107 [FrameworkBundle] Serializer groups support (dunglas)
54+
* feature #13872 [FrameworkBundle] Added domain column when debugging translations (hiddewie)
55+
* feature #13780 [HttpKernel] Throw a LogicException when kernel.exception does not lead to a Response (nicolas-grekas)
56+
* feature #13897 [translation][performances] move loading resources into Translator initialize. (aitboudad)
57+
* feature #13864 Entity type: loader caching by query builder instance (dominikzogg)
58+
* feature #13855 Read validation contraints from Resources/config/validation/ sub-dir (GromNaN)
59+
* feature #13257 [Serializer] ObjectNormalizer (dunglas)
60+
* feature #13795 [Serializer] Refactoring of metadata (dunglas)
61+
* feature #13840 [WebProfilerBundle] Update ajax calls in toolbar to add the css error class (rubenrua)
62+
* feature #13809 [OptionsResolver] add missing deprecation triggers (Tobion)
63+
* feature #13398 [PhpUnit] new PhpUnit bridge (nicolas-grekas)
64+
* feature #13615 [FrameworkBundle] Made ServerParams a service (rpg600)
65+
* feature #12526 Add an auto_alias compiler pass (Daniel Wehner)
66+
* feature #13665 [Debug] generalize deprecated interfaces tracking (nicolas-grekas)
67+
* feature #13656 removed Propel bridge from Symfony Core (fabpot)
68+
* feature #13500 [Serializer] Normalizers can serialize collections and scalars (dunglas)
69+
* feature #13463 [WebProfilerBundle] Replaced raster PNG icons with vector SVG icons (sgrodzicki)
70+
* feature #13234 [Asset] added the component (fabpot)
71+
* feature #11379 Added new Forwarded header support for Request::getClientIps (tony-co)
72+
* feature #9782 [Security] added string representation for core Users (tobiassjosten)
73+
* feature #12174 [TwigBundle] Add loader priority (wizhippo)
74+
* feature #13074 [Translation] Refresh catalogues when resources change (iamluc)
75+
* feature #13294 [PropertyAccess] Show property path in all exception messages (mpajunen)
76+
* feature #13548 [TwigBridge] Added support for passing more files to twig:lint command (sustmi)
77+
* feature #13120 [Serializer] Name converter support (dunglas)
78+
* feature #13428 Added a Twig profiler (fabpot)
79+
* feature #11129 Added i18n support to ConfirmationQuestion (WouterJ)
80+
* feature #13034 [HttpKernel] [WebProfilerBundle] added HTTP status to profiler search result (xelaris)
81+
* feature #13475 [SecurityBundle] decouple the logout PHP helper and Twig extension (fabpot)
82+
* feature #12891 [Form] Deprecated setDefaultOptions() in favor of configureOptions() (peterrehm)
83+
* feature #13342 [security] Fetching current stored context when not explicitly specified (jaytaph)
84+
* feature #12960 [FrameworkBundle] Container parameters in Route#condition (nikita2206)
85+
* feature #13418 [DX] Attempt to improve logging messages with parameters (iltar)
86+
* feature #13320 [HttpKernel] Add request uri to Logger context (Rvanlaak)
87+
* feature #13401 [TwigBundle] use the new Twig autoescaping strategy (fabpot)
88+
* feature #13361 [Routing] apply deprecation triggers and fix tests (Tobion)
89+
* feature #13378 lazy-load fragment renderers (fabpot)
90+
* feature #13354 Twig decoupling from Templating (fabpot)
91+
* feature #13264 URL manipulations as a Twig extension (fabpot)
92+
* feature #13289 [DependencyInjection] deprecated synchronized services (fabpot)
93+
* feature #13323 [Security] removed usage of the deprecated SecurityContextInterface (fabpot)
94+
* feature #13241 [Form] add back model_timezone and view_timezone options (xabbuh)
95+
* feature #13252 [Serializer] Refactoring and object_to_populate support. (dunglas)
96+
* feature #13255 [Serializer] Add circular reference handling to the PropertyNormalizer (dunglas)
97+
* feature #13259 Deprecate the translator implementation in the Validator component (stof)
98+
* feature #12956 [Validator] Added checkDNS option on URL validator (saro0h)
99+
* feature #13230 [TwigBundle] removed the Container dependency on ActionsExtension (fabpot)
100+
* feature #12602 Add type aliases for allowed types in OptionsResolver (henrikbjorn)
101+
* feature #12594 [DX] [HttpKernel] Use "context" argument when logging route in RouterListener (iltar)
102+
* feature #12653 [Filesystem] Keep executable permission when a file is copied (joelwurtz)
103+
* feature #13164 [Debug] track and report deprecated classes and interfaces (nicolas-grekas)
104+
* feature #13157 [Security] Updated ACL generateSql.php (jaytaph)
105+
* feature #13105 [FrameworkBundle] added a test router for the built-in web server (fabpot)
106+
* feature #12092 [Serializer] Serialization groups support (dunglas)
107+
* feature #13031 [Serializer] Add xml_format_output context option. Close #12517. (dunglas)
108+
* feature #12862 [Console] Allowing the user answering key or value of the autocompleterValues (saro0h)
109+
* feature #12469 [Security] Added the triggering of the security.interactive_login event in SimplePreAuthenticationListener (saro0h)
110+
* feature #12896 [DX][Profiler] Show the inherited roles in the web profiler (peterrehm)
111+
* feature #12295 [FrameworkBundle] make GetSetMethodNormalizer available by default (dunglas)
112+
* feature #12666 [Hackday][Stopwatch] added __toString on StopwatchEvent (damienalexandre)
113+

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@
7474
"doctrine/orm": "~2.2,>=2.2.3",
7575
"doctrine/doctrine-bundle": "~1.2",
7676
"monolog/monolog": "~1.11",
77-
"propel/propel1": "~1.6",
7877
"ircmaxell/password-compat": "~1.0",
7978
"ocramius/proxy-manager": "~0.4|~1.0",
8079
"egulias/email-validator": "~1.2"

src/Symfony/Bridge/Twig/Node/RenderBlockNode.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Symfony\Bridge\Twig\Node;
1313

1414
/**
15-
* Compiles a call to {@link FormRendererInterface::renderBlock()}.
15+
* Compiles a call to {@link \Symfony\Component\Form\FormRendererInterface::renderBlock()}.
1616
*
1717
* The function name is used as block name. For example, if the function name
1818
* is "foo", the block "foo" will be rendered.

src/Symfony/Bundle/DebugBundle/DependencyInjection/Compiler/DumpDataCollectorPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use Symfony\Component\DependencyInjection\ContainerBuilder;
1616

1717
/**
18-
* Registers the file link format for the {@link DumpDataCollector}.
18+
* Registers the file link format for the {@link \Symfony\Component\HttpKernel\DataCollector\DumpDataCollector\DumpDataCollector}.
1919
*
2020
* @author Christian Flothmann <christian.flothmann@xabbuh.de>
2121
*/

src/Symfony/Bundle/FrameworkBundle/Tests/Translation/TranslatorTest.php

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Bundle\FrameworkBundle\Tests\Translation;
1313

1414
use Symfony\Bundle\FrameworkBundle\Translation\Translator;
15+
use Symfony\Component\Translation\Loader\ArrayLoader;
1516
use Symfony\Component\Translation\MessageCatalogue;
1617
use Symfony\Component\Filesystem\Filesystem;
1718
use Symfony\Component\Translation\MessageSelector;
@@ -77,6 +78,8 @@ public function testTransWithCaching()
7778

7879
// do it another time as the cache is primed now
7980
$loader = $this->getMock('Symfony\Component\Translation\Loader\LoaderInterface');
81+
$loader->expects($this->never())->method('load');
82+
8083
$translator = $this->getTranslator($loader, array('cache_dir' => $this->tmpDir));
8184
$translator->setLocale('fr');
8285
$translator->setFallbackLocales(array('en', 'es', 'pt-PT', 'pt_BR', 'fr.UTF-8', 'sr@latin'));
@@ -90,6 +93,27 @@ public function testTransWithCaching()
9093
$this->assertEquals('other choice 1 (PT-BR)', $translator->transChoice('other choice', 1));
9194
$this->assertEquals('foobarbaz (fr.UTF-8)', $translator->trans('foobarbaz'));
9295
$this->assertEquals('foobarbax (sr@latin)', $translator->trans('foobarbax'));
96+
97+
// refresh cache again when resource file resources file change
98+
$resource = $this->getMock('Symfony\Component\Config\Resource\ResourceInterface');
99+
$resource
100+
->expects($this->at(0))
101+
->method('isFresh')
102+
->will($this->returnValue(false))
103+
;
104+
$catalogue = $this->getCatalogue('fr', array('foo' => 'foo fresh'));
105+
$catalogue->addResource($resource);
106+
107+
$loader = $this->getMock('Symfony\Component\Translation\Loader\LoaderInterface');
108+
$loader
109+
->expects($this->at(0))
110+
->method('load')
111+
->will($this->returnValue($catalogue))
112+
;
113+
114+
$translator = $this->getTranslator($loader, array('cache_dir' => $this->tmpDir));
115+
$translator->setLocale('fr');
116+
$this->assertEquals('foo fresh', $translator->trans('foo'));
93117
}
94118

95119
public function testTransWithCachingWithInvalidLocale()
@@ -227,12 +251,7 @@ protected function getContainer($loader)
227251

228252
public function getTranslator($loader, $options = array(), $loaderFomat = 'loader', $translatorClass = '\Symfony\Bundle\FrameworkBundle\Translation\Translator')
229253
{
230-
$translator = new $translatorClass(
231-
$this->getContainer($loader),
232-
new MessageSelector(),
233-
array($loaderFomat => array($loaderFomat)),
234-
$options
235-
);
254+
$translator = $this->createTranslator($loader, $options, $translatorClass, $loaderFomat);
236255

237256
if ('loader' === $loaderFomat) {
238257
$translator->addResource('loader', 'foo', 'fr');
@@ -267,6 +286,16 @@ public function testWarmup()
267286
$translator->warmup($this->tmpDir);
268287
$this->assertTrue(file_exists($this->tmpDir.'/catalogue.fr.'.$catalogueHash.'.php'));
269288
}
289+
290+
private function createTranslator($loader, $options, $translatorClass = '\Symfony\Bundle\FrameworkBundle\Translation\Translator', $loaderFomat = 'loader')
291+
{
292+
return new $translatorClass(
293+
$this->getContainer($loader),
294+
new MessageSelector(),
295+
array($loaderFomat => array($loaderFomat)),
296+
$options
297+
);
298+
}
270299
}
271300

272301
class TranslatorWithInvalidLocale extends Translator

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/logger.html.twig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
{% set is_deprecation = log.context.level is defined and log.context.type is defined and (constant('E_DEPRECATED') == log.context.type or constant('E_USER_DEPRECATED') == log.context.type) %}
9494
{% if priority == '-100' ? is_deprecation : log.priority >= priority %}
9595
{% set log_loop_index = log_loop_index + 1 %}
96-
<li class="{{ cycle(['odd', 'even'], log_loop_index) }}{% if log.context.scream is defined %} scream{% elseif log.priority >= 400 %} error{% elseif log.priority >= 300 %} warning{% endif %}">
96+
<li class="{{ cycle(['odd', 'even'], log_loop_index) }}{% if log.context.scream is defined %} scream{% elseif log.priority >= 400 %} error{% elseif log.priority >= 300 or is_deprecation %} warning{% endif %}">
9797
{{ logger.display_message(loop.index, log, is_deprecation) }}
9898
</li>
9999
{% endif %}
@@ -114,6 +114,8 @@
114114
{% set stack = log.context.stack|default([]) %}
115115
{% set id = 'sf-call-stack-' ~ log_index %}
116116

117+
DEPRECATED - {{ log.message }}
118+
117119
{% if stack %}
118120
<a href="#" onclick="Sfjs.toggle('{{ id }}', document.getElementById('{{ id }}-on'), document.getElementById('{{ id }}-off')); return false;">
119121
<img class="toggle" id="{{ id }}-off" alt="-" src="data:image/gif;base64,R0lGODlhEgASAMQSANft94TG57Hb8GS44ez1+mC24IvK6ePx+Wa44dXs92+942e54o3L6W2844/M6dnu+P/+/l614P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABIALAAAAAASABIAQAVCoCQBTBOd6Kk4gJhGBCTPxysJb44K0qD/ER/wlxjmisZkMqBEBW5NHrMZmVKvv9hMVsO+hE0EoNAstEYGxG9heIhCADs=" style="display:none">

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,13 @@
103103
return dict.hasOwnProperty(key)
104104
? dict[key]
105105
: null;
106-
}
106+
};
107107
108108
this.set = function(key, value) {
109109
dict[key] = value;
110110
111111
return value;
112-
}
112+
};
113113
};
114114
115115
/**
@@ -383,7 +383,7 @@
383383
384384
return this;
385385
};
386-
};
386+
}
387387
388388
function canvasAutoUpdateOnResizeAndSubmit(e) {
389389
e.preventDefault();

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/layout.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
for (elem in menuItems) {
116116
if (typeof(menuItems[elem].children) !== 'undefined' &&
117117
menuItems[elem].children.length > 0) {
118-
child = menuItems[elem].children[0]
118+
child = menuItems[elem].children[0];
119119
120120
if ('' === child.getAttribute('title') ||
121121
null === child.getAttribute('title')) {

src/Symfony/Component/Config/ConfigCacheFactory.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,11 @@ public function __construct($debug)
3737
*/
3838
public function cache($file, $callback)
3939
{
40-
$cache = new ConfigCache($file, $this->debug);
40+
if (!is_callable($callback)) {
41+
throw new \InvalidArgumentException(sprintf('Invalid type for callback argument. Expected callable, but got "%s".', gettype($callback)));
42+
}
4143

44+
$cache = new ConfigCache($file, $this->debug);
4245
if (!$cache->isFresh()) {
4346
call_user_func($callback, $cache);
4447
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Symfony\Component\Config\Tests;
13+
14+
use Symfony\Component\Config\ConfigCacheFactory;
15+
16+
class ConfigCacheFactoryTest extends \PHPUnit_Framework_TestCase
17+
{
18+
/**
19+
* @expectedException \InvalidArgumentException
20+
* @expectedExceptionMessage Invalid type for callback argument. Expected callable, but got "object".
21+
*/
22+
public function testCachWithInvalidCallback()
23+
{
24+
$cacheFactory = new ConfigCacheFactory(true);
25+
26+
$cacheFactory->cache('file', new \stdClass());
27+
}
28+
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy