Commit Graph

18166 Commits

Author SHA1 Message Date
Fabien Potencier 1367ebb000 updated CHANGELOG for 2.5.6 2014-10-24 08:55:31 +02:00
Fabien Potencier 7b43827b17 Merge branch '2.3' into 2.5
* 2.3:
  enforce memcached version to be 2.1.0
  [FrameworkBundle] improve server:run feedback
  [Form] no need to add the url listener when it does not do anything
  [Form] Fix #11694 - Enforce options value type check in some form types
  Lithuanian security translations
  [Router] Cleanup
  [FrameworkBundle] Fixed ide links
  Add missing argument
  [TwigBundle] do not pass a template reference to twig
  [TwigBundle] show correct fallback exception template in debug mode
  [TwigBundle] remove unused email placeholder from error page
  use meta charset in layouts without legacy http-equiv

Conflicts:
	src/Symfony/Bundle/TwigBundle/Loader/FilesystemLoader.php
	src/Symfony/Bundle/TwigBundle/Resources/views/layout.html.twig
2014-10-24 07:49:22 +02:00
Fabien Potencier d009b2b4c3 minor #12297 enforce memcached version to be 2.1.0 (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

enforce memcached version to be 2.1.0

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

The signature of the `Memcached::get()` method changed with 2.2.0.
Therefore, tests fail in Symfony when mocking `Memcached` in the
`MemcachedSessionHandlerTest` of the HttpFoundation component (see
also php-memcached-dev/php-memcached#126 and
https://bugs.php.net/bug.php?id=66331).

Commits
-------

2ac5c86 enforce memcached version to be 2.1.0
2014-10-23 22:52:33 +02:00
Christian Flothmann 2ac5c86e37 enforce memcached version to be 2.1.0
The signature of the `Memcached::get()` method changed with 2.2.0.
Therefore, tests fail in Symfony when mocking `Memcached` in the
`MemcachedSessionHandlerTest` of the HttpFoundation component (see
also php-memcached-dev/php-memcached#126 and
https://bugs.php.net/bug.php?id=66331).
2014-10-23 15:11:04 +02:00
Fabien Potencier 7c5321cab0 minor #12292 [PropertyAccess] Simplified code (webmozart)
This PR was merged into the 2.5 branch.

Discussion
----------

[PropertyAccess] Simplified code

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

Makes implementation of #10882 more readable.

Simplifies `camelize()` as pointed out in #12275.

Commits
-------

b712ac1 [PropertyAccess] Simplified code
2014-10-23 08:36:05 +02:00
Bernhard Schussek b712ac1174 [PropertyAccess] Simplified code 2014-10-22 19:15:20 +02:00
Bernhard Schussek 91fde699aa minor #12242 [Form] no need to add the url listener when it does not do anything (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] no need to add the url listener when it does not do anything

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

In line with #11696

Commits
-------

7aea1c9 [Form] no need to add the url listener when it does not do anything
2014-10-20 12:59:59 +02:00
Fabien Potencier e1d1832443 minor #12257 [FrameworkBundle] improve server:run feedback (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[FrameworkBundle] improve server:run feedback

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

In #12253, improved feedback was added to the `server:run` command
instructing the user how to terminate the built-in web server. This
is hereby backported to the `2.3` branch.

Commits
-------

264c37a [FrameworkBundle] improve server:run feedback
2014-10-20 11:15:22 +02:00
Christian Flothmann 264c37ab96 [FrameworkBundle] improve server:run feedback
In #12253, improved feedback was added to the `server:run` command
instructing the user how to terminate the built-in web server. This
is hereby backported to the `2.3` branch.
2014-10-19 20:55:06 +02:00
Fabien Potencier 8487ef2c0c minor #12230 [Security] Lithuanian security translations (tadcka)
This PR was merged into the 2.3 branch.

Discussion
----------

[Security] Lithuanian security translations

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

Commits
-------

2e573f1 Lithuanian security translations
2014-10-17 11:15:13 +02:00
Tobias Schultze 7aea1c9808 [Form] no need to add the url listener when it does not do anything 2014-10-17 01:39:03 +02:00
Bernhard Schussek 7a13556443 bug #11696 [Form] Fix #11694 - Enforce options value type check in some form types (kix)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #11696).

Discussion
----------

[Form] Fix #11694 - Enforce options value type check in some form types

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

`Symfony\Component\Form\Extension\Core\Type\RepeatedType` allowed passing strings as options, which caused problems as in #11694.

Commits
-------

0af6467 [Form] Fix #11694 - Enforce options value type check in some form types
2014-10-16 11:06:53 +02:00
Stepan Anchugov 0af6467757 [Form] Fix #11694 - Enforce options value type check in some form types 2014-10-16 11:06:53 +02:00
Tadas Gliaubicas 2e573f1c81 Lithuanian security translations 2014-10-15 16:10:58 +03:00
Fabien Potencier 27d717e7f0 bug #12225 [SecurityBundle] Add trust_resolver variable into expression (zulus)
This PR was merged into the 2.5 branch.

Discussion
----------

[SecurityBundle] Add trust_resolver variable into expression

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

Commits
-------

2822fdb [SecurityBundle] Add trust_resolver variable into expression | Q             | A | ------------- | --- | Bug fix?      | [yes] | New feature?  | [no] | BC breaks?    | [no] | Deprecations? | [no] | Tests pass?   | [yes] | Fixed tickets | [#12224] | License       | MIT | Doc PR        | [-]
2014-10-14 19:21:03 +02:00
Dawid Pakuła 2822fdb39e [SecurityBundle] Add trust_resolver variable into expression
| Q             | A
| ------------- | ---
| Bug fix?      | [yes]
| New feature?  | [no]
| BC breaks?    | [no]
| Deprecations? | [no]
| Tests pass?   | [yes]
| Fixed tickets | [#12224]
| License       | MIT
| Doc PR        | [-]
2014-10-14 16:08:15 +02:00
Fabien Potencier 7dd842ced4 minor #12183 [Router] Cleanup (nkt)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #12183).

Discussion
----------

[Router] Cleanup

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |
Removed unused imports, variables, arguments.

Commits
-------

5a6677d [Router] Cleanup
2014-10-13 14:38:31 +02:00
Nikita Gusakov 5a6677d216 [Router] Cleanup 2014-10-13 14:38:27 +02:00
Fabien Potencier 2ad0642c1b bug #12209 [FrameworkBundle] Fixed ide links (hason)
This PR was merged into the 2.3 branch.

Discussion
----------

[FrameworkBundle] Fixed ide links

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

Commits
-------

baf5f47 [FrameworkBundle] Fixed ide links
2014-10-13 14:25:14 +02:00
Fabien Potencier a27de3d048 minor #12215 Fixed UPGRADE-3.0.md markup (lyrixx)
This PR was merged into the 2.5 branch.

Discussion
----------

Fixed UPGRADE-3.0.md markup

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

Commits
-------

eb5f60c Fixed UPGRADE-3.0.md markup
2014-10-13 14:23:40 +02:00
Christophe Coevoet c9cd76c98e bug #12208 Add missing argument (WouterJ)
This PR was merged into the 2.3 branch.

Discussion
----------

Add missing argument

`->dump` has 5 arguments (the 3th argument, the indent, was not provided in the twig extension).

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

Commits
-------

ac696b8 Add missing argument
2014-10-13 14:11:46 +02:00
Grégoire Pineau eb5f60cabc Fixed UPGRADE-3.0.md markup 2014-10-12 18:47:29 +02:00
Martin Hasoň baf5f47dbc [FrameworkBundle] Fixed ide links 2014-10-11 00:07:52 +02:00
Wouter J ac696b835e Add missing argument 2014-10-11 00:07:13 +02:00
Fabien Potencier fb31e47949 minor #12193 [TwigBundle] remove unused email placeholder from error page (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[TwigBundle] remove unused email placeholder from error page

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

remove unused email placeholder from error page

Commits
-------

a64bd03 [TwigBundle] remove unused email placeholder from error page
2014-10-10 18:57:08 +02:00
Fabien Potencier e38ceff231 bug #12197 [TwigBundle] do not pass a template reference to twig (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[TwigBundle] do not pass a template reference to twig

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

twig does not know about template references and only expects a string.
this commit also fixes that name parsing and locating was called twice for nonexistent templates.

Commits
-------

7fe33e3 [TwigBundle] do not pass a template reference to twig
2014-10-10 18:51:35 +02:00
Fabien Potencier b409b4b473 bug #12196 [TwigBundle] show correct fallback exception template in debug mode (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[TwigBundle] show correct fallback exception template in debug mode

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

In debug mode, the exception controller did not show the correct template in case the format is unknown.
It falls back to html but the logic for `exception_full` was not applied there. So it was just returning the partial html.

Commits
-------

b97acd9 [TwigBundle] show correct fallback exception template in debug mode
2014-10-10 18:48:12 +02:00
Tobias Schultze 7fe33e3b1d [TwigBundle] do not pass a template reference to twig
twig does not know about template references and only expects a string.
this commit also fixes that name parsing and locating was called twice for nonexistent templates
2014-10-10 01:37:49 +02:00
Tobias Schultze b97acd99f1 [TwigBundle] show correct fallback exception template in debug mode 2014-10-10 01:08:09 +02:00
Tobias Schultze a64bd039b9 [TwigBundle] remove unused email placeholder from error page 2014-10-09 22:00:23 +02:00
Fabien Potencier 60d006df43 minor #12192 use meta charset in layouts without legacy http-equiv (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

use meta charset in layouts without legacy http-equiv

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

`<meta charset="UTF-8" />` is now the recommended approach

Commits
-------

96e7b01 use meta charset in layouts without legacy http-equiv
2014-10-09 19:34:46 +02:00
Tobias Schultze 96e7b01602 use meta charset in layouts without legacy http-equiv 2014-10-09 18:42:17 +02:00
Fabien Potencier b4ed800529 Merge branch '2.3' into 2.5
* 2.3:
  [Routing] add tests for RequestContext
  [Routing] fix inconsistencies in RequestContext
  don't raise warnings when exception is thrown
2014-10-09 18:00:03 +02:00
Fabien Potencier 4dad67e104 minor #12190 [Routing] fix type inconsistencies in RequestContext (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[Routing] fix type inconsistencies in RequestContext

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

Fixed inconsistencies in RequestContext:

- [x] port setters and getters inconsistent with constructor (string vs int)
- [x] host should be lowercased for easier case-insensitivity, see #9072
- [x] fix setQueryString with null
- [x] fix return phpdoc typehint

Commits
-------

676c4a0 [Routing] add tests for RequestContext
f61607f [Routing] fix inconsistencies in RequestContext
2014-10-09 17:56:46 +02:00
Tobias Schultze 676c4a0253 [Routing] add tests for RequestContext 2014-10-09 17:28:58 +02:00
Tobias Schultze f61607f5cb [Routing] fix inconsistencies in RequestContext 2014-10-09 17:27:10 +02:00
Fabien Potencier a45c187132 bug #12187 [CssSelector] don't raise warnings when exception is thrown (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[CssSelector] don't raise warnings when exception is thrown

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

`array_map()` raises a warning when an exception is thrown inside the
callback (see https://bugs.php.net/bug.php?id=55416). To avoid these
warnings, `selectorToXPath()` is applied inside the loop.

Commits
-------

38e9623 don't raise warnings when exception is thrown
2014-10-09 16:28:21 +02:00
Christian Flothmann 38e9623ca4 don't raise warnings when exception is thrown
`array_map()` raises a warning when an exception is thrown inside the
callback (see https://bugs.php.net/bug.php?id=55416). To avoid these
warnings, `selectorToXPath()` is applied inside the loop.
2014-10-09 14:30:02 +02:00
Bernhard Schussek d2c6c34067 bug #12151 [Framework][DX] Set the proper validator class according to the configured api version (peterrehm)
This PR was submitted for the master branch but it was merged into the 2.5 branch instead (closes #12151).

Discussion
----------

[Framework][DX] Set the proper validator class according to the configured api version

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

With this change the proper validator class will be dumped and therefore used for code completion in IDE's like PhpStorm which rely on the dumped container.

If you have 2.4 or 2.5-bc API the class will be

    Symfony\Component\Validator\ValidatorInterface

If you use the 2.5 API the class will be

    Symfony\Component\Validator\Validator\ValidatorInterface

I consider this also as important for the developer experience since a wrong type hint can easily cause issues since the method signatures of the validate() method have changed.

From

````php
    public function validate($value, $groups = null, $traverse = false, $deep = false);
````

To

````php
    public function validate($value, $constraints = null, $groups = null);
````

So if you want to validate specific groups you now have to pass them as the third argument instead of the second.

Commits
-------

eb3dd0f [Framework][DX] Set the proper validator class according to the configured api version
2014-10-07 14:35:25 +02:00
Peter Rehm eb3dd0ff29 [Framework][DX] Set the proper validator class according to the configured api version 2014-10-07 14:35:24 +02:00
Fabien Potencier 643fdc8124 Merge branch '2.3' into 2.5
* 2.3:
  [FrameworkBundle] minor fix
  [Console] add a dot
  [Form] remove unnecessary call

Conflicts:
	src/Symfony/Component/Console/Tests/Fixtures/application_1.json
	src/Symfony/Component/Console/Tests/Fixtures/application_2.json
2014-10-05 15:57:04 +02:00
Fabien Potencier 39246def18 bug #12128 [Console] clean handling of :: passed to find() (xabbuh)
This PR was merged into the 2.5 branch.

Discussion
----------

[Console] clean handling of :: passed to find()

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

Commands cannot have a double colon in their name (for example, a command can't be named `foo::bar`). However, one might try to retrieve a `foo::bar` command from the application like this:

```php
$command = $application->find('foo::bar');
```

The `findAlternatives()` method of the `Application` class fails to handle these strings when there are commands registered with a name consisting of at least three parts (e.g. a command is named `foo:bar:baz`). In this case, an empty string is passed to `strpos()` causing PHP to raise a warning.

In a "real" Symfony application, calling `php ./app/console cache::clear` now results in the following error message:

```
  [InvalidArgumentException]
  There are no commands defined in the "cache:" namespace.
  Did you mean this?
      cache
```

Commits
-------

baab4ed clean handling of :: passed to find()
2014-10-05 15:48:36 +02:00
Fabien Potencier 6df49bb9e1 minor #12130 [FrameworkBundle] minor fix (NAYZO)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #12130).

Discussion
----------

[FrameworkBundle] minor fix

A small fix in the "parse" function of the "ControllerNameParser" Controller.
We should use "!==" instead of "!=" since it's better and faster in this case.

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

Commits
-------

cd966c6 [FrameworkBundle] minor fix
2014-10-05 15:47:18 +02:00
Ala Eddine Khefifi cd966c6826 [FrameworkBundle] minor fix
A small fix in the "parse" function of the "ControllerNameParser" Controller.
We should use "!==" instead of "!=" since it's better and faster in this case.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | NA
| License       | MIT
| Doc PR        | NA
2014-10-05 15:47:08 +02:00
Fabien Potencier db44606580 minor #12135 [Console] add a dot (MightyBranch)
This PR was submitted for the 2.5 branch but it was merged into the 2.3 branch instead (closes #12135).

Discussion
----------

[Console] add a dot

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

Added a "." at the end of an InputOption description, as the rest of the InputOption descriptions have it.

Commits
-------

fb0e685 [Console] add a dot
2014-10-05 15:45:15 +02:00
MightyBranch fb0e685286 [Console] add a dot 2014-10-05 15:45:10 +02:00
Fabien Potencier 34a638bc64 minor #12134 [Form] remove unnecessary call (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] remove unnecessary call

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

Commits
-------

4e45a39 [Form] remove unnecessary call
2014-10-05 09:29:26 +02:00
Tobias Schultze 4e45a39cc0 [Form] remove unnecessary call 2014-10-05 05:13:10 +02:00
Christian Flothmann baab4edf35 clean handling of :: passed to find()
Commands cannot have a double colon in their name (for example, a
command can't be named `foo::bar`). However, one might try to
retrieve a `foo::bar` command from the application like this:

```php
$command = $application->find('foo::bar');
```

The `findAlternatives()` method of the `Application` class fails to
handle these strings when there are commands registered with a name
consisting of at least three parts (e.g. a command is named
`foo:bar:baz`). In this case, an empty string is passed to `strpos()`
causing PHP to raise a warning.
2014-10-04 12:23:49 +02:00
Fabien Potencier adbde8ac7a minor #12093 [EventDispatcher] fix RegisterListenersPass test (xabbuh)
This PR was merged into the 2.5 branch.

Discussion
----------

[EventDispatcher] fix RegisterListenersPass test

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

With #12088 being merged, the test needs to be adapted to reflect the 2.5 specific changes.

Commits
-------

9d2120b fix RegisterListenersPass test
2014-10-02 07:56:02 +02:00