This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes#5746).
Commits
-------
96d87ad [Locale] fixed fallback locale
Discussion
----------
[Locale] fixed fallback locale
The `getFallbackLocale()` method in `Symfony\Component\Locale\Locale` did not return a fallback locale if the current locale (`Locale::getDefault()`) was a 5-char locale like de_CH.
`LocaleTest` failed when the locale was set to de_CH before running (see changes in LocaleTest).
(second attempt after messing up PR#5641)
---------------------------------------------------------------------------
by eriksencosta at 2012-10-15T05:08:25Z
Original PR: #5641.
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 2.1 branch.
Commits
-------
3e15d44 Documented removed _form_is_choice_group function
Discussion
----------
Documented removed `_form_is_choice_group` function
Also changed for-loop variables to match the current `form_div_layout.html.twig` code.
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes#5782).
Commits
-------
d662e22 [DoctrineBridge] UniqueValidatorTest, Change message on assertions
Discussion
----------
[DoctrineBridge] UniqueValidatorTest, Change message on assertions
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 submitted for the master branch but it was merged into the 2.1 branch instead (closes#5779).
Commits
-------
73aafb4 Delete use of CreationExeption
Discussion
----------
Delete use of CreationExeption
CreationException not used
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 2.0 branch.
Commits
-------
bf3e358 [Form] Fixed creation of multiple money fields with different currencies
Discussion
----------
[Form] Fixed creation of multiple money fields with different currencies
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #5458
Todo: -
License of the code: MIT
Documentation PR: -
This PR was merged into the 2.1 branch.
Commits
-------
8f81f07 [Form] Fixed setting the "data" option to an object in "choice" and "entity" type
Discussion
----------
[Form] Fixed setting the "data" option to an object in "choice" and "entity" type
Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: #5582
Todo: -
License of the code: MIT
Documentation PR: -
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes#5764).
Commits
-------
cacf5d7 Fixed Serbian plural translations.
Discussion
----------
Fixed Serbian plural translations.
Translations break productions apps again. We should come up with some solution for this.
This PR was submitted for the master branch but it was merged into the 2.0 branch instead (closes#5763).
Commits
-------
333ebeb Fixed IPv6 Check in RequestMatcher
Discussion
----------
[HttpFoundation] Fixed IPv6 Check in RequestMatcher
RequestMatcher checks IPv6 support with
```php
if (!defined('AF_INET6')) {
throw new \RuntimeException('Unable to check Ipv6. Check that PHP was not compiled with option "disable-ipv6".');
}
```
wich depends on sockets extension.
This PR adds a fallback by checking return value of silented call to `inet_pton` if extension is not available (code from https://github.com/dsp/v6tools/blob/master/src/v6tools/Runtime.php).
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes#5762).
Commits
-------
a3df2fe Fix typo
Discussion
----------
Fix typo
---------------------------------------------------------------------------
by stloyd at 2012-10-16T09:25:20Z
Wrong branch selected. Should be `2.1`.
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 merged into the master branch.
Commits
-------
34b60f7 [FrameworkBundle] more verbose output about service tags in container:debug command and display all tag attributes as columns in normal container:debug output
2a9805e [FrameworkBundle] Adding a option to debug services by tag
Discussion
----------
[2.2] [FrameworkBundle] Tag support in container debug
Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: n/a
License of the code: MIT
This PR allows finding all services with a specified tag in the container:
```
> app/console container:debug --tag=form.type
[container] Public services
Service Id Scope Class Name
form.type.birthday container Symfony\Component\Form\Extension\Core\Type\BirthdayType
form.type.checkbox container Symfony\Component\Form\Extension\Core\Type\CheckboxType
form.type.choice container Symfony\Component\Form\Extension\Core\Type\ChoiceType
form.type.collection container Symfony\Component\Form\Extension\Core\Type\CollectionType
form.type.country container Symfony\Component\Form\Extension\Core\Type\CountryType
[ ... ]
```
Also, it adds more info on used tags when requesting info of a service:
Before:
```
> app/console container:debug data_collector.request
[container] Information for service data_collector.request
Service Id data_collector.request
Class Symfony\Bundle\FrameworkBundle\DataCollector\RequestDataCollector
Tags kernel.event_listener, data_collector
Scope container
Public yes
Synthetic no
Required File -
```
After:
```
> app/console container:debug data_collector.request
[container] Information for service data_collector.request
Service Id data_collector.request
Class Symfony\Bundle\FrameworkBundle\DataCollector\RequestDataCollector
Tags
- kernel.event_listener (event: kernel.controller, method: onKernelController)
- data_collector (template: WebProfilerBundle:Collector:request, id: request, priority: 255)
Scope container
Public yes
Synthetic no
Required File -
```
---------------------------------------------------------------------------
by Burgov at 2012-07-15T21:00:46Z
thanks @stof :)
---------------------------------------------------------------------------
by stof at 2012-10-13T17:50:23Z
@Burgov @richardmiller any news on this PR ? Is there any feature to port from #5522 or is it ready to be merged as is ?
---------------------------------------------------------------------------
by Burgov at 2012-10-14T11:17:51Z
@stof, I've merged richardmiller's branch and rebased it so that everything is now in one command (the original container:debug), so technically, this is now ready to be merged. Still there's two things that might be discussed:
1) when using --tags, all other options and arguments are ignored. Perhaps an exception should be thrown when other parameters are passed?
2) I'm not completely satisfied with the way the output of the command with the --tag argument looks, perhaps someone can share his ideas about it?
---------------------------------------------------------------------------
by Burgov at 2012-10-15T07:19:29Z
@richardmiller any suggestions? I've tried to stay as close as possible to the normal output of this command, when using the --tag option, so using the output format you used couldn't really be done...
---------------------------------------------------------------------------
by fabpot at 2012-10-16T06:50:12Z
For the `--tag` output, and because the number of attributes is most of the time very limited, I would just add one new column per attribute:
```
~/ $ ./app/console container:debug --tag=form.type
[container] Public services with tag form.type
Service Id Alias Scope Class Name
form.type.birthday birthday container Symfony\Component\Form\Extension\Core\Type\BirthdayType
form.type.checkbox checkbox container Symfony\Component\Form\Extension\Core\Type\CheckboxType
form.type.choice choice container Symfony\Component\Form\Extension\Core\Type\ChoiceType
```
---------------------------------------------------------------------------
by fabpot at 2012-10-16T06:51:04Z
When using ``--tags``, an exception should indeed be thrown if other incompatible options are passed.
---------------------------------------------------------------------------
by fabpot at 2012-10-16T06:51:20Z
The last missing piece is a PR on the documentation. Thanks.
---------------------------------------------------------------------------
by Burgov at 2012-10-16T08:17:25Z
@fabpot I've added the tag attributes as columns to the normal output. Since services can have more of the same tag, I had to create an extra loop to represent this. For example, when debugging the kernel.event_listener tag, this is now the output:
```
> app/console container:debug --tag=kernel.event_listener
[container] Public services with tag kernel.event_listener
Service Id event method priority Scope Class Name
acme.demo.listener kernel.controller onKernelController container Acme\DemoBundle\EventListener\ControllerListener
assetic.request_listener kernel.request onKernelRequest container Symfony\Bundle\AsseticBundle\EventListener\RequestListener
data_collector.router kernel.controller onKernelController container Symfony\Bundle\FrameworkBundle\DataCollector\RouterDataCollector
monolog.handler.firephp kernel.response onKernelResponse container Symfony\Bridge\Monolog\Handler\FirePHPHandler
security.firewall kernel.request onKernelRequest 8 container Symfony\Component\Security\Http\Firewall
security.rememberme.response_listener kernel.response onKernelResponse container Symfony\Component\Security\Http\RememberMe\ResponseListener
sensio_framework_extra.cache.listener kernel.response onKernelResponse container Sensio\Bundle\FrameworkExtraBundle\EventListener\CacheListener
sensio_framework_extra.controller.listener kernel.controller onKernelController container Sensio\Bundle\FrameworkExtraBundle\EventListener\ControllerListener
sensio_framework_extra.converter.listener kernel.controller onKernelController container Sensio\Bundle\FrameworkExtraBundle\EventListener\ParamConverterListener
sensio_framework_extra.view.listener kernel.controller onKernelController container Sensio\Bundle\FrameworkExtraBundle\EventListener\TemplateListener
" kernel.view onKernelView
```
At this moment the " denotes that the same service as the line above is referenced.
---------------------------------------------------------------------------
by fabpot at 2012-10-16T08:37:38Z
@Burgov Looks good to me. Ping me when this is ready to be merged.
---------------------------------------------------------------------------
by Burgov at 2012-10-16T09:09:46Z
ping @fabpot I've rebased and I think it should be ready to go
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes#5761).
Commits
-------
da784b7 change what I think is a typo
Discussion
----------
change what I think is a typo
This PR was merged into the 2.1 branch.
Commits
-------
cf1e02d [Console] Fix error when mode is not in PATH
Discussion
----------
[Console] Fix error when mode is not in PATH
Small bugfix, fixescomposer/composer#1208
This PR was merged into the 2.1 branch.
Commits
-------
2ffaeda Change monolog require-dev to use the branch alias instead of dev-master
Discussion
----------
Change monolog require-dev to use the branch alias instead of dev-master
Ping @seldaek