Commit Graph

15492 Commits

Author SHA1 Message Date
Fabien Potencier
51413e1cbe merged branch bschussek/issue5113-2.3 (PR #8981)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3][Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted

Same as #7940, rebased onto 2.3.

Commits
-------

7879f07 [DoctrineBridge] Improved test coverage of EntityChoiceList
58e7c10 [Form] Improved test coverage of ChoiceList classes
9542d72 [Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted
72b8807 [Form] Fixed ChoiceList::get*By*() methods to preserve order and array keys
e1bf07f [Form] Removed usage of the ChoiceList::getIndicesFor*() methods where they don't offer any performance benefit
2013-09-10 22:26:31 +02:00
Fabien Potencier
eb9f76d5ba Merge branch '2.2' into 2.3
* 2.2:
  Fixed docblock in UserInterface::getSalt()
  [Process] Fix #8970 : read output once the process is finished, enable pipe tests on Windows
  [DoctrineBridge] Improved test coverage of EntityChoiceList
  [Form] Improved test coverage of ChoiceList classes
  [Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted
  [Form] Fixed ChoiceList::get*By*() methods to preserve order and array keys
  [Form] Removed usage of the ChoiceList::getIndicesFor*() methods where they don't offer any performance benefit
  [HttpKernel] made code more reliable

Conflicts:
	src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/EntityChoiceListTest.php
	src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceListInterface.php
	src/Symfony/Component/Form/Extension/Core/EventListener/FixRadioInputListener.php
	src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php
	src/Symfony/Component/Form/Form.php
	src/Symfony/Component/Form/Tests/Extension/Core/Type/ChoiceTypeTest.php
	src/Symfony/Component/Process/Process.php
	src/Symfony/Component/Process/Tests/AbstractProcessTest.php
2013-09-10 22:24:28 +02:00
Fabien Potencier
2a304e09bf merged branch bschussek/issue5113-2.2 (PR #8980)
This PR was merged into the 2.2 branch.

Discussion
----------

[2.2][Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted

Same as #7940, rebased onto 2.2.

Commits
-------

4d2dc55 [DoctrineBridge] Improved test coverage of EntityChoiceList
9d3628c [Form] Improved test coverage of ChoiceList classes
ed83752 [Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted
30aa1de [Form] Fixed ChoiceList::get*By*() methods to preserve order and array keys
53f292a [Form] Removed usage of the ChoiceList::getIndicesFor*() methods where they don't offer any performance benefit
2013-09-10 19:44:51 +02:00
Fabien Potencier
ea8359a870 merged branch bschussek/constraint-annotation-improvement (PR #8979)
This PR was merged into the master branch.

Discussion
----------

[Validator] The default option name can now be omitted when defining constraints as annotations

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

When a constraint has a default option, but other options should be set as well, the name of the default option had to be set explicitly when defining the constraint as annotation:

```php
/** @GreaterThan(value=2, message="Should be greater than 2") */
private $value;
```

After this PR, it is possible to omit the name of the default option:

```php
/** @GreaterThan(2, message="Should be greater than 2") */
private $value;
```

Commits
-------

5499a29 [Validator] The default option name can now be omitted when defining constraints as annotations
2013-09-10 19:41:59 +02:00
Fabien Potencier
fbbbd644be merged branch romainneutron/process-8970 (PR #8983)
This PR was merged into the 2.2 branch.

Discussion
----------

[Process][2.2] Fix #8970 : read output once the process is finished, enable pipe tests on Windows

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #8970
| License       | MIT

This fix the read of file handles after `proc_close` as described in the issue. I enable some stdin=>stdout pipes tests on windows with some dedicated buffer size. Solving the issue, I finally reproduced this [PHP bug](https://bugs.php.net/bug.php?id=65650) that I first described in my PR note in #8924

Most of Windows usage should be okay, but in case of a program throws lots of output and fills the buffer, some data might be lost/corrupted. Should it be documented ? This is a Windows only known issue.

Commits
-------

1e75cf9 [Process] Fix #8970 : read output once the process is finished, enable pipe tests on Windows
2013-09-10 19:38:55 +02:00
Fabien Potencier
e548c688a9 merged branch apfelbox/patch-1 (PR #8982)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #8982).

Discussion
----------

Fixed docblock in UserInterface::getSalt()

This method can return null, too.
See the line above:

> "This can return null if the password was not encoded using a salt."

Commits
-------

3c7b557 Fixed docblock in UserInterface::getSalt()
2013-09-10 19:35:57 +02:00
Jannik Zschiesche
1c623c6d46 Fixed docblock in UserInterface::getSalt()
This method can return null, too.
See the line above:

> "This can return null if the password was not encoded using a salt."
2013-09-10 19:35:57 +02:00
Romain Neutron
1e75cf9da1 [Process] Fix #8970 : read output once the process is finished, enable pipe tests on Windows 2013-09-10 19:14:06 +02:00
Bernhard Schussek
9efdb8e5d0 [Form] Deprecated ChoiceList::getIndicesFor*() methods 2013-09-10 18:24:36 +02:00
Bernhard Schussek
67ba131458 [DoctrineBridge] Improved test coverage of EntityChoiceList 2013-09-10 18:24:34 +02:00
Bernhard Schussek
4d2dc5574d [DoctrineBridge] Improved test coverage of EntityChoiceList 2013-09-10 18:22:14 +02:00
Bernhard Schussek
7879f079f6 [DoctrineBridge] Improved test coverage of EntityChoiceList 2013-09-10 18:20:46 +02:00
Bernhard Schussek
58e7c100dc [Form] Improved test coverage of ChoiceList classes 2013-09-10 18:17:27 +02:00
Bernhard Schussek
9542d72dc0 [Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted 2013-09-10 18:17:27 +02:00
Bernhard Schussek
72b8807630 [Form] Fixed ChoiceList::get*By*() methods to preserve order and array keys 2013-09-10 18:17:27 +02:00
Bernhard Schussek
e1bf07f1f9 [Form] Removed usage of the ChoiceList::getIndicesFor*() methods where they don't offer any performance benefit 2013-09-10 18:17:27 +02:00
Bernhard Schussek
9d3628cf13 [Form] Improved test coverage of ChoiceList classes 2013-09-10 18:05:04 +02:00
Bernhard Schussek
ed837522af [Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted 2013-09-10 18:05:04 +02:00
Bernhard Schussek
30aa1de8dc [Form] Fixed ChoiceList::get*By*() methods to preserve order and array keys 2013-09-10 17:43:42 +02:00
Bernhard Schussek
53f292adcc [Form] Removed usage of the ChoiceList::getIndicesFor*() methods where they don't offer any performance benefit 2013-09-10 17:40:49 +02:00
Bernhard Schussek
5499a29430 [Validator] The default option name can now be omitted when defining constraints as annotations 2013-09-10 17:29:20 +02:00
Bernhard Schussek
b65a51519d [Form] Fixed FormValidator::findClickedButton() not to be called exponentially 2013-09-10 16:01:37 +02:00
Bernhard Schussek
31e5ce5de1 [Form] Improved test coverage of ChoiceList classes 2013-09-10 14:39:29 +02:00
Bernhard Schussek
6283b0e93d [Form] Fixed expanded choice field to be marked invalid when unknown choices are submitted 2013-09-10 14:39:29 +02:00
Bernhard Schussek
79a214fa75 [Form] Fixed ChoiceList::get*By*() methods to preserve order and array keys 2013-09-10 14:39:29 +02:00
Bernhard Schussek
62fbed608a [Form] Removed usage of the ChoiceList::getIndicesFor*() methods where they don't offer any performance benefit 2013-09-10 14:39:29 +02:00
Fabien Potencier
b0b109b422 merged branch peterrehm/router-command (PR #8657)
This PR was squashed before being merged into the master branch (closes #8657).

Discussion
----------

Added option to show controllers optionally in the router:debug command

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Added option to show controllers in the router debug command as a convenience function.

    app/console router:debug --show-controllers

Commits
-------

6fd32f3 Added option to show controllers optionally in the router:debug command
2013-09-09 14:59:52 +02:00
Peter Rehm
6fd32f3da4 Added option to show controllers optionally in the router:debug command 2013-09-09 14:59:51 +02:00
Fabien Potencier
a672bba5cb merged branch enumag/patch-5 (PR #8965)
This PR was merged into the 2.3 branch.

Discussion
----------

Removed duplicate annotation

Commits
-------

5874dba Removed duplicate annotation
2013-09-09 14:26:34 +02:00
Jáchym Toušek
5874dbaebf Removed duplicate annotation 2013-09-09 13:18:54 +02:00
Fabien Potencier
599c86509e merged branch fabpot/request-stack (PR #8904)
This PR was merged into the master branch.

Discussion
----------

Synchronized Service alternative, backwards compatible

This is a rebased version #7707.

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #7707
| License       | MIT
| Doc PR        | symfony/symfony-docs#2956

Todo/Questions

 - [x] do we deprecate the synchronize feature (and removed it in 3.0)?
 - [x] deal with BC for listeners
 - [x] rename RequestContext as we already have a class with the same name in the Routing component?
 - [x] move RequestStack and RequestContext to HttpFoundation?
 - [x] update documentation

Prototype for introducing a ``RequestContext`` in HttpKernel.

This PR keeps the synchronized services feature, however introduces a ``RequestContext`` object additionally, that allows to avoid using synchronized service when injecting ``request_context`` instead of ``request`` into a service. The FrameworkBundle is modified such that it does not depend on synchronized services anymore. Users however can still depend on ``request``, activating the synchronized services feature.

Features:

* Introduced ``REQUEST_FINSHED`` (name is up for grabs) event to handle global state and environment cleanup that should not be done in ``RESPONSE``. Called in both exception or success case correctly
* Changed listeners that were synchronized before to using ``onKernelRequestFinished`` and ``RequestContext`` to reset to the parent request (RouterListener + LocaleListener).
* Changed ``FragmentHandler`` to use the RequestContext. Added some more tests for this class.

* ``RequestStack`` is injected into the ``HttpKernel`` to handle the request finished event and push/pop the stack with requests.

Todos:
* RequestContext name clashes with Routing components RequestContext. Keep or make unique?
* Name for Kernel Request Finished Event could be improved.

Commits
-------

1b2ef74 [Security] made sure that the exception listener is always removed from the event dispatcher at the end of the request
b1a062d moved RequestStack to HttpFoundation and removed RequestContext
93e60ea [HttpKernel] modified listeners to be BC with Symfony <2.4
018b719 [HttpKernel] tweaked the code
f9b10ba [HttpKernel] renamed the kernel finished event
a58a8a6 [HttpKernel] changed request_stack to a private service
c55f1ea added a RequestStack class
2013-09-08 22:22:53 +02:00
Fabien Potencier
dc762e10d7 [HttpKernel] made code more reliable 2013-09-08 19:54:19 +02:00
Fabien Potencier
a010ed4721 Merge branch '2.2' into 2.3
* 2.2:
  [HttpFoundation] fixed regression in the way the request format is handled for duplicated requests (closes #8917)
  [HttpKernel] fixer HInclude src (closes #8951)
  Fixed escaping of service identifiers in configuration
2013-09-08 18:12:21 +02:00
Fabien Potencier
11c3b16a4d merged branch fabpot/format-fix (PR #8961)
This PR was merged into the 2.2 branch.

Discussion
----------

fixed regression in the way the request format is handled

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #8917
| License       | MIT
| Doc PR        | n/a

Commits
-------

719b2bf [HttpFoundation] fixed regression in the way the request format is handled for duplicated requests (closes #8917)
2013-09-08 16:59:13 +02:00
Fabien Potencier
719b2bf67f [HttpFoundation] fixed regression in the way the request format is handled for duplicated requests (closes #8917) 2013-09-08 16:57:01 +02:00
Fabien Potencier
1b2ef74a9a [Security] made sure that the exception listener is always removed from the event dispatcher at the end of the request 2013-09-08 15:18:27 +02:00
Fabien Potencier
d4236ca8ac merged branch fabpot/hinclude-signer (PR #8960)
This PR was merged into the 2.2 branch.

Discussion
----------

[HttpKernel] fix HInclude src (closes #8951)

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #8951
| License       | MIT
| Doc PR        | n/a

fixes a regression introduced in #8879

Commits
-------

49f5027 [HttpKernel] fixer HInclude src (closes #8951)
2013-09-08 09:34:37 +02:00
Fabien Potencier
49f50271d4 [HttpKernel] fixer HInclude src (closes #8951) 2013-09-08 09:24:10 +02:00
Fabien Potencier
eb6b3b0206 merged branch jaikdean/twig-configuration-service-escaping (PR #8686)
This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #8686).

Discussion
----------

[TwigBundle] Fixed escaping of service identifiers in configuration

To recreate, add the following to `config.yml`:

    twig:
        globals:
            foo: "@@bar"

**Expected behaviour:** Twig has a global variable named `foo` containing the string `@bar`.

**Actual behaviour:** ServiceNotFoundException: The service "twig" has a dependency on a non-existent service "@bar".

Environment tested on:
- Symfony Standard Distribution 2.3.2
- OS X 10.8.4
- PHP 5.4.16

Commits
-------

d613110 [TwigBundle] Fixed escaping of service identifiers in configuration
2013-09-08 08:36:16 +02:00
Jaik Dean
c567262b7e Fixed escaping of service identifiers in configuration 2013-09-08 08:36:15 +02:00
Fabien Potencier
b1a062d232 moved RequestStack to HttpFoundation and removed RequestContext 2013-09-08 07:38:03 +02:00
Fabien Potencier
93e60eaeab [HttpKernel] modified listeners to be BC with Symfony <2.4 2013-09-07 21:48:44 +02:00
Fabien Potencier
018b71936f [HttpKernel] tweaked the code 2013-09-07 21:43:50 +02:00
Fabien Potencier
f9b10ba1d5 [HttpKernel] renamed the kernel finished event 2013-09-07 21:43:50 +02:00
Fabien Potencier
a58a8a69fd [HttpKernel] changed request_stack to a private service 2013-09-07 21:43:49 +02:00
Benjamin Eberlei
c55f1ea8af added a RequestStack class 2013-09-07 21:43:49 +02:00
Fabien Potencier
08ec911c8e merged branch Tobion/deprecate-debuggerinterface (PR #8929)
This PR was merged into the master branch.

Discussion
----------

[Templating] deprecate DebuggerInterface

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes: deprecated DebuggerInterface and Debugger
| Tests pass?   | yes
| Fixed tickets | #8926
| License       | MIT

- [x] add suggested optional dependency in templating component to Psr log
- [x] remove ProjectTemplateDebugger from tests

Commits
-------

b853438 [Templating] deprecate DebuggerInterface
2013-09-07 19:45:30 +02:00
Fabien Potencier
ccf2094752 [Console] reverted change in the XML root name (refs #8928) 2013-09-07 18:46:00 +02:00
Fabien Potencier
703fda3b8b merged branch deguif/console_xml_list_improvement (PR #8928)
This PR was squashed before being merged into the master branch (closes #8928).

Discussion
----------

[Console] Improved xml generated when listing commands

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

I marked this PR as a BC break, as it breaks the xml schema generated by the command __app/console list --xml__

It replaces the first node (currently _symfony_) by a more generic node name ( _application_ ) and adds the application name and application version if specified in the _Symfony\Component\Console\Application_ constructor.

Before (using composer console that uses symfony console component):
```
<?xml version="1.0" encoding="UTF-8"?>
<symfony>
    ...
</symfony>
```

After (using composer console that uses symfony console component):
```
<?xml version="1.0" encoding="UTF-8"?>
<application name="Composer" version="x.x.x">
    ...
</application>
```

Commits
-------

7958227 [Console] Improved xml generated when listing commands
2013-09-07 18:43:43 +02:00
François-Xavier de Guillebon
7958227d8b [Console] Improved xml generated when listing commands 2013-09-07 18:43:42 +02:00