This PR was merged into the master branch.
Commits
-------
12a890f Issue 5288 fix
Discussion
----------
Issue #5288 fix
I only have the test failing on
php -v
5.4.6-1ubuntu1
ICU version 4.8.1.1
Test results
1) Symfony\Component\Locale\Tests\Stub\StubLocaleTest::testGetCurrenciesData
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'BR$'
+'R$'
It looks like the check $this->isSameAsIcuVersion('4.8') on line is to strict.
It was added here https://github.com/symfony/symfony/commit/90d6dc37 but I don't how to test the fix on icu version 4.8.0.x
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #5288
Todo: Check older version of the ICU lib are still working. Because I could not test that.
This PR was merged into the master branch.
Commits
-------
082e8b9 [Validation] Added more Indonesian translation.
Discussion
----------
[Validation] Added more Indonesian translation.
- Added Indonesian translation for translation unit no. 57 and 58.
---------------------------------------------------------------------------
by bertzzie at 2012-12-12T16:16:09Z
This is to add some more translation I missed from the pull request before, here:
https://github.com/symfony/symfony/pull/6289#issuecomment-11291990
Thanks.
This PR was merged into the master branch.
Commits
-------
00422dc [Validator] Card validation - German translation
Discussion
----------
[Validator] Card validation - German translation
This PR was merged into the master branch.
Commits
-------
ada0875 Added farsi translation for card valdiation
Discussion
----------
[Validator] Added farsi translation for card valdiation
This PR was merged into the master branch.
Commits
-------
d52f8f7 Turkish Language File Translated
Discussion
----------
Turkish Language File Translated
This PR was merged into the master branch.
Commits
-------
ab58c7f [Validator] Card validation - Norwegian translation unit 54-48
Discussion
----------
[Validator] Card validation - Norwegian translation unit 54-58
This PR was merged into the master branch.
Commits
-------
34df35d Added validation messages for Afrikaans
Discussion
----------
[Validator] Validation messages - Afrikaans translatios
This PR was merged into the master branch.
Commits
-------
08f2631 [Validation] Improve Indonesian translation.
Discussion
----------
[Validation] Improve Indonesian translation.
- Improve some translation's grammar.
- Added translation unit no. 49 - 56.
This PR was merged into the master branch.
Commits
-------
89181a8 [Validator] added Hungarian translations for card validation
Discussion
----------
[Validator] added Hungarian translations for card validation
This PR was merged into the master branch.
Commits
-------
5cc4390 Updated catalan translations for validators
Discussion
----------
Updated catalan translations for validators
This PR was merged into the master branch.
Commits
-------
b2ff4d8 [Validator] Card validation - Italian translations
Discussion
----------
[Validator] Card validation - Italian translations
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: n/a
Todo: n/a
License of the code: MIT
Documentation PR: n/a
This PR was merged into the master branch.
Commits
-------
3a6372d Updated spanish translations for validators
Discussion
----------
Updated spanish translations for validators
Added translations for credit card related messages
This PR was merged into the master branch.
Commits
-------
237bbd0 fixed and refactored YamlFileLoader in the same sense as the XmlFileLoader
392d785 removed covers annotation from loader tests and unneeded use statements
45987eb added tests for the previous XmlFileLoader fixes
b20d6a7 ensure id, pattern and resource are specified
8361b5a refactor the XMlFileLoader
83fc5ff fix namespace handling in xml loader; it could not handle prefixes
1a60a3c make resource and key attributes required in xsd
02e01b9 improve exception messages in xml loader
51fbffe remove unneeded cast
358e9c4 fix some phpdoc
Discussion
----------
[Routing] improve loaders
BC break: no
Main points:
- fixed Xml loader that could not handle namespace prefixes but is valid xml
- fixed Yaml loader where some nonsesense configs were not validated correctly like an imported resource with a pattern key.
Added tests for all. Some refactoring + a few tweaks like better exception messages and more consistency between Xml loader and yaml loader. See also commits.
---------------------------------------------------------------------------
by Tobion at 2012-12-07T18:16:08Z
@fabpot this is ready
---------------------------------------------------------------------------
by Tobion at 2012-12-11T17:30:10Z
@fabpot rebased. Please don't squash to one big commit where one does not see what changed why.
---------------------------------------------------------------------------
by fabpot at 2012-12-11T17:32:40Z
I only squash when most commits are CS fixes and feedback.
---------------------------------------------------------------------------
by Tobion at 2012-12-11T17:37:49Z
Well, you squashed #6022 so it's not possible to revert a specific deprecation.
This PR was merged into the master branch.
Commits
-------
d5426f0 [Form] Add tests to prove that label is not rendered when is marked as false
120547c [Form][TwigBridge] Don't set label attributes if is marked as not to be rendered [Form][FrameworkBundle] Add option to disable rendering of label for fields
36e4556 [Form] Option for not displaying a label by setting label to false. [Form] Fixed formatting & translation ..
Discussion
----------
[Form] Added option for not displaying a form-label by setting label to false
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Replaces: #5421
@fabpot @BenjaminBeck: I was just not sure what to do with "table based" forms, so I left `<td></td>` rendered when there is no label, because I'm not sure that we can hide it easily.
---------------------------------------------------------------------------
by XWB at 2012-12-11T09:30:14Z
👍
This PR was merged into the master branch.
Commits
-------
ea74610 jumping progress bar fix for windows & unix
6a0ee27 [Console] fixed progress bar jumping
Discussion
----------
[Console] fixed progress bar jumping for windows & unix env
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
---------------------------------------------------------------------------
by pborreli at 2012-12-11T13:58:25Z
Good implementation but could you please check http://symfony.com/doc/current/contributing/code/standards.html
This PR was squashed before being merged into the master branch (closes#6022).
Commits
-------
8c7a169 [Routing] clean up of RouteCollection API
Discussion
----------
[Routing] clean up of RouteCollection API
BC break: only the internal behavior of addPrefix()
Deprecations:
- some params of addCollection and addPrefix that still work but should not be used anymore
- getPrefix (you cannot rely on it how my added test shows that failed previously but was fixed with https://github.com/symfony/symfony/pull/6120/files#L5L109
and it's also useless since we dont have a tree anymore)
Reasoning see commits and changelog.
---------------------------------------------------------------------------
by Tobion at 2012-12-06T19:15:53Z
@fabpot this is finished and rebased. I switched from `addConfigs` to addDefaults(), addRequirements(), and addOptions() as you suggested. I also deprecated getPrefix(). Reasoning see above and in the changelog.
This PR was squashed before being merged into the master branch (closes#6014).
Commits
-------
2b13760 [Filesystem] [mirror] added "delete" option
Discussion
----------
[Filesystem] [mirror] added "delete" option
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets:
Todo: -
License of the code: MIT
Documentation PR: symfony/symfony-docs#123
I added a "delete" option to the mirror function. If set to true, then
files present in target dir and not in origin dir will be removed.
Added also unit test for these feature.
---------------------------------------------------------------------------
by pborreli at 2012-11-16T00:58:19Z
Symfony2 code standard use lowercase `true` and `false`
---------------------------------------------------------------------------
by mylen at 2012-11-16T20:25:19Z
I have problem to believe that the last commit (merging two if together) was to blame for the segfault on travis...
when I run the unit testing on my machine, I get:
I'm using PHP 5.4.7 by the way...
Time: 2 seconds, Memory: 3.25Mb
OK, but incomplete or skipped tests!
Tests: 80, Assertions: 106, Skipped: 14.
---------------------------------------------------------------------------
by pborreli at 2012-11-16T20:38:40Z
Can you fix end-of-lines ?
---------------------------------------------------------------------------
by mylen at 2012-11-16T20:52:37Z
I put UNIX line feed and UTF8 charset
---------------------------------------------------------------------------
by mylen at 2012-11-16T20:53:59Z
Sorry, I add to clone the symfony repo with github and did small editing using pspad, I forgot to setup charset and line feed...
This PR was merged into the 2.0 branch.
Commits
-------
e6bb156 remove realpath call
Discussion
----------
[HttpKernel] remove realpath call
I'm trying to create an executable phar archive from a Symfony application, but when I run the phar, it fails to find any commands because of this php bug/feature:
https://bugs.php.net/bug.php?id=52769
After this change, my archive works just like a normal app/console call
* 2.1:
fixed CS
fixed CS
[Security] fixed path info encoding (closes#6040, closes#5695)
[HttpFoundation] added some tests for the previous merge and removed dead code (closes#6037)
Improved Cache-Control header when no-cache is sent
removed unneeded comment
Fix to allow null values in labels array
fix date in changelog
removed the Travis icon (as this is not stable enough -- many false positive, closes#6186)
Revert "merged branch gajdaw/finder_splfileinfo_fpassthu (PR #4751)" (closes#6224)
Fixed a typo
Fixed: HeaderBag::parseCacheControl() not parsing quoted zero correctly
[Form] Fix const inside an anonymous function
[Config] Loader::import must return imported data
[DoctrineBridge] Fixed caching in DoctrineType when "choices" or "preferred_choices" is passed
[Form] Fixed the default value of "format" in DateType to DateType::DEFAULT_FORMAT if "widget" is not "single_text"
[HttpFoundation] fixed a small regression
Conflicts:
src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php
* 2.0:
fixed CS
removed the Travis icon (as this is not stable enough -- many false positive, closes#6186)
[Config] Loader::import must return imported data
[HttpFoundation] fixed a small regression
Conflicts:
README.md
src/Symfony/Bridge/Twig/Extension/FormExtension.php
src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/attributes.html.php
src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/form_widget.html.php
src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php
src/Symfony/Component/Form/Form.php
src/Symfony/Component/HttpFoundation/Request.php
src/Symfony/Component/HttpFoundation/SessionStorage/PdoSessionStorage.php
tests/Symfony/Tests/Bridge/Doctrine/Logger/DbalLoggerTest.php
I'm trying to create an executable phar archive from a Symfony application, but when I run the phar, it fails to find any commands because of this php bug/feature:
https://bugs.php.net/bug.php?id=52769
After this change, my archive works just like a normal app/console call
This PR was squashed before being merged into the master branch (closes#6232).
Commits
-------
7428bf9 [WebProfilerBundle] Some eye candy for deprecated calls
Discussion
----------
[WebProfilerBundle] Some eye candy for deprecated calls
![Ohhh](https://lh4.googleusercontent.com/-T9DKsHWf4YU/UMIRqT0g_II/AAAAAAAAJ84/tRDRP8IMwRM/s840/stack.jpg).
@fabpot is [`|raw`](https://github.com/symfony/symfony/pull/new/deprecated#L0R117) a twig defect ?
---------------------------------------------------------------------------
by Baachi at 2012-12-08T09:12:12Z
Really nice 👍
---------------------------------------------------------------------------
by vicb at 2012-12-11T10:00:24Z
should be ready now
This PR was merged into the master branch.
Commits
-------
5d98fb1 [HttpKernel] ExceptionHandler is actually displaying PHP errors
Discussion
----------
[HttpKernel] ExceptionHandler is actually displaying all PHP errors
So there is no need to set display_errors to true in that case.
Partially fixes#6254.
Since even fatal errors are catched and turned into exceptions by
ErrorHandler, all PHP errors can nicely be displayed by
ExceptionHandler. There is no need to set display_errors to true
anymore then.
Partially fixes#6254 on github.
This PR was squashed before being merged into the master branch (closes#6253).
Commits
-------
e62b5f7 [Finder] cleanup, fixes, improvements
Discussion
----------
[Finder] cleanup, fixes, improvements
This PR was merged into the master branch.
Commits
-------
e458600 [DependencyInjection] Add deleted argument in Extension::processConfiguration
Discussion
----------
[DependencyInjection] Add deleted argument in Extension::processConfigur...
...ation
This PR was merged into the master branch.
Commits
-------
76e5bce no need to set the compiled route to null when cloning
Discussion
----------
[Routing] no need to set the compiled route to null when cloning
The compiled reference can be reused when cloning. When the route is changed, the compiled reference is set to null anyway. So if you just clone the route, this improves performance as it does not need to recompile.
When having a Cache-Control header like:
max-age="0"
isset($match[2]) is true but $match[2] containing: "0", it is evaluated
as false and 'true' will be set to "max-age" entry instead of "0".
This PR was merged into the master branch.
Commits
-------
cc0be8e [Finder] fluid, calling in() not required after append()
Discussion
----------
[Finder] fluid, calling in() not required after append()
This PR was merged into the 2.1 branch.
Commits
-------
6e7e08f [Form] Fixed the default value of "format" in DateType to DateType::DEFAULT_FORMAT if "widget" is not "single_text"
Discussion
----------
[Form] Fixed the "format" option in DateType
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #6141
Todo: -
License of the code: MIT
Documentation PR: -
This PR fixes a regression introduced in #4839. To quote that PR:
> This PR changes DateType and DateTimeType to support HTML5 by default when setting the option "widget" to "single_text".
In reality, the "format" option now defaults to the HTML5 format always, not just when "widget" is "single_text". This is fixed here.
The second commit in this PR removes special characters between select/text fields. What, with German locale, was
```
<day input>.<month input>.<year input>
```
before is now
```
<day input><month input><year input>
```
This is the way date fields are represented on the majority of websites. If you *need* separators, you can have them by setting the "format" option to a custom value:
```php
$builder->add('myDate', 'date', array(
'format' => 'dd.MM.yyyy',
));
```
---------------------------------------------------------------------------
by fabpot at 2012-12-07T08:52:21Z
The second commit should probably be done on master and it changes the behavior.
---------------------------------------------------------------------------
by bschussek at 2012-12-07T12:23:22Z
Ok, I removed the second commit now and removed the entries from the CHANGELOG.
This PR was merged into the master branch.
Commits
-------
d7a1154 make it possible for bundles extensions to prepend settings into the application configuration of any Bundle
Discussion
----------
[2.2] add possibility for bundles extensions to prepend the app configs
Bug fix: #4652
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
As can be seen in the patch the extensions that should prepend the configuration are enabled automatically if they implement ``PrependExtensionInterface``.
Just as an example, here an extension, which checks if SonataAdminBundle is available and if not disables integration with it in several Bundles. It also sets some default settings for ``document_class`` and ``default_document_manager_name``:
```
diff --git a/DependencyInjection/SymfonyCmfCoreExtension.php b/DependencyInjection/SymfonyCmfCoreExtension.php
index 9f92410..c0a8dbb 100644
--- a/DependencyInjection/SymfonyCmfCoreExtension.php
+++ b/DependencyInjection/SymfonyCmfCoreExtension.php
@@ -3,11 +3,12 @@
namespace Symfony\Cmf\Bundle\CoreBundle\DependencyInjection;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
+use Symfony\Component\\DependencyInjection\PrependExtensionInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
use Symfony\Component\Config\FileLocator;
-class SymfonyCmfCoreExtension extends Extension
+class SymfonyCmfCoreExtension extends Extension implements PrependExtensionInterface
{
public function load(array $configs, ContainerBuilder $container)
{
@@ -15,4 +16,45 @@ class SymfonyCmfCoreExtension extends Extension
$loader->load('config.xml');
$loader->load('services.xml');
}
+
+ public function prepend(ContainerBuilder $container)
+ {
+ $bundles = $container->getParameter('kernel.bundles');
+ if (!isset($bundles['SonataDoctrinePHPCRAdminBundle'])) {
+ // disable SonataDoctrinePHPCRAdminBundle admin support in Bundles
+ $config = array('use_sonata_admin' => false);
+ foreach ($container->getExtensions() as $name => $extension) {
+ switch ($name) {
+ case 'symfony_cmf_menu':
+ case 'symfony_cmf_routing_extra':
+ case 'symfony_cmf_simple_cms':
+ $container->prependExtensionConfig($name, $config);
+ break;
+ }
+ }
+ }
+
+ // process the configuration of SymfonyCmfCoreExtension
+ $configs = $container->getExtensionConfig($this->getAlias());
+ $config = $this->processConfiguration(new Configuration(), $configs);
+ // add the default configs to various Bundles
+ foreach ($container->getExtensions() as $name => $extension) {
+ switch ($name) {
+ case 'symfony_cmf_content':
+ case 'symfony_cmf_simple_cms':
+ $container->prependExtensionConfig($name, $config);
+ break;
+ }
+ }
+ }
}
```
---------------------------------------------------------------------------
by stof at 2012-09-21T21:10:00Z
I think you are giving too much power to bundles here: a bundle becomes able to modify all the config defined explicitly by the user if it wants to do it.
I think it would be safer to give them the possibility to load an additional config file which would be prepended (so that user-defined config would still win). Giving the ability to load files means passing the loader used by the kernel, and it should then be called before calling the load method on the kernel itself (to respect the order of loaded files)
---------------------------------------------------------------------------
by lsmith77 at 2012-09-22T05:50:08Z
Not sure how a config file helps solve anything. I mean they can load as many config files as they want already. The key is being able to automatically apply configuration to multiple Bundles as well as enabling/disabling features based on if certain Bundles are registered.
BTW the end result in my examples is also prepended, so that user config wins. However yes this would be up to the person implementing the Bundle. We could however provide a dedicated method for prepending in addition to or instead of ``setExtensionConfig``.
---------------------------------------------------------------------------
by stof at 2012-09-22T11:40:29Z
@lsmith77 If you can load a file with the main loader, this file can provide some app-level configuration (be it for your own bundle or others).
And your code example is indeed prepending. But imagine what would occur when someone uses this feature without knowing well how the component works: he will likely call ``setExtensionConfig`` in a first implementation, thus dropping all userland config for the bundle. Your setup does not only allow to make a file win over the userland config but makes it even easier to remove the userland config.
---------------------------------------------------------------------------
by lsmith77 at 2012-09-22T18:11:29Z
but i dont get how that would help. the point is to be able for one bundle to configure other bundles before the load as this is obviously alot cleaner than trying to do the same via a compiler pass. so imho this is what is needed to encourage decoupled bundles. otherwise for example CMS or other reuseable and extensible apps will be forced to always put everything in one bundle.
---------------------------------------------------------------------------
by stof at 2012-09-22T19:23:45Z
@lsmith77 I agree about the feature, not about the way to implement it. If you allow bundles to load a file as it it were some app-level config, they would become able to provide some config for other bundles (and you could load several files depending of which bundles are enabled), but without allowing bundles to remove the userland config.
---------------------------------------------------------------------------
by lsmith77 at 2012-09-22T19:50:19Z
sorry but i dont understand what you suggest. more over i dont see the problem. its already possible to seriously break stuff with compiler passes which cannot be easily enabled/disabled. this is just convenience. if it doesnt work because of some obscure combo then simply dont use it for the app since it needs to be explicitly enabled in the kernel.
---------------------------------------------------------------------------
by lsmith77 at 2012-09-24T09:25:10Z
@stof thought about your comments, are you suggesting for a Bundle to be able to generate a config file that is prepended? in that case the current behavior would already be that if we change ``setExtensionConfig`` to just be a ``prependExtensionConfig`` .. however i am not sure if we really need this limitation since as i point out this would still by far be less dangerous than compiler passes and also i expect this to be used mainly by open source applications on top of Symfony2 rather than standard bundles.
---------------------------------------------------------------------------
by lsmith77 at 2012-10-13T13:28:29Z
@lolautruche i also think this is relevant for you guys. this way you could start preconfiguring 3rd party bundles as part of your main ezPublish bundle.
---------------------------------------------------------------------------
by lolautruche at 2012-10-13T13:57:09Z
While I suspect a nice feature, the implementation looks obscure to me...
---------------------------------------------------------------------------
by lsmith77 at 2012-10-13T17:43:02Z
The implementation of the example extension or the implementation of the actual changes proposed in this PR?
---------------------------------------------------------------------------
by lolautruche at 2012-10-13T17:46:57Z
The example, sorry 😃
---------------------------------------------------------------------------
by lsmith77 at 2012-10-13T17:50:38Z
The example was fairly quickly hacked together. The basic thing you need to do is fetch the config for the bundle you want to change, manipulate the config (usually by appending an array to the array of configs so that you dont affect explicit configuration) and then set it again.
As I explained to @stof it would alternative/additionally be possible to support a method that pushes a config array to the top of the array of config stack. Such a method might make the necessary code simpler.
---------------------------------------------------------------------------
by stof at 2012-10-13T21:39:07Z
@fabpot what do you think about it ?
---------------------------------------------------------------------------
by jrobeson at 2012-10-20T15:45:18Z
I've been porting much of an existing framework over to use more symfony components and bundles. I think that this might help some of the problems i've been having. I would really appreciate some better examples as how to one would use it (same for the cmf router, but that's another story).
---------------------------------------------------------------------------
by lsmith77 at 2012-10-21T07:28:52Z
not really sure what other examples i could give. the process is quite simple:
1) determine what configuration options to add to other Bundles
for example with the following code I determine that SonataAdmin for PHPCR is not installed (which means i should disable using it in other Bundles):
```
$bundles = $container->getParameter('kernel.bundles');
if (!isset($bundles['SonataDoctrinePHPCRAdminBundle'])) {
```
alternatively I could simply already process the configuration and then pick all or some of these configuration options:
```
$configs = $container->getExtensionConfig($this->getAlias());
$config = $this->processConfiguration(new Configuration(), $configs);
```
2) then add these configuration to what other Bundles I feel should get these options
usually I will add these to the top of the config array stack. this means that if the user would manually set the same setting in most cases the user setting will override what the pre-processor set.
```
$container->unshiftExtensionConfig($name, array('use_sonata_admin' => false));
```
---------------------------------------------------------------------------
by lsmith77 at 2012-10-24T12:52:38Z
added ``ContainerBuilder::unshiftExtensionConfig`` since this is the usual use case. with this method added it could be discussed if ``ContainerBuilder::setExtensionConfig`` is still needed or not.
---------------------------------------------------------------------------
by lsmith77 at 2012-11-24T14:48:44Z
I spoke to @fabpot today and he said that since this patch just allows you to set defaults and not really "process" the actual configuration I shouldn't call it "preProcess" so I renamed it to "prepend".
Furthermore as its just prepending @fabpot said there isnt really a need to require manually enabling it, so here is a patch to auto-enable the prepending logic:
```
diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php
index b890fbf..7374b87 100644
--- a/src/Symfony/Component/HttpKernel/Kernel.php
+++ b/src/Symfony/Component/HttpKernel/Kernel.php
@@ -701,8 +701,8 @@ abstract class Kernel implements KernelInterface, TerminableInterface
*/
protected function prependExtensionConfigs(ContainerBuilder $container)
{
- foreach ($this->getPrependingExtensions() as $name) {
- $extension = $container->getExtension($name);
+ foreach ($this->bundles as $bundle) {
+ $extension = $bundle->getContainerExtension();
if ($extension instanceof PrependExtensionInterface) {
$extension->prepend($container);
}
@@ -710,16 +710,6 @@ abstract class Kernel implements KernelInterface, TerminableInterface
}
/**
- * Returns the ordered list of extensions that may prepend extension configurations.
- *
- * @return array
- */
- protected function getPrependingExtensions()
- {
- return array();
- }
-
- /**
* Gets a new ContainerBuilder instance used to build the service container.
*
* @return ContainerBuilder
```
---------------------------------------------------------------------------
by lsmith77 at 2012-11-25T19:31:01Z
ok .. i pondered the code some more and now i have enabled registering of the prepending extensions by default, since its now quite easy to just override the ``prependExtensionConfigs()`` method since there is almost no logic in there anymore.
@fabpot i am not 100% sure with the naming yet ..
---------------------------------------------------------------------------
by lsmith77 at 2012-12-05T14:03:43Z
@fabpot if you are ok with the PR as it is now, i can do the rebase so you can merge this?
---------------------------------------------------------------------------
by lsmith77 at 2012-12-05T18:30:29Z
@fabpot all good now? then i will squash the commits ..
---------------------------------------------------------------------------
by lsmith77 at 2012-12-05T18:34:50Z
actually looking at the full change set again i am no longer sure if it makes sense to have ``PrependExtensionInterface`` in the DI rather than the HttpKernel.
---------------------------------------------------------------------------
by lsmith77 at 2012-12-07T09:21:14Z
@fabpot all good now?
---------------------------------------------------------------------------
by fabpot at 2012-12-07T09:37:52Z
The code looks good to me now. There are two remaining task before merging:
* Is it something we need to add somewhere in the documentation?
* Can you add a note in the DI component CHANGELOG?
Thanks.
---------------------------------------------------------------------------
by lsmith77 at 2012-12-07T09:49:17Z
i have added a changelog entry and squashed the commits.
i will also work on a documentation entry, i guess i will make it a cookbook entry. not sure if it should be included in http://symfony.com/doc/2.0/cookbook/bundles/extension.html .. but imho it would better be a separate entry.
* 2.1:
[HttpFoundation] changed UploadedFile::move() to use move_uploaded_file() when possible (closes#5878, closes#6185)
[HttpFoundation] added a check for the host header value
[DoctrineBridge] Improved performance of the EntityType when used with the "query_builder" option
[DoctrineBridge] Improved exception message
[DoctrineBridge] Fixed: Exception is thrown if the entity class is not known to Doctrine
Removed useless branch alias for dev-master in composer.json
Conflicts:
composer.json
src/Symfony/Bridge/Doctrine/composer.json
src/Symfony/Bridge/Monolog/composer.json
src/Symfony/Bridge/Propel1/composer.json
src/Symfony/Bridge/Swiftmailer/composer.json
src/Symfony/Bridge/Twig/composer.json
src/Symfony/Bundle/FrameworkBundle/composer.json
src/Symfony/Bundle/SecurityBundle/composer.json
src/Symfony/Bundle/TwigBundle/composer.json
src/Symfony/Bundle/WebProfilerBundle/composer.json
src/Symfony/Component/BrowserKit/composer.json
src/Symfony/Component/ClassLoader/composer.json
src/Symfony/Component/Config/composer.json
src/Symfony/Component/Console/composer.json
src/Symfony/Component/CssSelector/composer.json
src/Symfony/Component/DependencyInjection/composer.json
src/Symfony/Component/DomCrawler/composer.json
src/Symfony/Component/EventDispatcher/composer.json
src/Symfony/Component/Filesystem/composer.json
src/Symfony/Component/Finder/composer.json
src/Symfony/Component/Form/composer.json
src/Symfony/Component/HttpFoundation/composer.json
src/Symfony/Component/HttpKernel/composer.json
src/Symfony/Component/Locale/composer.json
src/Symfony/Component/OptionsResolver/composer.json
src/Symfony/Component/Process/composer.json
src/Symfony/Component/Routing/composer.json
src/Symfony/Component/Security/composer.json
src/Symfony/Component/Serializer/composer.json
src/Symfony/Component/Templating/composer.json
src/Symfony/Component/Translation/composer.json
src/Symfony/Component/Validator/composer.json
src/Symfony/Component/Yaml/composer.json
* 2.0:
[HttpFoundation] changed UploadedFile::move() to use move_uploaded_file() when possible (closes#5878, closes#6185)
[HttpFoundation] added a check for the host header value
Conflicts:
src/Symfony/Component/HttpFoundation/File/File.php
src/Symfony/Component/HttpFoundation/Request.php
src/Symfony/Component/HttpFoundation/Tests/RequestTest.php
This PR was merged into the 2.0 branch.
Commits
-------
0489799 [HttpFoundation] added a check for the host header value
Discussion
----------
[HttpFoundation] added a check for the host header value
alternative for #3865
This PR was squashed before being merged into the master branch (closes#6005).
Commits
-------
577ee80 [HttpFoundation] Move IP check methods to a HttpUtils class for reuse
Discussion
----------
[HttpFoundation] Move IP check methods to a HttpUtils class for reuse
---------------------------------------------------------------------------
by vicb at 2012-11-13T18:05:18Z
Thanks @stof ! (didn't get my copy paste error as PHP allow calling non static method w/o a warning).
---------------------------------------------------------------------------
by GromNaN at 2012-11-17T23:19:29Z
Having an `Utils` class with mixed functions doesn't seem to be a good practice. I think the class should be called something like `Symfony\Component\HttpFoundation\IpAddress`.
---------------------------------------------------------------------------
by vicb at 2012-11-27T09:37:20Z
@fabpot could this be merged if `HttpUtils` is renamed to `IpUtils` ?
---------------------------------------------------------------------------
by fabpot at 2012-12-06T13:35:28Z
Renaming the class to `IpUtils` is indeed a good idea.
---------------------------------------------------------------------------
by vicb at 2012-12-06T14:07:59Z
ready !
---------------------------------------------------------------------------
by fabpot at 2012-12-06T14:39:19Z
Can you add an entry in the CHANGELOG?
---------------------------------------------------------------------------
by vicb at 2012-12-06T14:53:09Z
done, thanks for the reminder !
This PR was squashed before being merged into the master branch (closes#5853).
Commits
-------
63b0059 [Process] Add ability to reset arguments on ProcessBuilder
Discussion
----------
[Process] Add ability to reset arguments on ProcessBuilder
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
This PR adds the ability to "reset" the arguments set on a `ProcessBuilder`. This allows the builder to be re-used without having to set things like custom environment variables, current working directory etc again.
This PR was squashed before being merged into the master branch (closes#5860).
Commits
-------
d0057d0 Added failure_path_parameter to mirror target_path_parameter
Discussion
----------
Added failure_path_parameter to mirror target_path_parameter
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
Enable login failure redirect path can be assigned in a form field just like target path.
---------------------------------------------------------------------------
by stof at 2012-10-29T09:40:17Z
Please also open a PR to the doc repo to document this new feature
---------------------------------------------------------------------------
by leevigraham at 2012-10-29T09:56:29Z
@stof @fabpot Done.
This PR was merged into the master branch.
Commits
-------
7f16c1f [HttpKernel] Add DI extension configs as ressources when possible
Discussion
----------
[HttpKernel] Add DI extension configs as ressources when possible
/cc @rdohms @richardmiller
---------------------------------------------------------------------------
by vicb at 2012-11-30T11:57:48Z
btw @fabpot what about having a base class for `Extension` in the DI ? Would make it easier to re-use it when using standalone components, Di and (the suggested) Config as the greatest part of the class is not HttpKernel specific.
---------------------------------------------------------------------------
by fabpot at 2012-12-06T08:47:28Z
@vicb your suggestion makes sense.
Can you also explain the goal of this PR?
---------------------------------------------------------------------------
by vicb at 2012-12-06T09:01:58Z
The goal of this PR is to avoid having to sfcc when you modify a DI extension configuration. I think @rdohms got trapped.
---------------------------------------------------------------------------
by vicb at 2012-12-06T09:08:08Z
see https://twitter.com/rdohms/status/274059267428978688
---------------------------------------------------------------------------
by stof at 2012-12-06T09:20:54Z
I thought about it several times but never took time to implement it. It is annoying to have to clear the cache when you modify a default value in the Configuration class. So +1
This PR was squashed before being merged into the master branch (closes#6173).
Commits
-------
4878ec0 [HttpKernel] [WebProfilerBundle] Better handling of deprecated methods
Discussion
----------
[HttpKernel] [WebProfilerBundle] Better handling of deprecated methods
Bug fix: no
Feature addition: yes
Backwards compatibility break: yes, if you were expecting E_USER_DEPRECATED or E_DEPRECATED to throw an exception
Symfony2 tests pass: yes
Fixes the following tickets: #6139 partly, I'd go through and add the actual trigger_error() calls in another (or possibly one per component) PR
Todo: call trigger_error()
License of the code: MIT
Documentation PR: -
I added the deprecation count with the Exception icon in the Profiler Toolbar, and changed the color of it to be yellow for deprecations and red for exceptions (was yellow for exceptions).
---------------------------------------------------------------------------
by fabpot at 2012-12-03T09:43:09Z
Adding trigger_error calls should be done in one PR to ease the merging. thanks.
This PR was merged into the master branch.
Commits
-------
51223c0 added upgrade instructions
50e6259 adjusted tests
98f3ca8 [Routing] removed tree structure from RouteCollection
Discussion
----------
[Routing] removed tree structure from RouteCollection
BC break: yes (see below)
Deprecations: RouteCollection::getParent(); RouteCollection::getRoot()
tests pass: yes
The reason for this is so quite simple. The RouteCollection has been designed as a tree structure, but it cannot at all be used as one. There is no getter for a sub-collection at all. So you cannot access a sub-collection after you added it to the tree with `addCollection(new RouteCollection())`. In contrast to the form component, e.g. `$form->get('child')->get('grandchild')`.
So you can see the RouteCollection cannot be used as a tree and it should not, as the same can be achieved with a flat array!
Using a flat array removes all the need for recursive traversal and makes the code much faster, much lighter, less memory (big problem in CMS with many routes) and less error-prone.
BC break: there is only a BC break if somebody used the PHP API for defining RouteCollection and also added a Route to a collection after it has been added to another collection.
So
```
$rootCollection = new RouteCollection();
$subCollection = new RouteCollection();
$rootCollection->addCollection($subCollection);
$subCollection->add('foo', new Route('/foo'));
```
must be updated to the following (otherwise the 'foo' Route is not imported to the rootCollection)
```
$rootCollection = new RouteCollection();
$subCollection = new RouteCollection();
$subCollection->add('foo', new Route('/foo'));
$rootCollection->addCollection($subCollection);
```
Also one must call addCollection from the bottom to the top. So the correct sequence is the following (and not the reverse)
```
$childCollection->->addCollection($grandchildCollection);
$rootCollection->addCollection($childCollection);
```
Remeber, this is only needed when using PHP for defining routes and calling methods in a special order. There is no change required when using XML or YAML for definitions. Also, I'm pretty sure that neither the CMF, nor Drupal routing, nor Silex is relying on the tree stuff. So they should also still work.
cc @fabpot @crell @dbu
One more thing: RouteCollection wasn't an appropriate name for a tree anyway as a collection of routes (that it now is) is definitely not a tree.
Yet another point: The XML declaration of routes uses the `<import>` element, which is excatly what the new implementation of addCollection without the need of a tree does. So this is now also more analogous.
---------------------------------------------------------------------------
by Koc at 2012-11-26T17:34:15Z
What benefit of this?
---------------------------------------------------------------------------
by Tobion at 2012-11-26T17:56:53Z
@Koc Why did you not simply wait for the description? ^^
---------------------------------------------------------------------------
by dbu at 2012-11-26T18:33:09Z
i love PR that remove more code than they add whithout removing functionality.
---------------------------------------------------------------------------
by Crell at 2012-11-26T18:49:52Z
There's an issue somewhere in Drupal where we're trying to use addCollection() as a shorthand for iterating over one collection and calling add() on the other for each item. We can't do that, however, because the subcollections are not flattened properly when reading back and our current dumper can't cope with that. So this change would not harm Drupal at all, and would mean I don't have fix a bug in our dumper. :-) I cannot speak for any other projects, of course.
---------------------------------------------------------------------------
by Tobion at 2012-11-27T19:06:34Z
Ok, this is ready.
This PR was merged into the master branch.
Commits
-------
acfc750#2042 initial implementation of fatal error handler
Discussion
----------
Display traces for fatal errors
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: looks like yes
Fixes the following tickets: #2042 (partly)
License of the code: MIT
Output looks like on screen http://easycaptures.com/fs/uploaded/737/1191436899.png . I've added one line to css to prevent displaying standard xdebug trace http://easycaptures.com/fs/uploaded/737/5939488074.png
---------------------------------------------------------------------------
by Koc at 2012-11-08T21:55:41Z
So, community please advice me, how can I trigger `KernelEvents::EXCEPTION` event in `ErrorHandler` or `ExceptionHandler`? Or should I provide other event for this?
---------------------------------------------------------------------------
by stof at 2012-11-08T22:03:23Z
@Koc Don't. the exception handler is there to be the safe guard when developing, and does not depend on the kernel (which would be required to trigger the event). If you were triggering the listener again, it would mean that any exception thrown in a listener would lead to a loop.
And if it is for the fatal error handling, you simply cannot be sure the kernel is still available (and even less in a wokring state) at this point.
---------------------------------------------------------------------------
by Koc at 2012-11-08T22:06:31Z
But how can I notify logger (which will send me mail or just log this situation)?
---------------------------------------------------------------------------
by fabpot at 2012-11-09T07:33:41Z
The error handler is only registered when in debug mode in the Kernel and can be triggered very early in the handling of a request (even before we have access to the dispatcher or anything else). So, the current PR looks fine to me (apart from the typo and the lack of unit tests).
---------------------------------------------------------------------------
by Koc at 2012-11-09T09:13:03Z
> The error handler is only registered when in debug mode
Ooh! I haven't see that before. But the goal - be notified about errors by email or log-file. Like now exceptions with traces from site emails to me.
---------------------------------------------------------------------------
by fabpot at 2012-11-09T09:20:54Z
I think there are two goals. The first one being to have nice pages in the development environment when a fatal error occurs. And this PR addresses that feature quite nicely. The second can be addressed in another PR.
---------------------------------------------------------------------------
by henrikbjorn at 2012-11-14T11:50:22Z
I have some questions about the ErrorHandler. Is there a reason for it only to be registered in an debug environment (which prod is not). Would assume that if i enable the ErrorHandler in productions aswell Monolog would log thoose instead of them just vanishing?
---------------------------------------------------------------------------
by Koc at 2012-11-14T12:01:50Z
I am thinking about it too. But as Fabien says it will another PR
---------------------------------------------------------------------------
by GromNaN at 2012-11-18T10:38:09Z
You should add a memory reserve to be able to handle "Out of memory" errors.
An example is here :
513d628966/lib/Raven/ErrorHandler.php (L91)513d628966/lib/Raven/ErrorHandler.php (L62)
---------------------------------------------------------------------------
by fabpot at 2012-11-28T11:35:21Z
@Koc can you finish this PR (probably by integrating the memory reserve as explained by @GromNaN)?
---------------------------------------------------------------------------
by Koc at 2012-11-28T11:46:12Z
of course, on this weekend
---------------------------------------------------------------------------
by Koc at 2012-12-02T17:44:44Z
@fabpot done
This PR was squashed before being merged into the master branch (closes#6100).
Commits
-------
0e3671b [WiP] Split urlmatcher for easier overriding
Discussion
----------
[WiP] Split urlmatcher for easier overriding
Based on discussion in https://github.com/symfony-cmf/Routing/pull/30, this PR splits the matchCollection() method of UrlMatcher into two methods. The reason is to allow Symfony CMF and Drupal to override just one of them, while leaving the actual meat of the class intact.
Additionally, it switches $routes from private to protected for the same reason: It makes it possible for us to extend the class cleanly.
Marking as WIP in case further discussion in CMF suggests other/different changes, but review and a conceptual go/no-go would be appreciated now.
---------------------------------------------------------------------------
by dbu at 2012-11-25T12:57:46Z
i think this variant really just extracts part of the logic into a separate method whithout changing any behaviour or concept. it would help a lot for the cmf to have it this way so we can extend and tweak the logic. is this now good or anybody has more input?
---------------------------------------------------------------------------
by dbu at 2012-11-27T19:42:04Z
sorry for being pushy about this one, but we need to know if this change is ok or not, if we need to improve something. if there is some problem we did not think of, we have to find different solutions for the cmf/drupal matchers.
---------------------------------------------------------------------------
by fabpot at 2012-11-28T14:29:10Z
`PhpMatcherDumper` should probably also be updated to call the new `getAttributes()` method; but that won't be possible as the Route is not accessible when using this dumper. Adding a feature that can only be used by the standard `UrlMatcher` and not by the other matchers does not sound good to me.
---------------------------------------------------------------------------
by dbu at 2012-11-28T17:18:09Z
in the context of the cmf, our problem is that we have too many routes to hold in memory. i think the dumper is not of interest for that use case - @Crell correct me please if i am wrong. if we need any caching we would need to write our own dumper probably. but currently we just extend the UrlMatcher
---------------------------------------------------------------------------
by Crell at 2012-11-30T05:47:39Z
Correct. In both the CMF case and Drupal case we have our own dumpers, because the current ones don't work for us anyway. (1000 routes and all that. :-) ) This isn't a new public method. It's just a small refactor of UrlMatcher itself to make it easier to extend. If you're using a dumped PhpMatcher, I don't know why you'd be using something like NestedMatcher in the first place.
This PR was merged into the master branch.
Commits
-------
918bad6 fix phpdoc in ExecutionContextInterface
Discussion
----------
fix phpdoc in ExecutionContextInterface
This PR was merged into the master branch.
Commits
-------
3d0c70e made ExecutionContext more consistent
Discussion
----------
[Validator] made ExecutionContext more consistent
BC break: no
The default should be an empty string instead of null because
1. a string is expected according to phpdoc
2. its more consistent with `validate($value, $groups = null, $subPath = '', $traverse = false, $deep = false)` and `validateValue($value, $constraints, $groups = null, $subPath = '')` that both have `''` as default for subPath
---------------------------------------------------------------------------
by bschussek at 2012-12-03T21:14:49Z
👍
Without the custom handler, assertions after the first failure wouldn't be executed. This catches E_USER_DEPRECATED errors and passes everything else on to the phpunit error handler.
* 2.1:
[TwigBundle] Moved the registration of the app global to the environment
needs to use simpleContent in xsd to allow empty elements
bumped Symfony version to 2.1.5-DEV
bumped Symfony version to 2.0.19-DEV
removed wrong routing xsd statement `mixed="true"`
removed unused attribute from routing.xsd
[HttpFoundation] added a small comment about the meaning of Request::hasSession() as this is a recurrent question (refs #4541)
updated VERSION for 2.1.4
updated CHANGELOG for 2.1.4
updated VERSION for 2.0.19
update CONTRIBUTORS for 2.0.19
updated CHANGELOG for 2.0.19
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
src/Symfony/Component/Routing/Loader/schema/routing/routing-1.0.xsd
* 2.0:
[TwigBundle] Moved the registration of the app global to the environment
needs to use simpleContent in xsd to allow empty elements
bumped Symfony version to 2.0.19-DEV
removed wrong routing xsd statement `mixed="true"`
removed unused attribute from routing.xsd
updated VERSION for 2.0.19
update CONTRIBUTORS for 2.0.19
updated CHANGELOG for 2.0.19
Conflicts:
CONTRIBUTORS.md
src/Symfony/Bundle/TwigBundle/Resources/config/twig.xml
src/Symfony/Bundle/TwigBundle/TwigEngine.php
src/Symfony/Component/HttpKernel/Kernel.php
Swapped arguments $groups and $subPath in ExecutionContext::validate and ExecutionContext::validateValue, so they match their interface signatures again.
This PR was merged into the 2.0 branch.
Commits
-------
57edf56 removed wrong routing xsd statement `mixed="true"`
Discussion
----------
removed wrong routing xsd statement `mixed="true"`
mixed="true" means that the element could contain both text and other elements, e.g.
`<requirement key="_locale">text <subelement /></requirement>`
But this wrong and such a definition would not even validate against the scheme as the xsd does not define which elements would be expected inside.
This PR was merged into the 2.0 branch.
Commits
-------
d5623b4 removed unused attribute from routing.xsd
Discussion
----------
removed unused attribute from routing.xsd
This PR was merged into the master branch.
Commits
-------
20dbe47 added annotation
c73cb8a add default for pattern for clarity
ddd8918 make id attribute required
62536e5 refactor to an xsd:group
451dcdc it should be possible to define the defaults, req. and options in any order, just like in YAML
Discussion
----------
improve routing xml scheme
bc break: no
Main points:
- the xml scheme only allowed defaults, requirements and options in this specific order. but the XmlFileLoader does not have the restriction and the YAML definions does not have such an restriction either. this is now fixed. so you can use
```
<requirement key="_locale">en</requirement>
<default key="_controller">Foo</default>
```
Before it had the be first all defaults, then all requirements, then all options.
- make id attribute required
For more changes see commits.
This PR was merged into the master branch.
Commits
-------
373be62 Bugfix for creating cookie on loginSuccess in AbstractRememberMeServices
Discussion
----------
Bugfix for creating cookie on loginSuccess in AbstractRememberMeServices
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #6055
Todo: -
License of the code: MIT
By a mistake setting of new cookies did not work for other RememberMe services than PersistentTokenBasedRememberMeServices
---------------------------------------------------------------------------
by TerjeBr at 2012-12-01T17:28:08Z
Ping. Any feedback on this?
mixed="true" means that the element could contain both text and other elements, e.g.
`<requirement key="_locale">text <subelement /></requirement>`
But this wrong and such a definition would not even validate against the scheme as the xsd does not define which elements would be expected inside.
* 2.1:
replaced magic strings by proper constants
refactored tests for Request
fixed the logic in Request::isSecure() (if the information comes from a source that we trust, don't check other ones)
added a way to configure the X-Forwarded-XXX header names and a way to disable trusting them
fixed algorithm used to determine the trusted client IP
removed the non-standard Client-IP HTTP header
Conflicts:
src/Symfony/Component/HttpFoundation/Tests/RequestTest.php
* 2.0:
replaced magic strings by proper constants
refactored tests for Request
fixed the logic in Request::isSecure() (if the information comes from a source that we trust, don't check other ones)
added a way to configure the X-Forwarded-XXX header names and a way to disable trusting them
fixed algorithm used to determine the trusted client IP
removed the non-standard Client-IP HTTP header
Conflicts:
src/Symfony/Component/HttpFoundation/Request.php
src/Symfony/Component/HttpFoundation/Tests/RequestTest.php
* 2.1: (29 commits)
[DependencyInjection] fixed composer.json
[Validator] Fix typos in validators.ru.xlf
Edited some minor grammar and style errors in russian validation file
Updated Bulgarian translation
[Form] improve error message with a "hasser" hint for PropertyAccessDeniedException
[Form] Updated checks for the ICU version from 4.5+ to 4.7+ due to test failures with ICU 4.6
[Form] simplified a test from previous merge
Update src/Symfony/Component/Form/Extension/Core/Type/FileType.php
fixed CS
Xliff with other node than source or target are ignored
small fix of #5984 when the container param is not set
Filesystem Component mirror symlinked directory fix
[Process][Tests] fixed chainedCommandsOutput tests
fixed CS
Use better default ports in urlRedirectAction
Add tests for urlRedirectAction
info about session namespace
fix upgrade info about locale
Update src/Symfony/Component/DomCrawler/Tests/FormTest.php
Update src/Symfony/Component/DomCrawler/Form.php
...
* 2.0:
[DependencyInjection] fixed composer.json
[Form] Updated checks for the ICU version from 4.5+ to 4.7+ due to test failures with ICU 4.6
fixed CS
small fix of #5984 when the container param is not set
fixed CS
Use better default ports in urlRedirectAction
Add tests for urlRedirectAction
Update src/Symfony/Component/DomCrawler/Tests/FormTest.php
Update src/Symfony/Component/DomCrawler/Form.php
[Security] remove escape charters from username provided by Digest DigestAuthenticationListener
[Security] added test extra for digest authentication
fixed CS
[Security] Fixed digest authentication
[Security] Fixed digest authentication
[SecurityBundle] Convert Http method to uppercase in the config
Use Norm Data instead of Data
Conflicts:
src/Symfony/Bridge/Doctrine/Form/EventListener/MergeCollectionListener.php
src/Symfony/Bundle/FrameworkBundle/Controller/RedirectController.php
src/Symfony/Component/DependencyInjection/composer.json
This PR was merged into the master branch.
Commits
-------
0a380cf [HttpFoundation] disabled Request _method feature by default (should now be explicitely enabled via a call to enableHttpMethodOverride())
Discussion
----------
[HttpFoundation] disabled Request _method feature by default
It should now be explicitely enabled via a call to enableHttpMethodOverride())
This PR was merged into the 2.1 branch.
Commits
-------
06ee53b [Form] improve error message with a "hasser" hint for PropertyAccessDeniedException
Discussion
----------
[Form] improve error msg w/ a "hasser" hint for PropertyAccessDeniedException
"Hasser" support was added under the 2.1 branch of the Form component
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: no, but fails exactly the same as without this fix
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: symfony/symfony-docs#1958
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: no, but fails exactly the same as without this fix
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: symfony/symfony-docs#1958
This PR was merged into the master branch.
Commits
-------
1858b96 [Form] Adapted FormValidator to latest changes in the Validator
1f752e8 [DoctrineBridge] Adapted UniqueValidator to latest changes in the Validator
efe42cb [Validator] Refactored the GraphWalker into an implementation of the Visitor design pattern.
Discussion
----------
[Validator] Refactored the Validator for use in Drupal
Bug fix: no
Feature addition: no
Backwards compatibility break: yes
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: TODO
Drupal wants to use the Symfony Validator component in their next version. I was talking to @fago recently about the changes that we'd need to make and implemented these changes in this PR. I don't want to rush this, but the deadline is tight, since Drupal feature freeze is on December 1st and @fago needs at least a couple of days to integrate the Validator into Drupal.
This PR introduces two significant changes:
* Interfaces were created for all classes that constitute the Validator's API. This is were the PR breaks BC, because `ConstraintValidatorInterface::initialize()` is now type hinted against `ExecutionContextInterface` instead of `ExecutionContext`.
* The graph walker was refactored into an implementation of the Visitor pattern. This way, the validator was decoupled from the structure of the metadata (class → properties and getter methods) and makes it possible to implement a different metadata structure, as is required by the Drupal Entity API.
As a consequence of the API change, custom validation code is now much easier to write, because `ValidatorInterface` and `ExecutionContextInterface` share the following set of methods:
```php
interface ValidatorInterface
{
public function validate($value, $groups = null, $traverse = false, $deep = false);
public function validateValue($value, $constraints, $groups = null);
public function getMetadataFor($value);
}
interface ExecutionContextInterface
{
public function validate($value, $subPath = '', $groups = null, $traverse = false, $deep = false);
public function validateValue($value, $constraints, $subPath = '', $groups = null);
public function getMetadataFor($value);
}
```
No more juggling with property paths, no more fiddling with the graph walker. Just call on the execution context what you'd call on the validator and you're done.
There are two controversial things to discuss and decide (cc @fabpot):
* I moved the `@api` tags of all implementations to the respective interfaces. Is this ok?
* I would like to deprecate `ValidatorInterface::getMetadataFactory()` (tagged as `@api`) in favor of the added `ValidatorInterface::getMetadataFor()`, which offers the exact same functionality, but with a different API and better encapsulation, which makes it easier to maintain for us. We can tag `getMetadataFor()` as `@api`, as I don't expect it to change. Can we do this or should we leave the old method in?
I would like to decide the major issues of this PR until **Sunday November 25th** in order to give @fago enough room for his implementation.
Let me hear your thoughts.
This PR was merged into the master branch.
Commits
-------
d1b5093 Try to make sure cookies get deleted from the TokenProvider when no longer in use
Discussion
----------
Delete cookies from the TokenProvider that is no longer in use
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Todo: -
License of the code: MIT
When the user logs in, or login fails for some reason, the old "remember me" cookie should be deleted from the TokenProvider if you are using the PersistentTokenBasedRememberMeServices.
As the code is now, the token is only deleted on logout.
---------------------------------------------------------------------------
by TerjeBr at 2012-11-20T13:45:54Z
So, anything else that needs to be done before this is merged?
---------------------------------------------------------------------------
by TerjeBr at 2012-11-21T10:30:53Z
Ok, I have corrected the typo in the comment and squashed the commit.
---------------------------------------------------------------------------
by schmittjoh at 2012-11-21T10:36:29Z
btw, ``canceled`` (more American) and ``cancelled`` (more British) are both
correct English forms.
On Wed, Nov 21, 2012 at 11:30 AM, Terje Bråten <notifications@github.com>wrote:
> Ok, I have corrected the typo in the comment and squashed the commit.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/symfony/symfony/pull/6055#issuecomment-10592112>.
>
>
---------------------------------------------------------------------------
by schmittjoh at 2012-11-21T10:40:24Z
As a side-note have you verified that this does not break the cookie theft protection?
---------------------------------------------------------------------------
by TerjeBr at 2012-11-21T10:51:10Z
Yes, cookie theft protection is still there and is functioning well.
---------------------------------------------------------------------------
by TerjeBr at 2012-11-21T11:14:04Z
I am using this together with the DoctrineTokenProvider in issue #6057 in my own project and done some extensive testing on it.
---------------------------------------------------------------------------
by TerjeBr at 2012-11-23T10:30:34Z
Is this ready to be merged now?
This PR was squashed before being merged into the master branch (closes#6080).
Commits
-------
e477a2e Handle case of static controller method and controllers using magic __call() method
Discussion
----------
Handle case of static controller method and controllers using magic __call() method
Improve collecting controller details for edge cases where:
- controller is array, but contains class name and static method
- method doesn't exist, but is handled by magic __call() method
---------------------------------------------------------------------------
by fabpot at 2012-11-21T08:12:08Z
Can you add some unit tests?
---------------------------------------------------------------------------
by sli-systems at 2012-11-21T22:19:17Z
@pierredup
I disagree with the your comment about is_callable() only working with objects. The PHP docs state that the first argument is a callable, so it can be a string, array, closure, and perhaps more.
The test I added also shows that the code works as is :)
I've thought about your suggestion of adding reflection to look up the location of __call(). However, I think this doesn't really add a lot and only complicates matters. Also, as you can see in the new test, there is also __callStatic() to consider.
The fact that file/line are n/a is correct, because the most typical case will be that __call() and __callStatic() will delegate to some other method that might not even be in the same class/file (a subclass I would expect), IMHO.
@fabpot
Good catch about the '/'. I hope the test is complete enough. Looks more like an exercise on PHP callables than anything else, tho ;)
---------------------------------------------------------------------------
by pierredup at 2012-11-22T04:56:18Z
True that ````is_callable```` takes any callable argument, except in the one specific case where you have a ````__call()```` method, and pass an array with the first paramater as a string.
Take the following example:
class Controller {
public function __call($method, $arguments) {}
}
$controller = array('Controller', 'action');
var_dump(is_callable($controller));
Here ````is_callable($controller)```` will actually return ````false````, where if you have ````$controller = array(new Controller, 'action');```` it would return true.
Of course if you have a ````__callStatic```` method, then it would always return true.
Your tests doesn't seem to cover this use case
---------------------------------------------------------------------------
by sli-systems at 2012-11-22T20:27:05Z
Hmm, maybe. I have to admin that I do not know about this case. OTOH, if is_callable returns false is it really callable then? I would think this more of a PHP bug then?
I think I might have come across this case during coding, but then dismissed it because in that case FilterControllerEvent failed already before the data collector code is reached.
In FilterControllerEvent there is a check on is_callable and a LogicException is thrown if $controller is not callable.
So, is FilterControllerEvent wrong too then?
---------------------------------------------------------------------------
by pierredup at 2012-11-22T20:41:14Z
One would think that if is_callable returns false, then the controller isn't callable, but in the case I mentioned above, the controller is in fact callable. I also thought it was a bug with php, but the php-internals don't seem to think so.
The problem is, if you specify the class as a string, php looks for a static method, even if you have a __call method, it won't be registered.
I will have a look at the FilterControllerEvent to see if this use case applies there as well.
---------------------------------------------------------------------------
by sli-systems at 2012-11-22T20:50:32Z
Rather strange - if that is the case then using is_callable seems pretty pointless and the only way would be to try to execute the controller to find out if it is, in fact, callable...
---------------------------------------------------------------------------
by pierredup at 2012-11-22T20:51:07Z
Okay so it actually seems that the case above isn't callable after all. If the controller is specified as a string, then a static method need to exist. Hence why it works with __callStatic. Only when an instance of the class is specified, will it handle the __call method.
---------------------------------------------------------------------------
by sli-systems at 2012-11-22T20:57:55Z
So the tests are sufficient then?
---------------------------------------------------------------------------
by pierredup at 2012-11-22T20:59:22Z
Yes it is.
This happens when you just assume something without actually testing it :)
Sorry for the hassle
With this refactoring comes a decoupling of the validator from the structure of
the underlying metadata. This way it is possible for Drupal to use the validator
for validating their Entity API by using their own metadata layer, which is not
modeled as classes and properties/getter methods.
This PR was merged into the 2.1 branch.
Commits
-------
84635bd [Form] allowed no type guesser to be registered
Discussion
----------
[Form] made the factory builder pass null when no type guesser registered
reopened#5422 against 2.1 as it's a bug fix
---------------------------------------------------------------------------
by stof at 2012-10-13T21:23:34Z
@fabpot anything left for this PR ?
---------------------------------------------------------------------------
by fabpot at 2012-10-14T09:41:29Z
@bamarni Can you add some unit tests and also update the FormExtensionInterface interface phpdoc as `getTypeGuesser` can now return `null`? Thanks. ping @bschussek
---------------------------------------------------------------------------
by bamarni at 2012-10-14T17:10:27Z
I've added a few tests covering this.
@fabpot : the phpdoc is already correct, it currently can return null, this only occurs with this convenient class.
---------------------------------------------------------------------------
by bschussek at 2012-10-16T07:43:41Z
This PR breaks FormFactory::createBuilderForProperty(), which expects a guesser to be present. Can you check the component for other uses of the guesser and add a null-check there?
---------------------------------------------------------------------------
by bamarni at 2012-10-16T10:57:54Z
I cannot find other places than the factory (searching for 'getTypeGuesser').
---------------------------------------------------------------------------
by bschussek at 2012-11-08T16:58:37Z
You should also adapt `FormRegistry::getTypeGuesser()` not to build a `FormTypeGuesserChain` if the array of guessers is empty. In that case it will return now `null` (adapt the doc block). We also need a different was of checking if the type guessers have already been parsed in FormRegistry. Otherwise the first if condition in `FormRegistry::getTypeGuesser()` will never become false. You could for example initialize the property `$guesser` to `false` and only set it to `null` after the first run of `getTypeGuesser()`.
---------------------------------------------------------------------------
by bamarni at 2012-11-08T18:40:00Z
good catch I had missed it! I've applied your suggestion in the latest commit. Do you see anything else before I squash?
---------------------------------------------------------------------------
by bschussek at 2012-11-08T18:45:15Z
A test for `FormRegistry::getTypeGuesser()` would of course be awesome.
---------------------------------------------------------------------------
by bamarni at 2012-11-08T18:52:13Z
Then it was already awesome! (see https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Tests/FormRegistryTest.php#L252)
I've also added one for the null case if it's what you meant.
This PR was merged into the master branch.
Commits
-------
e2a50ef [OptionsResolver] fix normalizer without corresponding option
5a53821 [OptionsResolver] fix removing normalizers
Discussion
----------
OptionsResolver: normalizer fix
setNormalizer() -> replace() -> all() would generate an error.
---------------------------------------------------------------------------
by bschussek at 2012-07-29T16:09:20Z
Thank you for the fix! Could you please add a test case?
---------------------------------------------------------------------------
by Tobion at 2012-07-30T15:42:26Z
There is another problem: setNormalizer() (without setting an option) -> all()
I suggest to simply ignore normalizers that have no corresponding option. Do you agree?
---------------------------------------------------------------------------
by Tobion at 2012-07-30T16:19:24Z
On the other hand, one could argue that a normalizer without option should also work like this:
```
$this->options->setNormalizer('foo', function (Options $options) {
return '';
});
$this->assertEquals(array('foo' => ''), $this->options->all());
```
But when having a normalizer that wants a previous value as param, it does not work (because there is none).
---------------------------------------------------------------------------
by stof at 2012-07-30T16:30:34Z
@Tobion according to github, this need to be rebased
---------------------------------------------------------------------------
by bschussek at 2012-07-30T19:16:48Z
I guess setNormalizer() should check whether the option is set and fail otherwise. The second possibility, as you say, is to ignore them in all(). I'd prefer whatever is more efficient.
---------------------------------------------------------------------------
by bschussek at 2012-07-30T19:17:27Z
But setting a normalizer without setting an option, and having that option appear in the final options, does not make sense if you ask me.
---------------------------------------------------------------------------
by Tobion at 2012-07-30T21:23:46Z
Well it could make sense. If you want to override/normalize an option to a given value however it has been overloaded by others or just not overloaded at all. This is what normalizers do. I think its more consistent than the other solutions.
Raising exception in setNormalizer would make the Class dependent on the order you call the methods, e.g. `setNormalizer(); set()` would not work. But the other way round would be ok.
Ignoring some normalizers in `all` would be strange because they are there but not applied under some circumstances.
---------------------------------------------------------------------------
by Tobion at 2012-07-30T21:42:40Z
Added the fix. If you disagree tell me.
---------------------------------------------------------------------------
by bschussek at 2012-08-04T09:30:18Z
> Raising exception in setNormalizer would make the Class dependent on the order you call the methods, e.g. `setNormalizer(); set()` would not work. But the other way round would be ok.
I think this would be a better solution. I dislike if the normalizer magically adds an option that does not exist. This could hide implementation error, e.g. when a refactoring removes an option, but the normalizer is forgotten. Can you throw an exception in this case?
Should we find use cases that rely on this to work, we can soften the behavior and remove the exception.
---------------------------------------------------------------------------
by Tobion at 2012-08-04T15:02:51Z
Well, that would also make it impossible to set a normalizer for on optional option in OptionsResolver.
So `setOptional` + `setNormalizers` would throw an exception which sounds counter-intuitive. Are you sure about that?
---------------------------------------------------------------------------
by Tobion at 2012-08-17T11:47:58Z
ping @bschussek
---------------------------------------------------------------------------
by Tobion at 2012-10-07T22:31:44Z
@bschussek ping
---------------------------------------------------------------------------
by stof at 2012-10-13T18:04:30Z
@bschussek ping
---------------------------------------------------------------------------
by Tobion at 2012-11-08T09:55:15Z
@bschussek please let's get this finished.
They should normally be initialized anyway in the constructor. But when extending the Route (like in CMF) and using an ORM/ODM to persist them in the DB, the constructor is not called. Then a new property that is not saved like hostnamePattern stays null which in turn makes the RouteCompiler fails as it expects '' instead of null.
This PR was merged into the 2.0 branch.
Commits
-------
f2cbea3 [Security] remove escape charters from username provided by Digest DigestAuthenticationListener
80f6992 [Security] added test extra for digest authentication
d66b03c fixed CS
694697d [Security] Fixed digest authentication
c067586 [Security] Fixed digest authentication
Discussion
----------
Fix digest authentication
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets:
Todo: -
License of the code: MIT
Documentation PR: -
Replaces: #5485
This adds the missing fixes.
My only concerns is the ```\"``` removing.
```\"``` is only needed for the HTTP transport, but keeping them would require to also store the username with the escapes as well.
---------------------------------------------------------------------------
by fabpot at 2012-10-30T11:25:28Z
The digest authentication mechanism is not that widespread due to its limitation. And the transport is not HTTP, I think we are talking about very few cases.
---------------------------------------------------------------------------
by sstok at 2012-10-30T12:49:14Z
Apache seems to remove (ignore) escape characters.
```c
if (auth_line[0] == '=') {
auth_line++;
while (apr_isspace(auth_line[0])) {
auth_line++;
}
vv = 0;
if (auth_line[0] == '\"') { /* quoted string */
auth_line++;
while (auth_line[0] != '\"' && auth_line[0] != '\0') {
if (auth_line[0] == '\\' && auth_line[1] != '\0') {
auth_line++; /* escaped char */
}
value[vv++] = *auth_line++;
}
if (auth_line[0] != '\0') {
auth_line++;
}
}
else { /* token */
while (auth_line[0] != ',' && auth_line[0] != '\0'
&& !apr_isspace(auth_line[0])) {
value[vv++] = *auth_line++;
}
}
value[vv] = '\0';
}
```
But would this change be a BC break for people already using quotes but without a comma and thus they never hit this bug?
The change it self is minimum, just calling ```str_replace('\\\\', '\\', str_replace('\\"', '"', $value))``` when getting the username.
---------------------------------------------------------------------------
by fabpot at 2012-11-13T13:00:12Z
@sstok Doing the same as Apache seems the best option here (just document the BC break).
---------------------------------------------------------------------------
by sstok at 2012-11-15T16:05:00Z
Hopefully I did this correct, but the needed escapes seem correctly removed.
`\"` is changed to `"` `\\` is changed to `\`
`\'` it kept as it is, as this needs no correcting.
@Vincent-Simonin Can you verify please.
---------------------------------------------------------------------------
by Vincent-Simonin at 2012-11-19T09:28:18Z
Authentication didn't work with this configuration :
```
providers:
in_memory:
name: in_memory
users:
te"st: { password: test, roles: [ 'ROLE_USER' ] }
```
`te"st` was set in authentication form's user field.
(Must we also escape `"` in configuration file ?)
Tests were performed with nginx.
---------------------------------------------------------------------------
by sstok at 2012-11-19T09:33:34Z
Yes. YAML escapes using an duplicate quote, like SQL.
```yaml
providers:
in_memory:
name: in_memory
users:
"te""st": { password: test, roles: [ 'ROLE_USER' ] }
```
This PR was squashed before being merged into the master branch (closes#5888).
Commits
-------
2379d86 CS Fixes - Replaced "array of type" by "Type[]" in PHPDoc block
Discussion
----------
CS Fixes - Replaced "array of type" by "Type[]" in PHPDoc block
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: no (but tests doesn't pass on master too). See Travis.
License of the code: MIT
Documentation PR: Not Applicable
Status: Finished
To improve support of the eclipse PDT pluggin (for autocompletion), I propose to change the array notation in PHPDoc blocks to match the phpDocumentor notation for "array of type".
Modifications are made for the following components:
- BrowserKit
- ClassLoader
- Config
- Console
- CssSelector
- DependencyInjection
- DomCrawler
- EventDispatcher (no changes)
- Filesystem (no changes)
- Finder
- Form
- HttpFoundation
- HttpKernel
- Locale
- OptionResolver (no changes)
- Process (no changes)
- Routing (no changes)
- Serializer (no changes)
- Templating
- Translation
- Validator
- Yaml (no changes)
- Security
- Stopwatch (no changes)
See Proposal https://github.com/symfony/symfony/pull/5852
---------------------------------------------------------------------------
by pborreli at 2012-11-01T15:19:27Z
will you make a PR for each component ? why not only one PR with one commit for each component instead ?
---------------------------------------------------------------------------
by raziel057 at 2012-11-01T15:32:39Z
Ok, I'm going try to do it.
---------------------------------------------------------------------------
by raziel057 at 2012-11-01T16:12:56Z
I would like to rename my branch from COMPONENT_Form to changes-phpdoc (as all modifications would be commited in only one branch), so I tried to execute the following command but I have an error.
git remote rename COMPONENT_Form changes-phpdoc
error: Could not rename config section 'remote.COMPONENT_Form' to 'remote.changes-phpdoc'
Do you know how to do it?
---------------------------------------------------------------------------
by pborreli at 2012-11-01T16:14:26Z
don't rename it, you will have to close and make another PR which is useless here, just edit the title.
---------------------------------------------------------------------------
by stof at 2012-11-01T16:16:17Z
and ``git remote rename`` is about renaming a remote repo, not a branch
---------------------------------------------------------------------------
by raziel057 at 2012-11-03T11:36:02Z
Is it normal that all my commit are duplicated? I would like just update my master and merge with my branch.
---------------------------------------------------------------------------
by fabpot at 2012-11-06T10:22:55Z
@raziel057 Can you rebase on master? That should fix your problem.
---------------------------------------------------------------------------
by fabpot at 2012-11-09T13:28:53Z
@raziel057 Can you finish this PR?
---------------------------------------------------------------------------
by Tobion at 2012-11-09T13:34:45Z
I'll do it for the routing component this evening because I know it by heart. ^^
---------------------------------------------------------------------------
by raziel057 at 2012-11-09T15:06:26Z
@Tobion ok Thanks!
@fabpot Yes, I will try to finish it this week end.
---------------------------------------------------------------------------
by raziel057 at 2012-11-11T13:04:07Z
@Tobion Did you already change PHPDoc in the Routing component?
---------------------------------------------------------------------------
by Tobion at 2012-11-11T15:21:18Z
@raziel057 Yes I'm working on it.
---------------------------------------------------------------------------
by Tobion at 2012-11-12T15:16:31Z
@raziel057 Done. See #5994
This PR was merged into the master branch.
Commits
-------
824a0f3 [Routing] compatibility with older PCRE (pre 8)
Discussion
----------
[Routing] compatibility with older PCRE (pre 8)
#6062 for master
This PR was merged into the 2.1 branch.
Commits
-------
1daefa5 [Routing] made it compatible with older PCRE version (pre 8)
Discussion
----------
[Routing] compatibility with older PCRE version (pre 8)
fixes#4093
Ok I changed my mind about this issue.
1. I figured more people are affected than I thought and CentOS is stubborn.
2. Symfony still uses the old regex style `?P<param>` in several other components. So also doing so in the routing makes it more consistent.
3. Even if it's definitely not good to use an over 6 year old PCRE version with a recent PHP version, we can still try to provide the best experience. It doesn't mean we support outdated software stacks of custom PHP compilations as we won't and cannot specifically test against it.
@fabpot: I will do a seperate PR on master when you merged this because the code changed alot in master so it cannot easily be merged I guess. I will also convert the symfony requirement for PCRE in the requirements check to a recommendation.
This PR was merged into the master branch.
Commits
-------
966e7d6 [DI] removed unneeded is_object() calls
Discussion
----------
[DI] removed unneeded is_object() calls
I searched through all of symfony for occurences of the coding style `(is_object($value) && $value instanceof Object)` with a regex like `is_object\(\$[a-zA-z0-9]+\) && \$[a-zA-z0-9]+ instanceof `.
The `is_object` calls are not needed in this case. Only the DI component made such duplicate checks.
This PR was squashed before being merged into the master branch (closes#6030).
Commits
-------
749dac1 Improve docBlock
Discussion
----------
Improve docBlock
This is just a minor change documenting the return type of `SerializerInterface::deserialize()`.
This PR was merged into the master branch.
Commits
-------
83b37ff [DependencyInjection] Return self for add...
Discussion
----------
[DependencyInjection] Return self for add...
Bug fix: no
Forget fix: yes
Feature addition: no
Symfony2 tests pass: yes
License of the code: MIT
Return self instance when call an ADD something method.
---------------------------------------------------------------------------
by pborreli at 2012-11-16T13:24:45Z
Please fix PHPDoc accordingly
---------------------------------------------------------------------------
by ruian at 2012-11-16T13:38:41Z
@pborreli done.
This PR was merged into the master branch.
Commits
-------
97f6a1b [Form] Update password type trimming to false
Discussion
----------
[Form] Update password trimming to false by default
Bug fix: yes
Feature addition: no
Backwards compatibility break: yes
Symfony2 tests pass: yes
Fixes the following tickets: ~
Todo: -
License of the code: MIT
Documentation PR: ~
Hey!
Today, I realize that the password type is by default trimmed. IMHO, this is not the expected behavior. By default, the password type should not trim the input value.
Regards
---------------------------------------------------------------------------
by nomack84 at 2012-11-13T19:16:29Z
👍
---------------------------------------------------------------------------
by mvrhov at 2012-11-13T19:57:29Z
IMHO password and username fields should be trimmed. whitespace at the beginning and at the end of those fields are not wanted. At least I don't want to deal with a user support where WS on those fields is not trimmed.
---------------------------------------------------------------------------
by egeloen at 2012-11-13T20:08:08Z
@mvrhov I agree with you about username fields and other "text" fields but in case of a password field, if the end user specifies white space at the begin/end of his password, it should not be trimmed. It should simply let it as it is. I open this PR due to two customers who reports me this behavior.
---------------------------------------------------------------------------
by clemherreman at 2012-11-14T10:06:15Z
@mvrhov I agree, username shouldn't be trimmed, however password are kind of special. They should be used *"as is"*, as lots of users have wicked passwords.
Moreover, usually the password is asked twice, so if there are spaces, they are most likely wanted by the end user.
So 👍
---------------------------------------------------------------------------
by clemherreman at 2012-11-14T10:07:27Z
Also Travis status on this PR is **failed** because of an error when downloading the deps.
---------------------------------------------------------------------------
by geoffrey-brier at 2012-11-14T10:34:56Z
👍
---------------------------------------------------------------------------
by bschussek at 2012-11-14T15:01:43Z
Could you please add a test case to PasswordTypeTest?
Please also reference this PR in the test
(= add the comment `// https://github.com/symfony/symfony/pull/6007` before the test)
---------------------------------------------------------------------------
by egeloen at 2012-11-14T15:10:36Z
@bschussek I have updated the PR.
---------------------------------------------------------------------------
by bschussek at 2012-11-14T15:24:34Z
Thanks! Could you please squash the commits?
---------------------------------------------------------------------------
by egeloen at 2012-11-14T15:30:11Z
@bschussek Done.
---------------------------------------------------------------------------
by stloyd at 2012-11-14T15:39:47Z
Should this be noted in `UPGRADE` file ? (as this is change of actually BC break =))
---------------------------------------------------------------------------
by egeloen at 2012-11-15T22:59:45Z
@stloyd Where can I put it? In the [UPGRADE-2.2](https://github.com/symfony/symfony/blob/master/UPGRADE-2.2.md) file?
---------------------------------------------------------------------------
by stloyd at 2012-11-15T23:02:51Z
@egeloen IMO yes, according this will go to `master` (which is actual _dev_ branch for `2.2`)
---------------------------------------------------------------------------
by egeloen at 2012-11-16T13:54:04Z
@fabpot I have removed the comment & added an entry in the `UPGRADE-2.2` file.
Bug fix: no
Feature addition: no
Backwards compatibility break: yes
Symfony2 tests pass: yes
License of the code: MIT
Return self instance when call an ADD something method.
This PR was squashed before being merged into the master branch (closes#6018).
Commits
-------
6334343 [Routing] removed getHostnamePattern from RouteCollection
Discussion
----------
[Routing] removed getHostnamePattern from RouteCollection
this method is not useful and can introduce inconsistencies when a sub-route has a different hostname, which already has a getter for the hostname
This PR was merged into the master branch.
Commits
-------
f4b630d [HttpFoundation] fix#6002
Discussion
----------
[HttpFoundation] fix#6002
---------------------------------------------------------------------------
by fabpot at 2012-11-13T17:02:45Z
Can you add a test?
---------------------------------------------------------------------------
by Tobion at 2012-11-13T17:04:23Z
hehe see #6004 there is also a test
---------------------------------------------------------------------------
by vicb at 2012-11-13T17:05:06Z
There is a test in the original PR, no need for 6004.
---------------------------------------------------------------------------
by vicb at 2012-11-13T17:05:20Z
Which is why is was failing btw
---------------------------------------------------------------------------
by Tobion at 2012-11-13T17:06:36Z
The test in 6002 did not fail for me without your patch.
---------------------------------------------------------------------------
by fabpot at 2012-11-14T12:47:46Z
@Tobion @vicb What do we do? Just revert #6002 or merge this PR?
---------------------------------------------------------------------------
by vicb at 2012-11-14T13:25:51Z
Merge. Go go go :)
----- Reply message -----
De : "Fabien Potencier" <notifications@github.com>
Pour : "symfony/symfony" <symfony@noreply.github.com>
Cc : "Victor Berchet" <victor@suumit.com>
Objet : [symfony] [HttpFoundation] fix#6002 (#6003)
Date : mer., nov. 14, 2012 13:47
@Tobion @vicb What do we do? Just revert #6002 or merge this PR?
—
Reply to this email directly or view it on GitHub.
---------------------------------------------------------------------------
by Tobion at 2012-11-14T13:31:22Z
@vicb can you explain what it fixes? As I said, your test does not cover something that would fail without the patch. So I don't see the bug.
---------------------------------------------------------------------------
by vicb at 2012-11-14T15:30:55Z
@Tobion php.net states: The `current()` function simply returns the value of the array element that's currently being pointed to by the internal pointer and `reset()` returns the value of the first array element.
I have no clue what the "element that's currently being pointed to by the internal pointer" in this method so `reset()` is probably what you want.
Validated ?
---------------------------------------------------------------------------
by Tobion at 2012-11-14T16:12:03Z
I agree `reset()` is more explicit here. But `current()` should work just as well in this case because the array pointer can only be at the first item when calling the method. Anyway, this is good to merge. I just hoped there was a unit test that ensures this on my machine. This is why I added the test in my patch. Maybe Fabien can just merge the second commit on #6004
---------------------------------------------------------------------------
by vicb at 2012-11-14T16:20:57Z
As explained in #6004, there is already a test from my first PR that made Travis go red.
This PR was merged into the master branch.
Commits
-------
395c004 [HttpFoundation] Fix AcceptHeader
Discussion
----------
[HttpFoundation] Fix AcceptHeader
The important lines are:
```php
<?php
- return !empty($this->items) ? current($this->items) : null;
+ return !empty($this->items) ? $this->items[0] : null;
```
(and the corresponding test).
The commit has some code re-org to make reading tests easier (providers defined close the the corresponding test). This might be personal preferences only, let me know if it should be reverted.
* 2.1:
fixed comment. The parent ACL is not accessed in this method.
[HttpFoundation] Make host & methods really case insensitive in the RequestMacther
[Validator] fixed Ukrainian language code (closes#5972)
Fixed case of php function
* 2.0:
fixed comment. The parent ACL is not accessed in this method.
[HttpFoundation] Make host & methods really case insensitive in the RequestMacther
[Validator] fixed Ukrainian language code (closes#5972)
Fixed case of php function
Conflicts:
src/Symfony/Bundle/FrameworkBundle/Resources/translations/validators.uk.xliff
src/Symfony/Component/HttpFoundation/RequestMatcher.php
* 2.1: (24 commits)
forced Travis to use source to workaround their not-up-to-date Composer on PHP 5.3.3
[Routing] removed irrelevant string cast in Route
Fixed typo
Make YamlFileLoader and XmlFileLoader file loading extensible
[HttpKernel] fix typo
Fixed singularization of "prices"
[Form] Removed an exception that prevented valid formats from being passed, e.g. "h" for the hour, "L" for the month etc.
[HttpKernel] fixed Client when using StreamedResponses (closes#5370)
fixed PDO session handler for Oracle (closes#5829)
[HttpFoundation] fixed PDO session handler for Oracle (closes#5829)
[Locale] removed a check that is done too early (and it is done twice anyways)
Update src/Symfony/Component/Validator/Resources/translations/validators.fa.xlf
Adding new localized strings for farsi validation.
[HttpFoundation] moved the HTTP protocol check from StreamedResponse to Response (closes#5937)
[Form] Fixed forms not to be marked invalid if their children are already marked invalid
[Form] Excluded some tests in NumberToLocalizedStringTransformerTest which fail on ICU 4.4, but work on ICU 4.8
added missing tests from previous merge
[Form] Fixed NumberToLocalizedStringTransformer to accept both comma and dot as decimal separator, if possible
Fix export-ignore on Windows
Show correct class name InputArgument in error message
...
Conflicts:
.travis.yml
src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php
This PR was merged into the master branch.
Commits
-------
0159358 refactored CSS, images, templates included in the built-in bundles
812b9b1 replace _ in stylesheets (ids and classes) by - (should be consistent across the whole framework now)
983b2b5 uniformized styles
e0aab40 renamed sf-exceptionreset to sf-reset
Discussion
----------
Public resources refactoring
The first 3 commits are just cosmetic ones.
The last one refactors CSS, images, and templates included in the built-in bundles. Right now, everything is tied to the exception pages, but the code can be used standalone.
So, the goal is to make things more decoupled and more reusable across different bundles. That way, a bundle can provide pages that look like the other ones in Symfony without the need to duplicate code.
See the associated PR for the distribution bundle to see an example.
If you want to have a look at the last commit (not sure if it is worth it), you probably want to append ?w=1 to the URL to avoid too much whitespace noise.
---------------------------------------------------------------------------
by pborreli at 2012-11-13T09:38:00Z
congrats ! #6000
---------------------------------------------------------------------------
by fabpot at 2012-11-13T09:38:39Z
A simple usage example:
```jinja
{% extends "TwigBundle::layout.html.twig" %}
{% block body %}
<div class="block">
FOOBAR
</div>
{% endblock %}
```
This PR was squashed before being merged into the master branch (closes#5879).
Commits
-------
07bd5c6 Make non-instantiable utils classes consistent with each other
Discussion
----------
Make non-instantiable utils classes consistent with each other
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
As per discussion in #5875 turned out that we don't have a consistent way to define non-instantiatable classes.
I don't like `final` as it removes flexibility with no visible gain.
I don't like `abstract` since it's not specifically clear what is meant by that. Is this class not complete? Should it be extended?
This PR was merged into the 2.0 branch.
Commits
-------
b3a8efd fixed comment. The parent ACL is not accessed in this method.
Discussion
----------
fixed comment. The parent ACL is not accessed in this method.
Just fixed a comment on PermissionGrantingStrategy.
hasSufficientPermissions() is not accessing the parent ACL. That's done in isGranted().
we don't need the logic to merge numeric keys, as we don't have them. I could also improve the genrated code by PhpMatcherDumper a little by saving a function call.
This PR was squashed before being merged into the master branch (closes#5928).
Commits
-------
6a033f3 setData method also accepts objects. Doc should reflect this.
Discussion
----------
setData method also accepts objects. Doc should reflect this.
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: NA
Todo: None
License of the code: MIT
Documentation PR: None
This PR was squashed before being merged into the master branch (closes#5904).
Commits
-------
84adcb1 [2.2][Routing] Added support for default attributes with default values of method params
Discussion
----------
[2.2][Routing] Added support for default attributes with default values of method params
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
With this patch, you can configure your default values likes this:
``` php
/**
* @Route("/hi/{name}", name="hi")
*/
public function hiAction($name = "Bob")
{
return new Response($name);
}
```
---------------------------------------------------------------------------
by Tobion at 2012-11-03T23:15:32Z
I'm unsure. How does one know if that param defines a default value or a requirement? It's too vague.
---------------------------------------------------------------------------
by lyrixx at 2012-11-03T23:35:27Z
It's only a default value, not a requirement.
It's just a shortcut to avoid `defaults={"name"="bob"}`
---------------------------------------------------------------------------
by Tobion at 2012-11-03T23:43:51Z
Yes, but its not clear. It could also be a shortcut to `requirements={"name"="bob"}`, which has totally different meaning. So it's not self-explanatory.
-1 for me.
---------------------------------------------------------------------------
by lyrixx at 2012-11-03T23:48:21Z
it is the default php behavior. It's a default value for a variable...
---------------------------------------------------------------------------
by stof at 2012-11-04T00:22:58Z
@Tobion using the default value of the method to set a requirement does not make any sense. I don't see why someone would expect this behavior
---------------------------------------------------------------------------
by fabpot at 2012-11-06T10:12:05Z
@lyrixx Can you add some unit tests?
---------------------------------------------------------------------------
by Tobion at 2012-11-06T10:28:42Z
Oh I misunderstood the PR. I thought this makes the `name` param default to `hi`. `@Route("/hi/{name}", name="hi")`. But it's just the name of the route. Your example was easy to misinterpret as you used `name` everywhere.
---------------------------------------------------------------------------
by fabpot at 2012-11-10T08:33:13Z
@lyrixx Can you finish this PR?
---------------------------------------------------------------------------
by lyrixx at 2012-11-10T13:16:34Z
@fabpot Yes i will as soon as possible.
---------------------------------------------------------------------------
by lyrixx at 2012-11-10T18:34:07Z
I rebase and amend my commit. (I changed doc in commit message to be less confusing)
I will try to add tests.
But for now, `AnnotationClassLoader::load` is not really tested, and `AnnotationClassLoader::addRoute` is absolutely not tested. So I think I should add tests for these methods ? And then add tests for my patch.
I will try tomorrow.
---------------------------------------------------------------------------
by lyrixx at 2012-11-11T18:23:41Z
@fabpot I added new tests. I tried to made very atomic commits.
This PR was merged into the master branch.
Commits
-------
bdf0334 Fixed the lap method. Added upgrade notes. Some CS fixes
Discussion
----------
Fixed the lap method. Added upgrade notes. Some CS fixes
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: ~
Todo: ~
License of the code: MIT
Documentation PR: ~
This adds some type-hinting to the Stopwatch components.
I've also split the Section class to its own file, I know it's not a must as per coding standards used by Symfony but it complies with most of the other classes in the framework.
I've updated the UPGRADE-2.2.md file as well.
There's a bug fix which I'm not sure it if should have been done in this branch or not.
Let me know if I should make this PR against an older version of the framework.
Thanks.
This PR was merged into the master branch.
Commits
-------
c7a8f7a [Routing] fixed possible parameters conflict in apache url matcher
Discussion
----------
[Routing] fixed possible parameters conflict in apache url matcher
Bug fix: yes
Feature addition: no
Backwards compatibility break: no (as long as rewrite rules are generated after upgrading)
Symfony2 tests pass: yes
- This fixes a conflict in route parameters:
The rewrite rules currently pass route informations through environment variables:
`_ROUTING_DEFAULT_x`: passes the default value of parameter x
`_ROUTING__allow_x`: passes the information that method x was allowed for this route
`_ROUTING_x`: passes the value of parameter x
The problem is that naming a route parameter `DEFAULT_*` or `_allow_*` would not behave as expected.
I fixed this by namespacing all environment variables; e.g. parameters are in `_ROUTING_param_*`, defaults in `_ROUTING_default_*`, etc.
- The PR fixes a second issue: sometimes the variables are prefixed with multiple REDIRECT_. This PR handles this case by ignoring them all.
- This also improves performance a little:
Matching a route with two parameters and two default parameters 100K times: (`$_SERVER` was copied from a real request, so with many non `_ROUTING_` variables)
master: 6.6s
this branch: 4.7s
---------------------------------------------------------------------------
by fabpot at 2012-10-27T13:37:24Z
Any news on this PR? Is it mergeable?
---------------------------------------------------------------------------
by arnaud-lb at 2012-10-27T14:50:08Z
There is an issue with default parameter values, I can't find how to fix that in a simple way. Before this PR, default values are never used (if a parameter is an optional not present in the url, the parameter's value is the empty string); after this PR, when a parameter is present and empty (e.g. a requirement like `.*`), its value is set to its default value.
---------------------------------------------------------------------------
by Tobion at 2012-10-29T01:36:08Z
The problem is, it's not consistent with the default php matcher. So one cannot safely exchange it with the apache matcher because it behaves differently under some (special) circumstances.
---------------------------------------------------------------------------
by fabpot at 2012-11-05T08:05:54Z
We need to move forward as I want to merge the hostname support in the routing ASAP to have plenty of time for feedback before the 2.2 release.
Does it sound reasonable to merge this PR as is an open a ticket about the remaining issue (which should not occur that often anyways)?
---------------------------------------------------------------------------
by arnaud-lb at 2012-11-05T09:22:02Z
@fabpot it sounds reasonable to me. Also, I've the hostname support branch is currently rebased so that it can be merged without this one.
---------------------------------------------------------------------------
by Tobion at 2012-11-11T21:50:20Z
Btw, does the ApacheMatcherDumper handle the _scheme requirement? It doesn't look like it. This would be another bug.
Anyway, we can probably merge this PR and open new issues for the remaining bugs.
This PR was merged into the master branch.
Commits
-------
e32ca2b [HttpKernel] Fix Symfony2 full framework tests
Discussion
----------
[HttpKernel] Fix Symfony2 full framework tests
Fix the path when the full framework is used
---------------------------------------------------------------------------
by fabpot at 2012-11-12T09:08:06Z
When is it broken?
---------------------------------------------------------------------------
by vicb at 2012-11-12T09:18:01Z
now, https://travis-ci.org/symfony/symfony/jobs/3159326
This PR was squashed before being merged into the master branch (closes#5970).
Commits
-------
d0433b6 [Stopwatch] Get the "real size" used & minor tweaks
Discussion
----------
[Stopwatch] Get the "real size" used & minor tweaks
---------------------------------------------------------------------------
by vicb at 2012-11-11T09:45:50Z
@fabpot @maoueh thanks for your feedback, integrated.
This PR was merged into the master branch.
Commits
-------
4c0c588 [MemoryDataCollector] Stop being optimistic about memory usage
Discussion
----------
[MemoryDataCollector] Stop being optimistic about memory usage
Take into account the memory used in the kernel.terminate listeners
This PR was merged into the master branch.
Commits
-------
b27b749 made usage of Composer autoloader for subtree-split unit tests
Discussion
----------
made usage of Composer autoloader for subtree-split unit tests
This PR also normalizes the way components are tested.
---------------------------------------------------------------------------
by stof at 2012-11-09T23:14:22Z
👍
This PR was merged into the 2.1 branch.
Commits
-------
84b760b [HttpKernel] fixed Client when using StreamedResponses (closes#5370)
Discussion
----------
[HttpKernel] fixed Client when using StreamedResponses (closes#5370)
This PR was merged into the 2.1 branch.
Commits
-------
e34fb41 [HttpFoundation] moved the HTTP protocol check from StreamedResponse to Response (closes#5937)
Discussion
----------
[HttpFoundation] moved the HTTP protocol check from StreamedResponse to Response (closes#5937)
This PR was merged into the 2.1 branch.
Commits
-------
646a714 Fix export-ignore on Windows
Discussion
----------
Fix export-ignore on Windows
Rules:
Tests/ export-ignore
don't work on Windows. My proposition is:
/Tests export-ignore
This PR was merged into the 2.1 branch.
Commits
-------
4909bc3 [Form] Fixed forms not to be marked invalid if their children are already marked invalid
Discussion
----------
[Form] Fixed forms not to be marked invalid if their children are already marked invalid
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #4359
Todo: -
License of the code: MIT
Documentation PR: -
This PR prevents unsynchronized forms from being marked invalid if any of their children is also unsynchronized (and thus also marked invalid). Displaying an invalid message twice does not help the user and, if used in conjunction with error bubbling, may lead to duplicate errors (see #4359).
This PR was merged into the master branch.
Commits
-------
380cf4f [HttpKernel] added memory information in the Stopwatch
Discussion
----------
[HttpKernel] added memory information in the Stopwatch
* 2.0:
[Form] Fixed NumberToLocalizedStringTransformer to accept both comma and dot as decimal separator, if possible
Show correct class name InputArgument in error message
shows correct class name InputOption in error message
The exception message should say which field is not mapped
[HttpFoundation] Fix name sanitization after perfoming move
Add check to Store::unlock to ensure file exists
Conflicts:
src/Symfony/Bridge/Doctrine/Validator/Constraints/UniqueEntityValidator.php
src/Symfony/Component/HttpFoundation/File/UploadedFile.php
tests/Symfony/Tests/Component/Console/Input/InputArgumentTest.php
tests/Symfony/Tests/Component/Console/Input/InputOptionTest.php
tests/Symfony/Tests/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformerTest.php
tests/Symfony/Tests/Component/HttpFoundation/File/FileTest.php
tests/Symfony/Tests/Component/HttpKernel/HttpCache/StoreTest.php
This PR was merged into the master branch.
Commits
-------
af87c2b changed the Firewall to be a proper subscriber
02bd359 changed the remember-me listener to be a proper subscriber
Discussion
----------
Changed some security classes to implement the EventSubscriberInterface interface
---------------------------------------------------------------------------
by fabpot at 2012-11-06T10:11:28Z
That could also be done in 2.1. What do you think?
This PR was merged into the master branch.
Commits
-------
55a0fef Float support added for transchoice in the Translation Component
Discussion
----------
Float support added for transchoice in the Translation Component
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
---------------------------------------------------------------------------
by pborreli at 2012-11-01T23:22:50Z
👍 nice PR
* Default to _id for storing session ID
* Use MongoDate instead of MongoTimestamp (BC break)
* Rename default field names ("sess_" is redundant)
* "justOne" is redundant for session removal
* Assert true return values in method tests
* Add note about TTL collections for gc()
* Don't set identifier in upsert (invalid behavior)
This PR was merged into the master branch.
Commits
-------
e193590 [Security] removed the 401 error custom status message
Discussion
----------
[Security] removed the 401 error custom status message
see fabpot/Silex#496
---------------------------------------------------------------------------
by pborreli at 2012-10-31T17:29:24Z
@fabpot please fix the test suite, if you don't know how to do it, read http://symfony.com/doc/current/contributing/code/tests.html, thx 😸
This PR was merged into the master branch.
Commits
-------
73bb47b [Console] Fix#5897 - Console component require Shell component
Discussion
----------
[Console] Fix#5897 - Console component require Shell component
When setting the process isolation of a shell to true:
`setProcessIsolation(true)` throw a `\RuntimeException` if the Process component isn't available.
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #5897
Todo: -
License of the code: MIT
Documentation PR: -
---------------------------------------------------------------------------
by alias-mac at 2012-11-04T17:07:59Z
I noticed that there is no Unit Testing for the Shell class. Shall I create one with the test for this fix/bug request?
---------------------------------------------------------------------------
by alias-mac at 2012-11-06T01:58:40Z
Updated based on @stof comments.
---------------------------------------------------------------------------
by alias-mac at 2012-11-06T02:11:20Z
The travis-ci build failure as nothing to do with the code. See:
https://travis-ci.org/#!/symfony/symfony/jobs/3076345
When setting the process isolation of a shell to true:
`setProcessIsolation(true)` throw a `\RuntimeException` if the Process component isn't available.
This PR was squashed before being merged into the master branch (closes#5841).
Commits
-------
6b601bd [http-foudation] Better accept header parsing
Discussion
----------
[http-foudation] Better accept header parsing
Bug fix: no
Feature addition: yes
Backwards compatibility break: yes
Symfony2 tests pass: yes
**Quality:**
The special `q` item attribute represents its quality. I had to make some choices:
* if I set `q` attribute, it's assigned to quality property, but not to attributes
* the `__toString()` method only render `q` attribute if quality is less than 1
**BC break:**
The return of `Request::splitHttpAcceptHeader()` has changed. It's result was an array of qualities indexed by an accept value, it now returns an array of `AcceptHeaderItem` indexed by its value.
---------------------------------------------------------------------------
by jfsimon at 2012-10-26T08:35:55Z
As dicussed in https://github.com/symfony/symfony/pull/5711.
---------------------------------------------------------------------------
by Seldaek at 2012-10-27T10:35:49Z
Maybe you can pull 5e8a5267f6 into your branch (for some reason I can't send a PR to your repo, it doesn't show up in github's repo selector.. looks like they don't like projects with too many forks). It allows you to use usort() which hopefully is faster than your merge sort, though I did not bench it. I also added tests to confirm the functionality.
---------------------------------------------------------------------------
by Seldaek at 2012-10-27T10:40:27Z
Sorry please check 376dd93c56 instead, I missed a few tests in the RequestTest class.
---------------------------------------------------------------------------
by jfsimon at 2012-10-29T16:26:03Z
@fabpot do you think the introduced BC break is acceptable?
---------------------------------------------------------------------------
by fabpot at 2012-10-29T16:37:06Z
@jfsimon Are all getAccept*() method BC?
---------------------------------------------------------------------------
by jfsimon at 2012-10-29T16:39:26Z
@fabpot nope, just `Request::splitHttpAcceptHeader()`
---------------------------------------------------------------------------
by jfsimon at 2012-10-29T16:43:18Z
@fabpot I think missunderstood... only `Request::splitHttpAcceptHeader()` breaks BC.
---------------------------------------------------------------------------
by fabpot at 2012-10-29T16:53:22Z
So, a BC break on just splitHttpAcceptHeader is possible... but should be documented properly. Another option would be to deprecate the current method (and keep it as is), and just use the new version everywhere. Sounds better as it won"t introduce any BC breaks.
---------------------------------------------------------------------------
by jfsimon at 2012-10-29T16:55:57Z
@fabpot Okay, I'll update this PR according to your second option.
---------------------------------------------------------------------------
by jfsimon at 2012-10-29T20:14:46Z
@fabpot done.
As you can see here: https://github.com/symfony/symfony/pull/5841/files#L5L1029 value returned by `Request::splitHttpAcceptHeader()` is not **exactly** the same as before because all attributes are present (not only those before the `q` one).
---------------------------------------------------------------------------
by fabpot at 2012-10-30T06:16:23Z
The last thing missing before I can merge is a PR to update the documentation (should probably be just a note somewhere with the example you have in the UPGRADE file).
---------------------------------------------------------------------------
by jfsimon at 2012-10-30T07:07:08Z
@fabpot I could add this example here: http://symfony.com/doc/current/components/http_foundation/introduction.html#request after `Accessing the session`, what do you think?
---------------------------------------------------------------------------
by fabpot at 2012-10-30T07:14:10Z
Yes, looks good to me.
* 2.1:
removed unused use statements
[Form] Adapted HTML5 format in DateTimeType as response to a closed ICU ticket
[2.1][HttpFoundation] Fixed Php doc in Request::get
bumped Symfony version to 2.1.4-DEV
updated VERSION for 2.1.3
update CONTRIBUTORS for 2.1.3
updated CHANGELOG for 2.1.3
merged branch jakzal/yamlDoubleQuotesDumperFix (PR #4320)
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
This PR was merged into the 2.1 branch.
Commits
-------
b9f6cac [2.1][HttpFoundation] Fixed Php doc in Request::get
Discussion
----------
[2.1][HttpFoundation] Fixed Php doc in Request::get
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
According to php code, `Request::get` method does not seek in cookies.
---------------------------------------------------------------------------
by pborreli at 2012-11-02T11:02:26Z
your PR is full of reSquest typo :)
---------------------------------------------------------------------------
by lyrixx at 2012-11-02T11:25:31Z
@pborreli Fixed
Commits
-------
b631073 [Yaml] Fixed double quotes escaping in Dumper.
Discussion
----------
[Yaml] Fixed double quotes escaping in Dumper
Issue #4308 is caused by Dumper::escapeWithDoubleQuotes() which uses [str_replace()](http://php.net/str_replace).
From the php docs:
> Because str_replace() replaces left to right, it might replace a previously inserted value when doing multiple replacements.
We should be very careful in deciding about the order of elements in $escapees array. I'd really appreciate if someone reviewed my fix. Tests say I didn't break anything but I'm not sure what percentage of Yaml specification is covered by tests.
Bug fix: yes
Feature addition: no
Backwards compatibility break: not that I know
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/jakzal/symfony.png?branch=yamlDoubleQuotesDumperFix)](http://travis-ci.org/jakzal/symfony)
Fixes the following tickets: #4308
---------------------------------------------------------------------------
by travisbot at 2012-05-18T08:53:51Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1364279) (merged 5192722c into a04acc89).
---------------------------------------------------------------------------
by travisbot at 2012-05-18T23:19:49Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1371539) (merged ecaa1aab into fc3c609b).
---------------------------------------------------------------------------
by dinamic at 2012-05-19T07:35:21Z
Something is really wrong with this method. You can see clearly that multiple characters would fail proper escaping.
Here's an example:
```
$value = '\\\\"some value\n \"some quoted string\" and \'some single quotes one\'"';
var_dump(Escaper::escapeWithDoubleQuotes($value));
string(72) ""\\\"some value\n \\some quoted string\\ and 'some single quotes one'\"""
```
To begin with the backslash - in the initial value you have 2 (escaped ones), that after escaping should result in 4, not in 1 (escaped). I guess this behavior has to be verified with the importer, but imho it does not seem right.
Does anyone know why this escaping wasn't done using a regular expression in first place?
---------------------------------------------------------------------------
by clemens-tolboom at 2012-05-19T10:18:58Z
Searching for https://duckduckgo.com/?q=what+is+\xc2\x85 the table on http://stackoverflow.com/questions/6609895/efficiently-replace-bad-characters is interesting enough to decide we need way more documentation on this file.
\xc2\x85 seems to be triple dot (ellipses)
\xe2\x80\xa9 seems to be paragraph separator see http://drupal.org/node/914360#comment-3468550
Conflicts:
src/Symfony/Component/Yaml/Escaper.php
This PR was merged into the master branch.
Commits
-------
2f7bbbf [HttpFoundation] Added BinaryFileResponse.
Discussion
----------
[2.2] [HttpFoundation] Added BinaryFileResponse.
Another stab at #3602, based on @stealth35's code at https://gist.github.com/1472230.
- Move things around a little, clean things up, looking how it has been done in StreamedResponse.
- Add tests.
- Make functions chainable.
- Add a flag whether or not to trust the X-Sendfile-Type header.
---------------------------------------------------------------------------
by Partugal at 2012-06-10T19:56:43Z
What about support X-Accel-Redirect (nginx)?
---------------------------------------------------------------------------
by niklasf at 2012-06-10T20:41:10Z
@Partugal: So we support X-Sendfile-Type to pick the X-Sendfile header. What else would be needed to support X-Accel-Redirect (which we should definitely do)?
---------------------------------------------------------------------------
by Partugal at 2012-06-10T21:29:41Z
@niklasf Because nginx not use full file path, this need X-Accel-Mapping header (http://rack.rubyforge.org/doc/Rack/Sendfile.html)
---------------------------------------------------------------------------
by niklasf at 2012-06-10T22:45:38Z
@Partugal: Alright. Doing such a substitution now. Also added a test for that.
---------------------------------------------------------------------------
by stealth35 at 2012-06-11T07:47:35Z
I think the MIME should be base on the extensions map, for an example with `xlsx` that send an `application/zip` or a `xlsx` file MIME is `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`
Client to server : Reverve MIME => libmagic
Server to client : MIME => MIME map
---------------------------------------------------------------------------
by niklasf at 2012-06-11T14:40:00Z
@partugal: Thanks! Also added tests. Any e-mail you want to have in your credits?
---------------------------------------------------------------------------
by niklasf at 2012-06-11T14:41:39Z
@stealth35: Yeah ... makes sense. How would I get that information?
---------------------------------------------------------------------------
by stealth35 at 2012-06-11T14:47:36Z
use the `Symfony\Component\HttpFoundation\File\Mimetype\MimeTypeExtensionGuesser` it's the same map as Apache
and if the extension don't exists use `$this->getMimeType` and finaly `application/octet-stream`
---------------------------------------------------------------------------
by Partugal at 2012-06-11T15:46:41Z
@niklasf Thanks you for your work
If needed you may use linniksa@gmail.com
---------------------------------------------------------------------------
by niklasf at 2012-06-14T10:58:19Z
@stealth35: Sorry. I have to ask again.
- So the first step would be using the map in `MimeTypeExtensionGuesser`? I don't see how I can access that, because the `guess()` method it has, is for guessing extensions from mime types, not the reverse.
- Then, by `$this->getMimeType` you mean the getMimeType() method of the file? Sounds good.
- `application/octet-stream` as the fallback. Alright.
---------------------------------------------------------------------------
by stealth35 at 2012-06-14T11:00:33Z
Yeah sorry `MimeTypeExtensionGuesser` is for getting an extension with the Mime, forget about this, i'll take care aboute all MIME intégration later
---------------------------------------------------------------------------
by niklasf at 2012-06-14T13:12:22Z
@stealth35: Awesome. Thanks a lot.
---------------------------------------------------------------------------
by jalliot at 2012-08-07T20:53:54Z
@niklasf You should backport the changes from 532334d23d and 3f51bc0a3d
---------------------------------------------------------------------------
by niklasf at 2012-08-07T21:07:10Z
@jalliot Thanks. Fixed.
This PR was merged into the master branch.
Commits
-------
2817a47 [Finder] Fixed filename containing space bug in gnu adapter.
9bf7cb0 [Finder] Added filename containing space to tests.
Discussion
----------
[Finder] Fixed filename containing space bug in gnu find adapter.
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes: #5851
`GNU find` adapter now uses `cut` instead of `awk`.
This PR was merged into the master branch.
Commits
-------
3e58893 [Security] Tweak UsernamePasswordFormAuthenticationListener
Discussion
----------
[Security] Tweak UsernamePasswordFormAuthenticationListener
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/acasademont/symfony.png)](http://travis-ci.org/acasademont/symfony)
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
Improvements:
- Do not check twice for the ```only_post``` condition. The condition in the ```attemptAuthentication``` method is useless as this method will never be called if the previous ```requiresAuthentication``` call returns false.
- If the expected request is ```only_post```, check only the POST variables for the username and password parameters. Otherwise, query params and attributes are checked before.
- Use POST instead of post for correctness
This PR was merged into the master branch.
Commits
-------
aecc9b1 fixed tests when OpenSsl is not enabled in PHP, renamed a missnamed test, added missing license doc blocks
ca567b5 fixed CS
5cdf696 added a SecureRandomInterface
234f725 rename String to StringUtils
5849855 moved the secure random dep for remember me as a constructor argument
248703f renamed Prng to SecureRandom
c0c8972 simplified the Prng code
e5dc7af moved the secure random class from JMSSecurityExtraBundle to Symfony (closes#3595)
Discussion
----------
[2.2][Security] Add a PRNG (closes#3595)
As per #3595, I have moved the secure random class from JMSSecurityExtraBundle to Symfony.
It has more impact than I expected ;)
As you will see, the implementation has been refactored a bit. The most notable change is that Doctrine support has been moved to the bridge with the addition of a proper Doctrine seed provider (Doctrine is not a special case anymore).
The Doctrine configuration has been moved to the DoctrineBundle: doctrine/DoctrineBundle#91schmittjoh/JMSSecurityExtraBundle#65 removes the code that has been moved.
---------------------------------------------------------------------------
by Seldaek at 2012-07-05T13:26:01Z
I'm all for more security features, and both the String class & the Prng class for wrapping openssl make a lot of sense IMO, but I fail to see the use of the rest.
If we just want a seed to have a fallback in case openssl is missing, I'd rather have a secret in the config.yml than a million classes to store the same secret in the DB. Maybe I'm missing something though? /cc @schmittjoh
---------------------------------------------------------------------------
by schmittjoh at 2012-07-05T16:32:10Z
Having the configuration in different places (SecurityBundle & DoctrineBundle) feels a bit weird. I would prefer an approach similar to ACL, or the user provider/firewall section with factories. The latter being a bit more work to implement and the former potentially asking for complaints about too tight coupling to Doctrine.
Regarding testing, we probably need to move the disableOpenSsl method to the SecureRandom class in order to allow OpenSSL to be disabled for testing and we also need to change the byte generation algorithm to produce the same output for the same starting seed. I agree that it does not make sense to introduce an interface for SecureRandom as only the seed providers should be replaced.
As for the seed itself, it is constantly updated and does not stay the same as in the beginning. Thus, we need a provider that we can write to, and not only read from. I'm also not sure about using OpenSSL on Windows as I have read enough resources which claimed that the entropy on Windows is not always good (including OpenSSL docs). Always using the custom seed provider at least always ensured proper entropy even if OpenSSL's speed issues have been fixed in newer PHP versions.
---------------------------------------------------------------------------
by stof at 2012-07-05T16:44:24Z
@schmittjoh everything is in SecurityBundle now as it does not use a database anymore
---------------------------------------------------------------------------
by stof at 2012-07-05T16:44:59Z
and there is no seed provider anymore either
---------------------------------------------------------------------------
by schmittjoh at 2012-07-05T16:53:39Z
Not having a seed provider is not such a good idea, but having a file-based seed provider is.
---------------------------------------------------------------------------
by Seldaek at 2012-07-05T17:01:18Z
@schmittjoh why would you need to replace the seed provider? Don't you think that people serious about security to the point that they would want a stronger seed provider would enable openssl instead?
---------------------------------------------------------------------------
by stof at 2012-07-05T17:06:50Z
Well, what I meant is that there is no interchangeable provider anymore. The Prng class uses the file directly.
And btw, I think the Prng class should be mockable for tests, so it should either have an interface or not be final (I vote for adding an interface)
---------------------------------------------------------------------------
by jalliot at 2012-07-09T18:46:12Z
@fabpot @schmittjoh What about using more fallbacks for `openssl_random_pseudo_bytes` like in @Seldaek's post ["Unpredictable hashes for humans"](http://seld.be/notes/unpredictable-hashes-for-humans)?
Trying `mcrypt_create_iv` first might also be faster.
---------------------------------------------------------------------------
by Seldaek at 2012-07-10T08:52:46Z
@jalliot I think mcrypt should be after if you make it use /dev/urandom, not 100% sure but openssl is probably higher quality than urandom.
---------------------------------------------------------------------------
by schmittjoh at 2012-07-10T09:12:07Z
The fallback algorithm that I added should be enough (it passes the
statistical randomness tests).
On Tue, Jul 10, 2012 at 10:52 AM, Jordi Boggiano <
reply@reply.github.com
> wrote:
> @jalliot I think mcrypt should be after if you make it use /dev/urandom,
> not 100% sure but openssl is probably higher quality than urandom.
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/symfony/symfony/pull/4763#issuecomment-6870145
>
---------------------------------------------------------------------------
by stof at 2012-10-13T17:20:06Z
@fabpot please send a PR to the doc so that this can be merged 😃
---------------------------------------------------------------------------
by stof at 2012-10-13T17:22:08Z
hmm, actually, some comments have not been taken into account yet so it is not ready to be merged
---------------------------------------------------------------------------
by stof at 2012-10-27T07:14:43Z
you forgot the SecureRandom file
---------------------------------------------------------------------------
by fabpot at 2012-10-27T08:49:54Z
I think I've addressed all the comments. If everyone agree with the current implementation, I'm going to start updating the documentation.
---------------------------------------------------------------------------
by fabpot at 2012-10-27T10:51:15Z
I've fixed the remaining CS issues.
---------------------------------------------------------------------------
by fabpot at 2012-10-28T07:00:31Z
Documentation is here: symfony/symfony-docs#1858
This PR was squashed before being merged into the 2.0 branch (closes#5496).
Commits
-------
9872d26 [HttpFoundation] Fix name sanitization after perfoming move
Discussion
----------
[HttpFoundation] Fix name sanitization after perfoming move
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #2577
License of the code: MIT
Further work on #2577, fixes name sanitization, after moving file name with new name with non latin characters in the beginning.
---------------------------------------------------------------------------
by stloyd at 2012-09-12T09:52:05Z
You must revert chmod changes.
---------------------------------------------------------------------------
by helios-ag at 2012-09-12T14:30:36Z
@stloyd fixed
---------------------------------------------------------------------------
by stof at 2012-10-13T21:12:43Z
@fabpot what is the status of this PR ?
This PR was merged into the master branch.
Commits
-------
e2aa79b Added CardScheme validator
Discussion
----------
[2.2] [Validator] Added CardScheme validator
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets:
Todo: Adding documentation
License of the code: MIT
CardScheme separated into its own PR from #4734 as requested by @fabpot
---------------------------------------------------------------------------
by fabpot at 2012-10-05T17:08:24Z
As far I understand the discussion on #4734, a few people seemed to be concerned about the usefulness of adding such a validator in Symfony core. Anyone wanting to give his point of view? Personally, I'm -0 on merging this.
---------------------------------------------------------------------------
by merk at 2012-10-05T22:27:05Z
There are circumstances where such logic is required, and it could be desired by the programmer to filter out valid cards for a payment gateway before sending a request.
However, this is already included in JMSPaymentBundle if people don't think it should be in core.
This PR was squashed before being merged into the master branch (closes#5455).
Commits
-------
7ea2f76 [process] expose the process status.
Discussion
----------
[process] expose the process status.
Pull request for issue #5453.
---------------------------------------------------------------------------
by pborreli at 2012-09-07T07:30:01Z
👍
---------------------------------------------------------------------------
by drak at 2012-09-21T18:53:14Z
This PR is missing the patch header in the description https://github.com/symfony/symfony-docs/blob/master/contributing/code/patches.rst#make-a-pull-request
---------------------------------------------------------------------------
by stof at 2012-10-13T21:25:04Z
@boombatower can you update the PR according to my comments and add some tests ?
This PR was squashed before being merged into the master branch (closes#5638).
Commits
-------
98b68c2 [2.2][Console] Add possibility to add new input options to console application
Discussion
----------
[2.2][Console] Add possibility to add new input options to console application
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
At the moment it is not possible to overwrite the input arguments of a console application to not have the default ones. Adding is possible with:
$cli->getDefinition()->addOption(new InputOption('--custom', '-c', InputOption::VALUE_NONE, 'Use custom option.'));
Also added some simple tests for adding a custom HelperSet.
---------------------------------------------------------------------------
by dirkaholic at 2012-10-04T06:29:57Z
OK, is a bit inconsistent with what it's done with the helper set then, where you can use both ways. New PR for the tests is the referenced one.
---------------------------------------------------------------------------
by stof at 2012-10-04T18:57:42Z
@dirkaholic Can you rebase your branch (it conflicts with master) and squash your commit together ?
http://symfony.com/doc/current/contributing/code/patches.html#rework-your-patch may help you if you don't know how to do it
---------------------------------------------------------------------------
by dirkaholic at 2012-10-04T19:53:09Z
Done.
---------------------------------------------------------------------------
by stof at 2012-10-04T21:40:53Z
@dirkaholic the rebase worked fine but you have not squashed the commits together.
---------------------------------------------------------------------------
by dirkaholic at 2012-10-05T05:35:30Z
What do you mean ? Only the setDefinition function plus test is left here. The rest was already merged with https://github.com/symfony/symfony/issues/5668
---------------------------------------------------------------------------
by stof at 2012-10-05T10:48:53Z
@dirkaholic Squashing is about making the PR use only 1 commit instead of 2 (the second one changing only some whitespaces, which is not what its message says). But @fabpot told me that he improved his merging tool and so he can squash it when merging so it is OK.
This PR was squashed before being merged into the master branch (closes#5601).
Commits
-------
7914d95 [HttpFoundation] UploadedFile: Added ability to the original extension of the file uploaded
Discussion
----------
[HttpFoundation] UploadedFile: Added ability to the original extension of the file uploaded
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
Fixes the following tickets: #5599
Todo: -
`$file->getExtension()` on uploaded files always will return blank as the temp file names do not have an extension. This adds `$file->getClientOriginalExtension()` which returns the extension based off the original file name. It also includes a test to check this function.
---------------------------------------------------------------------------
by daum at 2012-09-25T21:54:00Z
@stof just pushed updated doc block and spacing fix.
---------------------------------------------------------------------------
by stof at 2012-10-13T21:47:17Z
@fabpot anything missing to merge it ?
This PR was merged into the 2.0 branch.
Commits
-------
a094f7e Add check to Store::unlock to ensure file exists
Discussion
----------
[2.0] [HttpKernel] Add check to Store::unlock to ensure file exists
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
I was seeing this error in my logs when using an `AppCache`:
```
Error 2: /var/www/beta.example.com/shared/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/Store.php line 92: unlink(/var/www/beta.example.com/releases/20120827020525/app/cache/beta/http_cache/md/c2/88/66a911b5266a57bdd55131a47895b8861dfd.lck): No such file or directory
```
It was only occurring when the `http_cache` file was being primed (i.e. first load).
I've added a simple check to ensure that the file is a valid file before trying to unlink. I also added a missing `@return` docblock. Note: I've chosen to return `false` if the file does not exist as this seems to be the behaviour of the `purge` method.
---------------------------------------------------------------------------
by jonathaningram at 2012-08-29T06:46:52Z
@henrikbjorn done and rebased. Thanks.
---------------------------------------------------------------------------
by jonathaningram at 2012-09-17T22:38:47Z
@henrikbjorn any news on this one? It's currently not possible to use the HTTP Cache without the first request failing.
---------------------------------------------------------------------------
by jonathaningram at 2012-09-25T01:28:38Z
ping @fabpot sorry to keep pushing this, but any chance you could take a look at this?
This PR was squashed before being merged into the master branch (closes#5381).
Commits
-------
0f3126f Added lockExists to Store interface, fixed locking bugs, added tests.
Discussion
----------
Added lockExists to Store interface, fixed locking bugs, added tests.
While working on Drupal's HttpCache implementation, I discovered that the base HttpCache class does an is_file to check for a lock, which assumes a file-based cache is being used. This seems like a mistake since the rest of the Store interface is easily swappable. I added a lockExists method so that this is properly abstracted.
I also noticed there were no tests for the change I made, so I added some very basic locking tests. While adding those I found that the existing lock method is a bit broken. This line here:
```php
<?php
if (false !== $lock = @fopen($path = $this->getPath($this->getCacheKey($request).'.lck'), 'x')) {
```
will return false if the file couldn't be written for any reason, but the rest of the method assumes that if $lock == false, the lock exists already. So if the file couldnt be written due to the parent directory not existing, $path will be returned as if it exists, which is clearly not the desired behavior.
I changed this to return false if the file couldnt be written and doesn't exist, $path if it exists, and true if the lock was created. It still doesn't feel great to have bool|string return values, but that's the best I could come up with atm. I also added a check for the parent directory that creates it if it doesn't exist. The new tests fail without it.
I also broke out that code a bit as it was very difficult to read.
---------------------------------------------------------------------------
by henrikbjorn at 2012-08-30T09:11:16Z
Symfony have a editorconfig file which set the correct indentation settings. http://editorconfig.org/
---------------------------------------------------------------------------
by msonnabaum at 2012-08-30T13:00:20Z
Updated based on stof's feedback.
---------------------------------------------------------------------------
by msonnabaum at 2012-08-30T13:21:40Z
Fixed based on code style feedback.
---------------------------------------------------------------------------
by jonathaningram at 2012-09-05T12:29:47Z
@msonnabaum, this seems to be distantly related to my recent PR too: #5376.
---------------------------------------------------------------------------
by stof at 2012-10-13T20:35:55Z
@fabpot anything left to merge this ?
---------------------------------------------------------------------------
by catch56 at 2012-10-23T16:42:10Z
This looks great to me, Couldn't find anything to complain about.
* 2.1:
[ClassLoader] fixed unbracketed namespaces (closes#5747)
slight refactoring in UrlMatcher
[Form] Created test for DoctrineOrmTypeGuesser see #5790
[Form] Fixed DoctrineOrmTypeGuesser to guess the "required" option for to-one associations
This PR was merged into the master branch.
Commits
-------
adeadfb fixed comment striping on global namespace classes
Discussion
----------
[ClassCollectionLoader] fixed comment striping on global namespace classes
previously #4792, I've removed the multiple blank lines removal not to break heredocs.
---------------------------------------------------------------------------
by stof at 2012-10-13T18:04:56Z
@fabpot is there anything left to merge this ?
---------------------------------------------------------------------------
by bamarni at 2012-10-14T11:47:23Z
I've added a space when faking a namespace, so that it stils works without the tokenizer (if #5747 gets merged)
This PR was merged into the master branch.
Commits
-------
b89e413 [Process] Add output / error output incremental getters
Discussion
----------
[2.2][Process] Add output / error output incremental getters
Bug fix: #4999
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
Travis fails ; tests are ok on my local clone but upstream symfony master is currently broken
---------------------------------------------------------------------------
by stof at 2012-10-13T21:20:47Z
@romainneutron is there anything left before merging ? And please open a PR to the documentation to document the new feature
This PR was merged into the master branch.
Commits
-------
85d39aa session class tests
Discussion
----------
session class tests
Hi,
This patch adds some Session class tests.
Best regards,
Michal
---------------------------------------------------------------------------
by lsmith77 at 2012-10-19T17:04:29Z
can you close and reopen this PR to retriggered the travis build?
This PR was merged into the master branch.
Commits
-------
99aa37c tests for Request class
Discussion
----------
tests for Request class
Hi,
This patch adds some tests for Request class.
Best regards,
Michal
---------------------------------------------------------------------------
by lsmith77 at 2012-10-19T17:04:33Z
can you close and reopen this PR to retriggered the travis build?
This PR was squashed before being merged into the master branch (closes#5838).
Commits
-------
201f3e6 [Form] Fixed cannot unset string offsets in CsrfValidationListener
Discussion
----------
[Form] Fixed cannot unset string offsets in CsrfValidationListener
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
A php fatal error is happening when someone rewrite the entire form data for an object with a single input.
```
Fatal error: Cannot unset string offsets in vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Csrf/EventListener/CsrfValidationListener.php on line 72
```
Example:
```html
<form action="/app_dev.php/post/create" method="post" >
<div id="posttype">
<div>
<label for="posttype_name" class="required">Name</label>
<input type="text" id="posttype_name" name="posttype[name]" required="required" maxlength="255" />
</div>
<div>
<label for="posttype_text" class="required">Text</label>
<textarea id="posttype_text" name="posttype[text]" required="required"></textarea>
</div>
<input type="hidden" id="posttype__token" name="posttype[_token]" value="83a1617c694fbdea43c2527f1a55c7419ce82a42" /></div>
<p>
<button type="submit">Create</button>
</p>
</form>
```
If someone alters the html to add a simple input at the bottom of the form like this one:
```html
<input type="text" id="posttype" name="posttype" value="test123" />
```
The result will be a php fatal error.
---------------------------------------------------------------------------
by bschussek at 2012-10-26T09:49:05Z
Thank you for the pull request! Could you please reference the pull request in the test?
```php
// https://github.com/symfony/symfony/pull/5838
public function testStringFormData()
{
...
```
---------------------------------------------------------------------------
by jfcixmedia at 2012-10-26T10:21:29Z
@bschussek Added, thanks.
This PR was squashed before being merged into the master branch (closes#4115).
Commits
-------
878dd91 [2.2] [Form] Trim listener, unicode whitespace characters.
Discussion
----------
[2.2] [Form] Trim listener, unicode whitespace characters.
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo:
I have some questions. ZERO WIDTH SPACE (200B) doesn't belong to White_Space but it's invisible and treated as white space by the html4.1 spec - http://www.w3.org/TR/html4/struct/text.html#h-9.1
Same question for
* U+202F NARROW NO-BREAK SPACE
* U+FEFF ZERO WIDTH NO-BREAK SPACE
---------------------------------------------------------------------------
by Dattaya at 2012-04-26T09:49:25Z
It seems to me that the check `mb_check_encoding($data, 'UTF-8')` is unnecessary. For non utf8 characters `preg_replace` returns `null` if `u` flag is set.
From http://www.pcre.org/pcre.txt:
>When you set the PCRE_UTF8 flag, the byte strings passed as patterns
and subjects are (by default) checked for validity on entry to the rel-
evant functions.
...
>If an invalid UTF-8 string is passed to PCRE, an error return is given.
---------------------------------------------------------------------------
by Dattaya at 2012-07-27T06:52:58Z
Forgot to mention that `Cc` property includes more characters than needed (`0009-000D` and `0085`) but I think control characters shouldn't appear in a form field anyway.
---------------------------------------------------------------------------
by stof at 2012-10-13T16:47:47Z
@Dattaya ping
* 2.1:
bumped Symfony version to 2.0.19-DEV
updated VERSION for 2.0.18
update CONTRIBUTORS for 2.0.18
updated CHANGELOG for 2.0.18
updated vendors for 2.0.18
Remove § about prototype_name customization in 2.0
fix option name
Add to DateFormats 'D M d H:i:s Y T' (closes#5830)
* 2.0:
bumped Symfony version to 2.0.19-DEV
updated VERSION for 2.0.18
update CONTRIBUTORS for 2.0.18
updated CHANGELOG for 2.0.18
updated vendors for 2.0.18
Add to DateFormats 'D M d H:i:s Y T' (closes#5830)
Conflicts:
CONTRIBUTORS.md
src/Symfony/Component/HttpKernel/Kernel.php
tests/Symfony/Tests/Bridge/Monolog/Processor/WebProcessorTest.php
vendors.php
This PR was merged into the master branch.
Commits
-------
40341bb Changed MoneyType::$patterns visibility.
c88fe94 Changed getPattern visibility
Discussion
----------
Changed getPattern visibility
It should be possible to override this method.
---------------------------------------------------------------------------
by Inori at 2012-10-22T19:25:37Z
Probably makes sense to also change visibility of [MoneyType::$patterns](c88fe94707/src/Symfony/Component/Form/Extension/Core/Type/MoneyType.php (L23))
---------------------------------------------------------------------------
by umpirsky at 2012-10-22T20:49:09Z
@Inori Fixed, thanks.
- Do not check twice for the only_post condition
- If the expected request is only_post, check only the post variables for the username and password parameters
This PR was merged into the master branch.
Commits
-------
20f19bf Add the Request locale to the RequestDataCollector
Discussion
----------
[HttpKernel] Add the Request locale to the RequestDataCollector
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/acasademont/symfony.png)](http://travis-ci.org/acasademont/symfony)
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
---------------------------------------------------------------------------
by acasademont at 2012-10-17T09:01:32Z
Seems like some Twig tests are failing in the master branch
This PR was merged into the master branch.
Commits
-------
5b3ed82 MetadataBag test
Discussion
----------
MetadataBag test
Hi,
This patch adds MetadataBag test.
Best regards,
Michal
This PR was merged into the master branch.
Commits
-------
e54d749 [Routing] Simplified php matcher dumper (and optimized generated matcher)
Discussion
----------
[Routing] Simplified php matcher dumper (and optimized generated matcher)
Bug fix: no
Feature addition: no
Related: #3378
Backwards compatibility break: no
Symfony2 tests pass: yes
This simplifies the php matcher dumper by allowing the dumper to re-organize routes in the dumper's own structure.
As a result, dumping is made a little simpler. This is also helps much for my hostname-based routes PR #3378.
Reorganizing routes also allows to find more optimization opportunities:
Currently the dumper wraps some collections of routes in a `if (0 === strpos($pathinfo, '/someprefix')` if the collection has user-defined prefix, and if it contains more than one direct child Route. This can miss many optimization opportunities.
The PR changes this by building a prefix tree of routes based on the static prefix extracted from routes' patterns. Then every leave having a prefix and more than one child (route or collection) will be wrapped in a `if` statement.
Example:
```
// No explicit prefix is specified
@Route("/cafe")
@Route("/cacao")
@Route("/coca")
```
is compiled like this:
```
if (url starts with /c) {
if (url starts with /ca) {
// test route "/cafe"
// test route "/cacao"
}
// test route "/coca"
}
```
Some tests have many white space changes, much more easier to review [here](https://github.com/symfony/symfony/pull/5734/files?w=1)
---------------------------------------------------------------------------
by Tobion at 2012-10-13T02:27:54Z
I'm not sure if adding these specific classes just for dumping is the best implementation because they duplicate some logic and this optimization should also work out-of-the-box with the standard RouteCollection etc.
What I have in mind is a new method in RouteCollection like `RouteCollection::optimizeTree` that returns a new RouteCollection with the Routes that includes these optimization you do here. So there would probably be no need for the new classes.
It think it requires some changes in RouteCollection like the handling of prefix that must start with a slash currently, which is too restrictive. But it should be possible.
---------------------------------------------------------------------------
by arnaud-lb at 2012-10-13T12:52:32Z
@Tobion
> I'm not sure if adding these specific classes just for dumping is the best implementation because they duplicate some logic and this optimization should also work out-of-the-box with the standard RouteCollection etc.
I think RouteCollection and DumperCollection do not share the same concerns; and RouteCollection does things that don't allow to reorganize routes freely. For instance when adding a collection to a RouteCollection this changes all the child routes' prefix, requirements, options, etc. When setting a collection's prefix, this prepends the prefix to every child route's pattern, etc.
---------------------------------------------------------------------------
by arnaud-lb at 2012-10-15T08:50:23Z
squashed the CS commits
---------------------------------------------------------------------------
by arnaud-lb at 2012-10-15T13:50:16Z
@fabpot @Tobion this PR is ready to be merged if everyone agrees
---------------------------------------------------------------------------
by Tobion at 2012-10-16T18:10:36Z
When the above is fixed, I think it's good to be merged.
---------------------------------------------------------------------------
by arnaud-lb at 2012-10-17T08:40:20Z
Fixed; thanks @Tobion @stof for your reviews
---------------------------------------------------------------------------
by Tobion at 2012-10-19T03:30:10Z
@arnaud-lb could you please test whether your PR fixes#5780 as a side-effect?
I can image that it's fixed because you use `$route->compile()->getStaticPrefix();` for prefix optimization.
If it's fixed please add a test case. If not, that's fine, and we need to fix it in another PR.
* 2.1: (28 commits)
Delete use of CreationExeption
[Form] Fixed error message in PropertyPath to not advice to use a non-existing feature
[Form] Fixed creation of multiple money fields with different currencies
[Form] Fixed setting the "data" option to an object in "choice" and "entity" type
Fixed Serbian plural translations.
Fixed IPv6 Check in RequestMatcher
Fix typo
change what I think is a typo
[Console] Fix error when mode is not in PATH
[WebProfilerBundle] fixed macro usage (to be forward compatible with Twig 2.x)
Change monolog require-dev to use the branch alias instead of dev-master
[FrameworkBundle] partially reverted previous merge
[2.1] Added missing error return codes in commands
Made the router lazy when setting the context
[WebProfilerBundle] fixed typos
Fix incorrect variable in FileProfilerStorage
UnitTest fix
UnitTest fix
added a unit test
fixed#5384
...
* 2.0:
[Form] Fixed creation of multiple money fields with different currencies
Fixed IPv6 Check in RequestMatcher
fixed DomCrwaler/Form to handle <button> when submitted
Conflicts:
tests/Symfony/Tests/Component/DomCrawler/FormTest.php
tests/Symfony/Tests/Component/Form/Extension/Core/Type/MoneyTypeTest.php
This PR was merged into the 2.1 branch.
Commits
-------
bda29b3 [Form] Fixed error message in PropertyPath to not advice to use a non-existing feature
Discussion
----------
[Form] Fixed error message in PropertyPath to not advice to use a non-existing feature
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #5388
Todo: -
License of the code: MIT
Documentation PR: -
This PR was merged into the master branch.
Commits
-------
aefa495 Move `hiddeninput.exe` to Resources/bin
c0f8a63 Fix CS and typos
26c35e0 Skip askHiddenResponse test on windows
e2eaf5a Update Changelog, add Readme note about hidden input third party
ac01d5d Fix tests and CS
e396edb [Console] Add DialogHelper::askHiddenResponse method
Discussion
----------
[Console] Add DialogHelper::askHiddenResponse method
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
It adds a method to `DialogHelper` to ask a question and hide the response. It's pretty cool when working with passwords.
This code is more than largely inspired by Composer, see [ConsoleIO.php at line 140](https://github.com/composer/composer/blob/master/src/Composer/IO/ConsoleIO.php#L140)
You will notice that this PR embeds a Windows Executable binary for windows support. This windows binary is provided by @Seldaek (see https://github.com/Seldaek/hidden-input)
This dependency is not yet available via composer.
If this is a problem to embed this file, we can think of other way to provide this support (make a package from HiddenInput and add composer recommandation for example).
---------------------------------------------------------------------------
by stof at 2012-10-11T17:20:11Z
The link to the hiddeninput source code should be added in the readme.
And you should also update the changelog.
Btw, adding composer for hiddeninput does not make sense. Compsoer is about installing PHP code, not about downloading the source of a C++ program.
---------------------------------------------------------------------------
by romainneutron at 2012-10-11T17:22:58Z
This proposition comes from a discussion I had with Jordi , nothing more :)
Romain
On 11 oct. 2012, at 19:20, Christophe Coevoet <notifications@github.com>
wrote:
The link to the hiddeninput source code should be added in the readme.
And you should also update the changelog.
Btw, adding composer for hiddeninput does not make sense. Compsoer is about
installing PHP code, not about downloading the source of a C++ program.
—
Reply to this email directly or view it on
GitHub<https://github.com/symfony/symfony/pull/5731#issuecomment-9349736>.
---------------------------------------------------------------------------
by romainneutron at 2012-10-12T07:33:00Z
Changelog updated, Readme note added, CS fixed
---------------------------------------------------------------------------
by stof at 2012-10-13T22:09:24Z
the missing point is now the PR to the doc for this new feature
---------------------------------------------------------------------------
by romainneutron at 2012-10-16T00:33:59Z
@stof documentation added
---------------------------------------------------------------------------
by romainneutron at 2012-10-16T09:10:35Z
@fabpot what you asked is now fixed
This PR was squashed before being merged into the master branch (closes#5725).
Commits
-------
d6be69a [i5669][Console] Adding a note about the list command in the help command
Discussion
----------
[i5669][Console] Adding a note about the list command in the help command
In order to fix the issue #5669.
---------------------------------------------------------------------------
by gnugat at 2012-10-11T09:45:45Z
This PR is ready for a first code review.
---------------------------------------------------------------------------
by stof at 2012-10-13T22:25:15Z
@fabpot 👍
This PR was merged into the 2.1 branch.
Commits
-------
9d8f689 UnitTest fix
02b0b39 UnitTest fix
a4f3ea9 [2.1][DependencyInjection] Incomplete error handling in the container
Discussion
----------
[2.1][DependencyInjection] Incomplete error handling in the container
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: ~
Todo: ~
License of the code: MIT
Documentation PR: ~
The Container::get method, error handling has been handled incompletely because the created wrong service was not removed from the container.
---------------------------------------------------------------------------
by stof at 2012-10-13T23:12:11Z
@fabpot anything missig in this PR ? It looks ready to be merged to me.
This PR was merged into the master branch.
Commits
-------
63b480e [Console] fixed#5316
Discussion
----------
[Console] [Enhancement] fixes#5316
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #5316
---------------------------------------------------------------------------
by marfillaster at 2012-10-05T02:14:55Z
I simplified the change. And the reason why tests for text help do not need changes is because in CommandTest, the commands are executed first which also merges app definition before invoking asText or asXml . While in ApplicationTest, commands are never run therefore app definition is not being merged.
---------------------------------------------------------------------------
by stof at 2012-10-13T23:13:52Z
@fabpot This looks ready to me. Anything left ?
Initializing the matcher and the generator to set the context does not make
sense as it is set anyway when building them. This avoids initializing
them in the RouterListener if you never actually use them (for instance
because you use the apache matcher).
Calling setDefaultLocale was replacing the intl locale even if the locale
was already set in the Request, thus leading to a different value than the
request locale.
Changed checking CONTENT_TYPE from server to headers variable
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #5697
Todo: -
License of the code: MIT
This PR was merged into the 2.1 branch.
Commits
-------
1566f9f [Routing] fix handling of whitespace and synch between collection prefix and route pattern
90145d2 [Routing] fix handling of two starting slashes in the pattern
Discussion
----------
[Routing] fix handling of slashes and whitespace in pattern/prefix
BC break: no
feature addition: no
The first commit fixes the handling of two starting slashes in the pattern. It would be confused with a network path e.g. `//domain/path` when generating a path, so should be prevented.
The second commit fixes the handling of whitespace in RouteCollection::addPrefix. It wasn't trimmed there but it is trimmed in Route::setPattern. So it can be out-of-synch between RouteCollection::getPrefix <-> Route::getPattern.
This PR was merged into the master branch.
Commits
-------
f66f110 FIX [2.1][ClassLoader]UniversalClassLoader not working with AnnotationRegistry::registerLoader
Discussion
----------
[2.1][ClassLoader]UniversalClassLoader not working with AnnotationRe...
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: ~
Todo: ~
License of the code: MIT
Documentation PR: ~
The Doctrine\Common\Annotations\AnnotationRegistry::loadAnnotationClass examines the returning value of the loader and the load is successful only if the loader returns with "TRUE" value.
This is how method Symfony\Component\ClassLoader\ClassLoader::loadClass works, but it is not true for Symfony\Component\ClassLoader\UniversalClassLoader::loadClass.
---------------------------------------------------------------------------
by sstok at 2012-10-08T09:25:39Z
As this is a bug fix it should be done on 2.0
---------------------------------------------------------------------------
by stof at 2012-10-08T12:49:42Z
It is not a bugfix. Nothing enforces an autoloader to return a boolean in PHP.
And Symfony works with the annotation registry since 1.5 year (when it was introduced): https://github.com/symfony/symfony-standard/blob/2.0/app/autoload.php#L34-38
Btw, if you are using 2.1, I would recommend you to use the new ClassLoader instead of the UniversalClassLoader to autoload PSR-0 libraries. It has a simpler API (and returns the boolean needed by Doctrine) while supporting the same classes than the UniversalClasssLoader (both of them are supporting PSR-0 and nothing else)
This PR was merged into the master branch.
Commits
-------
bf9d2be [Console] Fixes in ProgressHelper
Discussion
----------
[Console] Fixes in ProgressHelper
Bug fix: yes
Feature addition: no
Backwards compatibility break: ?
Symfony2 tests pass: yes
Changed from true to false the default "newline" parameter of the method "overwrite" (to stick with the default value of OutputInterface).
[Security] changed default iterations of Pbkdf2PasswordEncoder to 1000 instead of 5000
[Security] Improved description of PBKDF2 encoder
[SecurityBundle] added PBKDF2 PasswordEncoder
updated CHANGELOG.md
[Security] Use the build-in hash_pbkdf2() when available
[SecurityBundle] added information about hash_algorithm for configuration
[Security] always check algorithm and fixed CS
* 2.1:
fixed CS
added doc comments
added doc comments
[Validator] Updated swedish translation
Update src/Symfony/Component/Validator/Resources/translations/validators.de.xlf
[2.1] Exclude tests from zips via gitattributes
[HttpKernel][Translator] Fixed type-hints
Updated lithuanian validation translation
[DomCrawler] Allows using multiselect through Form::setValues().
[Translation] forced the catalogue to be regenerated when a resource is added (closes symfony/Translation#1)
Unit test for patched method OptionsResolver::validateOptionValues().
validateOptionValues throw a notice if an allowed value is set and the corresponding option isn't.
[Form] Hardened code of ViolationMapper against errors
[HttpFoundation] Fixed#5611 - Request::splitHttpAcceptHeader incorrect result order.
[Form] Fixed negative index access in PropertyPathBuilder
Update src/Symfony/Component/Validator/Resources/translations/validators.ro.xlf
Conflicts:
src/Symfony/Component/DomCrawler/Form.php
src/Symfony/Component/Process/Process.php
This PR was merged into the 2.1 branch.
Commits
-------
65cf3a0 added doc comments
Discussion
----------
added doc comments
---------------------------------------------------------------------------
by stof at 2012-10-06T11:27:23Z
closing in favor of #5686 which targets 2.0
---------------------------------------------------------------------------
by fabpot at 2012-10-06T12:38:17Z
This one cannot be closed as it contains more phpdocs than in the 2.0 branch.
* 2.0:
fixed CS
added doc comments
[HttpKernel][Translator] Fixed type-hints
[Translation] forced the catalogue to be regenerated when a resource is added (closes symfony/Translation#1)
[HttpFoundation] Fixed#5611 - Request::splitHttpAcceptHeader incorrect result order.
Conflicts:
src/Symfony/Component/Process/Process.php
tests/Symfony/Tests/Component/HttpFoundation/RequestTest.php
This PR was squashed before being merged into the 2.1 branch (closes#5677).
Commits
-------
cf422bf [Validator] Updated swedish translation
Discussion
----------
[Validator] Updated swedish translation
Updated existing strings with plural translations and added some new translations as well.
https://github.com/symfony/symfony/issues/5628
This PR was squashed before being merged into the master branch (closes#5456).
Commits
-------
be62fcc [process] provide a restart method.
Discussion
----------
[process] provide a restart method.
Pull request for issue #5452.
Another possibility would be to allow for either run() or start() scenarios, but I am not sure that is terribly useful since restart() with a new process lends itself to restarting longer running services when they crash and you want the old process so you can inspect the logs and what not.
Otherwise, something like this might work, but doesn't allow for run() to return status code. Someone can get around that by getting manually on returned process.
```php
<?php
public function restart($method = 'start', $callback = null)
{
if ($this->isRunning()) {
throw new \RuntimeException('Process is already running');
}
if ($method != 'start' && $method != 'run') {
throw new \RuntimeException('Method must be start or run');
}
$process = clone $this;
$process->$method();
return $process;
}
```
---------------------------------------------------------------------------
by pborreli at 2012-09-07T07:17:26Z
can you add some tests please ?
This PR was squashed before being merged into the master branch (closes#4061).
Commits
-------
32bb754 [2.2] [WIP] [Finder] Adding native finders implementations
Discussion
----------
[2.2] [WIP] [Finder] Adding native finders implementations
Work in progress...
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #4031
This PR intends to add native finders implementation based on shell command execution.
Planned support concerns:
- GNU `find` command -> done
- MS `FINDSTR` command
---------------------------------------------------------------------------
by fabpot at 2012-05-15T06:19:50Z
@jfsimon What's the status of this PR?
---------------------------------------------------------------------------
by jfsimon at 2012-05-15T06:43:34Z
@fabpot 2 features missing for the GNU find adapter: sorting result with `sort` command and excluding directories; 1 bug (even if tests pass, which let me thing it needs more tests): regex matching is done on full path, not basename. Then I'll need to work on MS `FINDSTR` command adapter (I talked to Pierre Couzy, and he's OK to help when he will have time to). I'll try to push the sort and directory excluding features this week.
---------------------------------------------------------------------------
by jalliot at 2012-05-15T09:51:20Z
BTW @jfsimon, in the (quite specific) case where you don't precise filenames or other options but only `contains` or `notContains`, you could call `grep` directly without the `find`. That would speed things up a bit more :)
---------------------------------------------------------------------------
by fabpot at 2012-06-28T15:20:55Z
@jfsimon Would be nice to be able to include this PR before 2.1.0 beta2. Would you have time to finish the work soon?
---------------------------------------------------------------------------
by jfsimon at 2012-06-29T11:07:19Z
@fabpot I'd say next week for GNU part with some help from @smaftoul.
---------------------------------------------------------------------------
by jfsimon at 2012-07-10T08:20:44Z
It seems that I need to perform some benchmarks as find may not be so fast :/
---------------------------------------------------------------------------
by jfsimon at 2012-07-10T16:51:19Z
@fabpot @stof do you think I can add benchmark scripts inside the component, or should I create a new repository for that?
---------------------------------------------------------------------------
by fabpot at 2012-07-10T16:57:05Z
Then benchmark scripts won't be part of the repository in the end, so you should create a new repo for that.
---------------------------------------------------------------------------
by jfsimon at 2012-07-13T17:57:03Z
@fabpot @smaftoul Benchmark is ready (more cases to come): https://github.com/jfsimon/symfony-finder-benchmark
I'm glad to see that `gnu_find` adapter is really faster than the `php` one!
---------------------------------------------------------------------------
by stof at 2012-07-13T19:17:20Z
@jfsimon could you make a gist with the result of the benchmark ? I think many people will be lazy to run it themselves when looking at this ticket, and people using windows will probably be unable to run it at all :)
---------------------------------------------------------------------------
by jfsimon at 2012-07-13T21:37:50Z
First results: https://gist.github.com/3107676
---------------------------------------------------------------------------
by jfsimon at 2012-08-01T07:26:21Z
Sorry, I forgot `[Finder]` tag in 3 commits message... is it fixable?
---------------------------------------------------------------------------
by stof at 2012-08-01T08:58:28Z
@jfsimon you can edit the commit message whne doing an interactive rebase.
and btw, you will need to do a rebase anyway: the PR conflicts with master
---------------------------------------------------------------------------
by jfsimon at 2012-08-01T13:11:20Z
@stof Okay, I rebased origin/master. As you can see, above comments are now floating in the air :/
Strangely, rebase broke my tests... I need to fix them :(
---------------------------------------------------------------------------
by stof at 2012-08-01T13:14:11Z
Weird. github still tells me that the PR cannot be merged. Did you fetch the latest master before rebasing ?
---------------------------------------------------------------------------
by jfsimon at 2012-08-01T13:19:25Z
Weird, git fetch only fetched my own repository, I had to `git fetch origin`. I'm rebasing... again.
---------------------------------------------------------------------------
by jfsimon at 2012-08-01T14:50:02Z
@stof Rebase done, tests fixed :)
---------------------------------------------------------------------------
by stof at 2012-08-01T15:18:19Z
hmm, Travis does not seems to agree with the second statement :)
---------------------------------------------------------------------------
by jfsimon at 2012-08-01T17:33:55Z
Ouch, I'm really sorry, I was in the wrong tmux window when started tests :/
Good news, I have to fix my last problem (the regex tested against full path instead of basename) to fix the tests.
I'm on it.
---------------------------------------------------------------------------
by jfsimon at 2012-08-01T18:16:10Z
Grrr... I didnt start full test suite, shame on me.
---------------------------------------------------------------------------
by jfsimon at 2012-08-01T19:10:02Z
Same bench than before, but with non empty files: https://gist.github.com/3229865
---------------------------------------------------------------------------
by jfsimon at 2012-08-01T19:23:32Z
It seems that searching files by their name with regex is really fatser than by glob with find: https://gist.github.com/3229911
@fabpot should I convert glob to regex when using `contains` and `notContains`?
---------------------------------------------------------------------------
by jfsimon at 2012-08-01T19:55:02Z
It seems that I'm an idiot, I used `contains` instead of `name`.
Real bench is here: https://gist.github.com/3230139
@fabpot sorry for the mess, I should go to bed :/
Results are still convincing!
---------------------------------------------------------------------------
by stof at 2012-08-01T20:04:42Z
They are, but the regex are not faster than glob anymore in these results
---------------------------------------------------------------------------
by jfsimon at 2012-08-01T21:17:25Z
@travisbot you failed, not me!
---------------------------------------------------------------------------
by jfsimon at 2012-08-01T21:18:28Z
Anyone to launch benchmark with php 5.4?
https://github.com/jfsimon/symfony-finder-benchmark
---------------------------------------------------------------------------
by lyrixx at 2012-08-01T22:25:08Z
Bench with php 5.4.5
https://gist.github.com/3231244
This PR was squashed before being merged into the master branch (closes#5668).
Commits
-------
1117499 [2.2][Console] Test default input defintion and default helper set
Discussion
----------
[2.2][Console] Test default input defintion and default helper set
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
See: https://github.com/symfony/symfony/pull/5638
This PR was merged into the master branch.
Commits
-------
e22823b [Routing] context params should have higher priority than defaults
16c1b01 [Routing] fixed 4 bugs in the UrlGenerator
Discussion
----------
[Routing] UrlGenerator: fixed missing query param and some ignored requirements
reopened version of #5181 (cherry-picked)
On top of that I fixed#5437 in my code and added test case.
---------------------------------------------------------------------------
by Tobion at 2012-10-03T18:41:45Z
@fabpot ping
---------------------------------------------------------------------------
by fabpot at 2012-10-03T18:43:43Z
IIUC, #5437 is a regression in 2.1 and should be done in 2.1, no?
---------------------------------------------------------------------------
by Tobion at 2012-10-03T18:46:42Z
It's not in 2.1 anymore as you reverted the PR. #5437 is not valid currently and can be closed.
So this can either be merged in master or 2.1 whatever you prefer.
My benchmarks showed a performance improvement of 20% when matching routes that make use of possesive quantifiers because it prevents backtracking when it's not needed
This PR was merged into the master branch.
Commits
-------
005a9a3 [Routing] fixed RouteCompiler for adjacent and nested placeholders
Discussion
----------
[2.2] [Routing] fixed RouteCompiler for adjacent placeholders
Tests pass: yes
Feature addition: no
Fixes: #4215
BC break: no
- Nesting placeholders works now properly, e.g. `/{foo{bar}}`. Only `bar` is a variable, the rest is static text.
- Variables without separator work now correctly too, e.g. `/{w}{x}{y}{z}.{_format}`. All variables will have the correct default regex in the current manner, that is exclude the previous static char and the next static char (which means disregarding the placeholder in between that have no seperator).
As you can see, I have not modified any tests, only added some. So this change is BC. The compiler now works under all conditions and does not fail for such patterns.
---------------------------------------------------------------------------
by Tobion at 2012-05-08T22:34:58Z
ready for review / merging
Thanks @snc for giving a helpful tip.
---------------------------------------------------------------------------
by Tobion at 2012-06-12T23:22:54Z
fabpot told me, he doesn't like PRs that both fix and enhance stuff. So I reworked this PR so that it only contains the bug fixes.
The new PR #4563 contains the feature addition.
---------------------------------------------------------------------------
by Tobion at 2012-06-26T12:33:43Z
ping @fabpot
---------------------------------------------------------------------------
by Tobion at 2012-08-14T16:29:27Z
Why wait for 2.2? It's a bugfix only, without BC break.
---------------------------------------------------------------------------
by Tobion at 2012-08-31T17:04:37Z
@fabpot I think this should go into 2.1
This PR was squashed before being merged into the 2.1 branch (closes#5502).
Commits
-------
6200290 PSR-2 correct.
5c17388 Allows using multiselect through Form::setValues().
Discussion
----------
[DomCrawler] Allows using multiselect through Form::setValues().
Patch allows set multiple values in select using setValues() method, as it is used in Symfony\Component\BrowserKit\Client::submit().
This PR was merged into the 2.0 branch.
Commits
-------
6c59fbd [HttpFoundation] Fixed#5611 - Request::splitHttpAcceptHeader incorrect result order.
Discussion
----------
[HttpFoundation] Request::splitHttpAcceptHeader incorrect result order.
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: 5611
Makes items with equal q-values return in the original provided order. Fixes tests to reflect this behavior.
---------------------------------------------------------------------------
by kerihenare at 2012-10-02T20:59:11Z
To avoid confusion over the modified language test I have instead created new tests.
This PR was merged into the 2.1 branch.
Commits
-------
2568432 [Form] Hardened code of ViolationMapper against errors
Discussion
----------
[Form] Hardened code of ViolationMapper against errors
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
This ticket improves the code of ViolationMapper to reduce the risk of bugs and in order to make further bug fixing easier. It was implemented while trying to solve #5578 and is semantically equivalent to the previous version.
* 2.1:
[2.1] Fix SessionHandlerInterface autoloading
Remove executable bit from HttpKernel/DependencyInjection/ConfigurableExtension.php
[2.0][http-foundation] Fix Response::getDate method
[DoctrineBridge] Require class option for DoctrineType
[HttpFoundation] fixed the path to the SensioHandlerInterface class in composer.json
Support the new Microsoft URL Rewrite Module for IIS 7.0. @see http://framework.zend.com/issues/browse/ZF-4491 @see http://framework.zend.com/code/revision.php?repname=Zend+Framework&rev=24842
fixed undefined variable
hasColorSupport does not take an argument
Improve FilterResponseEvent docblocks Response ref
The path for 2.1 is also incorrect. For master, this was fixed in 3b4708. This patch adds the `target-dir` prefix to the autoloading base directory of the HttpFoundation stubs.
This PR was merged into the master branch.
Commits
-------
2a673d8 Replaced ContainerAwareTraceableEventDispatcher with TraceableEventDispatcher
Discussion
----------
Replaced ContainerAwareTraceableEventDispatcher with TraceableEventDispatcher
The ContainerAwareTraceableEventDispatcher class was tied to both the
Symfony container and the HttpKernel profiler. It made it non reusable
in another context.
The new TraceableEventDispatcher only keeps the HttpKernel profiler
integration and is able to wrap any other event dispatcher. It makes it
reusable in frameworks using the Symfony HttpKernel component like
Silex.
The only drawback is that we don't have access to the listener
priorities in the collected data anymore (but the listeners are still
ordered correctly). The change is still worth it I think.
---------------------------------------------------------------------------
by stof at 2012-09-27T13:38:24Z
You should add some tests for your new TraceableDispatcher
The ContainerAwareTraceableEventDispatcher class was tied to both the
Symfony container and the HttpKernel profiler. It made it non reusable
in another context.
The new TraceableEventDispatcher only keeps the HttpKernel profiler
integration and is able to wrap any other event dispatcher. It makes it
reusable in frameworks using the Symfony HttpKernel component like
Silex.
The only drawback is that we don't have access to the listener
priorities in the collected data anymore (but the listeners are still
ordered correctly). The change is still worth it I think.
This PR was merged into the master branch.
Commits
-------
7ef2e9d Replaced ContainerAwareTraceableEventDispatcher with TraceableEventDispatcher
Discussion
----------
Replaced ContainerAwareTraceableEventDispatcher with TraceableEventDispatcher
The ContainerAwareTraceableEventDispatcher class was tied to both the
Symfony container and the HttpKernel profiler. It made it non reusable
in another context.
The new TraceableEventDispatcher only keeps the HttpKernel profiler
integration and is able to wrap any other event dispatcher. It makes it
reusable in frameworks using the Symfony HttpKernel component like
Silex.
The only drawback is that we don't have access to the listener
priorities in the collected data anymore (but the listeners are still
ordered correctly). The change is still worth it I think.
---------------------------------------------------------------------------
by stof at 2012-09-27T13:38:24Z
You should add some tests for your new TraceableDispatcher
The ContainerAwareTraceableEventDispatcher class was tied to both the
Symfony container and the HttpKernel profiler. It made it non reusable
in another context.
The new TraceableEventDispatcher only keeps the HttpKernel profiler
integration and is able to wrap any other event dispatcher. It makes it
reusable in frameworks using the Symfony HttpKernel component like
Silex.
The only drawback is that we don't have access to the listener
priorities in the collected data anymore (but the listeners are still
ordered correctly). The change is still worth it I think.
This PR was squashed before being merged into the master branch (closes#3501).
Commits
-------
4f3ded7 Actually this is worse
72a1c65 * Coding standards fixes * Changed `started` to `startTime` * Other fixes/edits
8249928 * Weeks/months/years is probably unrealistic * Set some sensible padding defaults * Use isset() instead of is_array()
37b62bf Fixing bug for elapsed time between 1 and 2 seconds
8fe4568 Special formatting for when there is no maximum set
75f532f Minor docblock updates
e436e1a Adding ProgressHelper for Console Component
Discussion
----------
[2.2][Console] Add ProgressHelper
[![Build Status](https://secure.travis-ci.org/leek/symfony.png?branch=feature/progress-helper)](http://travis-ci.org/leek/symfony)
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: Yes
Fixes the following tickets: -
Todo:
- Add unit tests
- Add documentation
--
I find myself needing some sort of progress indicator in most of my Console applications.
If this is something that could possibly be apart of Symfony, that would be great.
**Example:**
![Progress Example](http://i.imgur.com/a0wGQ.gif)
---------------------------------------------------------------------------
by jmikola at 2012-03-05T03:08:24Z
Do you have an example of this being used within a console command?
I'd be curious what the performance overhead is. My earliest console commands (nearly 2 years ago) would print status during each iteration (for a database migration) and I found the impact noticeable. After some time, I revised it to only print each X iterations, which often matched up with the batch size inserts/updates.
But for the last year, I've been using [declare(ticks=X)](http://php.net/manual/en/control-structures.declare.php) and have been quite happy with the results. By tuning the tick interrupt, the performance overhead is very small. It's especially helpful when dealing with processing code that is difficult to interrupt with a manual call to update the progress display, as PHP takes care of invoking the tick handler for me. I've thought about making such a console component helper for it, but I think the implementation is too invasive to abstract into a helper.
Here's an example of it being used in OrnicarMessageBundle's [MongoDBMigrateMetadataCommand](https://github.com/ornicar/OrnicarMessageBundle/blob/master/Command/MongoDBMigrateMetadataCommand.php).
---------------------------------------------------------------------------
by leek at 2012-03-05T04:05:29Z
@jmikola: Here is a simple example:
```php
<?php
// ...
protected function execute(InputInterface $input, OutputInterface $output)
{
$progress = $this->getHelperSet()->get('progress');
$progress->start($output, 50);
$i = 0;
while ($i++ < 50) {
usleep(mt_rand(20000, 200000));
$progress->advance();
}
$progress->finish();
}
```
The performance overhead shouldn't be much more than a standard `$output->write()` call. When used with a loop doing 1000's of iterations, you can set the `redrawFreq` option to something more appropriate to control how often the progress indicator is redrawn to the console.
---------------------------------------------------------------------------
by leek at 2012-03-10T10:05:32Z
Added some minor updates along with an example GIF of 2 of the progress bars (see edited PR).
---------------------------------------------------------------------------
by jmikola at 2012-03-10T15:22:29Z
Why does `1 sec` flash over to `1 secs` before `2 secs` is rendered?
---------------------------------------------------------------------------
by henrikbjorn at 2012-03-10T15:26:08Z
👍
---------------------------------------------------------------------------
by leek at 2012-03-10T16:07:08Z
@jmikola: Thanks! I didn't even notice that. Fixed.
---------------------------------------------------------------------------
by drak at 2012-03-11T09:04:58Z
What an amazing PR. I feel like I just have to write some code that uses this feature just because it's there!
---------------------------------------------------------------------------
by henrikbjorn at 2012-03-11T09:55:50Z
This is needed a lot, we have a bunch of import scripts where this is useful.
@fabpot what are your thoughts on this?
---------------------------------------------------------------------------
by francoispluchino at 2012-03-14T12:34:38Z
👍
---------------------------------------------------------------------------
by vicb at 2012-03-14T13:00:42Z
could you please order the properties & methods by visibility according to the Sf2 CS.
---------------------------------------------------------------------------
by leek at 2012-03-14T19:08:52Z
No problem - I'll make the requested changes tonight.
---------------------------------------------------------------------------
by stof at 2012-04-03T22:48:45Z
@fabpot ping
---------------------------------------------------------------------------
by stloyd at 2012-04-14T09:46:31Z
@fabpot Any hope to get this in 2.1 ?
---------------------------------------------------------------------------
by mvriel at 2012-05-15T19:28:34Z
👍
Tried it out by manually including it in my project and works like a charm
---------------------------------------------------------------------------
by blaugueux at 2012-05-23T18:46:15Z
Up ! It will be great to have this feature in the next release.
@fabpot ping
---------------------------------------------------------------------------
by guilhermeblanco at 2012-05-28T22:58:35Z
@fabpot tried on my app and everything works fine.
Any plans to merge this one into 2.1?
---------------------------------------------------------------------------
by damonjones at 2012-05-29T02:31:39Z
+1
This would be a very nice feature to have in 2.1.
---------------------------------------------------------------------------
by fabpot at 2012-05-29T06:18:57Z
This is scheduled for 2.2.
---------------------------------------------------------------------------
by Burgov at 2012-08-16T13:04:34Z
I have a service which downloads a file using wget though the console component, and reads the progress from stderr. Rather than advancing in steps, i'd like to be able to set the current progress. Something like this method might be a nice addition:
```php
public function setCurrent($value, $redraw = false)
{
$this->advance($value - $this->current, $redraw);
}
```
This PR was merged into the master branch.
Commits
-------
92e10a8 Updated HttpFoundation and Locale for proper Composer autoloading
Discussion
----------
Updated HttpFoundation and Locale for proper Composer autoloading
This PR uses better Composer autoloading strategy for the stubs in HttpFoundation and Locale.
It also fixes a bug inside HttpFoundation's composer.json file where the path for SessionHandlerInterface was wrong.
[![Build Status](https://secure.travis-ci.org/jalliot/symfony.png?branch=autoloader-update)](http://travis-ci.org/jalliot/symfony)
After merging this PR and updating the vendors of the SE, you can also merge symfony/symfony-standard#387
---------------------------------------------------------------------------
by datiecher at 2012-09-05T11:15:39Z
Any updates on this issue?
---------------------------------------------------------------------------
by jalliot at 2012-09-05T16:43:46Z
Well I guess it is up to @fabpot to decide now :)
---------------------------------------------------------------------------
by drak at 2012-09-07T11:59:22Z
> It also fixes a bug inside HttpFoundation's composer.json file where the path for SessionHandlerInterface was wrong.
If so should be part of a separate PR imo.
This PR was merged into the master branch.
Commits
-------
7fe44da Whitespace corrections
6d30f20 Switched to using a method to get original class name that did not require string parsing
3c8d607 Changed test to use a longer form, complete check of the contents of the trace
de77c88 Whitespace correction
03a7bb9 Added a unit test to verify incomplete classes do not cause flatten exception to throw
e562418 Added a bit to convert incomplete objects in the error message
Discussion
----------
[HttpKernel] Added a bit to convert incomplete objects in the error message
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes*
\* no - errors in MongoDbSessionHandlerTest attempting to access private property, however running just src/Symfony/Component/HttpKernel does pass.
Objects of class __PHP_Incomplete_Class are only sometimes an object.
```
$object = unserialize('O:14:"BogusTestClass":0:{}');
$object instanceof __PHP_Incomplete_Class; // true
is_object($object); // false
gettype($object); // "object"
```
Since it is "not an object", the flatter attempts to turn it into a string, it triggers:
```
__PHP_Incomplete_Class could not be converted to string.
```
Which then hides the root error message.
---------------------------------------------------------------------------
by pborreli at 2012-09-18T16:16:33Z
have you seen that http://stackoverflow.com/questions/965611/forcing-access-to-php-incomplete-class-object-properties looks like you can still access the object even if it's a __PHP_Incomplete_Class with foreach
---------------------------------------------------------------------------
by rrehbeindoi at 2012-09-18T16:38:38Z
Thank you for the tip re: foreach.
* 2.1:
Added Base64 encoding, decoding to MongoDBProfilerStorage
Fix duplicated code and a field name
refactor src/Symfony/Component/Translation/Loader/MoFileLoader.php
fixed typo
Update src/Symfony/Component/Validator/Resources/translations/validators.pl.xlf
fixed issue #5596 (Broken DOM with the profiler's toolbar set in position top)
[Form] Fixed the testsuite for PHPUnit 3.6 as travis still uses it
added dirs generated by build-data.php in locale component to .gitignore
[Process] Fixed bug introduced by 7bafc69f38.
[Process][Tests] Prove process fail (Add more test case)
[Process][Tests] Prove process fail
[HttpFoundation] Fixed the tests
[DomCrawler] Added test for supported encodings by mbstring
[Config] Fixed preserving keys in associative arrays
[Console] Fixed return value for Command::run
[Locale] Fixed tests
[Console] Fix some input tests
[Filesystem] Fixed tests on Windows
[Config] Fixed tests on Windows
This PR was merged into the 2.1 branch.
Commits
-------
d7623ae [DomCrawler] Added test for supported encodings by mbstring
Discussion
----------
[2.1][DomCrawler] Added test for supported encodings by mbstring
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
---------------------------------------------------------------------------
by fabpot at 2012-09-25T09:35:18Z
As this is a bug fix, it should be done on the 2.0 branch. Thanks.
---------------------------------------------------------------------------
by stof at 2012-09-25T09:41:59Z
@fabpot 2.0 does not contain the code trying to convert the encoding.
Commits
-------
27b2df9 [Process] Fixed bug introduced by 7bafc69f38.
7a955c0 [Process][Tests] Prove process fail (Add more test case)
598dcf3 [Process][Tests] Prove process fail
Discussion
----------
[Process][Tests] Prove process fail with chained commands
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: no
Fixes the following tickets: -
Todo: Fix that
License of the code: MIT
This PR is against 2.1 branch. Previous PR was #5575
This PR try to hiligh a regression in Process component.
``` php
$process = new Process("echo -n 1 && echo -n 1");
// or $process = new Process("echo -n 1 ; echo -n 1");
$process->run();
var_dump('11' == $process->getOutput()); // false,
var_dump($process->getOutput()); // '1',
```
This test failed because of PR #5543 ; see 7bafc69f38 (L0R233)
---------------------------------------------------------------------------
by romainneutron at 2012-09-25T13:05:45Z
You've to revert the change that causes the fail (ie: remove https://github.com/symfony/symfony/blob/2.1/src/Symfony/Component/Process/Process.php#L233)
---------------------------------------------------------------------------
by romainneutron at 2012-09-25T13:06:56Z
BTW, removing this line re-open #5030
---------------------------------------------------------------------------
by stof at 2012-09-25T13:11:15Z
@lyrixx please add a commit reverting the addition of ``exec`` in the case of sigchild not being used (only this addition, not the full commit you linked) as it should fix your test.
---------------------------------------------------------------------------
by stof at 2012-09-25T13:12:21Z
@fabpot btw, this regression is quite important. As I said in the previous PR, it impacts composer in a bunch of places.
---------------------------------------------------------------------------
by romainneutron at 2012-09-25T13:30:07Z
You reverted too much things, you just had to remove line 233
---------------------------------------------------------------------------
by stof at 2012-09-25T13:42:49Z
@lyrixx I explicitly asked you to revert only the ``exec`` addition for the case without sigchild.
---------------------------------------------------------------------------
by lyrixx at 2012-09-25T13:55:57Z
@stof Sorry, i fixed that.
---------------------------------------------------------------------------
by romainneutron at 2012-09-25T13:56:26Z
@lyrixx just remove the two last commit, edit Process.php and remove line 233
---------------------------------------------------------------------------
by lyrixx at 2012-09-25T13:59:59Z
@romainneutron I think it's ok now.
---------------------------------------------------------------------------
by romainneutron at 2012-09-25T14:11:28Z
yep it's good :)
Commits
-------
2dcb2d7 [Filesystem] Fixed tests on Windows
Discussion
----------
[2.1][Filesystem] Fixed tests on Windows
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
Commits
-------
fc1e844 [Locale] Fixed tests
Discussion
----------
[2.1][Locale] Fixed tests
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
Commits
-------
65281fb [Config] Fixed tests on Windows
Discussion
----------
[2.1][Config] Fixed tests on Windows
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
Commits
-------
b961ee3 [HttpFoundation] Fixed the tests
Discussion
----------
[HttpFoundation] Fixed the tests
b8a2f8c646 reverted the use of the username
and password in the getSchemeAndHost method but forgot to revert the
corresponding tests.
Commits
-------
8ab3054 added dirs generated by build-data.php in locale component to .gitignore
Discussion
----------
added dirs generated by build-data.php in locale component to .gitignore
This is to complete the PR #5411.
Paging @eriksencosta.
---------------------------------------------------------------------------
by eriksencosta at 2012-09-25T14:54:06Z
For me it's ok!
Batman?
---------------------------------------------------------------------------
by shieldo at 2012-09-25T14:55:38Z
Kapow! Thanks for checking it over!
---------------------------------------------------------------------------
by shieldo at 2012-09-25T15:41:05Z
As @stof pointed out, git does read .gitignore files in sub-paths. So I've modified the commit so the change is in the Locale component only.
Commits
-------
ef288a2 [Form] Fixed the testsuite for PHPUnit 3.6 as travis still uses it
Discussion
----------
[Form] Fixed the testsuite for PHPUnit 3.6
Travis is still using it so this avoids making all build fail just because of it.
Commits
-------
c869a65 [Console] Fixed return value for Command::run
Discussion
----------
[2.1][Console] Fixed return value for Command::run
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
API says that Command::run returns integer. This is also necessary if I want to run nested commands.
* 2.1:
fixed stringification of array objects in RequestDataCollector (closes#5295)
[HttpFoundation] removed the username and password from generated URL as generated by the Request class (closes#5555)
[Console] fixed default argument display (closes#5563)
Fixing config normalisation example in docblock
* 2.0:
fixed stringification of array objects in RequestDataCollector (closes#5295)
Fixing config normalisation example in docblock
Conflicts:
src/Symfony/Bridge/Doctrine/DataCollector/DoctrineDataCollector.php
src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php
Quoted from the ticket it solves for future reference:
"I've been having issues with using htdigest auth (requirement for me to
work with) after upgrading to 2.1. Each time a resource is loaded, a
prompt is given for the HTTP Auth username and password, and Chrome does
not automatically respond to these 401 responses with the credentials it
already has. I've traced the issue to being caused by the HttpFoundation
Component, specifically Request.php.
The request class adds the PHP_AUTH_USER/PHP_AUTH_PW parameters to the
request URI (changes http://www.mysite.com requests to
http://user:pw@www.mysite.com) in getSchemeAndHttpHost(). This behaviour
is not specified in the HTTP RFC, and is incompatible with Chrome as of
Chrome 19, IE (as of IE 9) and has special behaviour in Firefox (prompts
the user to confirm they know they're logging into the site, which is an
ambiguous behaviour at best, but at least it's something if they're
going to support it for now).
This functionality was added about to HttpFoundation about a year ago,
but it really should be removed and standard protocol practices should
be followed. This practice makes it possible for cross-site tracking and
other malicious behaviours to be performed by hiding information in the
authorization headers, which explains why most browsers no longer
support or take exception with it.
The offending line is specifically this. Replacing it with return
$this->getScheme().'://'.$this->getHttpHost(); seems to solve the
problem."
Commits
-------
6bafe5a moved some code to the component
Discussion
----------
moved some code to the component
This simply moves some code from a command to a dedicated class to make it more reusable.
I wasn't able to run tests because composer failed to install dependencies. Let's see if travis can do better.
* 2.1:
bumped Symfony version to 2.1.3-DEV
updated VERSION for 2.1.2
updated CHANGELOG for 2.1.2
Fixed FlashBagInterface phpdoc, clarified UPGRADE docs
composer is available in travis workers
Conflicts:
src/Symfony/Component/HttpKernel/Kernel.php
Commits
-------
bb0e4c3 Fixed FlashBagInterface phpdoc, clarified UPGRADE docs
Discussion
----------
Fixed FlashBagInterface phpdoc, clarified upgrade doc
The fact that multiple flash messages are now stored/retrieved per type was an additional BC break that I missed when I first went through the 2.1 update doc, and it didn't help that the phpdoc was outdated.
These changes just clarify things a little.
---------------------------------------------------------------------------
by drak at 2012-09-20T07:45:52Z
+1
Commits
-------
71db836 Better config validation handling for numerical values: * New node type Integer and Float * New expressions: min() and max()
Discussion
----------
[2.2] [Config] Better handling for numerical values:
* New node type Integer and Float
* New expressions: ifLessThan(), ifGreaterThan(), ifInRange(), ifNotInRange()
---------------------------------------------------------------------------
by fabpot at 2012-07-03T08:50:22Z
As I said on PR #4713, adding more method clutters the API without any big benefits. I'm -1 on the PR.
---------------------------------------------------------------------------
by jeanmonod at 2012-07-03T08:54:36Z
I have been discuss it with @schmittjoh at the sflive, he was thinking it could be a good addition.
IMHO I think that if we want to encourage the usage of bundle configuration validation, we should make it as easy as possible to use...
---------------------------------------------------------------------------
by jeanmonod at 2012-07-03T08:59:42Z
A real life example:
->scalarNode('max_nb_items')
->validate()
->ifTrue(function($v){
return !is_int($v) || (is_int($v) && $v<1);
})
->thenInvalid('Must be a positive integer')
->end()
->end()
could be replaced by
->integerNode('max_nb_items')
->validate()
->ifLessThan(1);
->thenInvalid('Must be a positive integer')
->end()
->end()
---------------------------------------------------------------------------
by gnutix at 2012-07-03T09:03:06Z
I agree with @jeanmonod on this matter, the bundle configuration validation is already kind of a hassle to understand (and read), so it would be a good addition IMHO.
---------------------------------------------------------------------------
by fabpot at 2012-07-03T10:54:32Z
@schmittjoh What's your point of view?
---------------------------------------------------------------------------
by schmittjoh at 2012-07-03T14:10:37Z
The integer and float nodes are valuable additions imo which I wanted to add myself several times but simply did not have the time for.
As for the changes to the expression builder, I was not really passionate about them in Paris, but I did not mind either way. However, looking at this PR, I think they would be better implemented as methods on the definition builders, and validated directly by the nodes:
```php
$builder->integerNode('foo')->range(1, 4)->end();
$builder->integerNode('foo')->mustBeGreaterThan(5)->end();
```
This will also allow for these constraints to be introspected and added to generated documentation.
---------------------------------------------------------------------------
by fabpot at 2012-07-03T17:57:25Z
@jeanmonod Can you take into account the comments by @schmittjoh?
---------------------------------------------------------------------------
by jeanmonod at 2012-07-03T19:40:24Z
@fabpot Yes, I will try to move those 4 checks.
@schmittjoh If I put those tests into the ScalarNodeDefinition did you think it's ok? And did I have to make anything special for the documentation introspection?
---------------------------------------------------------------------------
by schmittjoh at 2012-07-03T19:56:00Z
You can take a look at the EnumNodeDefinition, and the EnumNode. They are
pretty simple, and should give you a good idea of how to implement it.
On Tue, Jul 3, 2012 at 9:46 PM, Jeanmonod David <
reply@reply.github.com
> wrote:
> @fabpot Yes, I will try to move those 4 checks.
>
> @schmittjoh If I put those tests into the ScalarNodeDefinition did you
> think it's ok? And did I have to make anything special for the
> documentation introspection?
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/symfony/symfony/pull/4714#issuecomment-6744309
>
---------------------------------------------------------------------------
by jeanmonod at 2012-07-03T21:37:18Z
OK, I just refactor as requested. At the end, I didn't add the range() check. It can be easily done by chaining min and max, like this:
$builder->integerNode('foo')->min(1)->max(4)->end();
@schmittjoh can you have a look?
---------------------------------------------------------------------------
by schmittjoh at 2012-07-03T21:48:17Z
Have you tested the builder API? Did you maybe forget to commit something?
---------------------------------------------------------------------------
by jeanmonod at 2012-07-03T21:52:45Z
Yes you are right, I forget the definition
---------------------------------------------------------------------------
by jeanmonod at 2012-07-03T22:15:45Z
OK, I realize now that I misunderstood the concept. I was thinking that a node was able to do self validation. But no, I will have to move my code to the node definition. So let's wait for a new commit...
---------------------------------------------------------------------------
by jeanmonod at 2012-07-06T06:13:55Z
@schmittjoh I just push the move to definition and the new abstract class Numeric. Can you review it?
---------------------------------------------------------------------------
by jeanmonod at 2012-07-10T05:12:59Z
@schmittjoh, @fabpot
I fix all the mention points, can you have a look at the final result?
---------------------------------------------------------------------------
by schmittjoh at 2012-07-10T06:38:20Z
There are still some excessive blank lines if you want to be perfect, but overall looks good now.
---------------------------------------------------------------------------
by jeanmonod at 2012-07-10T07:05:54Z
@schmittjoh I think the comments of @Baachi are not well placed in the diff. I execute php-cs-fix on all code, so level of perfectness is already good ;)
@fabpot Do you want some more complements before merging?
---------------------------------------------------------------------------
by fabpot at 2012-07-10T07:07:21Z
@jeanmonod I'm going to review the code once more and it will be merged for 2.2. Thanks for your work.
---------------------------------------------------------------------------
by fabpot at 2012-09-18T13:58:48Z
@jeanmonod Can you squash your commits before I merge? Thanks.
---------------------------------------------------------------------------
by jeanmonod at 2012-09-18T14:36:59Z
@fabpot Squash done
---------------------------------------------------------------------------
by fabpot at 2012-09-19T04:07:13Z
@jeanmonod One last thing: can you submit a PR on symfony/symfony-docs that update the documentation with the new possibilities?
---------------------------------------------------------------------------
by jeanmonod at 2012-09-20T05:32:01Z
@fabpot OK, Documentation PR done here: https://github.com/symfony/symfony-docs/pull/1732
* 2.1:
[Form] removed comment now that PHPUnit 3.7 is out
Add a Sigchild compatibility mode (set to false by default)
fix Fatal error: Cannot access private property
Conflicts:
src/Symfony/Component/Process/Process.php
Commits
-------
bb2566c [Console] Console colorization is also provided by ConEmu on Windows
Discussion
----------
[Console] Console colorization is also provided by ConEmu on Windows
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
See http://code.google.com/p/conemu-maximus5/wiki/AnsiEscapeCodes#Переменная_окружения
---------------------------------------------------------------------------
by fabpot at 2012-09-16T07:43:55Z
Can you add a note about it in the changelog of the component? thanks
Commits
-------
e271b17 Remove the string optimization since it causes no real performance gain but increases generation time of the dumped PHP Container
Discussion
----------
PhpDumper and large strings
When the PhpDumper is dealing with longer strings, the regular expression performed to optimize this can be quite a performance hog.
In our case sometimes the dumper takes more then 30 seconds if leaving this enabled. Disabling it will bring it back to sub-second speed.
This patch makes the optimization optional by passing in an additional container option.
---------------------------------------------------------------------------
by fabpot at 2012-08-25T16:57:29Z
I don't like adding yet another option for something that should "just works". It would be better to find a better way to optimise the strings for all cases.
---------------------------------------------------------------------------
by mazen at 2012-08-25T17:22:07Z
I never really tested how much of a runtime difference it incurs when either using the "optimized" version or the non optimized version, so:
Having an example at hand which generates stable results yields (in a non-debug environment with a booted container using either of the optimization methods):
Without optimized strings:
```
Time taken for tests: 14.865 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 217000 bytes
HTML transferred: 8000 bytes
Requests per second: 67.27 [#/sec] (mean)
Time per request: 14.865 [ms] (mean)
Time per request: 14.865 [ms] (mean, across all concurrent requests)
Transfer rate: 14.26 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.0 0 0
Processing: 14 15 19.7 14 632
Waiting: 14 15 19.7 14 632
Total: 14 15 19.7 14 632
Percentage of the requests served within a certain time (ms)
50% 14
66% 14
75% 14
80% 14
90% 14
95% 14
98% 15
99% 23
100% 632 (longest request)
```
With Optimized Strings enabled
```
Time taken for tests: 14.077 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 217000 bytes
HTML transferred: 8000 bytes
Requests per second: 71.04 [#/sec] (mean)
Time per request: 14.077 [ms] (mean)
Time per request: 14.077 [ms] (mean, across all concurrent requests)
Transfer rate: 15.05 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.0 0 0
Processing: 14 14 1.3 14 48
Waiting: 14 14 1.3 14 48
Total: 14 14 1.3 14 48
Percentage of the requests served within a certain time (ms)
50% 14
66% 14
75% 14
80% 14
90% 14
95% 14
98% 14
99% 15
100% 48 (longest request)
```
So the response times differ by around 0.8ms
Building the non-optimized container takes around 800ms
Building the optimized container takes 43 seconds
From my Point of View it would just be viable to remove the optimization (since it already incurred some issues fixed in 808088a3ca).
I do not see a way how to improve the regexps (but by all means I'm no regular expression guru)
---------------------------------------------------------------------------
by fabpot at 2012-08-30T07:12:55Z
I'm also for removing these optimizations. What others think?
---------------------------------------------------------------------------
by Baachi at 2012-08-30T07:54:53Z
I'm +1 for removing this feature.
The performance boost is to small.
Commits
-------
9135431 [HttpKernel] Added support for WinCache in ConfigDataCollector
Discussion
----------
[HttpKernel] Added support for WinCache in ConfigDataCollector
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
Commits
-------
f2e4802 [Yaml] Normalize exceptions
b0f5f2e [Serializer] Normalize exceptions
bcd8db2 [DependencyInjection] Normalize exceptions
Discussion
----------
Normalize exceptions
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
This PR adds consistence to components which already have their own exception interface.
DependencyInjection, Serializer and Yaml now only throw their own scoped exceptions.
For other components, it's much more work and could introduce some bugs. It would be better to do it in Symfony 2.2.
Commits
-------
c5e7793 [Process] Normalize exceptions
Discussion
----------
[Process] Normalize exceptions
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
There were some exceptions in the Process scope but they were not implemented everywhere in the component.
This PR ensure that all exceptions thrown inside Process implements `Process\Exception\ExceptionInterface`.
---------------------------------------------------------------------------
by romainneutron at 2012-08-30T20:05:41Z
Tests passes, it's a travis issue, see http://travis-ci.org/#!/symfony/symfony/builds/2287439
PHP Fatal error: Cannot access private property Symfony\Component\HttpFoundation\Tests\Session\Storage\Handler\MongoDbSessionHandlerTest::$options
in src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php on line 85
Commits
-------
22e9036 updated CHANGELOG
bafe890 [FrameworkBundle] changed Client::enableProfiler() behavior to fail silently when the profiler is not available (it makes it easier to write functional tests)
f41872b [FrameworkBundle] added a way to enable the profiler for the very next request in functional tests (closes#4307)
67b91e5 [HttpKernel] added a way to enable a disable Profiler
Discussion
----------
[2.2] added a way to enable the profiler for the very next request in a functional test
Bug fix: yes/no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #4307
Todo: -
License of the code: MIT
Documentation PR: should be done before merging
After merging this PR, we need to disable the profiler in the test environment in Symfony SE.
Commits
-------
6ff9b04 Add Luhn validator
Discussion
----------
[2.2] [Validator] Add Luhn validator
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets:
Todo: Adding documentation if this PR is blessed.
License of the code: MIT
I submitted these validators to JMSPaymentCoreBundle, because they're payment related, but @schmittjoh feels that they're a better choice for adding to Symfony2.
See schmittjoh/JMSPaymentCoreBundle#52 for the original submission.
---------------------------------------------------------------------------
by fabpot at 2012-07-04T05:19:42Z
I'm +1. @bschussek?
---------------------------------------------------------------------------
by shieldo at 2012-07-04T15:46:05Z
+1 in principle (certainly the Luhn check). I did wonder whether Visa Electron should also be in there (although, that uses a subset of the Visa range, and the chance that you would be checking for a Visa Electron but *not* Visa at the same time is vanishingly small, so maybe this is unnecessary).
---------------------------------------------------------------------------
by merk at 2012-07-04T21:25:30Z
@shieldo I did have a concern about the Electron as well, but in the case of an online system doing payment processing, I'm not sure anyone would ever need to check if it was an Electron card or not.
---------------------------------------------------------------------------
by merk at 2012-07-04T21:28:25Z
We could expand the CardScheme stuff further with this list: http://en.wikipedia.org/wiki/List_of_Issuer_Identification_Numbers
Is there any point expanding the validator beyond financial services and into the other sevices listed?
---------------------------------------------------------------------------
by shieldo at 2012-07-04T21:37:41Z
@merk Yes, in actuality there are always going to be cases you can't trap with a regex - I'd say validation like this is working if it catches a majority of cases of invalid numbers, because in reality ones that get through will just fail downstream anyway. The purpose of the validator isn't to identify individual schemes for numbers, it's to do a sanity check across collections of schemes.
I don't really see any point expanding beyond financial services for a core validator (imho) - I'm not sure how stable some of this information is.
---------------------------------------------------------------------------
by Gator92 at 2012-07-11T00:45:50Z
+1 on the Luhn check (without the authorship, just give credit to Greg Knapp), the CardScheme, however, is not really required by most gateways these days, it's a better candidate for a custom constraint.
---------------------------------------------------------------------------
by merk at 2012-07-11T00:47:20Z
I dont object, but Greg's algorithm has a flaw for odd length creditcard numbers. The unit testing written by Infinite caught this.
---------------------------------------------------------------------------
by Gator92 at 2012-07-11T01:35:46Z
You're right, the Knapp algo is flawed and does not appear to work on odd-numbered length cards.
---------------------------------------------------------------------------
by fabpot at 2012-07-11T05:49:22Z
@merk: Can you open two new pull requests? One for each validator?
---------------------------------------------------------------------------
by merk at 2012-07-26T23:42:24Z
PR updated to remove CardScheme into its own PR.
Documentation PR added to symfony-docs
* 2.1:
Create CONTRIBUTING.md file for auto-linking in PR's
Added Bulgarian translation
[Profiler]Use the abstract method to get client IP
Typo fix
Fixing incorrect word in twig:lint command description
Rename $key parameter to $name for consistency
=Minor chnage: replaced function by method
Fixed the phpdoc in the DependencyInjection component
Commits
-------
02516de [Routing] fix variable with a requirement of '0'
1f5b793 [Routing] fix setting empty requirement in Route
Discussion
----------
[Routing] fix setting empty requirement
First commit: A requirement of "^$" was overlooked and wasn't recognized as empty after stripping it in Route.
Second commit: Fixes a requirement of '0' that was ignored by the Compiler.
Commits
-------
8f46795 tests for HeaderBag
Discussion
----------
tests for HeaderBag
Hi,
This patch adds 100% tests coverage for HeaderBag.
Best regards,
Michal
Commits
-------
622102e [Process] change all documentation type to callable
Discussion
----------
[Process] change all documentation type to callable
Update documentation per #5456 instead of mixing in with restart() pull request.
Commits
-------
be28e56 [Routing] disallow numeric named variables in pattern
Discussion
----------
[Routing] compile check for numeric named variables in pattern
Because PHP raises an error for such subpatterns in PCRE and thus would break matching, e.g. this is not allowed as regex `(?<123>.+)`.
So add a compile time check for a non-working pattern like '/{123}'.
---------------------------------------------------------------------------
by sstok at 2012-09-06T08:31:42Z
Strangely enough Regex buddy gives no warning or error with the pattern.
Is the name all numeric invalid or just the beginning?
1e4 and 0xFF would be perfectly valid but returns true with is_nummeric()
---------------------------------------------------------------------------
by Tobion at 2012-09-06T08:59:07Z
Any numeric is not valid. I guess this limitation is unique to PHP's binding to PCRE.
I think it's because the returned matches array of of preg_match contains both the subpattern as integer index and as named variable. So having a numeric named variable would conflict as `array['1'] === array[1]`.
Commits
-------
7c5cfeb [Routing] added test why #5238 is not that easy
Discussion
----------
[Routing] added test why #5238 is not that easy
This just adds a test that wasn't covered yet and shows why #5238 is not that easy as I thought at first.
Commits
-------
0f86a33 micro-optim: replace for with foreach
4efb9fe [Form] Remove unneeded FormUtil constants
Discussion
----------
[Form] Remove FormUtil constants
The constants are not useful from outside the class as the $pluralMap is also private. So no need to expose these veriables in the API when they cannot be used in any way. Unfortunately there are not private constants, so use private static. Then I realized the variables can be removed altogether, as they are only used once anyway and the index meaning is already documented in pluralMap.
---------------------------------------------------------------------------
by empire at 2012-08-18T12:58:22Z
FormUtils is abstract class, and maybe subclass (in future) will use this constants, I think changing access modifier to `protected` is better option.
---------------------------------------------------------------------------
by Tobion at 2012-08-18T12:59:40Z
They cannot, as pluralMap is private...
---------------------------------------------------------------------------
by Partugal at 2012-08-18T14:11:17Z
extract self::$pluralMap into local variable add small speed up
4.5499801635742 ms vs 5.7430267333984 ms on 100 iterations
---------------------------------------------------------------------------
by Tobion at 2012-08-18T14:16:47Z
This is not about performance.
---------------------------------------------------------------------------
by Partugal at 2012-08-18T14:21:11Z
yes but adds
your changes vs current is
5.7430267333984 ms vs 6.4971446990967 ms on 100 iterations
---------------------------------------------------------------------------
by Tobion at 2012-08-18T14:29:48Z
How about `$map =& self::$pluralMap[$i]`?
---------------------------------------------------------------------------
by Partugal at 2012-08-18T14:59:57Z
I mean https://gist.github.com/3387253
---------------------------------------------------------------------------
by Partugal at 2012-08-18T15:01:45Z
foreach is event faster :)
(4.1971206665039 ms on my hw)
---------------------------------------------------------------------------
by Tobion at 2012-08-18T15:04:51Z
I see.
---------------------------------------------------------------------------
by Partugal at 2012-08-18T15:06:41Z
in first comment i mean code like this:
```php
$pluralMap = self::$pluralMap; // do this because access to static property is to slow
```
on my machine & is slower `$map =& $pluralMap[$i]` vs `$map = $pluralMap[$i]`
5.0 vs 4.8 ms
imho & not needed in read only code
---------------------------------------------------------------------------
by Tobion at 2012-08-18T15:15:03Z
Well, you'd need to benchmark memory too. `=&` should reduce memory primarily in this case.
---------------------------------------------------------------------------
by Partugal at 2012-08-18T15:19:35Z
```php
echo memory_get_usage() . "\n"; // 711536
$a = array_fill(5, 6000, 'banana');
echo memory_get_usage() . "\n"; // 1497632
$b = $a;
echo memory_get_usage() . "\n"; // 1497760
$b[1] = 2;
echo memory_get_usage() . "\n"; // 2283832
```
1497760 - 1497632 = 128 it is size for variable structure not for its value:
```php
echo memory_get_usage() . "\n"; // 711536
$a = 1;
echo memory_get_usage() . "\n"; // 1497632
$b = &$a;
echo memory_get_usage() . "\n"; // 1497760
```
---------------------------------------------------------------------------
by Seldaek at 2012-08-18T17:52:32Z
@Tobion http://schlueters.de/blog/archives/125-Do-not-use-PHP-references.html - search for "copy-on-write" if you don't want to read it all.
---------------------------------------------------------------------------
by Tobion at 2012-08-18T19:37:44Z
Yeah I know about copy on write. I thought there might be a difference what you assign a sub-element of an array to a variable. But apparently not.
Interestingly `$a =& $b` takes a little more memory than `$a = $b` according to `memory_get_usage ()` but not when using `memory_get_usage (true)`.
---------------------------------------------------------------------------
by bschussek at 2012-08-30T08:15:01Z
I don't like the removal of the constants. They introduce meaning into the integers and improve code clarity. The rest looks good.
---------------------------------------------------------------------------
by Tobion at 2012-08-30T13:18:19Z
My opinion of the constants:
- They are part of the public API (as const are alwalys public) but cannot be used at all, as everything else is private...
- They are each only used once.
- The meaning of the indices is already documented in `$pluralMap`
- They are not used when building `$pluralMap` so they dont imprivate code clarity and consistence either. But doing so would on the other hand make it probably more ugly. So removing them is IMO best solution.
---------------------------------------------------------------------------
by bschussek at 2012-08-30T15:21:03Z
If you really need to remove the constants, then please comment the code where they are used accordingly.
---------------------------------------------------------------------------
by Tobion at 2012-08-31T00:58:51Z
I dont see what I should comment to make it more understandable, as the the map is already assigned to a named variable like `$suffixLength = $map[1];`.
---------------------------------------------------------------------------
by bschussek at 2012-08-31T09:12:18Z
> I dont see what I should comment to make it more understandable, as the the map is already assigned to a named variable
`$map[2]` and `$map[3]` is not self-describing.
---------------------------------------------------------------------------
by Tobion at 2012-08-31T17:23:15Z
@bschussek Done.
---------------------------------------------------------------------------
by bschussek at 2012-08-31T22:13:41Z
Could you please squash your commits?
Commits
-------
1b5ad17 Revert "Removed MySQL-exclusive usage of unsigned integer from table creation"
Discussion
----------
[Security][DBAL] Revert MySQL unsigned removal
Revert "Removed MySQL-exclusive usage of unsigned integer from table creation"
This reverts commit 57694aaa94.
The problem is underlying in Doctrine DBAL change tracking and should
either be fixed or ignored there.
I opened a ticket on Doctrine Jira http://doctrine-project.org/jira/browse/DBAL-322
---------------------------------------------------------------------------
by fabpot at 2012-08-14T06:40:47Z
I will merge this PR after we have a release of DBAL that includes the fix for DBAL-322.
---------------------------------------------------------------------------
by acasademont at 2012-08-20T08:01:48Z
This was already fixed 2 weeks ago in doctrine/dbal#183 so i guess this can be closed
---------------------------------------------------------------------------
by acasademont at 2012-08-20T08:02:06Z
merged i mean
Commits
-------
3036b00 JsonResponseTest
Discussion
----------
JsonResponseTest
Hi,
This patch adds some tests for JsonResponse.
Best regards,
Michal
---------------------------------------------------------------------------
by eventhorizonpl at 2012-09-01T07:09:12Z
Done. Thanks for the review!
Commits
-------
8a3c8c9 load test
Discussion
----------
load test
Hi,
This patch add test that covers this situation
public static function load($classes, $cacheDir, $name, $autoReload, $adaptive = false, $extension = '.php')
{
// each $name can only be loaded once per PHP process
if (isset(self::$loaded[$name])) {
return;
}
Best regards,
Michal
Commits
-------
0af8778 Response tests
Discussion
----------
Response tests
Hi,
This patch adds some tests to ResponseTest.
Best regards,
Michal
---------------------------------------------------------------------------
by eventhorizonpl at 2012-09-01T09:45:16Z
Fixed, thanks for the review.
---------------------------------------------------------------------------
by eventhorizonpl at 2012-09-02T19:39:26Z
CS fixed. Thanks for the review :)
Commits
-------
c74d9a9 ResponseHeaderBag tests
Discussion
----------
ResponseHeaderBag tests
Hi,
This patch adds some ResponseHeaderBag tests. Now ResponseHeaderBag got 100% test coverage :)
Best regards,
Michal
Commits
-------
b89d4ee StreamedResponseTest
Discussion
----------
StreamedResponseTest
Hi,
This patch adds one test to StreamedResponseTest and fixes another. StreamedResponse has 100% test coverage.
Best regards,
Michal
Commits
-------
21a5841 RedirectResponse tests
Discussion
----------
RedirectResponse tests
Hi,
This patch adds 100% test coverage for RedirectResponse class.
Best regards,
Michal
Commits
-------
04fd5f1 [Form] Fixed PropertyPath to not modify Collection instances (not even their clones)
Discussion
----------
[Form] Fixed PropertyPath to not modify Collection instances
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #4670
Todo: -
---------------------------------------------------------------------------
by pocallaghan at 2012-08-31T14:20:52Z
As far as I can see the pull request does fix the issue, which makes sense based on the code change (I didn't know iterator_to_array existed, good call). One thing I would say, I'm not sure on the use in the change to the test case. It's not clear to me what additional protection this extra assertion gives, as both the old and new code seem to pass.
---------------------------------------------------------------------------
by bschussek at 2012-08-31T14:21:46Z
The new assertion is there because not even the old code (`clone`) was tested.
---------------------------------------------------------------------------
by stof at 2012-08-31T14:37:38Z
@bschussek but was it failing without the code change ?
---------------------------------------------------------------------------
by bschussek at 2012-08-31T22:12:00Z
@stof It was not, but I was unable to write a good test for the change within reasonable time. I added an explanatory comment instead.
They are part of the public API (as const are always public) but cannot be used at all from outside the class as the$pluralMap is private. The meaning of the indices is already documented in the array.
Commits
-------
cb7e3f5 [Routing] added route compile check to identify a default value of a required variable that does not match the requirement
Discussion
----------
[Routing] added route compile check to identify a bad default value
BC break: yes but only for strange route definitions
See the exception message in code for the reasoning.
An exception is thrown for a __required__ variable that __has a default__ that __doesn't match__ the requirement.
So optional variables can of course still have a default that don't meet the requirement, which is useful.
This helps to identify useless route definitions at compile time instead of when generating or matching a URL.
Commits
-------
890aea2 FileLocatorInterface used in typehint instead of FileLocator
Discussion
----------
FileLocatorInterface used in typehint instead of FileLocator
---------------------------------------------------------------------------
by stof at 2012-08-30T22:09:39Z
@fabpot this makes sense (and it is BC)
---------------------------------------------------------------------------
by mvrhov at 2012-08-31T08:34:17Z
What's wrong with Interface hint? I always hint interface when available as this means that I can inject whatever class implementing that interface.
Commits
-------
7503ec9 Issue #5307: HTML regexp when match is false
Discussion
----------
Issue #5307: HTML regexp when match is false
When match is false the html5 validation regexp should be either inverted or not added.
Since we are in RC added a fix where this is not added, but marked a @todo so that this
can be revisited and we try to inverse the regexp instead.
Discussed in #5307.
---------------------------------------------------------------------------
by bschussek at 2012-08-30T08:40:06Z
👍 once the CS issue is fixed.
---------------------------------------------------------------------------
by rdohms at 2012-08-30T09:23:57Z
Could swear that was the CS in PSR-1 or 2, anyway, fixed.
---------------------------------------------------------------------------
by fabpot at 2012-08-30T09:26:07Z
Can you squash your commits before I merge? Thanks.
---------------------------------------------------------------------------
by rdohms at 2012-08-30T09:54:26Z
@fabpot done.
When match is false the html5 validation regexp should be either inverted or not added.
Since we are in RC added a fix where this is not added, but marked a @todo so that this
can be revisited and we try to inverse the regexp instead.
Commits
-------
58ebd1b [Form] Fixed error bubbling from DateTime widget - Issue #52708ea1607 Update src/Symfony/Component/Form/Extension/Core/Type/DateTimeType.php
Discussion
----------
[Form] Fixed error bubbling from DateTime widget - Issue #5270
This is related to https://github.com/symfony/symfony/issues/5270
---------------------------------------------------------------------------
by mpiecko at 2012-08-16T19:37:45Z
Travisbot shows something like this in it's log:
[Composer\Downloader\TransportException] The "http://nodeload.github.com/phingofficial/phing/zipball/2.4.12" file could not be downloaded (HTTP/1.1 500 Internal Server Error)
So is it my PR ot Travis CI who fails ... ? I saw this error in some other PR's ...
---------------------------------------------------------------------------
by stloyd at 2012-08-16T20:40:39Z
It's GitHub =)
---------------------------------------------------------------------------
by mpiecko at 2012-08-17T09:36:31Z
Bad GitHub :)
---------------------------------------------------------------------------
by bschussek at 2012-08-17T11:21:39Z
Could you please add a test to DateTimeTypeTest?
---------------------------------------------------------------------------
by mpiecko at 2012-08-17T12:23:40Z
Sure!
---------------------------------------------------------------------------
by bschussek at 2012-08-30T08:20:08Z
👍
Commits
-------
0706d18 [Routing] fixed 4 bugs in the UrlGenerator
Discussion
----------
[Routing] UrlGenerator: fixed missing query param and some ignored requirements
This was pretty hard to figure out. I could fix 4 bugs and refactor the code to safe 2 variables and several assignments. Sorry for doing this in one commit, but they were highly interdependent.
See the added tests for what was fixed. The most obvious bug was that a query param was ignored if it had by accident the same name as a default param (but wasn't used in the path).
In 3 cases it generated the wrong URL that wouldn't match this route. The generator wrongly ignored either the requirements or the passed parameter. I had to adjust one test that was asserting something wrong (see comments).
---------------------------------------------------------------------------
by Tobion at 2012-08-13T14:22:35Z
ping @fabpot
---------------------------------------------------------------------------
by Tobion at 2012-08-29T17:53:07Z
@fabpot I think it's important to merge this before 2.1 final.
Commits
-------
f2d8a8a Refactor the unit test for the "MongoDbSessionHandler"
Discussion
----------
[HttpFoundation] Refactor the unit test for the "MongoDbSessionHandler"
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
---------------------------------------------------------------------------
by drak at 2012-08-29T19:49:49Z
Big +1 from me. Exactly how these kind of tests should be written.
Commits
-------
eb2eba1 [Form] don't allow users to force exceptions by submitting unexpected data
Discussion
----------
[Form] don't allow users to force exceptions by submitting unexpected data
fix#5334
This makes it more fault-tolerant by simply ignoring wrong stuff from hackers.
@bschussek: I didn't find any other UnexpectedTypeExceptions that could be invoked by simply submitting unexpected data. But I'm not 100% sure that there aren't any indirectly invokeable, e.g. in some listeners.
---------------------------------------------------------------------------
by stof at 2012-08-24T22:34:52Z
a test is missing for this.
---------------------------------------------------------------------------
by Tobion at 2012-08-24T23:02:26Z
@stof true, I will add one
---------------------------------------------------------------------------
by Tobion at 2012-08-25T13:51:23Z
Added test.
---------------------------------------------------------------------------
by bschussek at 2012-08-29T11:07:37Z
👍
Could you please squash the commits?
---------------------------------------------------------------------------
by Tobion at 2012-08-29T13:43:52Z
Done.
Commits
-------
7e8ab54 [Form] raise OutOfBoundsException instead of InvalidArgumentException for inexistent form childs to be in line with PropertyPath
Discussion
----------
[Form] raise OutOfBoundsException instead of InvalidArgumentException in Form::get
BC break: yes
Raise OutOfBoundsException instead of InvalidArgumentException in Form::get for inexistent form childs to be in line with PropertyPath, which also uses OutOfBoundsException for invalid indexes. OutOfBoundsException fits much better as it extends RuntimeException instead of LogicException and this error can typically not be detected at compile time.
---------------------------------------------------------------------------
by bschussek at 2012-08-29T11:01:01Z
👍
---------------------------------------------------------------------------
by stloyd at 2012-08-29T11:07:51Z
Shouldn't this change be noted in upgrade file ?
---------------------------------------------------------------------------
by stof at 2012-08-29T11:23:04Z
it should (and in the changelog of the component)
Commits
-------
e7e39e0 [Form] refactor Guess
dcbeeb1 [Form] replaced UnexpectedValueException by InvalidArgumentException in Guess
Discussion
----------
[Form] replaced UnexpectedValueException by InvalidArgumentException in Guess
BC break: yes
this is a better fit because the error is a logic exception (that can be detected at compile time, i.e. when writing the code) instead of a runtime exception
---------------------------------------------------------------------------
by bschussek at 2012-08-29T10:51:54Z
👍
Commits
-------
0186731 [Form] removed hasParent from FormInterface and deprecated its use
Discussion
----------
[Form] removed hasParent from FormInterface and deprecated its use
There are already 2 alternatives with getParent() and isRoot(), so a third one with similar semantics is confusing and unneeded.
---------------------------------------------------------------------------
by bschussek at 2012-08-29T11:11:11Z
👍
Commits
-------
492c990 [Form] optimized PropertyPathMapper to invoke the expensive property path less often
47a8bbd [Form] optimized the binding of child forms and calculation of extra data
8d45539 [Form] refactor Form::bind to save 7 assignments
Discussion
----------
[Form] refactor Form::bind to save 7 assignments and a complete loop
---------------------------------------------------------------------------
by stof at 2012-08-24T23:45:18Z
the new code is not equivalent. See travis for the proof.
---------------------------------------------------------------------------
by Tobion at 2012-08-25T01:50:41Z
@stof fixed, I had to reduce the refactoring a little
---------------------------------------------------------------------------
by bschussek at 2012-08-29T11:05:52Z
👍
Commits
-------
d5eb4f7 [Form] fix phpdoc of Form::hasErrors
5cb8264 [Form] deprecated Form::hasErrors that isn't part of the Interface
Discussion
----------
[Form] deprecated Form::hasErrors that isn't part of the Interface
This method is not part of FormInterface, so I deprecated it as it cannot be used reliably. This is consistent with other hassers that were deprecated like `hasChildren` where one should use `count` instead.
---------------------------------------------------------------------------
by stof at 2012-08-26T19:11:19Z
You should deprecate it, not remove it
---------------------------------------------------------------------------
by Tobion at 2012-08-26T19:17:35Z
oh right. I thought it was added in 2.1 and thus can be removed but it's also in 2.0.
Done.
---------------------------------------------------------------------------
by bschussek at 2012-08-29T11:00:32Z
👍
* 2.0:
updated VERSION for 2.0.17
updated CHANGELOG for 2.0.17
updated vendors for 2.0.17
fixed XML decoding attack vector through external entities
prevents injection of malicious doc types
disabled network access when loading XML documents
refined previous commit
prevents injection of malicious doc types
standardized the way we handle XML errors
Redirects are now absolute
Conflicts:
CHANGELOG-2.0.md
src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php
src/Symfony/Component/DomCrawler/Crawler.php
src/Symfony/Component/HttpKernel/Kernel.php
tests/Symfony/Tests/Component/DependencyInjection/Loader/XmlFileLoaderTest.php
tests/Symfony/Tests/Component/Routing/Loader/XmlFileLoaderTest.php
tests/Symfony/Tests/Component/Serializer/Encoder/XmlEncoderTest.php
tests/Symfony/Tests/Component/Translation/Loader/XliffFileLoaderTest.php
tests/Symfony/Tests/Component/Validator/Mapping/Loader/XmlFileLoaderTest.php
vendors.php
Commits
-------
f1970fa dump test
Discussion
----------
Symfony\Component\ClassLoader\ClassMapGenerator dump test
Hi,
100 percent test coverage for ClassMapGenerator :)
Best regards,
Michal
---------------------------------------------------------------------------
by eventhorizonpl at 2012-08-24T07:47:24Z
Fixed, thanks for the review!
Commits
-------
83dc966 [Form] Fixed some PHPDoc
596bbb1 [Form] fixed FormConfigBuilder to use PropertyPathInterface
a523823 [Form] fixed and added phpDoc
Discussion
----------
[Form] fixed and added phpDoc
[ci skip]
---------------------------------------------------------------------------
by sstok at 2012-08-26T08:11:01Z
Some descriptions don''t seem to be properly aligned, use the CS-fixer.
---------------------------------------------------------------------------
by Tobion at 2012-08-26T17:02:25Z
@sstok This is more about manual fixes concerning forgotten exceptions or wrong data type. The cs fixer gives many false positives and can be applied later.
Commits
-------
9e5d5a4 [Form] fix static method call
Discussion
----------
[Form] fix static method call
`allowDataWalking` was called statically, but wasnt defined as such.
Commits
-------
933e821 Add minimum-stability (dev) in each component
Discussion
----------
Add minimum-stability (dev) in each component
This fixes the ability to run the test suite in each component if a `composer install` is needed.
---------------------------------------------------------------------------
by stof at 2012-08-22T13:57:14Z
If you really want to run the testsuite standalone, some dev requirements are missing (SecurityBundle needs the FrameworkBundle for its functional tests for instance). If you have some time to check the missing dev requirement, it would be great.
Anyway, 👍 for this
---------------------------------------------------------------------------
by willdurand at 2012-08-22T13:59:15Z
Yes I already did that once. I'll try to fix more components later.
On Wed, Aug 22, 2012 at 3:57 PM, Christophe Coevoet <
notifications@github.com> wrote:
> If you really want to run the testsuite standalone, some dev requirements
> are missing (SecurityBundle needs the FrameworkBundle for its functional
> tests for instance). If you have some time to check the missing dev
> requirement, it would be great.
> Anyway, [image: 👍] for this
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/symfony/symfony/pull/5318#issuecomment-7934886>.
>
>
---------------------------------------------------------------------------
by stof at 2012-08-22T14:02:23Z
Well, I think most components should be good now (as some work has been done on them). But the bridges and bundles may need some work (bundles were not having any dev requirements until yesterday when @guilhermeblanco added some on FrameworkBundle)
---------------------------------------------------------------------------
by pborreli at 2012-08-22T14:14:00Z
what about having for each READ-ONLY repo his own .travis.yml and travisci hook activated ?
---------------------------------------------------------------------------
by fabpot at 2012-08-22T14:30:13Z
please, don't add more travis files. The main already tests everything, and that's all we need.
---------------------------------------------------------------------------
by stof at 2012-08-22T14:33:46Z
@pborreli tests should not be different for subtree split repos as the code is the same and the tests are the same (except that more tests could be skipped because of missing deps).
Note that for the bundles, it is likely to be different currently as I think some skip tests are missing (just like dev requirements are). But fixing this does not require enablign travis.
---------------------------------------------------------------------------
by pborreli at 2012-08-22T14:42:30Z
ok, i was just thinking about a way to be sure each component is usable individually but yeah that would require to relaunch each tests and add a bunch of travis files + hook
---------------------------------------------------------------------------
by hason at 2012-08-24T13:12:04Z
@stof, @eriksencosta, @fabpot: Tests are different for Locale component, see #5235
---------------------------------------------------------------------------
by stof at 2012-08-24T13:35:07Z
@hason no. You also need to do it when running the tests of the Locale component as part of the full run.
Commits
-------
8c74b55 getNamespaces test
Discussion
----------
100pc symfony component class loader
Hi,
I added some tests for Symfony\Component\ClassLoader\UniversalClassLoader and Symfony\Component\ClassLoader\ClassLoader.
Best regards,
Michal
---------------------------------------------------------------------------
by eventhorizonpl at 2012-08-23T20:05:02Z
Fixed. Thanks for the review!
---------------------------------------------------------------------------
by pborreli at 2012-08-24T05:11:00Z
👍
---------------------------------------------------------------------------
by fabpot at 2012-08-24T05:46:36Z
Can you squash your commits before I merge the PR? Thanks.
Commits
-------
1ff081d added tests for ValidatorBuilder fluent interface
fec11ae updated docblocks for ValidatorBuilderInterface
b5aaf53 added fluent interface to validatorbuilder
Discussion
----------
[Validator] Added missing fluent interface to ValidatorBuilder
The new ValidatorBuilder class seems to be intended to have a fluent interface, reasoning:
- Static Validation::createValidatorBuilder() method exists
- Consistency with other builders in the framework
- Component README actually uses fluent interface for examples.
This was not implemented though. This PR adds the fluent interface.
BC Break: No
Symfony2 Tests Pass: Yes
---------------------------------------------------------------------------
by henrikbjorn at 2012-08-23T09:47:35Z
Could you add a test for this? :)
---------------------------------------------------------------------------
by bschussek at 2012-08-23T12:04:12Z
Great, thanks! 👍
---------------------------------------------------------------------------
by meandmymonkey at 2012-08-23T12:30:40Z
@henrikbjorn Yes, will do.
---------------------------------------------------------------------------
by meandmymonkey at 2012-08-25T16:21:37Z
@henrikbjorn done
Commits
-------
a38232a [Form] Fixed: FormTypeInterface::getParent() supports returning FormTypeInterface instances again
Discussion
----------
[Form] Fixed: FormTypeInterface::getParent() supports returning FormTypeInterface instances again
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #5221
Todo: -
---------------------------------------------------------------------------
by stof at 2012-08-22T14:14:55Z
the return value of the getParent method should be updated in the phpdoc of the FormTypeInterface to mention the FormTypeInterface .And the description of the method should be updated to explain than returning an instance is discouraged as it implies a performance penalty and does not support using type extensions (if the comment in the factory also applies to the unregistered parent)
---------------------------------------------------------------------------
by henrikbjorn at 2012-08-22T14:22:00Z
Wasn't TypeExtensions supported before? This means that Csrf will not be applied?
---------------------------------------------------------------------------
by stof at 2012-08-22T14:23:50Z
@henrikbjorn the csrf extension is targeting the FormType, which is registered in the form registry. What is not supported is having a type extension targeting an unregistered type
---------------------------------------------------------------------------
by bschussek at 2012-08-22T14:39:53Z
@stof Exactly. I find it a bit unlogical to register an extension for something that is not registered.
---------------------------------------------------------------------------
by henrikbjorn at 2012-08-22T14:39:57Z
Okay. That wasn't what i got from reading the comment :)
---------------------------------------------------------------------------
by bschussek at 2012-08-22T14:44:27Z
@stof Updated.
Commits
-------
bca68ca Fixed a typo
Discussion
----------
Fixed a typo
The CSRF error message won't be translated due to this typo even if the translator is enabled.
Commits
-------
47b8538 [Filesystem] missing realpath breaking FilesystemTest class on Windows (one line of code change)
Discussion
----------
[Filesystem] missing readlink breaking FilesystemTest class on Windows
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #5233
Todo:
License of the code: MIT
Documentation PR:
fix for windows plateform
$file == 'C:\Users\USERNA~1\...' before touch
$file == 'C:\Users\Username\... after the touch and readlink so it can pass following assertEquals
---------------------------------------------------------------------------
by bdmu at 2012-08-13T05:35:07Z
Hello,
Another solution may be (need to test it) to add
$this->workspace = realpath($this->workspace);
line 36, after the
mkdir($this->workspace, 0777, true);
in the setup method
Regards,
Christophe
Commits
-------
0ad00f8 [EventDispatcher] Adding IteratorAggregate to GenericEvent
Discussion
----------
[EventDispatcher] Adding IteratorAggregate to GenericEvent
---------------------------------------------------------------------------
by drak at 2012-08-16T07:43:29Z
What is the use case for this that it should be part of the Generic event?
---------------------------------------------------------------------------
by mtdowling at 2012-08-16T17:12:28Z
This allows for the GenericEvent to be even more generic. Now listeners don't need to know an exact key from the arguments, but rather can iterate over the arguments to find what they are looking for. This makes the GenericEvent more like an array.
---------------------------------------------------------------------------
by mtdowling at 2012-08-17T19:31:04Z
How would this be a nasty break? It's just giving the GenericEvent more capabilities with IteratorAggregate.
This is a completely separate PR from the one that flipped the constructor args.
---------------------------------------------------------------------------
by schmittjoh at 2012-08-17T19:34:47Z
Why are you not just doing ``foreach ($event->getArguments() as $arg) { /** ... */ }``?
If you just have ``foreach ($event)``, to me at least it would not be so clear what we are actually iterating over.
---------------------------------------------------------------------------
by mtdowling at 2012-08-17T19:39:23Z
This class already has ArrayAccess. If you're already using this class like an array, then I think you should expect to be able to iterate it like an array. I'm just finishing that concept off by implementing IteratorAggregate.
---------------------------------------------------------------------------
by schmittjoh at 2012-08-17T19:47:43Z
Indeed, if we already have ArrayAccess which we probably don't want to remove again, then that seems reasonable.
Commits
-------
ccb6dad [HttpFoundation] fixed undefined offset for assoc arrays in HeaderBag
Discussion
----------
[HttpFoundation] fixed undefined offset for assoc arrays in HeaderBag
`get` is assuming the headers are zero-indexed. So something like this would otherwise create a php warning.
```
$bag->set('foo', array('bad-assoc-index' => 'value'));
$this->assertSame('value', $bag->get('foo'));
```
Commits
-------
bdaa877 [HttpFoundation] fix#5271 (duplicated header in JsonResponse)
Discussion
----------
fix JsonResponse: duplicate header
fix#5271
---------------------------------------------------------------------------
by Tobion at 2012-08-16T16:50:04Z
Will look into the failing test later.
---------------------------------------------------------------------------
by Tobion at 2012-08-16T23:55:45Z
Finished.
Commits
-------
ac0fb48 0x02 -> \MongoBinData::BYTE_ARRAY
70a64bd MongoBinData constructor now require "type" parameter
Discussion
----------
MongoBinData constructor now requires "type" parameter
From mongo driver version 1.2.11 E_DEPRECATED is emitted when the 2nd argument (type) is not used for MongoBinData constructor. At the moment the default value is 0x02 ("byte array").
See: http://php.net/manual/en/mongobindata.construct.php
From mongo driver version 1.2.11 E_DEPRECATED is emitted when the 2nd argument (type) is not used for MongoBinData constructor. At the moment the default value is 0x02 ("byte array").
See: http://php.net/manual/en/mongobindata.construct.php
Commits
-------
57694aa Removed MySQL-exclusive usage of unsigned integer from table creation
Discussion
----------
[Security] Removed MySQL-exclusive usage of unsigned integer from table creation
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #5108
This patch removes the setting of unsigned integer fields which are MySQL-only.
---------------------------------------------------------------------------
by fabpot at 2012-08-13T12:25:23Z
@beberlei Does it look good?
---------------------------------------------------------------------------
by travisbot at 2012-08-13T12:30:27Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/2107738) (merged 57694aaa into 31536c36).
---------------------------------------------------------------------------
by lsmith77 at 2012-08-13T20:04:20Z
indeed afaik unsigned isnt part of the sql standard. in other RDBMS you need to use a constraint if you want to prevent negative values and of course there is no way to then also get the additional values per bit that you get with MySQL, but so it goes. that being said .. i dont know how Doctrine schema handles unsigned for other RDBMS .. ie if it just emulates them by trying to double the size with a constraint.
---------------------------------------------------------------------------
by beberlei at 2012-08-13T20:10:44Z
Looks good.
Doctrine ignores the 'unsigned' => true for all others vendors.
Commits
-------
1a4a4ee [DependencyInjection] Fixed a frozen constructor of a container with no parameters
2a124bc [DependencyInjection] Added a test for a frozen constructor of a container with no parameters
Discussion
----------
[DependencyInjection] Fix PHP Dumper for a constructor of a frozen container with no parameters
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets:
Todo: -
License of the code: MIT
---------------------------------------------------------------------------
by travisbot at 2012-08-06T16:51:20Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/2049206) (merged 1a4a4ee9 into 3d32a0bc).
Commits
-------
039264d [Console] Fixed tests about message exception when command is not available
a4d2d31 [Console] Added tests for message exception when command is not available
Discussion
----------
[Console] Fixed message exception when command is not avaible
Bug fix: yes
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
License of the code: MIT
Fixed singular / plural
`Did you mean this?` VS `Did you mean one of these`
---------------------------------------------------------------------------
by travisbot at 2012-08-07T14:40:55Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/2057647) (merged 039264d2 into b91a4a83).
---------------------------------------------------------------------------
by lyrixx at 2012-08-07T15:11:47Z
@travisbot You failed, not me !
Commits
-------
5ad75c7 updated method name in a comment
Discussion
----------
updated method name in a comment
---------------------------------------------------------------------------
by travisbot at 2012-08-07T14:35:39Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/2057604) (merged 5ad75c71 into b91a4a83).
Commits
-------
fa93324 [HttpFoundation] Fixed test under Windows environment
Discussion
----------
[HttpFoundation] Fixed test under Windows environment
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #5226
Todo: -
License of the code: MIT
Documentation PR: -
---------------------------------------------------------------------------
by travisbot at 2012-08-10T09:54:20Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/2084750) (merged fa933247 into dd9afddf).
Commits
-------
22be499 [HttpFoundation][Session] Cleaned up constructor invokation
Discussion
----------
[HttpFoundation][Session] Cleaned up constructor invokation
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: ~
Todo: ~
License of the code: MIT
Documentation PR: ~
This simply cleans up a mismatch between the class instantiation and the actual class constructor. Evidently something left over from the various iterations.
---------------------------------------------------------------------------
by travisbot at 2012-08-07T19:16:14Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/2060028) (merged 22be4993 into 7dbadbf2).
---------------------------------------------------------------------------
by drak at 2012-08-09T08:25:43Z
ping @fabpot
Commits
-------
3e1a1ab Force the value of Dumper::setIndentation($num) to be of type integer.
5be7237 Added Yaml\Dumper::setIndentation() method to allow a custom indentation level of nested nodes.
Discussion
----------
[Yaml] Allow custom indentation level for nested nodes
YAML does not specify an absolute indentation level, but a consistent indentation of nested nodes only: http://yaml.org/spec/current.html#indentation%20space/
Projects that are generally using 2 spaces for indentation should be able to retain consistency with their coding standards by supplying a custom value for the new $indent parameter for Yaml::dump() and Dumper::dump().
The new parameter is a backwards-compatible API addition and defaults to the previous default of 4 (which was changed from 2 via PR #2242 only recently).
The old $indent parameter is renamed to $level, and remains to be used internally only.
---------------------------------------------------------------------------
by travisbot at 2012-08-03T00:24:22Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/2024289) (merged 56331202 into b1618d21).
---------------------------------------------------------------------------
by travisbot at 2012-08-03T00:29:02Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/2024315) (merged eeae28a4 into b1618d21).
---------------------------------------------------------------------------
by travisbot at 2012-08-03T02:41:42Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/2024905) (merged 9a82c438 into b1618d21).
---------------------------------------------------------------------------
by fabpot at 2012-08-03T07:53:50Z
This is indeed a BC break as the method signature changed in a non-BC way.
---------------------------------------------------------------------------
by fabpot at 2012-08-03T08:35:51Z
I think I would prefer to have a static method to be able to change the number of spaces to use on a global basis. It makes more sense and would prevent the BC break. What do you think?
---------------------------------------------------------------------------
by sun at 2012-08-03T13:23:23Z
Thanks for your feedback! — Took some time to think through the static proposal. Here's what I think:
1. The call from DependencyInjection\Dumper\YamlDumper truly was a unexpected/nasty surprise for me. That is, because it passes a parameter to Yaml\Dumper that is documented for internal use only, and the surrounding YamlDumper code generally hard-codes lots of assumptions of where exactly the nodes/collections will be output in the dumped YAML structure. (I think that code can be simplified, cleaned up, and made faster at the same time (hence the todo), but indeed, that probably belongs into a separate issue.)
1. The essential problem with a static is closely bound to that though; a static property value for the indentation would "stick" and thus hi-jack the DependencyInjection\Dumper\YamlDumper, as it hard-codes and thus expects 4 spaces (contrary to any custom indentation).
1. Most code uses Yaml\Yaml as utility/helper service directly, so there'd be no clean way to prime the static with a custom value, aside from subclassing the entire thing - in which case this entire issue would sorta become moot, because at the point you're subclassing, you can as well go the extra mile and replace the entire Yaml\Dumper::dump() to implant the custom indentation level...
1. Another option would be to use a non-static Yaml\Dumper::$indent property, supplied through the constructor; i.e.:
public function __construct($indent = 4)
...or alternatively, ::setIndentation(). Essentially requiring people to use and instantiate Yaml\Dumper directly, if they want to use a custom indentation.
1. Though in the end, I don't want to sound pedantic, but I *do* wonder a bit about the exact extent of the `@api` tags, as well as `@param`s that are explicitly documented as "internal use only"... :) That is, because only Yaml\Yaml is tagged with `@api`, but nothing in Yaml\Dumper. The same sorta applies to DependencyInjection\Dumper\YamlDumper::dump(), which is tagged with `@api`, but the :.addService() method being adjusted accordingly here is not. So essentially, when taking those tags (plus the param's description) seriously and in a nitpicky way, then there is no BC break, since no one should rely on their exact implementation... ;) (I perfectly realize that this is a long shot :))
So... depending on the final stance on the last point, I'd either move forward with the current proposal in this PR. Otherwise, I'd suggest the non-static property on Yaml\Dumper - in which case we'd likely try to swap out the static Symfony\Component\Yaml\Yaml helper with a Drupal\Component\Yaml\Yaml in order to always instantiate the dumper with the custom indentation. What do you think?
---------------------------------------------------------------------------
by sun at 2012-08-04T22:57:21Z
Alright. While I believe I made some good points in my last comment, I've taken the fully backwards-compatible path:
- added the new $indent parameter only to Yaml::dump()
- added a new Dumper::$intendation property and Dumper::setIndentation() method, to control the indentation level within the scope of a single Dumper instance only.
Do you think this is acceptible? :)
---------------------------------------------------------------------------
by travisbot at 2012-08-05T06:16:22Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/2039120) (merged 5be7237b into c99f9d29).
---------------------------------------------------------------------------
by travisbot at 2012-08-07T07:51:04Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/2055164) (merged 3e1a1abd into c99f9d29).
---------------------------------------------------------------------------
by sun at 2012-08-07T07:53:18Z
Only one environment failed, and the [test failure](http://travis-ci.org/#!/symfony/symfony/jobs/2055165/L203) seems unrelated to this PR.
Commits
-------
c2207da [Console] Removed unused phpunit annotation.
c0c61da [Console] Added current style appliance for all styled text.
696a653 [Console] Removed text transformation for empty styles.
c7e324a [Console] Added test for non style tag formatting.
Discussion
----------
[Console] Non style tags dont disturb formatting anymore
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes issue #5196.
---------------------------------------------------------------------------
by travisbot at 2012-08-06T19:35:20Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/2050455) (merged c0c61da0 into 842b599c).
---------------------------------------------------------------------------
by travisbot at 2012-08-07T07:47:31Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/2055153) (merged c2207da6 into 842b599c).
Commits
-------
b3cf36a [Config] Missing type argument passed to loader.
Discussion
----------
[Config] Missing type argument passed to loader.
In FileLoader the $type is not passed to the child loader.
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
---------------------------------------------------------------------------
by travisbot at 2012-08-06T14:22:30Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/2047982) (merged b3cf36af into 89dce2df).
YAML does not specify an absolute indentation level, but a consistent indentation of nested nodes only: http://www.yaml.org/spec/1.2/spec.html#space/indentation/
Projects that are generally using 2 spaces for indentation should be able to retain consistency with their coding standards by supplying a custom value for the new $indent parameter added to Yaml::dump(), or the new Dumper::setIndentation() method.
The new parameter is a backwards-compatible API addition and defaults to the previous default of 4 (which was changed from 2 via PR #2242 only recently).
Commits
-------
aa890ae validateOptionTypes checking existence of key rather than value
c6a9638 OptionsResolver#validateOptionTypes should check if option value exists before checking its type; added corresponding test
Discussion
----------
[OptionsResolver] validateOptionTypes raises error for optional, nonexistant option values
The [`OptionsResolver#validateOptionTypes`](https://github.com/symfony/OptionsResolver/blob/master/OptionsResolver.php#L315) method should check if a given option value exists before trying to test its type:
```php
<?php
// Two optional 'one' and 'two' options that, if they exist, must be a string and int respectively
$resolver = new OptionsResolver();
$resolver->setOptional(array('one', 'two'))->setAllowedTypes(array('one' => 'string', 'two' => 'int'));
// Correctly fails as wrong type
$resolver->resolve(array('one' => 1, 'two' => 'alpha'));
// Correctly succeeds
$resolver->resolve(array('one' => 'alpha', 'two' => 1));
// Raises error "Undefined index: two", see OptionsResolver.php line 315
$resolver->resolve(array('one' => 'alpha'));
```
---------------------------------------------------------------------------
by travisbot at 2012-08-01T01:46:50Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/2006049) (merged c6a9638a into b1618d21).
---------------------------------------------------------------------------
by ericclemmons at 2012-08-03T05:15:27Z
I hope this makes it in for the 2.1 release. We have several types attempting to take advantage of the `OptionsResolver` component and want to help resolve this.
---------------------------------------------------------------------------
by stof at 2012-08-03T07:30:44Z
👍
---------------------------------------------------------------------------
by travisbot at 2012-08-03T17:25:12Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/2030053) (merged aa890aed into b1618d21).
Commits
-------
d1aae0b [Form] Fix UnexpectedTypeException from HttpFoundation extension
Discussion
----------
[Form] Fix UnexpectedTypeException from HttpFoundation extension
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
Fixes exception thrown by the `AbstractExtension` because the wrong method has been implemented.
```
Uncaught exception 'Symfony\\Component\\Form\\Exception\\UnexpectedTypeException' with message 'Expected argument of type "Symfony\\Component\\Form\\FormTypeInterface", "Symfony\\Component\\Form\\Extension\\HttpFoundation\\Type\\FormTypeHttpFoundationExtension" given' in vendor/symfony/form/Symfony/Component/Form/AbstractExtension.php:153
```
---------------------------------------------------------------------------
by stof at 2012-08-03T12:36:55Z
👍
* 2.0:
Fixes incorrect class used in src/Symfony/Bundle/FrameworkBundle/Console/Application.php
[FrameworkBundle] added test for fix broken command registration
corrected phpdoc
Commits
-------
22cb817 Caching variables for the PHP templating engine
Discussion
----------
[Templating] PHP templating engine speed-ups
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/dlsniper/symfony.png?branch=php-engine-escape-cache)](http://travis-ci.org/dlsniper/symfony)
Fixes the following tickets: ~
Todo: ~
License of the code: MIT
Documentation PR: ~
This PR should improve the speed for rendering the form present here: https://github.com/dlsniper/symfony-standard . On my computer, Ubuntu 12.04 Apache 2.2.22 + mod_php 5.3.10 default packages from Ubuntu on a core i7 I get about 30-40ms improvement / request with the first commit and with the second one I get a further smaller boost and also a small memory usage decrease.
---------------------------------------------------------------------------
by dlsniper at 2012-07-31T06:18:54Z
ping @bschussek This should help a bit more on the effort for optimizing the example provided for the Forms component.
If there's another example of complex form(s) let me know so that I can have a look on them as well. Thanks!
---------------------------------------------------------------------------
by travisbot at 2012-07-31T19:55:03Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/2003907) (merged 240152b9 into a172a812).
---------------------------------------------------------------------------
by dlsniper at 2012-08-02T07:41:03Z
@fabpot what do you think about this? or anyone else for that matter?
---------------------------------------------------------------------------
by travisbot at 2012-08-02T12:55:54Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/2018613) (merged 5e773e79 into a172a812).
---------------------------------------------------------------------------
by fabpot at 2012-08-03T07:42:31Z
Can you squash your commits?
---------------------------------------------------------------------------
by dlsniper at 2012-08-03T08:32:05Z
@fabpot Done
---------------------------------------------------------------------------
by travisbot at 2012-08-03T08:40:46Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/2026559) (merged 22cb8173 into 6f32078b).
OptionsResolver#validateOptionsCompleteness would already have thrown exception if the option were required, so this should only affect something explicitly marked as optional
Commits
-------
b982883 [Form] Moved FormHelper back to FrameworkBundle
cb62d05 [Form] [Validator] Fixed issues mentioned in the PR
2185ca8 [Validator] Added entry point "Validation" for more convenient usage outside of Symfony2
ed87361 [Form] Moved FormHelper creation to TemplatingExtension
87ccb6a [Form] Added entry point "Forms" for more convenient usage outside of Symfony
Discussion
----------
[Form] [Validator] Added more convenient entry points for stand-alone usage
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
This PR greatly simplifies the usage of the Form and Validator component when used outside of Symfony2. Check out the below code to get an idea about the simplified usage:
```php
<?php
use Symfony\Component\Validator\Validation;
use Symfony\Component\Validator\Mapping\Cache\ApcCache;
use Symfony\Component\Form\Forms;
use Symfony\Component\Form\Extension\HttpFoundation\HttpFoundationExtension;
use Symfony\Component\Form\Extension\Csrf\CsrfExtension;
use Symfony\Component\Form\Extension\Csrf\CsrfProvider\SessionCsrfProvider;
use Symfony\Component\Form\Extension\Templating\TemplatingExtension;
use Symfony\Component\Form\Extension\Validator\ValidatorExtension;
use Symfony\Component\HttpFoundation\Session;
use Symfony\Component\Templating\PhpEngine;
$session = new Session();
$secret = 'V8a5Z97e...';
$csrfProvider = new SessionCsrfProvider($session, $secret);
$engine = new PhpEngine(/* ... snap ... */);
$validator = Validation::createValidator();
// or
$validator = Validation::createValidatorBuilder()
->addXmlMapping('path/to/mapping.xml')
->addYamlMapping('path/to/mapping.yml')
->addMethodMapping('loadValidatorMetadata')
->enableAnnotationMapping()
->setMetadataCache(new ApcCache())
->getValidator();
$formFactory = Forms::createFormFactory();
// or
$formFactory = Forms::createFormFactoryBuilder()
// custom types, if you're too lazy to create an extension :)
->addType(new PersonType())
->addType(new PhoneNumberType())
->addTypeExtension(new FormTypeHelpTextExtension())
// desired extensions (CoreExtension is loaded by default)
->addExtension(new HttpFoundationExtension())
->addExtension(new CsrfExtension($csrfProvider))
->addExtension(new TemplatingExtension($engine, $csrfProvider, array(
'FormBundle:Form'
))
->addExtension(new ValidatorExtension($validator))
->getFormFactory();
$form = $formFactory->createBuilder()
->add('firstName', 'text')
->add('lastName', 'text')
->add('age', 'integer')
->add('gender', 'choice', array(
'choices' => array('m' => 'Male', 'f' => 'Female'),
))
->getForm();
if (isset($_POST[$form->getName()])) {
$form->bind($_POST[$form->getName()]);
if ($form->isValid()) {
// do stuff
}
}
return $engine->render('AcmeHelloBundle:Hello:index.html.php', array(
'form' => $form->createView(),
));
```
---------------------------------------------------------------------------
by bschussek at 2012-07-30T10:08:42Z
I should maybe add a comment about the benefits of this change, in case they are not self-explanatory:
* class construction with default configuration is now a one-liner
* userland code is decoupled from core implementations → userland code doesn't break if we change constructor signatures
* easier to understand, since many core classes are now created internally
* easy to discover the possible settings → just look at (FormFactory|Validator)BuilderInterface
* usage of custom interface implementations is supported, just like before
---------------------------------------------------------------------------
by fabpot at 2012-07-31T08:18:53Z
The new syntax is great.
I have one comment though about this PR about support of PHP as a templating system (support for Twig is provided by the bridge and it was already easy to configure Twig as a templating system for forms -- see Silex for instance).
The `FormHelper` has been moved into the Form component. This helper is only useful when using the PHP templating system (which is not what we recommend people to use), but the default templates are still in the Framework bundle. So using the Form component as standalone with PHP as a templating system still requires to install the bundle to get access to the default templates. Am I missing something? Do we want to move the PHP templates to the Form component too?
---------------------------------------------------------------------------
by stof at 2012-07-31T08:28:28Z
@fabpot it is even worse than that: the FormHelper currently uses the theme by using ``$theme . ':' . $block . '.html.php`` IIRC. This is not compatible with the default template name parser of the component expecting a path. And the FrameworkBundle template name parser does not support accessing a template outside a bundle AFAIK.
So moving the templating to the component would require some refactoring in the FormHelper and the template name parser. However, I think it is worth it. Some people complained that using the form rendering (outside the full-stack framework) was requiring either setting up Twig with the bridge, or adding FrameworkBundle in the project (which means including most of the code of the full-stack framework). Having the Templating rendering in the standalone component could be a great idea
---------------------------------------------------------------------------
by fabpot at 2012-07-31T08:42:53Z
But then, I don't want to promote the Templating component or the PHP templating system. Twig is always a better alternative and this should be what people use most of the time, PHP being the rare exception.
Anyway, we are too close from the first 2.1 RC, so any big refactoring will have to wait for 2.2.
---------------------------------------------------------------------------
by stof at 2012-07-31T09:02:10Z
then maybe we should keep the FormHelper in FrameworkBundle for now as it is tied to the FrameworkBundle template name parser anyway currently.
---------------------------------------------------------------------------
by bschussek at 2012-07-31T14:22:35Z
> it it is even worse than that: the FormHelper currently uses the theme by using ``$theme . ':' . $block . '.html.php`` IIRC. This is not compatible with the default template name parser of the component expecting a path.
This is why the templates are still in FrameworkBundle. I think they should be moved too, but then we have to change
* the default theme to an absolute file path
* the FrameworkBundle name parser to accept absolute paths
I think this can wait until 2.2. Baby steps.
> I don't want to promote the Templating component or the PHP templating system.
We can both promote Twig while making Templating as easy to use as possible. If people want to use Templating, they probably have a reason. We don't have to make their lives more painful than necessary.
Btw: Templating is a *lot* faster for rendering forms than Twig. On Denis' form, Templating takes 1.15 seconds while Twig takes 2.
About moving the helpers, we have two choices:
* Move each helper to the respective component. This would not require new releases of the Templating component when we add more helpers in other component.
* Move all helpers to Templating. This does not make that much sense for Form, as then Form has support for Templating (TemplatingRendererEngine) and Templating has support for Form (FormHelper), which is a bit weird. I personally prefer a stacked architecture, where Templating is at the bottom and Form-agnostic, and Form (or any other component) builds upon that.
I'm fine with both approaches. I'll move FormHelper back to FrameworkBundle, and we can decide for a direction in 2.2.
---------------------------------------------------------------------------
by bschussek at 2012-07-31T14:36:30Z
Done.
Commits
-------
03bbaaf [Routing] Add an interface for configuring strict_parameters
Discussion
----------
[RFC][Routing] Add an interface for configuring strict_parameters
This is a proposal to fix#4697 (related to #4592).
The main point left to discuss was the name of the interface, which is now `LenientInterface`. We could change the name to anything else is someone has a better idea.
@stof @Tobion what do you think ?
---------------------------------------------------------------------------
by stof at 2012-07-30T16:34:20Z
@vicb I already said I had no idea to name it, and it has not changed. :)
So let's wait for other people to see if they have a better idea
---------------------------------------------------------------------------
by breerly at 2012-07-30T16:38:38Z
Maybe `PermissibleInterface` or `PermissiveInterface`.
---------------------------------------------------------------------------
by Partugal at 2012-07-30T17:00:09Z
`StrictUrlGeneratorInterface`, `StrictParametersInterface` or `StrictInterface`
---------------------------------------------------------------------------
by pborreli at 2012-07-30T17:04:46Z
👍 for `PermissiveInterface`
---------------------------------------------------------------------------
by stof at 2012-07-30T17:07:59Z
yes, because the Router currently can only use this interface to set it to ``not-strict``. It assumes that the url generator is already strict by default (which is probably a bad assumption btw as the base class for the generated generator can be changed)
---------------------------------------------------------------------------
by pborreli at 2012-07-30T17:09:33Z
@stof thx, got it
---------------------------------------------------------------------------
by Partugal at 2012-07-30T17:10:03Z
this interface realize setting Strict by setStrictParameters, and get by getStrictParameters, and imho named it by `Strictable` is more logic
---------------------------------------------------------------------------
by pborreli at 2012-07-30T17:11:07Z
@Partugal let's try to find an english term :)
---------------------------------------------------------------------------
by Partugal at 2012-07-30T17:11:31Z
)
---------------------------------------------------------------------------
by breerly at 2012-07-30T17:15:23Z
@Partugal I like using "able" in interface names because it describes a behavior instead of a noun. This type of naming makes following the Interface Segregation Principle easy to follow. Good work.
---------------------------------------------------------------------------
by vicb at 2012-07-30T18:24:26Z
As explained by @stof I did not consider `StrictInterface` because as of now the interface is used to disabled the strict bevahior (which is enabled by default).
I am not satisfied with `PermissiveInterface` / `LenientInterface` because implementing this interface does not mean that the generator will be permissive but only that the behavior is configurable - yes I did consider `Configurable` but the term is a too vague.
---------------------------------------------------------------------------
by breerly at 2012-07-30T18:35:45Z
I see. Perhaps ```StrictConfigurableInterface``` would do the trick.
---------------------------------------------------------------------------
by Tobion at 2012-07-30T21:02:21Z
I think renaming strict_parameters to `strict_requirements` is the way to go because it determines how requirements are handled when generating a URL. Also we should allow another option:
strict_requirements = true: throw exception for mismatching requirements
strict_requirements = null: return null as URL for mismatching requirements and log it.
strict_requirements = false: return the URL with the given parameters without checking the requirements and don't log it.
(Maybe use constants for these).
The Interface I would then call `ConfigurableRequirementsInterface` or `RequirementsHandlingInterface`.
---------------------------------------------------------------------------
by vicb at 2012-07-31T07:23:24Z
Thanks all for the feeback, this is what is now implemented:
- A `ConfigurableRequirementsInterface` that should be implemented by generators that can be configure not to throw an exception when the parameters do not match the requirements,
- The interface has two methods: `setStrictRequirements()` and `isStrictRequirements()`,
- `setStrictRequirements()` always gets called to configure the generator (whatever the option value is)
Note: The Router option name has not changed (i.e. `strict_parameters`)
Does that fit everyone ?
---------------------------------------------------------------------------
by vicb at 2012-07-31T07:39:22Z
So the option name is now consistent (`strict_requirements`) with the interface. We should sync the change [in the standard edition](https://github.com/symfony/symfony-standard/blob/master/app/config/config.yml#L11) if we agree to merge this.
---------------------------------------------------------------------------
by fabpot at 2012-07-31T07:51:47Z
@vicb you forgot to rename the property in `UrlGenerator` as @stof mentioned above.
---------------------------------------------------------------------------
by vicb at 2012-07-31T07:59:57Z
@fabpot fixed. If the code is ok, I'll squash the commits and open a PR on symfony-standard
Commits
-------
a47922b [OptionsResolver] Fix Options::has() when the value is null
Discussion
----------
[OptionsResolver] Fix Options::has() when the value is null
`isset()` would have returned `false` when the value is `null`
Commits
-------
03c3712 [Filesystem] Fixed 2 tests throwing error on windows
3689bb8 [Filesystem] Fixed 3 failing tests on windows
Discussion
----------
[Filesystem] Fixed 5 tests on windows
Fixing 3 test expecting wrong folders :
```
-'C:\Users\pascal\AppData\Local\Temp\\1343425847694\file'
+'C:\Users\pascal\AppData\Local\Temp\1343425847694\file'
```
Fixed 2 tests on Windows caused by symlink function throwing error when first argument is not existent :
```
symlink(): Could not fetch file information(error 2)
```
Commits
-------
ae6016c [Finder] Workaround for FilterIterator-FilesystemIterator-rewind issue
Discussion
----------
[Finder] Workaround for the problem with rewind of FilterIterator with inner FilesystemIterator.
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #4922
Todo: -
License of the code: MIT
Documentation PR: -
---------------------------------------------------------------------------
by stof at 2012-07-20T10:28:05Z
Please add some tests
---------------------------------------------------------------------------
by alebo at 2012-07-24T09:50:36Z
Any feedback yet? The new commit includes tests.
Commits
-------
4d09907 [Serializer] Add a docblock to help type hinting
Discussion
----------
[Serializer] Add a docblock to help type hinting
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets:
Todo:
License of the code: MIT
Documentation PR:
Commits
-------
9e28593 fixed error on oracle db related to clob data. https://github.com/symfony/symfony/issues/3255
Discussion
----------
fixed error on pdosession storage for oracle db. Related to clob data
Did a change on 2.0 branch to fix this error
https://github.com/symfony/symfony/issues/3255
Tested on mysql and Oracle DB.
I also ran a phpunit test before commit:
phpunit tests/Symfony/Tests/Component/HttpFoundation/SessionStorage/PdoSessionStorageTest.php
PHPUnit 3.6.10 by Sebastian Bergmann.
Time: 0 seconds, Memory: 2.75Mb
OK (3 tests, 5 assertions)
Time: 0 seconds, Memory: 2.75Mb
Commits
-------
d858f7b [OptionsResolver] Optimized previous values of a lazy option not to be evaluated if the second argument is not defined
8a338cb [OptionsResolver] Micro-optimization
e659f0e [OptionsResolver] Improved the performance of normalizers
Discussion
----------
[OptionsResolver] Improved the performance of normalizers
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
Normalizers are now stored in the Options instance only once. Previously, normalizers were stored in Options upon resolving, which meant that they were added a lot of time if the same resolver was used for many different options arrays.
This improvement led to an improvement of 30ms on http://advancedform.gpserver.dk/app_dev.php/taxclasses/1
---------------------------------------------------------------------------
by beberlei at 2012-07-26T13:34:23Z
@bschussek do you have the code for this forms somewhere btw?
---------------------------------------------------------------------------
by bschussek at 2012-07-26T13:54:52Z
@beberlei https://github.com/stof/symfony-standard/tree/twig_forms
Normalizers are now stored in the Options instance only once. Previously,
normalizers were stored in Options upon resolving, which meant that
they were added a lot of time if the same resolver was used for many
different options arrays.
This improvement led to an improvement of 30ms on
advancedform.gpserver.dk/app_dev.php/taxclasses/1
Commits
-------
1d6611b [Filesystem] Fixed tests on system without posix
Discussion
----------
[Filesystem] Fixed tests on system without posix
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: master is broken
Fixes the following tickets: None
License of the code: MIT
Commits
-------
fb002d8 [Form] Fixed variable passing from outer to inner blocks of the same FormView instance
Discussion
----------
[Form] Fixed variable passing from outer to inner blocks of the same FormView instance
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #5029
Todo: -
This PR fixes two bugs.
The first bug is described in #5029. The second parameter to the "form_label" function in Twig, if given, always overwrote whatever label was defined previously.
```
{# null would overwrite whatever is currently set #}
form_label(form, null, { ... })
```
The second bug affected passing variables from outer to inner blocks. In the following example, "label_attr" would not be forwarded to the "form_label" function.
```
form_row(form, { "label_attr": { "class": "my_class" }})
```
Both bugs are fixed now.
Commits
-------
0ea3769 Fix not recognized "type" option exception
Discussion
----------
[Form] Fixed not recognized "type" option exception
The exception about not recognized "type" option was raised when "date", "datetime", "time" type was guessed by validator type guesser using the date related constraint.
---------------------------------------------------------------------------
by bschussek at 2012-07-25T11:30:23Z
Thanks! 👍
Commits
-------
686bf6b [Form] Made original data of a form and choices accessible in templates
Discussion
----------
[Form] Made original data of a form and choices accessible in templates
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #4171
Todo: -
Now you can access the normalized data of a form in the template:
```
form.vars.data
```
You can also access the original data of a choice, for example the entities in an entity type:
```
choice.data
```
The exception about not recognized "type" option was raised when "date", "datetime", "time" type was guessed by validator type guesser using the date related constraint.
Commits
-------
307d99c [Security] Fixed use_referer option not working properly when login_path is a route name
Discussion
----------
[Security] Fixed use_referer option not working properly when login_path...
... is a route name
When use_referer is set to true and the request comes from the login page,
the user should not be redirected to the login form again (the referer) but
to the default_target_path. The problem arises when our login_path option
is not a path but a route name, as the ```getUriForPath()``` method is not
made to create routes from route names.
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/acasademont/symfony.png?branch=master)](http://travis-ci.org/acasademont/symfony)
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
---------------------------------------------------------------------------
by stloyd at 2012-07-24T16:24:28Z
👍
When use_referer is set to true and the request comes from the login page,
the user should not be redirected to the login form again (the referer) but
to the default_target_path. The problem arises when our login_path option
is not a path but a route name, as the ```getUriForPath()``` method is not
made to create routes from route names.
Commits
-------
dd2aa54 [Form] Disabled manual singulars in PropertyPath until the syntax is finalized
Discussion
----------
[Form] Disabled manual singulars in PropertyPath until the syntax is finalized
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
Commits
-------
dc3a680 [Form] Improved FormRenderer API to reduce the size of the function call stack during rendering
Discussion
----------
[Form] Improved FormRenderer API to decrease the function call stack
Bug fix: no
Feature addition: no
Backwards compatibility break: **yes**
Symfony2 tests pass: yes
Fixes the following tickets: #4962, #4973
Todo: -
This PR reduces the function call stack size when rendering by directly calling the methods `renderBlock` and `searchAndRenderBlock` (formerly `renderSection`) and removing the delegating methods `render(Widget|Label|Row|...)`.
It breaks BC in that PHP templates now need to pass the FormView instance to `block` (formerly `renderBlock`). This is necessary, otherwise that function may behave buggy in special circumstances.
Otherwise this PR cleans up API method and parameter names to improve clarity.
Commits
-------
24b764e [Form] Fixed issues mentioned in the PR
9216816 [Form] Turned Twig filters into tests
310f985 [Form] Added a layer of 2.0 BC methods to FormView and updated UPGRADE and CHANGELOG
5984b18 [Form] Precalculated the closure for deciding whether a choice is selected (PHP +30ms, Twig +30ms)
5dc3c39 [Form] Moved the access to templating helpers out of the choice loop for performance reasons (PHP +100ms)
0ef9acb [Form] Moved the method isChoiceSelected() to the ChoiceView class (PHP +150ms)
8b72766 [Form] Tweaked the generation of option tags for performance (PHP +200ms, Twig +50ms)
400c95b [Form] Replace methods in ChoiceView by public properties (PHP +100ms, Twig +400ms)
d072f35 [Form] The properties of FormView are now accessed directly in order to increase performance (PHP +200ms, Twig +150ms)
Discussion
----------
[Form] Made FormView and ChoiceView properties public for performance reasons
Bug fix: no
Feature addition: no
Backwards compatibility break: **yes**
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
This PR changes the access to properties of `FormView` and `ChoiceView` objects from getters to direct property accesses. On [my example form](http://advancedform.gpserver.dk/app_dev.php/taxclasses/1) this improves rendering performance for **300ms** with PHP templates and **550ms** with Twig on my local machine.
Unfortunately, this breaks BC both with 2.0 and with the current master in Form Types and PHP templates. Twig templates are not affected by this change.
2.0:
```
$formView->set('my_var', 'foobar');
$formView->get('my_var');
$formView->getChild('childName');
$formView['childName'];
```
master:
```
$formView->setVar('my_var', 'foobar');
$formView->getVar('my_var');
$formView->get('childName');
$formView['childName'];
```
this PR:
```
$formView->vars['my_var'] = 'foobar';
$formView->vars['my_var'];
$formView->children['childName'];
$formView['childName'];
```
Should we add methods to keep BC with 2.0?
The second part of this PR contains improvements to the rendering of choice fields. These gain another **~500ms** for PHP templates and **80ms** for Twig. These improvements are BC, unless you overwrote the block "choice_widget_options" in your form themes which then needs to be adapted.
**Update:**
The PR now includes a BC layer for 2.0.
---------------------------------------------------------------------------
by stof at 2012-07-21T11:37:41Z
@bschussek couldn't we keep the getters and setters for BC even if the rendering accesses the public properties directly ?
---------------------------------------------------------------------------
by bschussek at 2012-07-21T11:52:33Z
@stof A BC layer for 2.0 is now included. People who upgraded to master already unfortunately need to adapt their code.
---------------------------------------------------------------------------
by sstok at 2012-07-21T12:40:57Z
👍
Commits
-------
134cc84 [Security] Fix DocBlock of attemptAuthentication
Discussion
----------
[Security] Fix DocBlock of attemptAuthentication
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets:
Todo: -
License of the code: MIT
Documentation PR: -
Commits
-------
9dc2011 Late static factory method
Discussion
----------
Late static factory method
When using `Symfony\CS\Finder\DefaultFinder::create()`, we lose all `Symfony\CS\Finder\DefaultFinder::__construct()` properties because main `Finder` does not use late static binding.
This commit resolves the issue.
Commits
-------
d4f4038 [Form] Reduced the number of setData() calls by deferring a Form's initialization (+40ms)
Discussion
----------
[Form] Reduced the number of setData() calls
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
This PR decreases the number of expensive `setData()` calls on `Form` instances by deferring the form's initialization with default data to the first call to a `get*Data()` method. If `setData()` is called manually before invoking `get*Data()`, the initialization with the default data will not take place.
Before:
```
$form = new Form($config); // implicit setData($config->getData());
$form->setData($object); // setData() is now called twice
```
After:
```
$form = new Form($config); // no implicit setData()
$form->getData(); // implicit setData($config->getData())
// or
$form = new Form($config);
$form->setData($object);
$form->getData(); // setData() was called only once
```
Add Response as possible return type of the method because the method AbstractAuthenticationListener::handle() test if $returnValue is an instance of Response (line 148).
Commits
-------
ed8823c [HttpFoundation] Allow setting an unknown status code without specifying a text
Discussion
----------
[HttpFoundation] Allow setting an unknown status code without specifying...
... a text
fix#4978
Commits
-------
16a980b [Validator] Fix bug order for constraint, property, getter and group-sequence-provider in validation.xml
Discussion
----------
[Validator] Fix bug order for constraint, property, getter and group-seq...
Actually, there is a bug that force developers to write validation.xml file with the following nodes order:
- constraint
- property
- getter
So that's not possible to have the following XML (because I need to write my property(ies) first).
```xml
<?xml version="1.0" encoding="UTF-8" ?>
<constraint-mapping xmlns="http://symfony.com/schema/dic/constraint-mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://symfony.com/schema/dic/constraint-mappinghttp://symfony.com/schema/dic/constraint-mapping/constraint-mapping-1.0.xsd">
<class name="Application\Eko\MyBundle\Entity\MyEntity">
<getter property="isBar">
<constraint name="True">
<option name="message">My error message</option>
</constraint>
</getter>
<property name="foo">
<constraint name="NotBlank" />
</property>
</class>
</constraint-mapping>
```
The XML below result in the following exception:
```
[ERROR 1871] Element '{http://symfony.com/schema/dic/constraint-mapping}property': This element is not expected. Expected is ( {http://symfony.com/schema/dic/constraint-mapping}getter ). (in /var/www/myproject/src/Application/Eko/MyBundle/Resources/config/validation.xml - line 14, column 0)
```
This is due to the sequence element that needs to respect the order given in the schema file.
The choice element is doing the same thing and permit to have a free order of elements so I have replaced the sequence by a choice element.
For more information: http://www.w3.org/TR/xmlschema-0/#ref17
Commits
-------
c81b2ad [Form] Rename UnmodifiableFormConfig to ImmutableFormConfig
274eb9e [EventDispatcher] Rename UnmodifiableEventDispatcher to ImmutableEventDispatcher
Discussion
----------
Rename unmodifiable to immutable
Maybe it's just me, but it sounded really wrong. The EventDispatcher one was added in 2.1 so no BC break. I don't know about the Form one, but I guess it's just used internally anyway.
RHEL5 will intermittently result in an exit code of -1 [1] due to
proc_get_status() being called after the process has completed
but outside of updateStatus() which saves the exit code.
[1]: https://github.com/composer/composer/issues/876
Commits
-------
1f33756 Update master
Discussion
----------
Allow HttpKernel ->render to be called directly
Hi,
I faced this problem in a funny situation.
Working on tests of individual components, I want to be able to test sub-requests. These elements are not mapped directly, relying on `FrameworkBundle` routing internal to achieve its goal.
The nature of my application leads to fully decoupled bundles, being a website responsible to define everything, from app configuration to routing elements. That way, an individual bundle controller don't know the route it should call, leading the test to be harder to do.
Together with this situation, it is also required in my testing scenario to be able to test the real world execution, then being an ESI include (a sub-request). This test then needs to be able to directly call controller to be rendered. That said, `HttpKernel` provides an API that does exactly what is required to achieve my goal, calling `render()` which triggers the sub-request and also accepts options which allows me to test the real world scenarios.
But as soon as you trigger the method, `ProfileListener` intercepts the kernel response to collect profiling information. Under this specific situation, since you called directly `render`, there's no master request, then leading the test to fail with the following PHP warning:
```
Warning: SplObjectStorage::offsetExists() expects parameter 1 to be object, boolean given in /var/www/nde/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php line 120
```
To fix that, all that is needed is a check for a possible parent request. That's the purpose of this patch. =)
---------------------------------------------------------------------------
by stof at 2012-07-17T15:11:13Z
This looks good to me, but as said on IRC, a test should be added to avoid regressions
Commits
-------
1474aa5 [Form] Fixed consideration of Twig's template inheritance and added another performance-improving check
b4ec7f5 Fixed my rubbish English
d11f8b5 [Form] Fixed passing of variables in the FormRenderer
629093e [Form] Extracted common parts of FormHelper and FormExtension into separate classes
216c539 [Form] Implemented a more intelligent caching strategy in FormHelper (PHP +100ms, Twig +100ms)
Discussion
----------
[Form] Merged FormHelper and FormExtension and implemented a better caching strategy
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
This PR extracts common parts of `FormHelper` and `FormExtension` into implementations of the new interfaces `FormRendererInterface` and `FormRendererEngineInterface`. The implemented `AbstractRendererEngine` features a more intelligent caching strategy than the one used before. When this strategy was implemented directly in `FormHelper`, the performance of [this specific, heavy form](http://advancedform.gpserver.dk/app_dev.php/taxclasses/1) could be improved from **2.5** to **2.25 seconds** on my machine for PHP templates.
Due to the abstraction and delegation, the performance gain is not that big anymore, but we still have a performance gain of about **0.1 seconds** for both PHP and Twig in the above example. The second, big improvement of this PR is maintainability - the differences between PHP and Twig templates are now contained in relatively small classes - and extendability (it is very easy now to support different template engines).
---------------------------------------------------------------------------
by stof at 2012-07-14T13:47:19Z
should a similar refactoring be done for the [Twig rendering](https://github.com/symfony/symfony/blob/master/src/Symfony/Bridge/Twig/Extension/FormExtension.php) ?
---------------------------------------------------------------------------
by bschussek at 2012-07-14T13:49:25Z
Yes. I would like to merge the common parts of Twig's FormExtension and PHP's FormHelper into an abstract class. Before that I need to have a [working, heavy Twig Form](https://twitter.com/webmozart/status/224135287377371138) in order to measure whether I don't actually decrease the performance with Twig. Can you help me there?
---------------------------------------------------------------------------
by vicb at 2012-07-16T21:48:24Z
Would it make sense to create a 'renderer' folder in the form component and move related classes there ?
---------------------------------------------------------------------------
by stof at 2012-07-16T22:06:58Z
@vicb It makes sense to keep the Twig renderer in the brisge. This is what the bridge is about. Moving the Twig class to the component would not be consistent. And the PHP renderer is already in the component (but it could make sense to move the helper from FrameworkBundle to the TemplatingExtension of the Form component though)
---------------------------------------------------------------------------
by vicb at 2012-07-16T22:16:50Z
@stof I was only referring to the classes located in the Component/Form folder.
---------------------------------------------------------------------------
by vicb at 2012-07-16T22:27:27Z
Overall I don't really know what to think of this PR. PHP and Twig use a different way to support blocks:
- PHP has one block per file,
- Twig could have many blocks per templates.
I am not sure if this PR is optimal for Twig and improves maintainability ?
---------------------------------------------------------------------------
by stof at 2012-07-16T22:46:11Z
@vicb it avoids duplicating the whole rendering logic for each engine (there is at least a third one in [SmartyBundle](https://github.com/noiselabs/SmartyBundle/blob/master/Extension/FormExtension.php) btw)
---------------------------------------------------------------------------
by bschussek at 2012-07-17T07:16:42Z
@vicb I don't think a renderer subfolder makes sense. The interfaces belong to the main namespace, and then the subfolder would only contain two classes.
Considering maintainability for Twig, I think that this PR in fact increases it. TwigExtension before always had to check the whole type hierarchy, while now the code in AbstractRendererEngine makes sure that this process is speeded up.
Before:
```
load _some_entity_field_label:
- check _some_entity_field_label
- check entity_label
- check choice_label
- check form_label
load _some_other_entity_field_label
- check _some_other_entity_field_label
- check entity_label
- check choice_label
- check form_label
a.s.o.
```
After:
```
load _some_entity_field_label:
- check _some_entity_field_label
- check entity_label (hits the cache if entity_label was checked before)
- check choice_label (hits the cache if choice_label was checked before)
- check form_label
load _some_other_entity_field_label
- check _some_other_entity_field_label
- check entity_label (now definitely hits the cache)
a.s.o.
```
Since many fields share the same ancestors in the inheritance tree, this definitely improves performance.
As can also be deducted here, custom block names such as `_some_entity_field_label` are now a major drawback. There is nothing we can cache for them, so they need to be checked for every individual block that we load. Removing this feature surprisingly gains no performance for Twig (I need to investigate why at some point), but it speeds up rendering for **250ms** using the PHP engine on [this example form](advancedform.gpserver.dk/app_dev.php/taxclasses/1), dropping the rendering time from 1.25 to 1 sec on my local machine. I'm not sure what we should do here.
---------------------------------------------------------------------------
by stof at 2012-07-17T07:21:31Z
@bschussek could it be possible to have an implementation checking the custom block and another one skipping it ? This way, the user could disable this feature when he does not need it.
---------------------------------------------------------------------------
by bschussek at 2012-07-17T07:38:34Z
@stof It would be possible to add a switch to `FormRenderer` that controls whether custom blocks are checked or not.
If this switch is disabled by default, we break BC. If this switch is enabled by default, it will be pretty useless. People will start designing away for custom blocks, and once they want to improve performance, they can't turn off the switch anymore because it would require too many changes.
---------------------------------------------------------------------------
by stof at 2012-07-17T08:08:38Z
@fabpot what do you think about it ?
---------------------------------------------------------------------------
by bschussek at 2012-07-17T08:41:43Z
Another option that just came to mind is to remove inheritance checks for anything but _widget and _row. I.e., if we render `entity_widget`, check
```
_id_widget
entity_widget
choice_widget
form_widget
```
But if we render `entity_label`, only check
```
_id_label
form_label
```
This improves PHP Templating for **170ms** and Twig for **20ms**. We gain another **150ms** for PHP Templating and **~15ms** for Twig if we also restrict custom fields (_id_widget) to the _widget and _row suffixes (it's really hard to tweak the renderer for Twig.. I think a lot of its performance bottlenecks lie in Twig itself).
Do you have any data on how often blocks other than _widget and _row are customized for specific types/IDs?
---------------------------------------------------------------------------
by stof at 2012-07-17T09:47:38Z
Well, I think most of the time other blocks are not even customized based on the type :)
---------------------------------------------------------------------------
by Tobion at 2012-07-17T14:32:39Z
From my experience rendering the form components individually is easier and more flexible than customizing by ID or type.
But there are still use cases for customizing like library-like bundles (e.g. Bootstrap).
Commits
-------
610c602 [OptionsResolver] Slightly tweaked the performance of the Options class
Discussion
----------
[OptionsResolver] Slightly tweaked the performance of the Options class
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
Commits
-------
1f2f866 fixed the serialization of the SwitchUserRole
b55930a [Security] Implemented the Serializable interface in the Role class
Discussion
----------
[Security] Implemented the Serializable interface in the Role class
The Role class is serialized in the session for each role of the user. Implementing the Serializable interface allows to reduce the size of the data.
Commits
-------
df2406f [Security] Add note to changelog about BC break
01b2e39 [Security] Extract default logout success handling logic
Discussion
----------
[Security] Extract default logout success handling logic
Bug fix: no
Feature addition: no
Backwards compatibility break: yes, small one for people using the component
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/asm89/symfony.png?branch=default-logout-success-handler)](http://travis-ci.org/asm89/symfony)
License of the code: MIT
As discussed earlier with @fabpot and @schmittjoh. This PR extracts the default logout success handling logic to a separate class that users can extend.
Note: build status is red, but that is because of a failing performance test in the form component? ..
Commits
-------
7d53909 Earlier PHP output buffer flush for non FPM environments
Discussion
----------
Earlier PHP output buffer flush for non FPM environments
In the Response::send() method you are calling the fastcgi_finish_request() in case it exists. This will provide a respectful performance boost when you have significant work being done by listeners acting on kernel terminal events; Sadly you are forgetting people that don't use FPM doing this.
The performance boost for a Vanilla PHP is not much: flushing earlier potentially helps higher layers such as the HTTPd or potential other cache layers: the sooner their buffer gets filled, the sooner they release information to the browser, even if the output buffer is still open. The explicit flush() is supposed to do exactly this.
Commits
-------
33f29ed [Form] '@group benchmark' for form performance tests
Discussion
----------
[Form] '@group benchmark' for form performance tests
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/asm89/symfony.png?branch=form-performance)](http://travis-ci.org/asm89/symfony)
License of the code: MIT
I think a PR or note about this has been rejected before, but since build statuses on PRs sometimes seem to fail if travis is busy I think moving the form performance tests to `@group benchmark` should be reconsidered.
Edit: even master is currently failing on this
Commits
-------
07992d3 [Validator] Added inheritDoc phpdoc for validate methods
Discussion
----------
[Validator] Added inheritDoc phpdoc for validate methods
Was instructed by @stof to do this for a PR on comparison validators and noticed none of the validators used inheritDoc.
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: n/a
Todo: I haven't looked around too much, but I assume if none of the validators followed this standard that there would be a fair few other classes not using. Obviously not a big issue though
License of the code: MIT
Documentation PR: n/a
Commits
-------
5ae0da0 Update changelogs
ff91b9a [FrameworkBundle] Make FlashBag the default.
Discussion
----------
[2.1][FrameworkBundle] Make FlashBag the default.
Bug fix: no
Feature addition: yes
Backwards compatibility break: yes (but only technically)
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
The difference between `AutoExpireFlashBag` and `FlashBag` is simply that the first will expire flashes regardless of being displayed on the next pageload. This can result in lost messages. It was created simply for BC with 2.0.
`FlashBag` expires flashes once they are retrieved. This also makes it ESI compatible.
/cc @lsmith77
---------------------------------------------------------------------------
by jalliot at 2012-07-14T18:13:40Z
+1!
You should add it to the changelog and upgrade files though :)
Commits
-------
480ab14 Further improving the MessageSelector exception
Discussion
----------
Further improving the MessageSelector exception
Hey guys!
The goal is just to give the users a better starting point when they see this exception.
See previous change in #4173 and conversation in #4207
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #4207
Todo: -
License of the code: MIT
Documentation PR: n/a
Thanks!
---------------------------------------------------------------------------
by stof at 2012-07-14T23:11:17Z
Shouldn't it be done in 2.0 instead ?
---------------------------------------------------------------------------
by weaverryan at 2012-07-15T00:15:42Z
I decided to go against 2.1 when I saw that #4173 was against 2.0. If we do it against 2.0, it'll cause a conflict when 2.0 is merged into master - seemed like too much trouble for such a small change.
Commits
-------
12bdec3 Moved the NormalizationAwareInterface check to the ChainEncoder
28e137c [Serializer] Added a ChainEncoder and a ChainDecoder
Discussion
----------
[Serializer] Added a ChainEncoder and a ChainDecoder
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/stof/symfony.png?branch=serializer_improvement)](http://travis-ci.org/stof/symfony)
Fixes the following tickets: -
Todo: -
These classes contains the logic previously defined in the Serializer itself to handle the choice of a serializer. This allows reusing it when using only the encoding part of the component, without having to use the Serializer class (which is not as handy to bootstrap when you want to use only encoders and decoders as normalizers come first)
I was wondering if these classes should have adders but I kept the constructor injection only to be consistent with the current code (encoders cannot be registered after the instantiation) and to avoid implementing the SerializerAwareInterface in them (to allow injecting the Serializer in serializer-aware encoders and decoders added later).
Note that this change is fully BC as it only changes the internal implementation of the Serializer.
---------------------------------------------------------------------------
by fabpot at 2012-07-14T11:07:32Z
ping @lsmith77 @Seldaek
---------------------------------------------------------------------------
by Seldaek at 2012-07-14T15:17:42Z
After a quick look, I'd say +1
Commits
-------
dbd169f [Form] Error in the SimpleFormTest case.
Discussion
----------
[Form] Error in the SimpleFormTest case.
Symfony2 tests pass: yes
---------------------------------------------------------------------------
by bschussek at 2012-07-14T13:25:28Z
Thanks, looks like a copy paste error. @fabpot 👍
Commits
-------
6489a65 [Form] Added an exception for invalid type services
Discussion
----------
[Form] Added an exception for invalid type services
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes [![Build Status](https://secure.travis-ci.org/stof/symfony.png?branch=form_safeguard)](http://travis-ci.org/stof/symfony) (Travis fails randomly for the performance test)
Fixes the following tickets: -
Todo: -
Before the introduction of the FormRegistry, the getName() method was
never used for types registered through the DI container. The
FormRegistry now uses the getName() method and missconfigured services
will trigger a notice.
This was reported in FriendsOfSymfony/FOSCommentBundle#234
Before the introduction of the FormRegistry, the getName() method was
never used for types registered through the DI container. The
FormRegistry now uses the getName() method and missconfigured services
will trigger a notice.
This was reported in FriendsOfSymfony/FOSCommentBundle#234
These classes contains the logic previously defined in the Serializer
itself to handle the choice of a serializer. This allows reusing it when
using only the encoding part of the component.
Commits
-------
cd7835d [Form] Cached the form type hierarchy in order to improve performance
2ca753b [Form] Fixed choice list hashing in DoctrineType
2bf4d6c [Form] Fixed FormFactory not to set "data" option if not explicitely given
7149d26 [Form] Removed invalid PHPDoc text
Discussion
----------
[Form] WIP Improved performance of form building
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: **Update the Silex extension**
This PR is work in progress and up for discussion. It increases the performance of FormFactory::createForm() on a specific, heavy-weight form from **0.848** to **0.580** seconds.
Before, the FormFactory had to traverse the hierarchy and calculate the default options of each FormType everytime a form was created of that type.
Now, FormTypes are wrapped within instances of a new class `ResolvedFormType`, which caches the parent type, the type's extensions and its default options.
The updated responsibilities: `FormFactory` is a registry and proxy for `ResolvedFormType` objects, `FormType` specifies how a form can be built on a specific layer of the type hierarchy (e.g. "form", or "date", etc.) and `ResolvedFormType` *does the actual building* across all layers of the hierarchy (by delegating to the parent type, which delegates to its parent type etc.).
---------------------------------------------------------------------------
by schmittjoh at 2012-07-12T18:25:40Z
Maybe ResolvedFormType
---------------------------------------------------------------------------
by jmather at 2012-07-13T02:56:38Z
I really like ResolvedFormType. That's the naming method I took for my tag parser that handes the same conceptual issue.
---------------------------------------------------------------------------
by axelarge at 2012-07-13T05:25:00Z
ResolvedFormType sounds very clear.
This change is great and I desperately hope to see more of this kind
---------------------------------------------------------------------------
by Baachi at 2012-07-13T06:41:26Z
Yes `ResolvedFormType` sounds good :) 👍
---------------------------------------------------------------------------
by fabpot at 2012-07-13T07:11:33Z
I like `ResolvedFormType` as well.
---------------------------------------------------------------------------
by henrikbjorn at 2012-07-13T07:46:48Z
👍 `ResolvedFormType` :shipit:
---------------------------------------------------------------------------
by stof at 2012-07-13T18:01:51Z
This looks good to me
Commits
-------
a924dab [OptionsResolver] Made the OptionsResolver clonable
70307e5 [Form] Improved EntityType performance by caching the EntityChoiceList
8298d8c [Form] Improved ChoiceType performance by caching ChoiceList objects
Discussion
----------
[Form] Improved performance of ChoiceType and EntityType
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
Commits
-------
a92f80b [Validator] Added Length constraint and deprecated MinLength and MaxLength
83a3f75 [Validator] Deprecated the constraints Min and Max in favor of Range
0cdacee [Validator] Removed MinCount and MaxCount and replaced them by the constraint Count
741c147 [Validator] Renamed deprecated Size constraint to Range
Discussion
----------
[Validator] Reintroduced Range constraint and created Count and Length constraints
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
After @Tobion's comment to #4851, this is the next try to streamline the constraints and reduce duplication of logic. The downside of the current MinLength/MaxLength and MinCount/MaxCount pairs is that they cannot output a fitting error message if a value should have an *exact* length/count. So this PR introduces
* Range (formerly Size) to replace Min/Max
* Count to replace MinCount/MaxCount
* Length to replace MinLength/MaxLength
Feedback is appreciated.
---------------------------------------------------------------------------
by Tobion at 2012-07-11T20:40:08Z
The `choice` constraint also cannot handle `min = max`. Or maybe we don't need these options on choice anymore as we can achieve the same with the new `count` constraint?!
---------------------------------------------------------------------------
by beberlei at 2012-07-12T08:59:44Z
Dude, nobody has time to fix the BC breaks you introduce :-)
---------------------------------------------------------------------------
by TomAdam at 2012-07-12T12:38:49Z
The changes to the `Size` validator yesterday broke my project, and I started rewriting to use `MaxLength / MinLength` validators today, until I spotted this. It would be good if this PR could have a reasonably high priority (whether or not it is accepted) as it will change how I fix my issues. I suspect a lot of people using the master branch will be in the same situation.
Commits
-------
34abe37 Added mime type for RAR archive, sending from Linux Chrome via nginx
Discussion
----------
Added new mime type for RAR archive
This mime type detected when sending file from Linux Chrome Browser via nginx
Commits
-------
5e6c06f [Security] Remove hard dependency on $providerKey for default auth success handler
Discussion
----------
[Security] Remove hard dependency on $providerKey for default auth success handler
Bug fix: yes?
Feature addition: yes?
Backwards compatibility break: no
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/asm89/symfony.png?branch=fix-default-auth-successhandler-extension)](http://travis-ci.org/asm89/symfony)
License of the code: MIT
In 8ffaafa867 a hard dependency was introduced between the default authentication success handling code and the active firewall. This makes sense. However, for people implementing their own success handler this makes it impossible to extend the default class as the `$providerKey` is set in the extension of the security bundle.
This PR makes the dependency a soft one so people can extend the class and use the default definition as a parent for their own service. However it is the responsibility of the developers to set the appropriate `$providerKey` if they want to use the target url saved in the session. Imo this is the right way as the developer should also set the appropriate options for the parent class in the overriding constructor.
---------------------------------------------------------------------------
by stof at 2012-07-11T19:01:12Z
@asm89 this PR need to be rebased according to github
---------------------------------------------------------------------------
by asm89 at 2012-07-11T19:13:09Z
@stof Done :)
---------------------------------------------------------------------------
by asm89 at 2012-07-12T10:07:53Z
@fabpot Done.
Commits
-------
0be602d [Validator] Deprecated the Size constraint
d661837 [Validator] Reverted the changes done to the Size constraint in 3a5e84f4a7d84b689 [Validator] Added the constraints MinCount and MaxCount
1a732e4 [Validator] Removed the Range constraint as it duplicates functionality given in Min and Max
Discussion
----------
[Validator] Deprecated the Size constraint in favor of MinCount and MaxCount
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
This PR cleans up with the current ambiguity between
* Min
* Max
* MinLength
* MaxLength
* Range
* Size
in the following ways:
* The Range constraint was removed again as it can be completely replaced by Min and Max.
* The Size constraint was reverted to it's 2.0 feature set and deprecated.
* The constraints MinCount and MaxCount were added to make up for the functionality that was added to Size.
Commits
-------
b7aae48 [Locale] Fixed error resetting in StubIntlDateFormatter::parse()
Discussion
----------
[Locale] Fixed error resetting in StubIntlDateFormatter::parse()
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #4242
Todo: -
---------------------------------------------------------------------------
by bschussek at 2012-07-11T08:00:15Z
ping @eriksencosta, @igorw - is this solved as intended?
---------------------------------------------------------------------------
by eriksencosta at 2012-07-11T11:20:24Z
Yes, thanks!
Commits
-------
7a76dba [Form] Renamed the options "data_timezone" and "user_timezone"
655d645 [Form] Fixed tests failing on systems with timezones other than +01:00
Discussion
----------
[Form] Fixed tests and renamed the options "data_timezone" and "user_timezone"
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
The option names were renamed for better consistency with the terms "model data" or "model format" and "view data" or "view format".
Commits
-------
ded6c03 [Form] DateTimeType now handles RFC 3339 dates as provided by HTML5
7e8b622 [Form] Added the option "format" to DateTimeType
9eeb200 [Form] Changed the default format of DateType to "yyyy-MM-dd" to support HTML 5 out of the box
d621a76 [Form] Improved DateTimeType code
Discussion
----------
[Form] Changed DateType and DateTimeType to support HTML5 by default
Bug fix: no
Feature addition: yes
Backwards compatibility break: yes
Symfony2 tests pass: yes
Fixes the following tickets: #2849, #3162
Todo: -
This PR changes DateType and DateTimeType to support HTML5 by default when setting the option "widget" to "single_text".
Also, the option "format" was added to DateTimeType.
---------------------------------------------------------------------------
by stof at 2012-07-10T15:38:44Z
This loos OK to me
---------------------------------------------------------------------------
by MDrollette at 2012-07-10T16:36:26Z
@stof typo: "looks" #meta-stoffed
Commits
-------
02e0a8f Allow Kernel::$name to be overridden by subclasses
Discussion
----------
Allow Kernel::$name to be overridden by subclasses
Because the name of the kernel is calculated in the constructor,
any child class that had overriden the kernel name, will be
ignored.
By setting the kernel name in the child class, we can avoid having
to execute the regex to calculate the name upon every construction
of a Kernel.
A test (and a kernel fixture) is added to prove that the override
works correctly.
Note: the Kernel API has not been touched, so there should be no
issues with BC.
What do you think?
Because the name of the kernel is calculated in the constructor,
any child class that had overriden the kernel name, will be
ignored.
By setting the kernel name in the child class, we can avoid having
to execute the regex to calculate the name upon every construction
of a Kernel.
A test (and a kernel fixture) is added to prove that the override
works correctly.
Note: the Kernel API has not been touched, so there should be no
issues with BC.
Commits
-------
5b057f8 [Form] Fixed DateType to use "format" for creating the year and day choices
Discussion
----------
[Form] Fixed DateType to use "format" for creating the year and day choices
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #3490
Todo: -
Commits
-------
f71e2a8 [Form] FormBuilder Bug Fix: remove() was not properly removing children
Discussion
----------
[Form] FormBuilder Bug Fix: remove() was not properly removing children
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #4803
License of the code: MIT
FormBuilder initially sets unresolved children as NULL, until resolved.
If FormBuilder::remove() is called before that child is resolved, the
if statement turns false, because isset(null) is false, when it should
be true. Instead, we should check to see if the key exists, and if so,
process and unset it.
Closes#4803
---------------------------------------------------------------------------
by bschussek at 2012-07-10T07:41:55Z
Can you please add a test covering this case?
---------------------------------------------------------------------------
by ChrisTickner at 2012-07-10T09:43:07Z
Sure, added a test case. It fails before the patch and passes after.
---------------------------------------------------------------------------
by bschussek at 2012-07-10T09:47:06Z
Thanks. Can you please add a comment to the test with the URL of this PR? Also, please squash your commits into one when your done.
---------------------------------------------------------------------------
by ChrisTickner at 2012-07-10T10:02:16Z
Oops, I deleted the remote branch and re-pushed without realizing we'd lose some history on this PR page. Live and learn I suppose.
---------------------------------------------------------------------------
by bschussek at 2012-07-10T10:18:20Z
Thanks!
FormBuilder initially sets unresolved children as NULL, until resolved.
If FormBuilder::remove() is called before that child is resolved, the
if statement turns false, because isset(null) is false, when it should
be true. Instead, we should check to see if the key exists, and if so,
process and unset it.
Closes#4803
Commits
-------
6ad4018 [Form] Also display the hint about adder/remover on invalid property access
Discussion
----------
[Form] Also display the hint about adder/remover on invalid property access
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
This PR follows up #4777. In this case the hint about adders and removers is also added when a property is found, but is not public, a common case.
Commits
-------
c6cb8b2 [Form] Removed unused option "inline" that was introduced by accident
Discussion
----------
[Form] Removed unused option "inline" that was introduced by accident
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
Commits
-------
9c94b48 [Form] Fixed the "data" option to supersede default data set in the model
Discussion
----------
[Form] Fixed the "data" option to supersede default data set in the model
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #3899
Todo: -
Commits
-------
7727de7 [Form] Deprecated Form::bindRequest() and replaced it by a PRE_BIND listener
Discussion
----------
[Form] Deprecated Form::bindRequest() and replaced it by a PRE_BIND listener
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
Instead of `bindRequest`, you should now simply call `bind`:
Before:
```
$form->bindRequest($request);
```
After:
```
$form->bind($request);
```
Commits
-------
ec8c023 Serbian Cyrillic translation updated.
Discussion
----------
Serbian Cyrillic translation updated.
Shouldn't source messages be updated in all files in one commit? Also, version is 1.2 in both, en and sr files, but source messages are not.
I would like to be notified whenever translation is changed, maybe we should have some topic on mailing list so all translators can receive notifications once messages are changed.
Commits
-------
f093caa [Form] Fixed invalid value passed to the constraint violation by the MinLength and MaxLength validators
Discussion
----------
[Form] Fixed invalid value passed to the constraint violation by the MinLength and MaxLength validators
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #4573
Todo: -
Commits
-------
eba7dfe Revert "[Form] added a circular reference safeguard for form type"
Discussion
----------
Revert "[Form] added a circular reference safeguard for form type"
This reverts commit ea93e4cafa.
Conflicts:
src/Symfony/Component/Form/FormBuilder.php
src/Symfony/Component/Form/FormFactory.php
Commits
-------
df5bb4a [Form] Unified rendering of errors for nested elements
Discussion
----------
[Form] Unified rendering of errors for nested elements
Bug fix: yes
Feature addition: no
Backwards compatibility break: yes?
Symfony2 tests pass: yes
Fixes the following tickets: #4615
Todo: -
Commits
-------
1345360 [Form] Fixed PropertyPath handling of offsetGet() that returns a constant value
6e1462e [Form] Fixed PropertyPath handling of __get() method that returns a constant
Discussion
----------
[Form] Fixed "Indirect modification.." exceptions in PropertyPath
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #4450, #4535?, #4612
Todo: -
Commits
-------
3462afc Tests for PluralizationRules.
Discussion
----------
[WIP][Translations][tests] Tests for PluralizationRules.
Currently we have no tests PluralizationRules. This patch is an initial one to show we have not enough langcodes in PluralizationRules.
I hope this gets in so others can fix the missing langcodes.
I'm waiting for [RFC [MessageCatalogue*] Add Metadata to MessageCatalogue](https://github.com/symfony/symfony/pull/4399) to get in to continue working on the [[WIP]: Allow Drupal to use Translate component](https://github.com/symfony/symfony/pull/4249).
---------------------------------------------------------------------------
by travisbot at 2012-05-25T14:38:37Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1433558) (merged 3462afc0 into 023dbf80).
---------------------------------------------------------------------------
by drak at 2012-07-01T09:47:05Z
Is there anything pending in this PR?
Commits
-------
28b6557 class_exists was returning fals for the container aware interface
Discussion
----------
class_exists was returning fals for the container aware interface
This test was marked skipped when it should not have been.
Commits
-------
e6b5595 [Form] Fixed display of empty values in DateType, TimeType and DateTimeType if they are not required
14e293f [Form] Refactored processing of the "empty_value" option in DateType
Discussion
----------
[Form] Fixed display of empty values in DateType, TimeType and DateTimeType
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #4596
Todo: -
Commits
-------
b4d7a7e [Component][Finder][SplFileInfo] file_get_contents=>fpassthru
Discussion
----------
[Component][Finder][SplFileInfo] file_get_contents=>fpassthru
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: https://github.com/symfony/symfony/pull/4335/files#r1016152
Todo: -
License of the code: MIT
Documentation PR: -
Commits
-------
040ba8f [Form] Fixed: ChoiceType omits the "empty_value" option if the choices contain an empty element
Discussion
----------
[Form] Fixed: ChoiceType omits the "empty_value" option if the choices contain an empty element
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #3854, #3864
Todo: -
Commits
-------
6d94f3e Ensure there is a session before getting the session id
Discussion
----------
[Form] Ensure there is a session before getting the session id
Solves "The CSRF token is invalid. Please try to resubmit the form" error when a form is generated before the session is started.
---------------------------------------------------------------------------
by fabpot at 2012-07-09T10:23:32Z
Adding a CSRF token only makes sense if you are on a page with a "user". If not (and if you don't use HTTP auth or whatever), then there is no need for a CSRF token.
---------------------------------------------------------------------------
by frosas at 2012-07-09T14:42:40Z
This PR doesn't change any logic on whether a CSRF token is added or not, it just fixes a bug when a token is requested.
Commits
-------
6c9c2ec [ClassCollectionLoader] fixed comment striping on classes in global namespace
Discussion
----------
[ClassCollectionLoader] fixed comment striping on classes in global namespace
Comments aren't striped when the class is in the global namespace, this adds a fake namespace to let the fixNamespaceDeclaration method handling the formating, so we can remove a method.
I've also put dev as minimum policy in composer, otherwise I couldn't install dependencies.
Commits
-------
1fa22d9 [Form] Output a more usable error when PropertyPath has tried to find adders and getters, but failed to find them
Discussion
----------
[Form] Output a more usable error when PropertyPath has tried to find ad...
...ders and getters, but failed to find them
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
I've refactored the writeProperty method of propertypath in order to supply a better error message when writing has failed.
The writeProperty method itself now finds singulars (if a singular was not passed) for the private findAdderAndRemover method which allowed for some duplicate code to be removed and since the writeProperty now holds this data, it can provide a more verbose exception message.
---------------------------------------------------------------------------
by bschussek at 2012-07-09T13:54:35Z
Apart from the typo this PR looks good.
---------------------------------------------------------------------------
by Burgov at 2012-07-09T14:01:04Z
fixed&squashed
Commits
-------
bb138da [Security] Fix regression after rebase. Target url should be firewall dependent
eb19f2c [Security] Add note to CHANGELOG about refactored authentication failure/success handling [Security] Various CS + doc fixes [Security] Exception when authentication failure/success handlers do not return a response [Security] Add authors + fix docblock
f9d5606 [Security] Update AuthenticationFailureHandlerInterface docblock. Never return null
915704c [Security] Move default authentication failure handling strategy to seperate class [Security] Update configuration for changes regarding default failure handler [Security] Fixes + add AbstractFactory test for failure handler
c6aa392 [Security] Move default authentication success handling strategy to seperate class [Security] Update configuration for changes regarding default success handler [Security] Fix + add AbstractFactory test
Discussion
----------
[Security] Refactor authentication success handling
Bug fix: no
Feature addition: no
Backwards compatibility break: yes
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/asm89/symfony.png?branch=refactor-authentication-success-handling)](http://travis-ci.org/asm89/symfony)
License of the code: MIT
This PR extracts the default authentication success handling to its own class as discussed in #4553. In the end the PR will basically revert #3183 (as suggested by @schmittjoh) and fix point one of #838.
There are a few noticeable changes in this PR:
- This implementation changes the constructor signature of the `AbstractAuthentictionListener` and `UsernamePasswordFormAuthenticationListener` by making the `AuthenticationSuccessHandler` mandatory (BC break). If this WIP is approved I will refactor the failure handling logic too and then this will also move one place in the constructor
- This PR reverts the change of making the returning of a `Response` optional in the `AuthenticationSuccessHandlerInterface`. Developers can now extend the default behavior themselves
@schmittjoh Any suggestions? Or a +1 to do the failure logic too?
---------------------------------------------------------------------------
by schmittjoh at 2012-06-17T23:53:07Z
+1 from me
@fabpot, what so you think?
---------------------------------------------------------------------------
by fabpot at 2012-06-19T08:15:48Z
Can you add a note in the CHANGELOG? Thanks.
---------------------------------------------------------------------------
by asm89 at 2012-06-19T10:22:20Z
I will, but I'll first do the same for the failure logic.
---------------------------------------------------------------------------
by travisbot at 2012-06-21T08:03:14Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1671555) (merged 17c8f66f into 55c6df99).
---------------------------------------------------------------------------
by asm89 at 2012-06-21T08:45:38Z
👍 thank you @stof. I think this is good to go now.
---------------------------------------------------------------------------
by travisbot at 2012-06-21T08:50:28Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1671817) (merged 8982c769 into 55c6df99).
---------------------------------------------------------------------------
by asm89 at 2012-06-21T14:23:58Z
@schmittjoh @fabpot The `LogoutListener` currently throws an exception when the successhandler doesn't return a `Response` ([link](9e9519913d/src/Symfony/Component/Security/Http/Firewall/LogoutListener.php (L101))). Should this code check for this too?
---------------------------------------------------------------------------
by schmittjoh at 2012-06-21T14:26:49Z
Yes, this code was removed, but needs to be re-added here as well.
---------------------------------------------------------------------------
by travisbot at 2012-06-21T15:08:59Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1674437) (merged 5afa240d into 55c6df99).
---------------------------------------------------------------------------
by asm89 at 2012-06-26T06:01:02Z
@fabpot Can you make a final decision on this? If you decide on point 3, this code can be merged. I agree with the arguments of @stof about the option handling and it 'only' being a BC break for direct users of the security component. I even think these direct users should be really careful anyway, since the behavior of the success and failurehandlers now change back to how they acted in 2.0.
Now I am thinking about it, can't the optional parameters of this class move to setters anyway? That will make it cleaner to extend.
---------------------------------------------------------------------------
by asm89 at 2012-06-28T10:29:50Z
ping @fabpot
---------------------------------------------------------------------------
by fabpot at 2012-06-28T17:23:02Z
I'm ok with option 1 (the BC break). After doing the last changes, can you squash your commits before I merge? Thanks.
---------------------------------------------------------------------------
by asm89 at 2012-07-06T21:59:54Z
@fabpot I rebased the PR, added the authors and also ported the fix that was done in 8ffaafa867 to be contained in the default success handler. I also squashed all the CS and 'small blabla fix' commits. Is it ok now?
Edit: travisbot will probably say that the tests in this PR fail, but that is because current master fails on form things
---------------------------------------------------------------------------
by asm89 at 2012-07-08T18:53:05Z
I rebased the PR, tests are green now: [![Build Status](https://secure.travis-ci.org/asm89/symfony.png?branch=refactor-authentication-success-handling)](http://travis-ci.org/asm89/symfony).
[Security] Various CS + doc fixes
[Security] Exception when authentication failure/success handlers do not return a response
[Security] Add authors + fix docblock
Commits
-------
6de6806 [Component][HttpKernel] fixed testGetRootDir() on Win
Discussion
----------
[Component][HttpKernel] fixed testGetRootDir() on Win
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/gajdaw/symfony.png?branch=kernel_test_fix)](http://travis-ci.org/gajdaw/symfony)
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
Method `getRootDir()` returns path containing slashes. On Windows machine `__DIR__` and `DIRECTORY_SEPARATOR` are backslashes. To pass the test on win machine we have to translate `\` into `/`.
Commits
-------
df66d90 slovenian validators translations updated
Discussion
----------
Slovenian validators translations updated
Updated Slovenian validators translations for master branch.
Commits
-------
d6e1f39 [Form] Fixed FormBuilder to maintain order of its children
Discussion
----------
[Form] Fixed FormBuilder to maintain order of its children
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #4693
Todo: -
Commits
-------
5fe3f39 [Form] Made data mappers completely responsible for dealing with empty values. Removed duplication of code.
9bf6e8b [Form] Compound forms now always need a data mapper. Otherwise an exception is thrown.
Discussion
----------
[Form] Made requirements for data mappers stricter
Bug fix: no
Feature addition: no
Backwards compatibility break: (yes)
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
This cleanup was done while trying to fix#4715, which is not easily fixable right now. It breaks BC for those people who do not extend `FormType` and manually construct `Form` instances, which hopefully nobody does as it is absolutely *not* recommended at this time.
This is not a problem with Symfony, but when using the component
standalone (Silex for instance), the context listener might be
instantiated even if the firewall does not need to be fired. In that
case, the handle() method is not called, but the response listener is
called, which means that en empty token is stored in the session.
For Silex, it means that when authenticated, if you visit a 404 page,
you would be disconnected automatically.
Commits
-------
819fe34 [Form] refactored variable name to be more consistent with rest of the naming
Discussion
----------
[Form] Refactored config variable naming to be more consistent
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Since `clientTransformer` is renamed to `viewTransformer` everywhere, I think for consistency reasons config variable name should be changed too..
---------------------------------------------------------------------------
by stloyd at 2012-07-06T07:31:39Z
Maybe also rename of `normTransformers` to `modelTransformers` ? As this were changed too.
---------------------------------------------------------------------------
by Inori at 2012-07-06T07:40:53Z
@stloyd makes sense, done
---------------------------------------------------------------------------
by bschussek at 2012-07-06T08:24:43Z
Thanks for the cleanup. Can you squash the commits and prefix the message with "[Form]" please?
---------------------------------------------------------------------------
by Inori at 2012-07-06T08:43:49Z
@bschussek done
---------------------------------------------------------------------------
by bschussek at 2012-07-06T09:31:04Z
Thanks! @fabpot 👍
Commits
-------
6f9eda9 [Form][Validator] Fixed generation of HTML5 pattern attribute based on Assert\Regex to remove delimiters.
Discussion
----------
[Form][Validator] Fixed generation of HTML5 pattern attribute based on Assert\Regex by removing delimiters or using a new option: htmlPattern.
Hopefully, this time is the good one…
* Fixes: [#3766, #4077, #4513, #4520, #4521]
* Bug fix: yes
* Feature addition: yes
* BC break: no
* Symfony2 tests pass: yes
In Issue #3766, it was asked that Assert\Regex generates HTML5 pattern attribute.
It was done in PR #4077, but the generated Regex is in delimited format which is not supported by HTML5.
Hence, `/[a-z]+/` would be converted to `[a-z]+`.
If flags are specified like in `/[a-z]+/i`, it cannot be converted and pattern validation will be disabled client-side. If is however now possible, using a new option, `htmlPattern`, to specify the pattern you want to be used.
Example:
```php
<?php
/**
* @Assert\Regex(pattern="/^[0-9]+[a-z]*$/i", htmlPattern="^[0-9]+[a-zA-Z]*$")
*/
private $civic_number;
```
**Note**: [Documentation](http://symfony.com/doc/current/reference/constraints/Regex.html) should be updated accordingly.
---------------------------------------------------------------------------
by lavoiesl at 2012-06-08T15:45:17Z
God, I just found out you can "add more commits to this pull request by pushing to the master branch on lavoiesl/symfony"…
---------------------------------------------------------------------------
by travisbot at 2012-06-08T15:50:31Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1568634) (merged 2d767b41 into b84b46ba).
---------------------------------------------------------------------------
by petajaros at 2012-07-04T14:23:16Z
Anything new about this issue?
---------------------------------------------------------------------------
by lavoiesl at 2012-07-04T16:25:43Z
Alright, tests are passing using `phpunit -c phpunit.xml.dist --filter 'RegexValidatorTest'`. @travisbot reports errors because he can’t even start the tests due to dependencies, which is not related
---------------------------------------------------------------------------
by vicb at 2012-07-04T16:31:13Z
It should be ready to merge when you have taken the last comments into account. thanks.
---------------------------------------------------------------------------
by lavoiesl at 2012-07-04T16:39:05Z
So it seems this PR will finally pass, thanks a lot.
---------------------------------------------------------------------------
by vicb at 2012-07-04T17:03:35Z
Thank you for this PR and the changes.
---------------------------------------------------------------------------
by fabpot at 2012-07-04T17:10:20Z
@lavoiesl Can you squash your commits before I merge? Thanks.
---------------------------------------------------------------------------
by lavoiesl at 2012-07-04T17:25:18Z
There. I also left trace of some commits I did.
Thanks
[Validator] Added delimiter escaping to Validator\Constraints\Regex::getNonDelimitedPattern
[Form][Validator] Added htmlPattern option for Regex Validation.
[Validator] Fixed Validator\Constraints\Regex::getNonDelimitedPattern variable declarations
[Validator] Fixed tests for Regex htmlPattern option (instead of html_pattern)
[Validation] tweaked generation of pattern to include .* when not anchors are present. Also removed the exception and made getNonDelimitedPattern private
Commits
-------
18f8fc7 [Finder] tests for Yaml class
Discussion
----------
[Finder] tests for Yaml class
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/gajdaw/symfony.png?branch=master)](http://travis-ci.org/gajdaw/symfony)
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
Additional tests improving tests coverage.
Commits
-------
3f9e8ff [ClassLoader] made ClassCollectionLoader::load() automatically include class dependencies
6f4d281 [ClassLoader] added missing support for PHP 5.4 traits
Discussion
----------
Classloader optimization
The first commit fixes support for PHP 5.4 trait.
The second one does several things:
* it optimizes the recent merge so that the reflection class instance is only loaded once;
* we use the fact that we now get all class dependencies to automatically add all class dependencies to the map.
---------------------------------------------------------------------------
by fabpot at 2012-07-03T17:26:46Z
I've updated to take into accounts traits.
---------------------------------------------------------------------------
by bamarni at 2012-07-04T11:58:57Z
great job 👍
I can't see it in the diff as this part hasn't changed, but somewhere in the autoReload block there is :
```
if ($meta[1] != $classes) {
$reload = true;
}
```
It should be array_unique($classes), otherwise the file would be perpetually regenerated in autoReload mode when the input contains duplicate, because they're implicitely removed when dumping the files.
---------------------------------------------------------------------------
by fabpot at 2012-07-04T13:20:04Z
@bamarni I've added an `array_unique` call at the top (this bug existed before by the way).
Commits
-------
c40a4e5 [HttpFoundation] fix query string normalization
f9ec2ea refactored test method
0880174 [HttpFoundation] added failing tests for query string normalization
Discussion
----------
[HttpFoundation] fix query string normalization
This fixes the query string normalization. There were several problems in it (see test cases that I added).
The main issue, that first catched my eye, was that the query string was urldecoded before it was exploded by `=`. See old code: `explode('=', rawurldecode($segment), 2);`. This means an encoded `=` (`%3D`) would falsely be considered a separator and thus lead to complete different parameters. The fixed test case is at `pa%3Dram=foo%26bar%3Dbaz&test=test`.
---------------------------------------------------------------------------
by Tobion at 2012-07-04T02:21:25Z
cc @simensen considering your PR 4711
Commits
-------
d37003e [HttpFoundation] small fixes in Request
Discussion
----------
[HttpFoundation] small fixes in Request
phpdoc fixes,
making http_build_query explicit
fixing query string of '0', that was ignored.
Unfortunately this '0' problematic is omnipresent because PHP makes it so easy to get wrong (as it is converted to boolean false). I don't know how often I fixed such issue already.
Commits
-------
45219ef [Process] Add default xampp path to the list of possible paths to check
28e1313 [Process] Clean-up/simplify code
56f473a [Process] Add extra dirs argument to the executable finder to allow searching more dirs
Discussion
----------
ExecutableFinder changes
It cleans up stuff a bit and adds a guess for xampp users that wouldn't have php in their path
Commits
-------
eda439f [EventDataCollector] Display a better message when no events have been recorded
6b87981 [TimeDataCollector] Do not throw an exception when no events are recorded
Discussion
----------
[Profiler] Better support for collector in a production env
relates to #3706.
With this PR it is possible to:
- enable only the profiler in a production environment - the wdt being disabled you have to switch to the development environment to inspect the collected data,
- enable both the profiler and the wdt in a production environment (the use case form #3706).
@jmikola would this solve your use case ?
Commits
-------
26a1e0b [ClassLoader] ordered ClassCollectionLoader writing to avoid redeclaration at runtime
Discussion
----------
[HttpKernel] allowed classes to compile to be prepended
I had an issue when registering JMSDIExtraBundle before the frameworkBundle, because the bundle is adding a class to compile wich extends a class to compile added by the frameworkbundle (https://github.com/schmittjoh/JMSDiExtraBundle/blob/master/HttpKernel/ControllerResolver.php#L39).
In my kernel, the bundle was registered before the frameworkbundle, if it's the case, the class is writed before the symfony core class in the cache file, so it will trigger the autoloader to load the symfony core class, then we'll have a fatal error because we're declaring 2 times the same class.
I'm suggesting to add a way to prepend the classes to compile added by an extension, this way we could force classes from the core bundle to pe prepended, and avoid this kind of error with other bundles adding classes extending core classes or implementing core interface. I've also added it to the frameworkbundle.
---------------------------------------------------------------------------
by travisbot at 2012-07-01T12:32:28Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1750090) (merged a989d35c into a1b73887).
---------------------------------------------------------------------------
by schmittjoh at 2012-07-01T12:45:46Z
This doesn't sound really failure proof, better would be to resolve the compiled classes in a way that handles the dependencies gracefully regardless of the order that they are registered in.
---------------------------------------------------------------------------
by bamarni at 2012-07-01T13:03:15Z
yes that would be much cleaner, even if it's not perfect, I don't have any other examples, but I think in most of situations this error happens because of the frameworkbundle late registration?
---------------------------------------------------------------------------
by bamarni at 2012-07-01T23:07:24Z
I've added an automatic reordering as suggested. Now I don't get the error whatever the order of FrameworkBundle and JMSDIExtraBundle is.
---------------------------------------------------------------------------
by vicb at 2012-07-02T10:02:33Z
Does the algo really works ?
Let's say I have the following hierarchy `A < B < C` and the classes added in the following order; `C, B, A`. I believe that the algo would return `B, A, C` instead of `A, B, C`.
An other question: should the dependency resolution be implemented in the `ClassCollectionLoader` rather than in the compiler pass ?
---------------------------------------------------------------------------
by vicb at 2012-07-02T10:23:11Z
@bamarni could you confirm the issue with the algo ? If it is confirmed, do you have time to work on a fix ?
---------------------------------------------------------------------------
by bamarni at 2012-07-02T11:05:53Z
the algo looks correct, there is a loop checking dependencies and appending the parent classes at the begining so it should also work with A > B > C, but I'll check and add a unit test.
You're right about the location it could belong there if we want a general fix, should I put it in the ClassLoader component?
---------------------------------------------------------------------------
by vicb at 2012-07-02T11:28:14Z
Yep please move the code to the ClassLoader.
You could also add some cache mechanism:
- ReflectionClass could be cached (they might be use mulitple times when some dependencies exist and are also used by the class loader)
- May be you could also cache the hierarchy of the classes
---------------------------------------------------------------------------
by bamarni at 2012-07-02T17:25:08Z
@vicb : indeed there were something wrong with the algo when it needed to handle more than 1 level of dependency, it's fixed, I've added a few test case and it passes.
Caching the dependencies found with reflection would be useful if people are dumping several files with some similar classes in the same process, but I don't see why we would need to cache the hierarchy?
---------------------------------------------------------------------------
by vicb at 2012-07-02T18:29:06Z
@bamarni I was referring to a local cache (ie local variable).
- On the first iteration, the code instantiate a reflection class,
- On other iteration you would instantiate again a reflection class for a subset of the classes
- ...
- In the end the former code instantiate again a reflection class for each class in order to get the file name, ...
I was also thinking of an other algo: count the number of parent classes for each classes to include and order classes according to this number. This would be a single loop only, what do you think ?
---------------------------------------------------------------------------
by bamarni at 2012-07-02T19:32:34Z
hum good idea counting the parents is cleaner, even though it looks enough, would it also make sense to treat interfaces and classes separately? I'm thinking about a file with all the interfaces at the begining (ordered by number of parents desc), then the classes would be appended (ordered by number of parents desc too).
---------------------------------------------------------------------------
by vicb at 2012-07-03T07:05:07Z
There is no real benefit in making the interfaces appear first but you can do it if it doesn't make the code more complex.
Please also add the `@throws` annotation to the methods.
---------------------------------------------------------------------------
by bamarni at 2012-07-03T09:37:28Z
@vicb : I've changed it to use the parents count, looks good to me.
---------------------------------------------------------------------------
by bamarni at 2012-07-03T12:23:46Z
changed
---------------------------------------------------------------------------
by bamarni at 2012-07-03T12:42:29Z
fixed
Commits
-------
3466896 [Routing] fix encoding of static static, so UrlGenerator produces valid URLs
Discussion
----------
[Routing] fix encoding of static text
Fixes#4166
As requested by Fabien, I split #4205 into multiple PRs.
---------------------------------------------------------------------------
by stof at 2012-06-09T12:49:32Z
github tells me this PR cannot be merged automatically. Could you rebase it ?
---------------------------------------------------------------------------
by Tobion at 2012-06-09T13:12:55Z
Done
---------------------------------------------------------------------------
by travisbot at 2012-06-09T13:18:18Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1576266) (merged 3466896a into 15b5aa4f).
Commits
-------
d9439ab made the charset overridable (closes#2072)
Discussion
----------
made the charset overridable (closes#2072)
The charset was configurable in a configuration file but it never worked:
framework:
charset: ISO-8859-1
Now, like for the cache and log dirs, you can configure the charset by
overriding the getCharset() method in the app kernel:
public function getCharset()
{
return 'ISO-8859-1';
}
---------------------------------------------------------------------------
by fabpot at 2012-07-03T07:26:04Z
See #2072 for the previous attempts to fix this issue.
The charset was configurable in a configuration file but it never worked:
framework:
charset: ISO-8859-1
Now, like for the cache and log dirs, you can configure the charset by
overriding the getCharset() method in the app kernel:
public function getCharset()
{
return 'ISO-8859-1';
}
Commits
-------
6296a24 Standalone query string normalization
Discussion
----------
[HttpFoundation] Standalone query string normalization
I wanted to leverage query string normalization in a test. I considered copying this code to my own library but I noticed that the only instance data `getQueryString` needed to know from the `Request` was `QUERY_STRING` so I broke the rest out into a standalone static function.
---------------------------------------------------------------------------
by simensen at 2012-07-02T20:05:59Z
I made the requested changes.
---------------------------------------------------------------------------
by fabpot at 2012-07-02T20:10:27Z
Can you squash your commits? Thanks.
---------------------------------------------------------------------------
by simensen at 2012-07-02T20:16:52Z
Sure, no problem. Hopefully I did it correctly.
Commits
-------
8ffaafa Make the session entry for the target url firewall dependent.
Discussion
----------
[Security] Make the session entry for the target url firewall dependent.
Bug fix: yes
Feature addition: no
Backwards compatibility break: yes
Symfony2 tests pass: yes
Fixes the following tickets:
License of the code: MIT
If there are two firewalls (eg. main and admin), calling an protected admin url
will direct you to the login form of the admin. If I ignore this and go to the login
form of the main firewall directly I will end up being redirected to the stored
admin target url, which will lead me to the admin login form again.
---------------------------------------------------------------------------
by travisbot at 2012-05-25T09:33:44Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1431566) (merged 8ffaafa8 into 45849ce3).
---------------------------------------------------------------------------
by uwej711 at 2012-06-09T08:05:54Z
Doesn't this make sense or did this slip through? Or is there something missing?
Commits
-------
88caf3a [HttpKernel] removed the storage of the current locale in the session
Discussion
----------
[HttpKernel] removed the storage of the current locale in the session
Before this commit, the current locale was stored in the session (if one
was already started). That way, for the next requests, even if the
request locale attribute was not set, the locale was "restored".
But this is a really bad practice as it means that the same URL can have
a different content depending on the previous requests. It would have
been better if the Vary header was set but the locale can be different
from the value coming from the Accept-Language anyway.
This is a BC break but fortunately, you can restore the 2.0 behavior by
creating a simple event listener that contains the logic removed by this
commit.
---------------------------------------------------------------------------
by travisbot at 2012-07-01T06:56:48Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1748659) (merged 009e30f0 into 2e356c1a).
---------------------------------------------------------------------------
by schmittjoh at 2012-07-01T08:15:46Z
How about using a cookie instead? It would remove the BC break, and also be possible to use a vary header?
---------------------------------------------------------------------------
by fabpot at 2012-07-01T09:13:44Z
The goal is to make Symfony as stateless as possible; introducing a cookie would defeat this goal.
---------------------------------------------------------------------------
by drak at 2012-07-01T09:19:37Z
@fabpot - thank you for bringing this to attention. I was meaning to do it a long time ago. The requested language is entirely a per request issue and must always be so. URLs must only ever return one content, and not multiple (e.g. different languages). The correct way to behave is to detect the language based on URL and failing that where a language is not requested, to look at the preferred language from the browser request and if available it can be redirected to that resource (e.g. /fr). This is what we do in Zikula. We have a further session based setting for "preferred language" which if set will override the browser default.
In summary:
1. If the language is specified in the GET request, return that language always. E.g. domain.com/fr/foo should return a French version of foo
2. If no language is specified in the GET request: first check the session for a preferred language, otherwise check the browser string for the preferred language and then if necessary, redirect to that resource. We have a setting which additionally say "always have language in URL, and don't put language code in URL for default language"
This means what in Zikula we only ever have one URL per language version of a page, but it still allows for users to set their preferred language which is taken in to account mainly when they visit the homepage (but in fact any page without a specific language in the request).
---------------------------------------------------------------------------
by drak at 2012-07-01T09:38:06Z
+1 on this PR. Basically the request locale should be in the Request object and calculated according to the applications preferences.
---------------------------------------------------------------------------
by schmittjoh at 2012-07-01T12:38:25Z
I agree that content must be detected based on the request, but I strongly disagree with relying entirely on the URL.
@fabpot, if you think about it using a cookie would still be stateless. There would be no state whatsoever, the detection would be entirely based on the request. Whether the language information is transmitted in the URL or as part of request headers is for the developer to decide eventually, at least IMO. My suggestion would just provide a default which is more BC.
---------------------------------------------------------------------------
by drak at 2012-07-01T20:08:50Z
@schmittjoh it's not entirely from the URL, there are browser preferences and also user defaults ca nalso available but the latter is slightly higher level. IMO it's not really Symfony's job here, it's application level specific. We have a pretty good working example of that in Zikula. Anyone can easily implement your own requirements with a listener.
What is absolutely clear however is it is wrong for one URL to deliver more than one version of any content.
---------------------------------------------------------------------------
by schmittjoh at 2012-07-01T21:16:52Z
I'm 100% for this change. My suggestion would just be more BC while still keeping Symfony2 stateless. Of course, it can be easily implemented in userland if we do not care about BC here.
Regarding different URLs per content, I do not think that this is our decision to make. Generally, developers should be able to make whatever content negotation they see fit. Whether they rely solely on the URL, or also take other request headers into account should not be limited by Symfony2.
---------------------------------------------------------------------------
by fabpot at 2012-07-02T10:37:26Z
I've added a paragraph in the UPGRADE file with a listener example that can be used to keep BC.
Before this commit, the current locale was stored in the session (if one
was already started). That way, for the next requests, even if the
request locale attribute was not set, the locale was "restored".
But this is a really bad practice as it means that the same URL can have
a different content depending on the previous requests. It would have
been better if the Vary header was set but the locale can be different
from the value coming from the Accept-Language anyway.
This is a BC break but fortunately, you can restore the 2.0 behavior by
creating a simple event listener that contains the logic removed by this
commit.
Commits
-------
4d09fe6 [Finder] '*' and '?' are considered are glob pattern rather than delimiters (fix#4664)
Discussion
----------
[Finder] '*' and '?' are considered are glob pattern rather than delimit...
...ers (fix#4664)
Commits
-------
f72ba0a Fixed detection of an active session
Discussion
----------
[WIP][HttpFoundation][Session] Fixed detection of an active session
Bug fix: yes
Feature addition: no
Backwards compatibility break: not sure
Symfony2 tests pass: no
Fixes the following tickets: #4529
Todo: Fix failing tests
License of the code: MIT
Documentation PR: ~
This fixes the problem when the session variable inside $request now has always data in it as it's now more powerful but this introduces the problem that the old way of detecting if a session is started or not doesn't work anymore.
---------------------------------------------------------------------------
by travisbot at 2012-06-09T21:53:17Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1578839) (merged 9ae13e12 into 6266b72d).
---------------------------------------------------------------------------
by drak at 2012-06-10T01:57:59Z
Sessions should be started implicitly. The SF auto_start config parameter controls the session listener to start the session.
---------------------------------------------------------------------------
by dlsniper at 2012-06-11T06:46:02Z
So this patch is correct then and I should continue the work on it?
---------------------------------------------------------------------------
by drak at 2012-06-11T07:51:39Z
@dlsniper - no it's not correct. The session should not be auto-started like this, @fabpot and I recently discussed it.
---------------------------------------------------------------------------
by dlsniper at 2012-06-11T07:52:55Z
@Drak, ok I'll remove the patch for auto_start then but the fix for start would still stand, right?
---------------------------------------------------------------------------
by drak at 2012-06-12T18:40:35Z
@dlsniper - I have no objection to the rest of the PR except for the autostart stuff. I've annotated for clarity :)
---------------------------------------------------------------------------
by travisbot at 2012-06-12T19:51:12Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1604158) (merged 3499980e into 37550d23).
---------------------------------------------------------------------------
by travisbot at 2012-06-12T19:52:00Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1604166) (merged dcc73071 into 37550d23).
---------------------------------------------------------------------------
by dlsniper at 2012-06-12T19:56:51Z
Seems Travis doesn't like the squashing of commits that I've did but the PR does pass the normal tests.
@drak is this good for merging now?
Thanks :)
---------------------------------------------------------------------------
by dlsniper at 2012-06-13T09:05:09Z
@fabpot this can be merged safely, I've just applied the patch on my production application and the patch is ok, it's just travis failing.
Thanks
---------------------------------------------------------------------------
by travisbot at 2012-06-13T09:23:46Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1608735) (merged 1a6eabd2 into 37550d23).
---------------------------------------------------------------------------
by travisbot at 2012-06-13T09:28:26Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1608758) (merged 4e3a93c8 into 37550d23).
---------------------------------------------------------------------------
by dlsniper at 2012-06-13T09:29:28Z
I've noticed that this is failing, I'll fix it later on today.
---------------------------------------------------------------------------
by travisbot at 2012-06-13T15:14:01Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1611541) (merged 5504c4b7 into 37550d23).
---------------------------------------------------------------------------
by drak at 2012-06-13T15:23:47Z
It's possible that other tests are failing not related to this PR. Run the tests on the current master, and try rebasing your branch to the current master also.
---------------------------------------------------------------------------
by dlsniper at 2012-06-13T15:44:22Z
I've just reminded why this is failing on builds, I can't do them locally because of this:
```
Installing dev dependencies
Your requirements could not be solved to an installable set of packages.
Problems:
- Problem caused by:
- Installation request for doctrine/orm [>= 2.2.0.0, < 2.4.0.0-dev]: Satisfiable by [doctrine/orm-2.2.2, doctrine/orm-2.2.1, doctrine/orm-2.2.0, doctrine/orm-2.2.x-dev, doctrine/orm-2.3.x-dev].
```
I'll try and install this somehow and see what's wrong with it.
---------------------------------------------------------------------------
by mvrhov at 2012-06-13T18:08:58Z
@dlsniper: as @stof said to me this should be resolved in latest versions of composer, but it seems that is not. The problem is that composer cannot figure out that you are on dev-master if you try to instal dev. dependencies on feature branch. Take a look at the .travis.yml file on how to do a proper dev vendors install.
cc @Seldaek
---------------------------------------------------------------------------
by dlsniper at 2012-06-13T23:08:53Z
@mvrhov Thanks for pointing this out.
@drak I still got two tests not passing but I'm not sure how to fix them as adding $session->start() will either fail with the message that the session has already been started, the headers_sent() call which returns true. Any help with them will be greatly appreciated. Thanks!
Here is what the HttpKernel tests are returning:
```
There were 2 failures:
1) Symfony\Component\HttpKernel\Tests\EventListener\LocaleListenerTest::testDefaultLocaleWithSession
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'es'
+'fr'
/var/www/symfony-orig/src/Symfony/Component/HttpKernel/Tests/EventListener/LocaleListenerTest.php:51
2) Symfony\Component\HttpKernel\Tests\EventListener\LocaleListenerTest::testLocaleFromRequestAttribute
Expectation failed for method name is equal to <string:set> when invoked 1 time(s).
Method was expected to be called 1 times, actually called 0 times.
FAILURES!
Tests: 263, Assertions: 1025, Failures: 2, Skipped: 10.
```
---------------------------------------------------------------------------
by travisbot at 2012-06-13T23:42:59Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1614883) (merged 1004b7c0 into c07e9163).
---------------------------------------------------------------------------
by travisbot at 2012-06-13T23:53:06Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1614897) (merged f72ba0a2 into c07e9163).
---------------------------------------------------------------------------
by dlsniper at 2012-06-16T20:14:41Z
@stof / @vicb Hi, do either of you think that you can either point me out to the right direction for fixing this either ping someone else for home help as @drak doesn't seem available for this and at the moment I'm pretty much clueless in what direction I should take this fix.
Thanks!
---------------------------------------------------------------------------
by dlsniper at 2012-06-19T14:16:29Z
ping @fabpot Can you please provide some input on this one as I'm a bit stuck and seems noone else is available.
---------------------------------------------------------------------------
by drak at 2012-06-20T10:24:43Z
fyi - I'll be able to look again in a few days
---------------------------------------------------------------------------
by fabpot at 2012-07-01T07:53:28Z
I'm +1 to add the `isStarted()` method, but -1 for the change of `Request::hasSession`.
---------------------------------------------------------------------------
by drak at 2012-07-01T09:06:15Z
@fabpot, I agree. `hasSession()` should not be changed, it's semantically incorrect to make it return effectively "hasActiveSession".
Commits
-------
7464dcd added phpdoc
c413e7b [Routing] remove RequestContextAwareInterface from RequestMatcherInterface
921be34 [Routing] fix phpdoc
Discussion
----------
[Routing] RequestMatcherInterface doesn't need context
Matchers that implement RequestMatcherInterface should match a Request, thus they don't need the request context.
---------------------------------------------------------------------------
by travisbot at 2012-06-14T21:39:48Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1624496) (merged f5ff1fe0 into 7c91ee57).
---------------------------------------------------------------------------
by schmittjoh at 2012-06-15T13:32:59Z
I think it makes sense to remove the RequestContext from the RequestMatcher.
---------------------------------------------------------------------------
by travisbot at 2012-06-15T15:54:28Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1628931) (merged 7464dcd2 into f881d282).
---------------------------------------------------------------------------
by Tobion at 2012-06-26T12:32:06Z
Anything missing?
Commits
-------
c1e4166 moved create of default form label to view layer
Discussion
----------
move create of default form label to view layer
A small optimization if you provide custom labels in the view layer (i.e. `{{ form_label(form.name, 'Your name') }}`
```
Bug fix: no
Feature addition: no
Backwards compatibility break: yes
Symfony2 tests pass: yes
Fixes the following tickets: ~
Todo: ~
License of the code: MIT
Documentation PR: ~
```
---------------------------------------------------------------------------
by travisbot at 2012-06-24T14:45:17Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1694310) (merged 37f0b774 into 0d4b02e4).
---------------------------------------------------------------------------
by travisbot at 2012-06-24T15:03:44Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1694418) (merged c1e4166e into 0d4b02e4).
Commits
-------
911db69 [FrameworkBundle] Typo fix
19eeac8 [HttpFoundation] Removed erroneous reliance on session.auto_start
dcac5d7 [HttpFoundation] Corrected docblocks and properties.
1fd66f3 [FrameworkBundle] Remove 'auto_start' configuration parameter.
Discussion
----------
[HttpFoundation] Remove session start on demand
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
This removes false reliance on ini directive `session.auto_start` to allow a session to start when session bags are accessed before the `SessionStorageInterface` is started.
Sessions must be explicitly started in all circumstances.
---------------------------------------------------------------------------
by stloyd at 2012-06-13T07:22:24Z
@drak Shouldn't you add note about this change in upgrade file ?
---------------------------------------------------------------------------
by drak at 2012-06-13T15:13:37Z
It's a development version change, so not really. But saying that, I have a bunch of documentation to amend when this gets merged and at that time I'll make sure the changelogs and upgrading are up to date as part of that.
---------------------------------------------------------------------------
by dlsniper at 2012-06-13T21:57:28Z
@drak If this change will kick in what does one user of Symfony 2 Standard must do in order to keep compat with this merge? I see that you said you'll update the docs but until that happens some might upgrade their app directly to master :)
Thanks.
---------------------------------------------------------------------------
by drak at 2012-06-14T01:36:04Z
@dlsniper - nothing. This corrects a bug and inconsistency.
---------------------------------------------------------------------------
by travisbot at 2012-06-29T17:48:42Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1739033) (merged 19eeac88 into 62100f1a).
---------------------------------------------------------------------------
by drak at 2012-06-29T17:55:13Z
@fabpot ping. The failing Travis is nothing to do with this PR (see the travis logs).
---------------------------------------------------------------------------
by travisbot at 2012-06-29T20:39:43Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1739805) (merged 911db69b into 62100f1a).
Commits
-------
df8d94e added Request::getSchemeAndHttpHost() and Request::getUserInfo() (closes#4312, refs #3416, refs #3056)
Discussion
----------
added Request::getSchemeAndHttpHost() and Request::getUserInfo()
see #4312
---------------------------------------------------------------------------
by travisbot at 2012-06-28T15:22:03Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1730172) (merged 598bd56f into 0d275701).
---------------------------------------------------------------------------
by Seldaek at 2012-06-28T15:22:35Z
Why not just `getSchemeAndHost`? That sounds long enough, and is fairly explicit given the context.
---------------------------------------------------------------------------
by fabpot at 2012-06-28T15:25:34Z
@Seldaek because (and that's probably unfortunate) we have both `getHost()` and `getHttpHost()`. The former does not include the port whereas the latter does.
---------------------------------------------------------------------------
by Seldaek at 2012-06-28T15:26:42Z
Ok makes sense.
---------------------------------------------------------------------------
by travisbot at 2012-06-28T16:11:16Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1730630) (merged df8d94e3 into 884a8264).
Commits
-------
b217897 [HttpFoundation] Complete Request::overrideGlobals
Discussion
----------
[2.2][HttpFoundation] complete Request::overrideGlobals
Bug fix: yes
Feature addition: yes
Backwards compatibility break: yes
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/stealth35/symfony.png?branch=populate_files)](http://travis-ci.org/stealth35/symfony)Fixes the following tickets: -
Todo: -
---------------------------------------------------------------------------
by stealth35 at 2011-12-15T14:20:36Z
Thank guys, should be better now
---------------------------------------------------------------------------
by stealth35 at 2011-12-15T16:14:40Z
@stloyd ✌️
---------------------------------------------------------------------------
by stloyd at 2011-12-15T16:22:48Z
@stealth35 You should update also [`RequestTest`](https://github.com/symfony/symfony/blob/master/tests/Symfony/Tests/Component/HttpFoundation/RequestTest.php#L623) which would show you typos you have few mins ago ;-)
---------------------------------------------------------------------------
by stealth35 at 2011-12-15T16:57:16Z
@stloyd done, thanks for your review
---------------------------------------------------------------------------
by canni at 2011-12-15T20:27:28Z
As this is bugfix, this shouldn't be re-based against 2.0?
---------------------------------------------------------------------------
by stealth35 at 2011-12-15T20:50:05Z
@canni It's more a forget feature, I tagged it to bug fix because of the `FIXME`, and it's add a method, IMO there is no rush
---------------------------------------------------------------------------
by canni at 2011-12-15T20:55:28Z
@stealth35 no rush at all, I was just curious :)
---------------------------------------------------------------------------
by vicb at 2012-01-06T16:24:31Z
I would say "Backwards compatibility break: yes" i.e.tests have been modified.
---------------------------------------------------------------------------
by stealth35 at 2012-01-06T16:36:15Z
@vicb the tests are not modified, just some addition
---------------------------------------------------------------------------
by vicb at 2012-01-06T16:40:30Z
@stealth35 https://github.com/symfony/symfony/pull/2892/files#L2R46
---------------------------------------------------------------------------
by stealth35 at 2012-01-06T17:13:07Z
@vicb it's not a compatibility break ...
---------------------------------------------------------------------------
by vicb at 2012-01-06T17:19:35Z
Well, same inputs, different outputs, this is a compatibility break to me.
But however it is named we should not change the behavior of this class; Client values are values as passed by the client you should no try to guess them.
---------------------------------------------------------------------------
by stealth35 at 2012-01-06T17:32:41Z
@vicb the behavior ? when you change the GET or POST values with `HttpFoundation\*Bag` (replace/set) it's the same thing
---------------------------------------------------------------------------
by vicb at 2012-01-06T17:35:39Z
I am referring to the difference in behavior between the current implementation and the version in this PR.
They do not behave the same and that's why the tests have been modified.
---------------------------------------------------------------------------
by fabpot at 2012-02-14T23:33:42Z
any progress on this PR?
---------------------------------------------------------------------------
by vicb at 2012-02-15T07:48:34Z
To make it clear I strongly disagree with the modifs in this PR. Available to help if needed.
---------------------------------------------------------------------------
by stealth35 at 2012-02-15T09:24:50Z
@fabpot Well, `move_uploaded_file` will not work so I have some doubt about this, @vicb just don't like the fact to add the mime type type and the size, it's not an important thing, I can remove it we can discuss later about that,
@vicb the last thing to do, it's to recreate the weird php $_FILES array
---------------------------------------------------------------------------
by vicb at 2012-02-23T17:11:29Z
@stealth35 I don't think we can bypass the `move_uploaded_file` security check - which is good. Is there any interest in this PR w/o this ?
If no we should just update phpDoc comment and remove the FIXME (meaning we can not override the `$_FILES`).
---------------------------------------------------------------------------
by stealth35 at 2012-03-10T16:13:14Z
@vicb updated
---------------------------------------------------------------------------
by vicb at 2012-03-11T09:38:20Z
@stealth35 what about adding some unit tests ?
---------------------------------------------------------------------------
by stealth35 at 2012-03-11T11:06:44Z
> what about adding some unit tests ?
@vicb `request_order` is PHP_INI_PERDIR, so I don't really how to handle this
---------------------------------------------------------------------------
by vicb at 2012-03-11T11:15:55Z
by creating a `protected getRequestOrder()` method or something like this ?
---------------------------------------------------------------------------
by stealth35 at 2012-03-11T11:36:11Z
it's too bad to create a method just for this, I can make cond in the test
``` php
<?php
$request->initialize(array('get' => 'foo'), array('post' => 'bar'));
$request->overrideGlobals();
$request_order = ini_get('request_order');
if ('gp' === $request_order) {
$this->assertEquals(array('get' => 'foo', 'post' => 'bar'), $_REQUEST);
} else if ('pg' === $request_order) {
$this->assertEquals(array('post' => 'bar', 'get' => 'foo'), $_REQUEST);
}
// ...
```
---------------------------------------------------------------------------
by vicb at 2012-03-11T12:02:17Z
This would only test one case.
Some thoughts about your snippet:
* The init should probably be `$request->initialize(array('foo' => 'get'), array('foo' => 'post'));`,
* `$request_order` does not take into account `variables_order.ini`,
* missing `strtolower`
---------------------------------------------------------------------------
by fabpot at 2012-03-23T21:21:59Z
What's the status of this PR? What needs to be done before merging?
---------------------------------------------------------------------------
by stealth35 at 2012-03-24T18:33:42Z
@fabpot missing some tests, it's not essay to tests an `ini`directive, @vicb recommand a `getRequestOrder` method, it's not a bad idea
---------------------------------------------------------------------------
by vicb at 2012-03-24T20:06:53Z
and change `$request_order` to `$requestOrder` as suggested by @henrikbjorn I can't find where
---------------------------------------------------------------------------
by stealth35 at 2012-06-14T12:42:25Z
I need help for testing
``` php
<?php
$request = $this->getMock('Request', array('overrideGlobals', 'initialize'));
$request->expects($this->any())
->method('getRequestOrder')
->will($this->returnValue('gp'));
$request->initialize(array('foo' => 'fooget'), array('foo' => 'foopost'));
$request->overrideGlobals();
$this->assertEquals(array_merge($_GET, $_POST), $_REQUEST);
```
Commits
-------
a609d55 [Locale] fixed StubIntlDateFormatter to behave like the ext/intl implementation
Discussion
----------
[2.0][WIP][Locale] StubIntlDateFormatter should use the TZ environment variable instead of the PHP's date.timezone setting
Bug fix: yes
Feature addition: no
Backwards compatibility break: yes
Symfony2 tests pass: yes
Fixes the following tickets: #3841
Todo: Check ext/intl changes for the next PHP 5.4 release
License of the code: MIT
![Build Status](https://secure.travis-ci.org/eriksencosta/symfony.png?branch=issue-3841)
There were changes that need to be investigated for the next PHP 5.4 release:
- [php-src @ eb346ef](eb346ef0f4)
- [php-src @ 888e77f](888e77ff73)
A strong evidence of bug in ext/intl was found while testing `StubIntlDateFormatter`. See the comment available at the docblock of `StubIntlDateFormatterTest`'s `testFormatWithDefaultTimezoneIntlShouldUseTheTzEnvironmentVariableWhenAvailable()` method and the following Gist for test scripts: https://gist.github.com/2946342
Maybe the upcoming PHP 5.4 release fix this bug since it will use the PHP's `date.timezone` when no time zone is provided. If confirmed the bug, it will need to be reported to the ext/intl maintainers.
---------------------------------------------------------------------------
by travisbot at 2012-06-18T05:02:05Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1644431) (merged a609d55c into cd0aa378).
---------------------------------------------------------------------------
by fabpot at 2012-06-28T14:09:08Z
@eriksencosta Now that PHP 5.4.4 is out, our tests for the Locale components are broken. Is this PR ready to be merged?
---------------------------------------------------------------------------
by eriksencosta at 2012-06-28T14:53:14Z
@fabpot the failed test case seems unrelated to this issue. I will debug it.
Failed test: `Locale\Tests\Stub\StubNumberFormatterTest::testParseTypeInt64IntlWith32BitIntegerInPhp32Bit`
Recent build job: http://travis-ci.org/#!/symfony/symfony/jobs/1729618
I just need to confirm mine todo note. If you want, merge it, I'll track this and make a new PR if needed (possibly only to remove the TODO note.)
Commits
-------
9d730be Method rename and phpdoc fixes
e01a95e Add a set of unit tests for the ExprBuilder class
Discussion
----------
Add a set of unit tests for the Config/ExprBuilder class
---------------------------------------------------------------------------
by travisbot at 2012-06-13T14:55:31Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1611400) (merged e01a95e1 into c07e9163).
---------------------------------------------------------------------------
by jeanmonod at 2012-06-13T22:04:52Z
Hi there,
I write all these tests because I'll come latter with an other PR that extend the ExprBuilder functionality. But I'm not sure I use the best way for testing this class. It's working, but some refactoring suggestions will be welcome...
@stof and @schmittjoh what do you think about that?
Commits
-------
6b5b625 [Form] added FormBuilderInterface in Tests namespace, so as to enable easy mocking
Discussion
----------
[Form] added FormBuilderInterface in Tests namespace, so as to enable ea...
...sy mocking
Adding a ``FormBuilderInterface`` in the ``Tests`` namespace, along same lines as ``FormInterface`` already there, for the purposes of being able to mock it straightforwardly (as ``FormBuilderInterface`` extends ``\Traversable``, and therefore creating a mock in PHPUnit causes a fatal error that the mock ``must implement interface Traversable as part of either Iterator or IteratorAggregate``). Currently in the tests a ``FormBuilder`` object is used with a mock event dispatcher and form factory passed into the constructor, but this is long-winded to have to do in tests for code outside the framework.
---------------------------------------------------------------------------
by travisbot at 2012-06-13T22:03:12Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1613957) (merged 6b5b625a into c07e9163).
---------------------------------------------------------------------------
by bschussek at 2012-06-14T07:22:33Z
👍
Commits
-------
9fabb3d [Form] Camelize 'add' and 'remove' methods in the PropertyPath
Discussion
----------
[Form] Camelize 'add' and 'remove' methods in the PropertyPath
Bug fix: yes
Feature addition: no
Backwards compatibility break: yes
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/acasademont/symfony.png?branch=camelize_property_path_add_and_remove_methods)](http://travis-ci.org/acasademont/symfony)
Fixes the following tickets: -
License of the code: MIT
Documentation PR: -
This issue camelizes the 'add' and 'remove' methods, as it is already done with the 'set' method.
This fixes a problem with properties like 'custom_messages', where the 'add' and 'remove' methods are 'addCustom_message' and 'removeCustom_message' instead of 'addCustomMessage' and 'removeCustomMessage'.
---------------------------------------------------------------------------
by acasademont at 2012-06-27T18:16:36Z
Seems the tests are failing due to some unrelated test in PHP 5.3.14 and PHP 5.4. PHP 5.3.3 works fine
---------------------------------------------------------------------------
by travisbot at 2012-06-27T18:38:39Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1722847) (merged 9fabb3dc into d0e15472).
This issue camelizes the 'add' and 'remove' methods,
as it is already done with the 'set' method.
This fixes a problem with properties like 'custom_messages',
where the 'add' and 'remove' methods are 'addCustom_message'
and 'removeCustom_message' instead of 'addCustomMessage'
and 'removeCustomMessage'.
Commits
-------
1227cc2 add escapeValue to ParameterBagInterface
Discussion
----------
add escapeValue to ParameterBagInterface
#4465
---------------------------------------------------------------------------
by travisbot at 2012-05-30T18:01:47Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1479725) (merged 1227cc2a into 49e213ce).
---------------------------------------------------------------------------
by drak at 2012-05-31T02:42:44Z
@bschussek - there are a few form tests failing that seem to have been merged into master and thus all other unrelated PRs are failing their travis build checks. @fabpot
Commits
-------
4d0cfbb Fix Italian translations in Validator
Discussion
----------
Fix Italian translation in Validator
I hope this time it'll work!
---------------------------------------------------------------------------
by travisbot at 2012-06-26T11:08:19Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1709695) (merged 4d0cfbb6 into 42212394).
---------------------------------------------------------------------------
by fabpot at 2012-06-26T15:17:30Z
That's weird. It still does not appear on your account: https://github.com/albyrock87/symfony is a 404.
---------------------------------------------------------------------------
by henrikbjorn at 2012-06-26T15:20:51Z
he renamed the repository instead i think https://github.com/albyrock87/symfony-fix-form-validation-italian
Commits
-------
81d0552 Adding the database to the DSN we are sending to the MongoDB server
Discussion
----------
Adding the database to the DSN we are sending to the MongoDB server
Adding the database to the DSN we are sending to the MongoDB server.
According to the [documentation from PHP](http://be2.php.net/manual/en/mongo.construct.php) the database will default to admin if it isn't specified in this DSN. Unfortunately the username we're trying to login with shouldn't have access to this database.
---------------------------------------------------------------------------
by travisbot at 2012-06-23T13:54:28Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1688817) (merged 2251be90 into 0d4b02e4).
---------------------------------------------------------------------------
by travisbot at 2012-06-25T11:34:17Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1700214) (merged 45d0748b into 0d4b02e4).
---------------------------------------------------------------------------
by Wotre at 2012-06-25T12:16:49Z
It looks to me like travisbot failed because of an error in the routing system that was fixed in c67cf8b56b, not because of the code I altered.
---------------------------------------------------------------------------
by travisbot at 2012-06-25T16:45:12Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1702410) (merged aa659463 into 0d4b02e4).
---------------------------------------------------------------------------
by fabpot at 2012-06-26T05:07:37Z
Can you squash your commits before I merge? Thanks.
---------------------------------------------------------------------------
by Wotre at 2012-06-26T12:02:02Z
I think I've managed to do that, but correct me if I've done something wrong :)
---------------------------------------------------------------------------
by travisbot at 2012-06-26T12:05:19Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1710220) (merged dcb79089 into 0d4b02e4).
---------------------------------------------------------------------------
by fabpot at 2012-06-26T12:14:28Z
@Wotre Unfortunately, that's wrong. You can read how to do that in the contrib docs: http://symfony.com/doc/current/contributing/code/patches.html#rework-your-patch
---------------------------------------------------------------------------
by Wotre at 2012-06-26T12:37:59Z
Thanks for the help, looks like I forgot the -f when pushing. It should be okay now
Commits
-------
9a74b85 [HttpFoundation] CS and phpdoc fixes
Discussion
----------
[HttpFoundation] CS and phpdoc fixes
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
Hey
---------------------------------------------------------------------------
by travisbot at 2012-06-02T00:30:49Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1504379) (merged 2f0117f2 into 1541fe26).
---------------------------------------------------------------------------
by fabpot at 2012-06-25T14:53:18Z
@adrienbrault Can you have a look at my comments?
---------------------------------------------------------------------------
by adrienbrault at 2012-06-25T16:24:49Z
Done! Sorry for the delay
---------------------------------------------------------------------------
by travisbot at 2012-06-25T17:50:24Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1702850) (merged 9a74b851 into 58436de1).
Commits
-------
c350944 Add the Countable interface to RouteCollection.
Discussion
----------
Add the Countable interface to RouteCollection.
Since RouteCollection is a fancy-pants array of Routes, and it already is iterable, it would be nice if it were also countable.
There may be optimizations to be had here, but I figure this is a decent start. There should be no BC breaks here, just some DX convenience.
---------------------------------------------------------------------------
by Crell at 2012-06-23T17:01:43Z
You Symfony people and your gratuitous whitespace... :-P
Both fixed and rebased.
---------------------------------------------------------------------------
by travisbot at 2012-06-23T17:25:31Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1689898) (merged 6b588eb3 into 0d4b02e4).
---------------------------------------------------------------------------
by travisbot at 2012-06-23T17:26:06Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1689902) (merged abd74cf5 into 0d4b02e4).
---------------------------------------------------------------------------
by travisbot at 2012-06-23T18:10:57Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1689975) (merged c3509446 into 0d4b02e4).
---------------------------------------------------------------------------
by mvrhov at 2012-06-24T07:11:12Z
@Crell running [php-cs-fixer](http://cs.sensiolabs.org/) on your changes will prevent you from being stoffed :P about CS
---------------------------------------------------------------------------
by stof at 2012-06-24T09:34:24Z
@mvrhov depends. The CS fixer will replace tabs with 4 spaces, but it will not fix it if using 2 spaces instead of 4. it cannot fix everything
---------------------------------------------------------------------------
by vicb at 2012-06-24T17:14:14Z
@Crell what is your use case ?
---------------------------------------------------------------------------
by fabpot at 2012-06-25T06:59:00Z
I'm not opposed to the change but what's the use case?
---------------------------------------------------------------------------
by lsmith77 at 2012-06-25T11:22:01Z
This is semi related to ideas we have for the dynamic router in the CMF. The 2 main reasons for the existence of the dynamic router are:
1) the fact that end users should be able to define new routes
2) the fact that there might just be too many routes to dump those efficiently to PHP
Now in some cases despite 1) the users might still want to dump key routes or even all routes as part of some deployment process to mod_rewrite or PHP when moving content from a staging database to a production database for better performance and reduced load on the database server.
Also even with the dynamic router it would be good to have tools available like ``app/console router:debug``.
But for both the use case of dumping some/all routes or when listing routes it might be necessary to implement some stop gap solutions to first check if this wouldn't lead to a too big collection. So it could be useful to be able to use whatever efficient solution the dynamic data store has for determining the count before starting to actually read the data from the data source.
Commits
-------
241aa92 [Config] added existence check to some resource methods
56b60c8 [Config] use is_file in FileResource::exists()
ff9c132 [Config] added type prefixes to resource ids
ece489f [Config] skip dots in getFilteredChilds() (fixes test suite on Linux)
c9eaa72 [Config] made ResourceInterface extends Serializable
d7c24eb [Config] added new methods and their tests to File and Directory resources
9fe0d00 [Config] update FileResourceTest
45a45ba [Config] updated DirectoryResource tests
1f9ba38 [Config] getFilteredChildResources() method added to DirectoryResource
6b39688 [Config] moved DirectoryResource childs retrieving to the special getFilteredChilds method
45df2e6 [Config] updated resources API to be more explicit
Discussion
----------
[Config] additions from ResourceWatcher
Extracted `Config` component changes from `ResourceWatcher` component.
---------------------------------------------------------------------------
by travisbot at 2012-06-20T08:27:30Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1662786) (merged 241aa92c into 092b5dde).
Commits
-------
8797b74 [Validator] added missing dutch translations
Discussion
----------
[Validator] added missing dutch translations
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets:
Todo:
License of the code: MIT
Documentation PR:
---------------------------------------------------------------------------
by travisbot at 2012-06-20T08:27:17Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1662776) (merged aa0a7e83 into 092b5dde).
---------------------------------------------------------------------------
by ricbra at 2012-06-20T09:55:45Z
@Burgov Thanks for the feedback. Fixed all typos & added PR description according to the documentation on Symfony site.
---------------------------------------------------------------------------
by travisbot at 2012-06-20T09:59:38Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1663352) (merged 8797b743 into 092b5dde).
* fixed DELETED event when starting to watch a file that does not exist yet
* fixed files that are deleted and then re-created
Conflicts:
src/Symfony/Component/ResourceWatcher/StateChecker/ResourceStateChecker.php
tests/Symfony/Tests/Component/ResourceWatcher/StateChecker/DirectoryStateCheckerTest.php
tests/Symfony/Tests/Component/ResourceWatcher/StateChecker/FileStateCheckerTest.php
Commits
-------
3eb67fc [2.1][Component][Finder] $this->current() fix
Discussion
----------
[2.1][Component][Finder] $this->current() fix
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/gajdaw/symfony.png?branch=master)](http://travis-ci.org/gajdaw/symfony)
Fixes the following tickets: -
Todo: -
License of the code: MIT
One method to resolve `->in("ftp://...")` problem is to create `RecursiveDirectoryFtpIterator`.
(Details: [issue 3585](https://github.com/symfony/symfony/issues/3585))
I think that all filters should access the information about current item calling `current()` or `getInnerIterator()`. Otherwise it will not work if we replace `RecursiveDirectoryIterator` with ftp iterator inside `Finder`.
I'm not sure if that should go to 2.0 or 2.1 branch.
---------------------------------------------------------------------------
by travisbot at 2012-05-19T09:20:19Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1373361) (merged 9f247921 into 58b92453).
---------------------------------------------------------------------------
by gajdaw at 2012-05-19T10:51:10Z
Probably it should go to master branch, because it improves commit done to master:
f2fea97460
---------------------------------------------------------------------------
by travisbot at 2012-05-19T11:26:14Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1373982) (merged f9d1db8c into 58b92453).
---------------------------------------------------------------------------
by travisbot at 2012-05-19T11:51:25Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1374031) (merged f1b4b4f7 into 58b92453).
---------------------------------------------------------------------------
by travisbot at 2012-05-19T12:48:17Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1374303) (merged b6d073da into 58b92453).
---------------------------------------------------------------------------
by travisbot at 2012-05-19T13:28:18Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1374568) (merged fd144c96 into 58b92453).
---------------------------------------------------------------------------
by travisbot at 2012-05-19T13:35:38Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1374609) (merged 89a8d851 into 58b92453).
---------------------------------------------------------------------------
by travisbot at 2012-05-21T04:31:46Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1385764) (merged 0d5b8322 into 58b92453).
---------------------------------------------------------------------------
by travisbot at 2012-05-21T07:21:56Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1386545) (merged 3eb67fca into 1407f112).
---------------------------------------------------------------------------
by stof at 2012-06-09T13:24:14Z
seems good
Commits
-------
a20fc68 Merge pull request #1 from SamsonIT/FilesystemExceptions
8eca661 [FileSystem] explains possible failure of symlink creation in windows
b1f8744 Add Changelog BC Break note
24eb396 [Filesystem] Added few new behaviors:
Discussion
----------
[Filesystem] Consistence and enhancements for Filesystem
Bug fix: no
Feature addition: yes
Backwards compatibility break: **yes**
Symfony2 tests pass: yes
Fixes the following tickets: None
License of the code: MIT
This PR adds features and introduce a backward compatibility break.
features :
- whenever an action fails, a \RuntimeException is thrown
- add access to the second and third arguments of ``touch`` function
- add a recursive option for chmod
- add a chown method
- add a chgrp method
The backward compatibility break happens in the mkdir method : Before this PR, a boolean is returned ; true if all directories were created, false otherwise.
It now returns nothing.
---------------------------------------------------------------------------
by travisbot at 2012-05-18T14:26:42Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1367000) (merged 83cdd622 into 1e15f210).
---------------------------------------------------------------------------
by fabpot at 2012-05-20T02:40:28Z
To be consistent, we should throw exception whenever some operation fails.
---------------------------------------------------------------------------
by romainneutron at 2012-05-20T21:10:23Z
I fix the consistency ; mkdir now throws an exception if a directory creation fails.
This introduce a BC break, see PR message which has been updated with all features and BC break.
Added chgrp and chown methods
Add options for touch
Add recursive option for chmod
---------------------------------------------------------------------------
by travisbot at 2012-05-20T21:11:47Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1383619) (merged a4d1eeb8 into 1407f112).
---------------------------------------------------------------------------
by travisbot at 2012-05-22T10:49:06Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1399027) (merged 7e14b6bd into 517ae43f).
---------------------------------------------------------------------------
by travisbot at 2012-05-22T10:58:10Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1399083) (merged 71852653 into 517ae43f).
---------------------------------------------------------------------------
by travisbot at 2012-05-22T11:18:44Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1399194) (merged 7645bad3 into 517ae43f).
---------------------------------------------------------------------------
by travisbot at 2012-05-23T18:21:47Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1414091) (merged b049d5b1 into 517ae43f).
---------------------------------------------------------------------------
by travisbot at 2012-05-23T18:26:19Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1414123) (merged 34903466 into 517ae43f).
---------------------------------------------------------------------------
by travisbot at 2012-05-29T16:07:26Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1467173) (merged b1d1eb2e into adf07f1e).
---------------------------------------------------------------------------
by travisbot at 2012-05-29T16:19:38Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1467261) (merged 42015ffa into adf07f1e).
---------------------------------------------------------------------------
by romainneutron at 2012-06-01T14:30:45Z
Any news about this PR ?
---------------------------------------------------------------------------
by stloyd at 2012-06-08T09:57:39Z
@romainneutron You need to [squash](http://www.silverwareconsulting.com/index.cfm/2010/6/6/Using-Git-Rebase-to-Squash-Commits) your commits, and add more proper message in squashed commit i.e.:
> [Filesystem] Added few new behaviors:
* whenever an action fails, a `RuntimeException` is thrown
* add access to the second and third arguments of `touch()` function
* add a recursive option for `chmod()`
* add a `chown()` method
* add a `chgrp()` method
> BC break: `mkdir()` function throw exception in case of failture instead of returning Boolean value.
---------------------------------------------------------------------------
by romainneutron at 2012-06-08T10:59:55Z
@stloyd squash done !
---------------------------------------------------------------------------
by travisbot at 2012-06-08T11:26:20Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1565540) (merged 8f55ddb6 into f8e68e58).
---------------------------------------------------------------------------
by travisbot at 2012-06-08T11:41:45Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1566247) (merged 880312b6 into f8e68e58).
---------------------------------------------------------------------------
by romainneutron at 2012-06-09T11:42:24Z
I've added documentation to the Filesystem component : https://github.com/symfony/symfony-docs/pull/1439
---------------------------------------------------------------------------
by travisbot at 2012-06-09T16:47:20Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1577754) (merged 5647ad41 into f8a09db5).
---------------------------------------------------------------------------
by stloyd at 2012-06-13T14:47:31Z
@romainneutron You probably need to rebase your code as some changes were merge into master for `Filesystem`.
---------------------------------------------------------------------------
by romainneutron at 2012-06-13T15:17:31Z
@stloyd rebase OK !
by the way, do you have any idea when/if this PR will be merged ?
---------------------------------------------------------------------------
by travisbot at 2012-06-13T15:20:44Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1611591) (merged c8b86c68 into c07e9163).
---------------------------------------------------------------------------
by fabpot at 2012-06-16T16:40:50Z
You need to add a note about the BC breaks in the CHANGELOG file.
---------------------------------------------------------------------------
by fabpot at 2012-06-16T16:43:20Z
Also, instead of using `\RuntimeException`, I would create a custom exception like we have done in other components (an interface + a RuntimeException that implements the interface and extends \RuntimeException). The exception name can be something like `IOException`.
---------------------------------------------------------------------------
by travisbot at 2012-06-18T10:11:20Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1645757) (merged 925a8234 into 0b8b76bf).
---------------------------------------------------------------------------
by stloyd at 2012-06-18T10:14:52Z
@fabpot Anything blocking merge of this PR ? (tests are failing because of issue in master, not releted to this PR)
---------------------------------------------------------------------------
by romainneutron at 2012-06-18T10:29:20Z
@fabpot @stloyd the latest push was just a rebase push for PR 4577 (https://github.com/symfony/symfony/issues/4577)
I'm currently fixing the Exception and changelog things, I'll push very soon
---------------------------------------------------------------------------
by romainneutron at 2012-06-18T10:44:38Z
@fabpot I've added the exception and the exception interface, add the changelog info
---------------------------------------------------------------------------
by travisbot at 2012-06-18T10:53:34Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1645981) (merged 634d6fb9 into 0b8b76bf).
---------------------------------------------------------------------------
by romainneutron at 2012-06-18T11:08:43Z
As reported by @stloyd the PR is failing due to an issue in the master, I re-push and trig the PR build when this issue is solved
---------------------------------------------------------------------------
by travisbot at 2012-06-18T11:16:58Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1646006) (merged 2f65945a into 0b8b76bf).
Commits
-------
bb87a71 [Console] Use 'mode' command to detect terminal size on Windows
Discussion
----------
[Console] Use 'mode' command to detect terminal size on Windows
This PR uses the windows 'mode' command to get the terminal height and width on windows.
I've left in the ANSICON stuff but I'm not sure if that's needed after this.
---------------------------------------------------------------------------
by travisbot at 2012-06-16T10:37:25Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1634120) (merged a490b6ec into f881d282).
---------------------------------------------------------------------------
by fabpot at 2012-06-16T16:17:24Z
ping @Seldaek
---------------------------------------------------------------------------
by Seldaek at 2012-06-16T17:03:22Z
It's a good addition, but you should still use ANSICON first if it's available. mode returns the buffer size and not the window size, which means the lines are not the real terminal height, but the buffer setting. ANSICON has both informations and hence allows you to be more correct. For columns/width both offer equally good information since the buffer size is not bigger than the window.
---------------------------------------------------------------------------
by fabpot at 2012-06-17T10:41:21Z
Can you squash your commits before I merge? Thanks.
---------------------------------------------------------------------------
by jcowgill at 2012-06-17T13:23:01Z
Yes that's fine.
---------------------------------------------------------------------------
by fabpot at 2012-06-18T12:04:43Z
@jcowgill there are still 3 commits.
---------------------------------------------------------------------------
by jcowgill at 2012-06-18T14:59:51Z
Woops, it's done now
Commits
-------
441c098 [HttpKernel] Remove unneeded test class (suggestion by @stof)
e49b714 [Routing] Fix component 'standalone' testsuite
0b0fe74 [HttpKernel] Fix component 'standalone' testsuite
8ff2838 [Form] Fix component 'standalone' testsuite
Discussion
----------
Fix component testsuites
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/asm89/symfony.png?branch=fix-component-testsuites)](http://travis-ci.org/asm89/symfony)
License of the code: MIT
The testsuites of some components would crash when running them seperately (from their own directory for example). This PR fixes that by skipping some additional tests if dependencies for the test aren't met. In the case of `HttpKernel` there was also a helper class in `KernelTest` that is now moved to it's own file. This was needed because the class implemented the `BundleInterface`, which depends on the `DependencyInjection` component. The autoloader would then crash the complete test suite.
I sent this PR to the `master` branch since the tests have been moved and splitted some while ago, before it wasn't really possible to have this situation. If for maintainability reasons it should still be send to the 2.0 branch, let me know!
---------------------------------------------------------------------------
by travisbot at 2012-06-18T08:25:58Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1645386) (merged f9b8ea82 into 0b8b76bf).
---------------------------------------------------------------------------
by travisbot at 2012-06-18T08:46:33Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1645448) (merged 441c0983 into 0b8b76bf).
- add a IOException and a main filesystem exception interface
- whenever an action fails, an IOException is thrown
- add access to the second and third arguments of touch() function
- add a recursive option for chmod()
- add a chown() method
- add a chgrp() method
- Switch the 'unlink' global function in Filesystem::symlink to Filesystem::remove.
BC break: mkdir() function now throws exception in case of failure instead of returning Boolean value.
- Missing dependency in one file
- Move helper class out of KernelTest because it implemented an
interface that depends on another component (thus would crash the
testsuite if invoked)
Commits
-------
38cad9d [Filesystem] added exists method
Discussion
----------
[Filesystem] added exists method
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets:
Todo:
License of the code: MIT
Documentation PR:
---------------------------------------------------------------------------
by travisbot at 2012-06-15T16:29:20Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1629204) (merged ebd1a4c6 into f881d282).
---------------------------------------------------------------------------
by sstok at 2012-06-16T09:05:48Z
Shouldn't it be better to stop on the first failure? as all the others files will be false automatically.
---------------------------------------------------------------------------
by stof at 2012-06-16T10:21:49Z
indeed. We should avoid unnecessary filesystem IO by returning false as soon as it is known
---------------------------------------------------------------------------
by aerialls at 2012-06-16T11:55:24Z
Indeed it's better this way. fixed!
---------------------------------------------------------------------------
by travisbot at 2012-06-16T12:01:16Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1634615) (merged 8d98f417 into 76b2ed46).
Commits
-------
bfe5e58 [Form] fixed typo in docblock
Discussion
----------
[Form] fixed typo in docblock
---------------------------------------------------------------------------
by travisbot at 2012-06-15T20:03:08Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1630865) (merged bfe5e585 into f881d282).
Commits
-------
fc3ebb8 [FileSystem] added if-windows check
0b58828 [FileSystem] remove symlinks under windows
Discussion
----------
[FileSystem] remove symlinks under windows
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
When installing assets on Windows with symlink, the following error occurs when symlink-folders already exist. This PR makes sure symlink-folders are removed under Windows.
```
$ app/console assets:install web --symlink
Installing assets using the symlink option
Installing assets for Symfony\Bundle\FrameworkBundle into web/bundles/framework
[ErrorException]
Warning: symlink(): Cannot create symlink, error code(1314) in C:\workspace\erik\roompot\vendor\symfony\symfony\src\Symfony\Component\Filesystem\Filesystem.php line 167
assets:install [--symlink] [--relative] target
```
---------------------------------------------------------------------------
by travisbot at 2012-06-13T09:00:42Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1608541) (merged 0b58828b into 37550d23).
---------------------------------------------------------------------------
by travisbot at 2012-06-13T14:39:32Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1611288) (merged fc3ebb8c into 0f67ca88).
Commits
-------
280fc05 failing test for HEAD StreamedResponse requests
Discussion
----------
[WIP] failing test for HEAD StreamedResponse requests
An exception is thrown if you prepare a StreamedResponse with a HEAD request. I'm not sure what the right fix is…
---------------------------------------------------------------------------
by kriswallsmith at 2012-06-06T15:51:04Z
The Travis build is here: http://travis-ci.org/#!/symfony/symfony/builds/1543352
---------------------------------------------------------------------------
by sstok at 2012-06-08T11:07:31Z
Well a HEAD can't/shouldn't be streamed as it doesn't contain a body so what is the real problem here?
---------------------------------------------------------------------------
by kriswallsmith at 2012-06-08T16:14:18Z
@sstok the response is prepared by the ResponseListener regardless of request method
---------------------------------------------------------------------------
by adrienbrault at 2012-06-08T19:41:27Z
Shouldn't the test at least assert something ?
Commits
-------
92e028f Changed the typehint in the LocaleListener
Discussion
----------
Changed the typehint in the LocaleListener
The listener does not depend on the RouterInterface but only on the
RequestContextAwareInterface which is also implemented by the matcher
and the generator. Changing the typehint allow reusing the listener
in Silex.
---------------------------------------------------------------------------
by travisbot at 2012-06-13T14:12:10Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1611055) (merged 92e028f1 into 1d7501db).
The listener does not depend on the RouterInterface but only on the
RequestContextAwareInterface which is also implemented by the matcher
and the generator. Changing the typehint allow reusing the listener
in Silex.
Commits
-------
4ac48d9 Added failing YAML inline string to tests
Discussion
----------
Added failing YAML inline string to tests
#4042 introduced a regression for yaml string parsing starting with a double colon (::). The below configuration syntax no longer works.
The addition to the tests generates a failure:
1) Symfony\Component\Yaml\Tests\InlineTest::testDump
Symfony\Component\Yaml\Exception\ParseException: Malformed inline YAML string ('::form_base.html.twig').
```yaml
# Twig Configuration
twig:
debug: %kernel.debug%
strict_variables: %kernel.debug%
form:
resources:
- '::form_theme.html.twig'
- 'InfiniteFormBundle::form_theme.html.twig'
```
---------------------------------------------------------------------------
by merk at 2012-06-12T22:15:42Z
For those having this trouble, locking composer at a specific symfony commit is the best option until it is fixed:
```
"symfony/symfony": "dev-master#3bb7dc0bfa87b2d4db8262be65b5f49cc6a17a9b",
```
---------------------------------------------------------------------------
by travisbot at 2012-06-13T00:44:45Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1605553) (merged 4ac48d9e into 37550d23).
Commits
-------
49e9957 added test to ensure matching is eager
Discussion
----------
[Routing] added test to ensure matching is eager
This just adds a passing test that wasn't covered yet, so we don't break this scenario in the future.
---------------------------------------------------------------------------
by travisbot at 2012-06-13T01:04:09Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1605738) (merged 49e99572 into 37550d23).
Commits
-------
b5cf337 [Form] Enhanced the form error message
Discussion
----------
[Form] Enhanced the form error message
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
The error message on type mismatch is a bit obscure:
The form's view data is expected to be an instance of class Samson\Bundle\TRSBundle\Entity\Labour, but has the type object. You can avoid this error by setting the "data_class" option to null or by adding a view transformer that transforms object to Samson\Bundle\TRSBundle\Entity\Labour.
This commit changes it to:
The form's view data is expected to be an instance of class Samson\Bundle\TRSBundle\Entity\Labour, but is an instance of class Closure. You can avoid this error by setting the "data_class" option to null or by adding a view transformer that transforms an instance of Closure to an instance of class Samson\Bundle\TRSBundle\Entity\Labour.
---------------------------------------------------------------------------
by travisbot at 2012-06-12T14:04:08Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1601478) (merged 70a15df6 into 77839690).
---------------------------------------------------------------------------
by travisbot at 2012-06-12T14:06:31Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1601507) (merged 12ec4dbd into 77839690).
---------------------------------------------------------------------------
by travisbot at 2012-06-12T14:13:09Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1601517) (merged b5cf337c into 77839690).
---------------------------------------------------------------------------
by bschussek at 2012-06-12T18:21:31Z
👍 Thanks!
Commits
-------
1e83206 [Form] FormBuilderInterface->getParent() doesn't take any arguments (anymore)
Discussion
----------
[Form] FormBuilderInterface->getParent() doesn't take any arguments (anymore)
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
---------------------------------------------------------------------------
by travisbot at 2012-06-12T13:43:25Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1601018) (merged 9826ca66 into 77839690).
---------------------------------------------------------------------------
by travisbot at 2012-06-12T13:51:33Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1601030) (merged 1e83206e into 77839690).
---------------------------------------------------------------------------
by bschussek at 2012-06-12T18:21:56Z
👍 Thanks again! :)
Commits
-------
31843cf [FrameworkBundle] Add info to config
d5ab4c1 [Routing] Update changelog
bbef65e [Routing] Add strict_parameters option to disable exceptions when a route generation fails due to an invalid parameter
Discussion
----------
[Routing] Add strict_parameters option to disable exceptions on invalid parameters
---------------------------------------------------------------------------
by travisbot at 2012-06-09T15:07:26Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1577025) (merged bbef65e6 into 37678e17).
---------------------------------------------------------------------------
by stof at 2012-06-09T15:43:48Z
Seems good, but you forgot to update the Changelog of the component. Anyway, let's wait for @vicb's review as he knows the Routing component better than me.
---------------------------------------------------------------------------
by Seldaek at 2012-06-09T16:35:56Z
I updated the changelog
---------------------------------------------------------------------------
by travisbot at 2012-06-09T16:38:31Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1577716) (merged d5ab4c1d into 37678e17).
---------------------------------------------------------------------------
by travisbot at 2012-06-11T10:10:37Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1590901) (merged a54e59e4 into 37678e17).
---------------------------------------------------------------------------
by travisbot at 2012-06-11T13:50:21Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1591926) (merged 31843cf0 into 0995b1f2).
Commits
-------
680e732 [Routing] fix phpDoc
Discussion
----------
[Routing] fix phpDoc
using inheritdoc where possible and removing api tag when parent interface has one
as requested by stof and fabpot
---------------------------------------------------------------------------
by travisbot at 2012-06-09T16:14:53Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1577508) (merged 0a44632a into f8a09db5).
---------------------------------------------------------------------------
by travisbot at 2012-06-10T19:36:25Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1585766) (merged 680e732a into 7bec0786).
Commits
-------
5d55726 [HttpFoundation] Added 308 as a valid redirect code
Discussion
----------
[HttpFoundation] Added 308 as a valid redirect code
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/jalliot/symfony.png?branch=patch-4)](http://travis-ci.org/jalliot/symfony)
Fixes the following tickets: -
Todo: -
I think this should go on 2.0 but error code 308 has only been added in master...
---------------------------------------------------------------------------
by lyrixx at 2012-06-09T22:56:32Z
👍
---------------------------------------------------------------------------
by travisbot at 2012-06-10T06:27:18Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1579937) (merged 5d557261 into 6266b72d).
Commits
-------
5d88255 Authorization header should only be rebuild when Basic Auth scheme is used
Discussion
----------
[Regression fix] Authorization header should only be rebuild when Basic Auth scheme is used
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: fixes regression introduced by #1813
Todo: N/A
License of the code: MIT
---------------------------------------------------------------------------
by travisbot at 2012-06-11T14:40:28Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1592604) (merged cf5ee26a into 27100ba4).
---------------------------------------------------------------------------
by mvrhov at 2012-06-12T06:13:01Z
fixed
---------------------------------------------------------------------------
by travisbot at 2012-06-12T06:14:55Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1598555) (merged 5d88255d into 27100ba4).
The error message on type mismatch is a bit obscure:
The form's view data is expected to be an instance of class Samson\Bundle\TRSBundle\Entity\Labour, but has the type object. You can avoid this error by setting the "data_class" option to null or by adding a view transformer that transforms object to Samson\Bundle\TRSBundle\Entity\Labour.
This commit changes it to:
The form's view data is expected to be an instance of class Samson\Bundle\TRSBundle\Entity\Labour, but is an instance of Closure. You can avoid this error by setting the "data_class" option to null or by adding a view transformer that transforms an instance of Closure to an instance of Samson\Bundle\TRSBundle\Entity\Labour.
Commits
-------
8dd2af7 Added Session Metadata info to the Request section of the WDT
Discussion
----------
[WebProfilerBundle] Added Session Metadata info to the Request section of the WDT
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/dlsniper/symfony.png?branch=wdt-session-metadata)](http://travis-ci.org/dlsniper/symfony)
Fixes the following tickets: #4181
Todo: ~
License of the code: MIT
Documentation PR: ~
This PR adds some session metadata available into the WDT (Created, Last used, Lifetime specifically).
If you'd like to see more info then let me know.
---------------------------------------------------------------------------
by travisbot at 2012-05-26T21:11:56Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1443801) (merged 9b0b4383 into 9e951991).
---------------------------------------------------------------------------
by travisbot at 2012-05-26T21:24:27Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1443856) (merged 31858319 into 9e951991).
---------------------------------------------------------------------------
by drak at 2012-05-27T00:48:37Z
Nice addition.
---------------------------------------------------------------------------
by dlsniper at 2012-05-31T21:21:37Z
@drak While using this patch on a production application I've noticed that the `$request->hasSession()` section will fail to recognize that there's no session anymore in the app if I'm not using the auto-start feature. I'm using the latest master branch, updated today around 12:00 UTC. Clearly this is not the right place to discuss that there's a problem with ::hasSession() but I wanted to ask someone else for an opinion before creating the issue/fix for it.
---------------------------------------------------------------------------
by stof at 2012-06-09T10:14:05Z
@dlsniper create an ticket for it, and it will become the best place to discuss it :)
---------------------------------------------------------------------------
by dlsniper at 2012-06-09T10:42:58Z
Ok, but then can this be merged meanwhile?
---------------------------------------------------------------------------
by stof at 2012-06-09T10:58:39Z
@fabpot 👍
---------------------------------------------------------------------------
by dlsniper at 2012-06-09T17:36:24Z
I've opened #4529 to address the issue seen in the comment.
Commits
-------
2277500 [Routing][HttpKernel] Add RequestMatcherInterface.
Discussion
----------
[Routing][HttpKernel] Add RequestMatcherInterface.
First try at implementing #4351.
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Fixes the following tickets: -
Todo: -
License of the code: MIT
---------------------------------------------------------------------------
by travisbot at 2012-05-21T19:37:07Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1392716) (merged 457496db into ea33d4d3).
---------------------------------------------------------------------------
by travisbot at 2012-05-21T19:47:51Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1392939) (merged 78effa98 into ea33d4d3).
---------------------------------------------------------------------------
by everzet at 2012-05-21T20:17:03Z
No tests?
---------------------------------------------------------------------------
by travisbot at 2012-05-21T20:18:18Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1393392) (merged 6564fb6a into ea33d4d3).
---------------------------------------------------------------------------
by schmittjoh at 2012-05-21T20:35:14Z
You need to remove the type-hint from the constructor, and probably add an exception instead where the matching methods are called to ensure that either ``UrlMatcherInterface``, or ``RequestMatcherInterface`` were passed. Alternatively, you could also add such a check to the constructor.
---------------------------------------------------------------------------
by fabpot at 2012-05-22T06:52:01Z
related to symfony/symfony#4020
---------------------------------------------------------------------------
by niklasf at 2012-05-25T11:11:45Z
Reverted the changes to UrlMatcher.php.
---------------------------------------------------------------------------
by fabpot at 2012-05-25T12:46:06Z
@niklasf: it looks good now except for the listener constructor (see @schmittjoh suggestion above). Can you fix that and add some unit tests to ensure that everything works as expected? Thanks.
---------------------------------------------------------------------------
by stof at 2012-05-25T12:52:59Z
Another solution could be to make the ``RequestMatcherInterface`` extend the ``MatcherInterface`` to keep the typehint in the constructor
---------------------------------------------------------------------------
by fabpot at 2012-05-25T13:52:26Z
I thought about that as well, but that does not make sense.
---------------------------------------------------------------------------
by stof at 2012-05-25T14:12:19Z
Well, the RouterInterface extends UrlMatcherInterface anyway (and it should stay this way as it would be a huge BC break) so I guess most people will implement both interfaces when implementing the RquestMatcherInterface
---------------------------------------------------------------------------
by travisbot at 2012-05-25T15:26:22Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1433963) (merged 8f36204c into ff4d446c).
---------------------------------------------------------------------------
by travisbot at 2012-05-25T15:33:13Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1433996) (merged 6d2f2cd9 into ff4d446c).
---------------------------------------------------------------------------
by travisbot at 2012-05-25T15:39:01Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1434060) (merged 3c1d89e2 into ff4d446c).
---------------------------------------------------------------------------
by travisbot at 2012-05-25T22:06:34Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1437398) (merged 3ab997c1 into ff4d446c).
---------------------------------------------------------------------------
by travisbot at 2012-05-25T22:06:47Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1437385) (merged d8c0e387 into ff4d446c).
---------------------------------------------------------------------------
by fabpot at 2012-05-26T06:41:31Z
Can you add a note in the CHANGELOG of the component?
---------------------------------------------------------------------------
by travisbot at 2012-05-26T08:12:40Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1440435) (merged c7458733 into 9e951991).
---------------------------------------------------------------------------
by niklasf at 2012-05-26T08:14:41Z
@fabpot: Sorry, not sure how: Under 2.1.0 or in a new section? As the first or last entry of the list?
---------------------------------------------------------------------------
by stof at 2012-05-26T10:20:23Z
@niklasf the new interface should be mentioned in the changelog of the Routing component
---------------------------------------------------------------------------
by travisbot at 2012-05-26T10:30:06Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1440837) (merged 34ea86a9 into 9e951991).
---------------------------------------------------------------------------
by niklasf at 2012-06-02T15:27:01Z
Ah ... so there were two pitfalls:
- PHPUnit clones the arguments of mocked functions. So they wouldn't equal.
- createGetResponseEventForUri() disables routing on purpose. So not using that helper, now.
Tests should be passing.
---------------------------------------------------------------------------
by travisbot at 2012-06-02T15:30:28Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1509054) (merged 7fab0118 into 1541fe26).
Commits
-------
06976fc Updated upgrade 2.1 file.
110ccd8 [BrowserKit] Updated changelog.
686854b [http kernel] Added client response type test.
ce7e1e6 [browser kit] Client now stores filtered response after request.
Discussion
----------
[browser kit] Client now stores filtered response after request.
Bug fix: yes
Feature addition: no
Backwards compatibility break: yes/no, choice is your
Symfony2 tests pass: yes
`Symfony\Component\HttpKernel\Client::request()` method now returns a `Symfony\Component\BrowserKit\Response` instance.
Fixes issue #4475.
---------------------------------------------------------------------------
by stof at 2012-06-05T08:58:00Z
This *is* as BC break as it changes the class returned by the method, even if the BC break is a bugfix to respect the epxected behavior :)
---------------------------------------------------------------------------
by jfsimon at 2012-06-05T09:05:32Z
@stof you're right!
---------------------------------------------------------------------------
by travisbot at 2012-06-06T15:29:54Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1533533) (merged 686854b2 into 1541fe26).
---------------------------------------------------------------------------
by stof at 2012-06-09T10:12:18Z
@jfsimon can you add a note in the changelog of the component and in the upgrade file ?
---------------------------------------------------------------------------
by jfsimon at 2012-06-09T10:51:00Z
@stof done!
---------------------------------------------------------------------------
by travisbot at 2012-06-09T11:12:43Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1575524) (merged 06976fcd into 1541fe26).
---------------------------------------------------------------------------
by stof at 2012-06-09T12:50:16Z
@fabpot 👍
Commits
-------
6a01d3d [Security] Check post_only option and request method
Discussion
----------
[Security] Take `post_only` into consideration in requiresAuthentication
Change requiresAuthentication to look at the `post_only` option. Fixes#4524
---------------------------------------------------------------------------
by travisbot at 2012-06-08T18:26:21Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1570033) (merged 6d799494 into b84b46ba).
---------------------------------------------------------------------------
by travisbot at 2012-06-09T11:34:59Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1575681) (merged af676bb5 into b84b46ba).
---------------------------------------------------------------------------
by stof at 2012-06-09T14:01:21Z
@henrikbjorn could you squash the commit, or cherry-pick the third one so that it is the only one ? The reverted commit seems weird in the PR.
---------------------------------------------------------------------------
by henrikbjorn at 2012-06-09T14:18:08Z
@stof there. Actually it cannot be squashed. But maybe what i did was wrong.
``` shell
git reset --hard b84b46ba1a
git cherry-pick af676bb5d01f835b2f9913e129e6c6eb3320dd26
git push -f henrikbjorn require-authentication
```
---------------------------------------------------------------------------
by travisbot at 2012-06-09T14:22:59Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1576658) (merged 6a01d3dd into 3bb7dc0b).
---------------------------------------------------------------------------
by stof at 2012-06-09T14:39:25Z
@fabpot 👍
Commits
-------
f541a54 [Form] implement force append / prepend
Discussion
----------
implement force append / prepend
See #4494 and #4473
---------------------------------------------------------------------------
by travisbot at 2012-06-09T12:33:07Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1575997) (merged b0ed9b26 into 3bb7dc0b).
---------------------------------------------------------------------------
by stof at 2012-06-09T12:53:29Z
@fabpot 👍 for me.
---------------------------------------------------------------------------
by travisbot at 2012-06-09T12:57:54Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1576150) (merged 5e45b5d3 into 3bb7dc0b).
---------------------------------------------------------------------------
by travisbot at 2012-06-09T13:41:05Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1576322) (merged d51c5437 into 3bb7dc0b).
---------------------------------------------------------------------------
by fabpot at 2012-06-09T14:47:37Z
Can you add a mention in the CHANGELOG please?
---------------------------------------------------------------------------
by greg0ire at 2012-06-09T14:58:25Z
Couldn't find anything relevant to update in the CHANGELOG of the form component, but the UPGRADE file contains something I could update.
---------------------------------------------------------------------------
by travisbot at 2012-06-09T15:06:27Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1576951) (merged 6b45ba66 into 3bb7dc0b).
---------------------------------------------------------------------------
by greg0ire at 2012-06-09T15:06:51Z
Squashed all the commits into one.
Commits
-------
b631073 [Yaml] Fixed double quotes escaping in Dumper.
Discussion
----------
[Yaml] Fixed double quotes escaping in Dumper
Issue #4308 is caused by Dumper::escapeWithDoubleQuotes() which uses [str_replace()](http://php.net/str_replace).
From the php docs:
> Because str_replace() replaces left to right, it might replace a previously inserted value when doing multiple replacements.
We should be very careful in deciding about the order of elements in $escapees array. I'd really appreciate if someone reviewed my fix. Tests say I didn't break anything but I'm not sure what percentage of Yaml specification is covered by tests.
Bug fix: yes
Feature addition: no
Backwards compatibility break: not that I know
Symfony2 tests pass: [![Build Status](https://secure.travis-ci.org/jakzal/symfony.png?branch=yamlDoubleQuotesDumperFix)](http://travis-ci.org/jakzal/symfony)
Fixes the following tickets: #4308
---------------------------------------------------------------------------
by travisbot at 2012-05-18T08:53:51Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1364279) (merged 5192722c into a04acc89).
---------------------------------------------------------------------------
by travisbot at 2012-05-18T23:19:49Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1371539) (merged ecaa1aab into fc3c609b).
---------------------------------------------------------------------------
by dinamic at 2012-05-19T07:35:21Z
Something is really wrong with this method. You can see clearly that multiple characters would fail proper escaping.
Here's an example:
```
$value = '\\\\"some value\n \"some quoted string\" and \'some single quotes one\'"';
var_dump(Escaper::escapeWithDoubleQuotes($value));
string(72) ""\\\"some value\n \\some quoted string\\ and 'some single quotes one'\"""
```
To begin with the backslash - in the initial value you have 2 (escaped ones), that after escaping should result in 4, not in 1 (escaped). I guess this behavior has to be verified with the importer, but imho it does not seem right.
Does anyone know why this escaping wasn't done using a regular expression in first place?
---------------------------------------------------------------------------
by clemens-tolboom at 2012-05-19T10:18:58Z
Searching for https://duckduckgo.com/?q=what+is+\xc2\x85 the table on http://stackoverflow.com/questions/6609895/efficiently-replace-bad-characters is interesting enough to decide we need way more documentation on this file.
\xc2\x85 seems to be triple dot (ellipses)
\xe2\x80\xa9 seems to be paragraph separator see http://drupal.org/node/914360#comment-3468550
Commits
-------
478227d Fixed quoting issues with Yaml Inline Parser
Discussion
----------
[Yaml] fix parsing quotes problem
Added some basic checking for quotes on their own within strings. Used single quote ' followed by "," and ":" to denote the end of the current string to test.
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #4021
Todo: N/A
---------------------------------------------------------------------------
by fabpot at 2012-05-07T09:22:56Z
After doing the requested changes, can you squash your commits? Thanks.
---------------------------------------------------------------------------
by paul-matthews at 2012-05-09T13:29:45Z
Resolved and squashed
---------------------------------------------------------------------------
by travisbot at 2012-05-09T13:30:30Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1285048) (merged 5ce6d4e1 into 6c714095).
---------------------------------------------------------------------------
by travisbot at 2012-05-09T13:31:06Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1285057) (merged 3592fcec into e54f4e46).
---------------------------------------------------------------------------
by travisbot at 2012-05-09T13:33:40Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1285094) (merged e209f786 into e54f4e46).
---------------------------------------------------------------------------
by travisbot at 2012-05-09T13:37:42Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1285153) (merged 0967b513 into e54f4e46).
---------------------------------------------------------------------------
by fabpot at 2012-05-09T14:00:29Z
It looks like that another commit is in your PR that should not be there.
---------------------------------------------------------------------------
by paul-matthews at 2012-05-09T15:52:35Z
Right-o will remove
---------------------------------------------------------------------------
by paul-matthews at 2012-05-09T15:54:15Z
resolved
---------------------------------------------------------------------------
by travisbot at 2012-05-09T15:57:15Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1286339) (merged fc276209 into e66a0bb3).
---------------------------------------------------------------------------
by fabpot at 2012-05-10T05:20:18Z
Apparently, some tests do not pass anymore after the patch. Can you have a look at them? Thanks.
---------------------------------------------------------------------------
by paul-matthews at 2012-05-10T11:20:45Z
Sure - looking into it.
---------------------------------------------------------------------------
by paul-matthews at 2012-05-10T17:55:53Z
I believe that's fixed.
The entire suite works locally now.
---------------------------------------------------------------------------
by travisbot at 2012-05-10T17:55:54Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1297641) (merged 884c02ed into fae4523f).
---------------------------------------------------------------------------
by paul-matthews at 2012-05-10T17:57:03Z
Unsure why travis fails.
---------------------------------------------------------------------------
by travisbot at 2012-05-10T18:00:28Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1297650) (merged 478227d9 into fae4523f).
---------------------------------------------------------------------------
by stof at 2012-06-09T13:24:52Z
@fabpot 👍
Commits
-------
a6d32de UrlMatcher class indent and doc fixes
Discussion
----------
[Routing] PHP CS and doc minor fixes
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
---------------------------------------------------------------------------
by travisbot at 2012-06-02T12:03:36Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1507232) (merged a6d32de1 into 1541fe26).
Commits
-------
4938080 MethodNotImplementedException -> MethodArgumentValueNotImplementedException
789fc14 Accept calling setLenient(false)
Discussion
----------
GH-4491 - Move patch from master to 2.0
A patch in PR-4469 fixed an issue with setLenient() and not having intl. This was only merged into master, although the original issue was created in the 2.0 branch. This PR cherry-picked the patches against 2.0 again.
---------------------------------------------------------------------------
by travisbot at 2012-06-06T15:29:19Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1527145) (merged 49380804 into 9a5e6c90).
---------------------------------------------------------------------------
by kbond at 2012-06-06T17:42:40Z
fixes#4491
Commits
-------
5f328de [console] Fixed docblock.
c80e156 [console] Added style stack getter in formatter.
0ae5a45 [console] Removed hardcoded empty style from styles stack.
Discussion
----------
[console] Removed hardcoded style formatter from style stack.
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
This PR make it possible to replace OutputFormatter again.
Fixes issue #4495.
---------------------------------------------------------------------------
by travisbot at 2012-06-06T15:29:44Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1531654) (merged c80e156f into 1541fe26).
---------------------------------------------------------------------------
by travisbot at 2012-06-06T15:29:53Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1533586) (merged 5f328dee into 1541fe26).
Commits
-------
3c8cc0a [HttpFoundation][Sessions] Refactored tests
13a2c82 [FrameworkBundle] Refactor session file handler service name and update changelogs
b2cc580 [HttpFoundation] Removed Native*Handler session save handler classes
f33b77c [HttpFoundation] Added a custom file save handler
Discussion
----------
[HttpFoundation][Sessions] Removed native save handlers
Bug fix: no
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
Added a specific filesessionhandler
Removed native handlers to slim down code.
---------------------------------------------------------------------------
by travisbot at 2012-05-30T02:54:40Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1473181) (merged 3c8cc0a1 into adf07f1e).
Commits
-------
23bb668 [FrameworkBundle][SecurityBundle] updated configuration to new method names
8775f2c [Config] replaced setInfo(), setExample() with more generic attributes
Discussion
----------
[Config] replaced setInfo(), setExample() with more generic attributes
This replaces ``setInfo`` and ``setExample`` with a more generic attribute system which provides more flexibility and is more future prove.
I have kept the specialized ``setInfo`` and ``setExample`` methods because they are a bit shorter, and also a good demonstration of what the system could be used for. However for consistency, I have renamed them to ``info()`` and ``example()`` respectively.
---------------------------------------------------------------------------
by travisbot at 2012-05-26T17:37:06Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1442720) (merged 8775f2c1 into 9e951991).
---------------------------------------------------------------------------
by stof at 2012-05-26T17:42:02Z
and you forgot to update FrameworkBundle
---------------------------------------------------------------------------
by travisbot at 2012-05-26T17:46:37Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1442764) (merged 23bb668e into 9e951991).
Commits
-------
a30f4a0 [Form] cleanup
Discussion
----------
[Form] cleanup
---------------------------------------------------------------------------
by travisbot at 2012-05-27T19:47:21Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1450050) (merged 09574f4b into adf07f1e).
---------------------------------------------------------------------------
by travisbot at 2012-05-27T19:57:42Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1450149) (merged a8c63d72 into adf07f1e).
---------------------------------------------------------------------------
by vicb at 2012-05-27T20:00:13Z
thanks a bunch @travisbot !
---------------------------------------------------------------------------
by travisbot at 2012-05-28T06:52:52Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1453555) (merged a30f4a03 into adf07f1e).
---------------------------------------------------------------------------
by bschussek at 2012-05-28T09:20:05Z
Thank you Victor! 👍
Commits
-------
59c4f55 a few minor changes
Discussion
----------
a few minor changes / cleanup
---------------------------------------------------------------------------
by travisbot at 2012-05-27T07:58:52Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1446431) (merged bb7ae326 into 9e951991).
Commits
-------
fc38e2b [Form] Fixed mapping of violations with empty paths to the root form
Discussion
----------
[Form] Fixed mapping of violations with empty paths to the root form
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -
Todo: -
---------------------------------------------------------------------------
by travisbot at 2012-05-27T12:57:36Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1447769) (merged fc38e2b4 into adf07f1e).
Commits
-------
d046fed [HttpFoundation] Remove temporary files after tests run
Discussion
----------
[HttpFoundation] Remove temporary files after tests run
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: [yes|no]
Fixes the following tickets: -
Todo: -
License of the code: MIT
Documentation PR: -
---------------------------------------------------------------------------
by travisbot at 2012-05-28T00:26:30Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1451809) (merged 30082e97 into adf07f1e).
---------------------------------------------------------------------------
by travisbot at 2012-05-28T06:59:39Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1453569) (merged d046fede into adf07f1e).
Commits
-------
8308aea [Config] added EnumNode
Discussion
----------
[Config] added EnumNode
This adds an EnumNode which should be used instead of a Closure and manual validation.
The benefit is that you can retrieve the allowed values. It is also a bit shorter, but that is not the main point here.
---------------------------------------------------------------------------
by travisbot at 2012-05-26T03:52:50Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1439264) (merged 8308aea9 into ff4d446c).
Commits
-------
b4e2818 [Form] Using new methods instead of the deprecated
Discussion
----------
[Form] Using new methods instead of the deprecated
---------------------------------------------------------------------------
by travisbot at 2012-05-25T21:05:11Z
This pull request [passes](http://travis-ci.org/symfony/symfony/builds/1436891) (merged b4e28186 into ff4d446c).
fixed bug with parent property
fix is_required field
fixed subform translation_domain inheritance
some translation_domain inheritance code refactoring
added form type translation_domain inheritance tests
changed methods place in form type test
changed arguments in createNamed method call in FormTypeTest
If there are two firewalls (eg. main and admin), calling an protected admin url
will direct you to the login form of the admin. If I ignore this and go to the login
form of the main firewall directly I will end up being redirected to the stored
admin target url. This is not what you usually want to happen.
Commits
-------
bad4a1f [OptionsResolver] CS fix in LazyOption
a54ea1b [OptionsResolver] small optimization in Options class
104dcf2 [OptionsResolver] fixed bugs concerning required options
1bfcff4 [OptionsResolver] added failing test cases to demonstrate two bugs
37a3a29 [OptionsResolver] optimized validation
Discussion
----------
[OptionsResolver] fixed two bugs and applied optimization
The first commit optimizes the validation in OptionsResolver by removing several unneeded method calls (without changing anything semantically).
Then I recognized two bugs in the current code that I wrote failing test cases for in the second commit.
1. setAllowedValues wrongly validated missing options
2. required options with defaults were considered missing by `resolve` (contrary to the `isRequired` method)
The third commit fixes these bugs.
The forth commit applies a small optimization in Options and uses a static function call for a static function.
---------------------------------------------------------------------------
by travisbot at 2012-05-24T03:39:34Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1418785) (merged a54ea1b6 into b07fb3c4).
---------------------------------------------------------------------------
by travisbot at 2012-05-24T05:22:33Z
This pull request [fails](http://travis-ci.org/symfony/symfony/builds/1419232) (merged bad4a1f7 into b07fb3c4).
---------------------------------------------------------------------------
by bschussek at 2012-05-24T06:20:02Z
I just tested this on my machine, and static calls are a tiny bit faster here, although this is really irrelevant for practical use. Even though I dislike useless micro-optimizations like this, I'm ok with this PR in general.
---------------------------------------------------------------------------
by Tobion at 2012-05-24T13:23:11Z
I didn't say that's an optimization in the first place. (The optimization was the removal of a variable assignment)
I just changed it because in other PRs I've been told, static functions should be called in a static way.
---------------------------------------------------------------------------
by Tobion at 2012-05-24T23:36:13Z
Please merge before 4387