Commit Graph

11596 Commits

Author SHA1 Message Date
Fabien Potencier
1c7f5d4920 merged branch ErikSaunier/patch-1 (PR #5779)
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
2012-10-18 21:44:44 +02:00
Erik Saunier
051327ea03 Delete use of CreationExeption
CreationException not used
2012-10-18 21:44:44 +02:00
Fabien Potencier
a01ede2f4d merged branch bschussek/issue5388 (PR #5778)
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: -
2012-10-18 21:42:42 +02:00
Fabien Potencier
1fddce4b6e merged branch bschussek/issue5458 (PR #5777)
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: -
2012-10-18 21:41:24 +02:00
Fabien Potencier
3b6082acdb merged branch bschussek/issue5582 (PR #5776)
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: -
2012-10-18 21:39:30 +02:00
Bernhard Schussek
bda29b335e [Form] Fixed error message in PropertyPath to not advice to use a non-existing feature 2012-10-18 19:52:59 +02:00
Bernhard Schussek
bf3e358697 [Form] Fixed creation of multiple money fields with different currencies 2012-10-18 19:17:20 +02:00
Bernhard Schussek
8f81f078e0 [Form] Fixed setting the "data" option to an object in "choice" and "entity" type 2012-10-18 18:50:25 +02:00
Michal Piotrowski
5b3ed826a8 MetadataBag test 2012-10-17 22:23:03 +02:00
Fabien Potencier
6b12fc0330 [TwigBundle] fixed unit tests 2012-10-17 15:58:03 +02:00
Fabien Potencier
3c65f6dee2 [TwigBundle] fixed unit tests 2012-10-17 15:22:39 +02:00
Albert Casademont
20f19bfd84 Add the Request locale to the RequestDataCollector 2012-10-17 10:50:16 +02:00
Arnaud Le Blanc
e54d749d05 [Routing] Simplified php matcher dumper (and optimized generated matcher) 2012-10-16 20:50:15 +02:00
Fabien Potencier
defccb3516 merged branch umpirsky/validators-serbian-plural (PR #5764)
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.
2012-10-16 16:15:39 +02:00
umpirsky
53c43bf647 Fixed Serbian plural translations. 2012-10-16 16:15:39 +02:00
Fabien Potencier
12ad992ae5 merged branch yohang/patch-1 (PR #5763)
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).
2012-10-16 13:28:16 +02:00
Yohan Giarelli
959c1dfa4b Fixed IPv6 Check in RequestMatcher
Added a fallback check for ipv6 support even if sockets extension is not available
2012-10-16 13:28:16 +02:00
Fabien Potencier
4141afba46 merged branch ooflorent/patch-1 (PR #5762)
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`.
2012-10-16 11:27:35 +02:00
Florent Cailhol
632e6bfa92 Fix typo 2012-10-16 11:27:35 +02:00
Fabien Potencier
d8f6021fc1 merged branch romainneutron/ConsoleHiddenQuestion (PR #5731)
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
2012-10-16 11:19:25 +02:00
Fabien Potencier
9ebc2f5b6b merged branch SamsonIT/tag-support-in-container-debug (PR #4937)
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
2012-10-16 11:17:44 +02:00
Fabien Potencier
52c5e30283 merged branch greg0ire/patch-3 (PR #5761)
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
2012-10-16 11:15:59 +02:00
Grégoire Paris
689788b974 change what I think is a typo 2012-10-16 11:15:59 +02:00
Romain Neutron
aefa49595b Move hiddeninput.exe to Resources/bin 2012-10-16 11:08:11 +02:00
Romain Neutron
c0f8a63e61 Fix CS and typos 2012-10-16 11:04:58 +02:00
Bart van den Burg
34b60f7558 [FrameworkBundle] more verbose output about service tags in container:debug command and display all tag attributes as columns in normal container:debug output 2012-10-16 11:01:37 +02:00
Richard Miller
2a9805eec1 [FrameworkBundle] Adding a option to debug services by tag 2012-10-16 10:40:21 +02:00
Michal Piotrowski
85d39aab50 session class tests 2012-10-15 19:57:42 +02:00
Michal Piotrowski
99aa37ce59 tests for Request class
tests for Request class p2
2012-10-15 18:46:16 +02:00
Fabien Potencier
3ed6b7a996 merged branch Seldaek/mode-path (PR #5755)
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, fixes composer/composer#1208
2012-10-15 17:44:13 +02:00
Jordi Boggiano
cf1e02d9ae [Console] Fix error when mode is not in PATH 2012-10-15 17:06:42 +02:00
Romain Neutron
26c35e0ffe Skip askHiddenResponse test on windows 2012-10-15 15:32:25 +02:00
Romain Neutron
e2eaf5a6d5 Update Changelog, add Readme note about hidden input third party 2012-10-15 15:32:20 +02:00
Fabien Potencier
13e6ce42a6 merged branch igorw/monolog-branch-alias (PR #5750)
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
2012-10-15 09:50:38 +02:00
Fabien Potencier
8731cc30ff [WebProfilerBundle] fixed macro usage (to be forward compatible with Twig 2.x) 2012-10-15 09:28:03 +02:00
Igor Wiedler
2ffaedad39 Change monolog require-dev to use the branch alias instead of dev-master 2012-10-14 16:16:42 +02:00
Bilal Amarni
adeadfbbc8 fixed comment striping on global namespace classes 2012-10-14 13:45:05 +02:00
Fabien Potencier
0fc0fb3b9c merged branch hason/crawler (PR #5407)
This PR was merged into the master branch.

Commits
-------

c902966 [DomCrawler] Added ability to set file as raw path to file field

Discussion
----------

[2.2][DomCrawler] Added ability to set file as raw path to file field

Bug fix: no
Feature addition: yes
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT

For description see #4674 (https://github.com/symfony/symfony/issues/4674#issuecomment-7811505)

Related PRs:

https://github.com/Behat/MinkBrowserKitDriver/pull/1
https://github.com/Behat/MinkGoutteDriver/pull/7
https://github.com/fabpot/Goutte/pull/77

---------------------------------------------------------------------------

by stof at 2012-10-13T21:53:27Z

@fabpot anything missing here ?
2012-10-14 11:36:44 +02:00
Fabien Potencier
dc519847fe [FrameworkBundle] partially reverted previous merge 2012-10-14 11:21:53 +02:00
Fabien Potencier
98070d50af merged branch hason/return_code (PR #5586)
This PR was squashed before being merged into the 2.1 branch (closes #5586).

Commits
-------

6b66bc3 [2.1] Added missing error return codes in commands

Discussion
----------

[2.1] Added missing error return codes in commands

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
License of the code: MIT
See: #5585

---------------------------------------------------------------------------

by fabpot at 2012-09-24T12:10:47Z

Exit code values are standardized and some values have some well-defined meaning. Have a look here for more info: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Process/Process.php#L67
2012-10-14 11:21:26 +02:00
Martin Hasoň
6b66bc3226 [2.1] Added missing error return codes in commands 2012-10-14 11:21:26 +02:00
Fabien Potencier
eb176467e8 merged branch stof/twig_global (PR #5741)
This PR was merged into the master branch.

Commits
-------

b31ae34 [WebProfilerBundle] Remove the now unneeded BC var and fixed a typo
d07ce03 [TwigBundle] Moved the registration of the app global to the environment

Discussion
----------

[TwigBundle] Moved the registration of the app global to the environment

This makes the app global variable available also when accessing the Twig
environment directly instead of using the TwigEngine.
2012-10-14 11:19:55 +02:00
Fabien Potencier
49fa1965d5 merged branch gnugat/i5669-console-list-in-help-command (PR #5725)
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 👍
2012-10-14 11:18:34 +02:00
Loic Chardonnet
d6be69acc5 [i5669][Console] Adding a note about the list command in the help command 2012-10-14 11:18:34 +02:00
Fabien Potencier
77a6eb6a62 merged branch szicsu/ContainerExceptionHandling-FIX (PR #5693)
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.
2012-10-14 11:16:36 +02:00
Fabien Potencier
db4824bfe1 merged branch marfillaster/help-inheritance (PR #5676)
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 ?
2012-10-14 11:13:59 +02:00
Fabien Potencier
5f5b1dc82d merged branch dpb587/pr-cleanup-some-tests (PR #5737)
This PR was merged into the master branch.

Commits
-------

3d2a7db Fix a few namespaces to match file system.

Discussion
----------

Cleanup Some Tests - tearDown and namespaces

Tried to cleanup a few tests and fix a few test classes which weren't following PSR-0. Removed original `tearDown` changes.

---

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: ~

---------------------------------------------------------------------------

by pborreli at 2012-10-13T06:41:14Z

from [PHPUnit documentation](http://www.phpunit.de/manual/current/en/fixtures.html#fixtures.more-setup-than-teardown) :

>setUp() and tearDown() are nicely symmetrical in theory but not in practice. In practice, you only need to implement tearDown() if you have allocated external resources like files or sockets in setUp(). If your setUp() just creates plain PHP objects, you can generally ignore tearDown(). However, if you create many objects in your setUp(), you might want to unset() the variables pointing to those objects in your tearDown() so they can be garbage collected. The garbage collection of test case objects is not predictable.

---------------------------------------------------------------------------

by fabpot at 2012-10-13T10:05:49Z

All these tearDown methods are not needed and should be removed.
2012-10-14 11:11:23 +02:00
Fabien Potencier
a88bb9b3de merged branch stof/lazy_router (PR #5745)
This PR was submitted for the master branch but it was merged into the 2.1 branch instead (closes #5745).

Commits
-------

a6918ec Made the router lazy when setting the context

Discussion
----------

Made the router lazy when setting the context

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).

@fabpot should it be considered as a bugfix (and so done in older branches) or a new feature ?

---------------------------------------------------------------------------

by stof at 2012-10-14T01:23:51Z

Btw, looking at the ApacheUrlMatcher code, I think it is flawed and that this change will actually not fix the performance issue reported in #5538 as it requires creating the RouteCollection everytime, including when apache actually matched it.
2012-10-14 10:27:44 +02:00
Christophe Coevoet
e0a3fc19a4 Made the router lazy when setting the context
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).
2012-10-14 10:27:44 +02:00
Danny Berger
3d2a7db61e Fix a few namespaces to match file system. 2012-10-13 13:20:28 -06:00