Commit Graph

18863 Commits

Author SHA1 Message Date
Tobias Schultze
63b8c07e5b [DependencyInjection] use inheritdoc for loaders 2014-10-13 21:10:53 +02:00
Tobias Schultze
ddd2fe2032 [Config] fix filelocator with empty name 2014-10-13 20:50:59 +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
8e42756c37 minor #12191 [Security] More accurate docblocks for AbstractVoter (johnkary)
This PR was squashed before being merged into the 2.6-dev branch (closes #12191).

Discussion
----------

[Security] More accurate docblocks for AbstractVoter

| Q             | A
| ------------- | ---
| Fixed tickets | none
| License       | MIT

Two fixes for docblocks in AbstractVoter:

1. Previously the example return value for a few methods used PHP's short array syntax (>= PHP 5.4). Symfony minimum PHP is 5.3 so the docblock examples should be compatible with that.

2. Previously getSupportedClasses() docblock had an example return value showing a FQCN using a leading slash. AbstractVoter looks for `get_class($object)` in the array of getSupportedClasses() returned values, and `get_class()` returns the FQCN without a leading slash.

Commits
-------

ed226ec [Security] More accurate docblocks for AbstractVoter
2014-10-10 18:59:55 +02:00
John Kary
ed226ec258 [Security] More accurate docblocks for AbstractVoter 2014-10-10 18:59:52 +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
Kévin Dunglas
48491c4441 [Serializer] Handle circular references 2014-10-09 19:55:06 +02:00
Fabien Potencier
e19680f31a feature #9073 [Routing] unify RequestContext as fluent class (Tobion)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[Routing] unify RequestContext as fluent class

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

- [x] <del>some methods were tagged with `@api` which makes no sense since the class is already tagged as stable. this automatically includes all methods. also our bc promise is only about `@api` on classes</del>
- [x] setParameters the only fluent method! I made them all fluent which makes sense for this class

Commits
-------

41412f9 [Routing] unify fluent interface in RequestContext
2014-10-09 19:36:19 +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
Tobias Schultze
41412f99f0 [Routing] unify fluent interface in RequestContext 2014-10-09 18:12:58 +02:00
Fabien Potencier
8203c66e3a Merge branch '2.5'
* 2.5:
  [Routing] add tests for RequestContext
  [Routing] fix inconsistencies in RequestContext
  don't raise warnings when exception is thrown
  [Framework][DX] Set the proper validator class according to the configured api version
2014-10-09 18:00:19 +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
Fabien Potencier
cf3cd9578c minor #12184 [FrameworkBundle] add changelog entry for web server commands (xabbuh)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[FrameworkBundle] add changelog entry for web server commands

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

I just noticed that I forgot to add a changelog entry in #11311.

Commits
-------

292088f add changelog entry for web server commands
2014-10-09 12:58:32 +02:00
Christian Flothmann
292088ffd5 add changelog entry for web server commands 2014-10-09 12:52:43 +02:00
Fabien Potencier
4430f75e89 bug #12180 Prevent an empty choice list being passed in debug:container (weaverryan)
This PR was squashed before being merged into the 2.6-dev branch (closes #12180).

Discussion
----------

Prevent an empty choice list being passed in debug:container

Hi guys!

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

Currently, there is a "bug" where if you pass an empty array to ChoiceList, then you get this following warning from `QuestionHelper::doAsk()`:

>
Warning: max(): Array must contain at least one element

That should probably be fixed too, but it would go on an earlier version, so I didn't want to mix fixes for different branches.

Thanks!

Commits
-------

ef23b63 Prevent an empty choice list being passed in debug:container
2014-10-09 01:30:22 +02:00
Ryan Weaver
ef23b631e0 Prevent an empty choice list being passed in debug:container 2014-10-09 01:30:11 +02:00
Fabien Potencier
ade0db7fac bug #12181 [HttpKernel] properly handle exceptions in translator listener (xabbuh)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[HttpKernel] properly handle exceptions in translator listener

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

The `setLocale()` method can throw an `\InvalidArgumentException` when
an invalid locale has been passed. These exceptions must be handled by
the `TranslatorListener` which should then pass the request's default
locale instead.

Commits
-------

d3a0a55 properly handle exceptions in translator listener
2014-10-09 01:28:28 +02:00
Fabien Potencier
d3e4905241 bug #12182 [FrameworkBundle] register TranslatorListener service (xabbuh)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[FrameworkBundle] register `TranslatorListener` service

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

Since the `TranslatorListener` was not registered as a service, the
proper locale would never have been passed from the current request
to the translator.

Commits
-------

3b578a6 register `TranslatorListener` service
2014-10-09 01:26:46 +02:00
Christian Flothmann
3b578a63b6 register TranslatorListener service
Since the `TranslatorListener` was not registered as a service, the
proper locale would never have been passed from the current request
to the translator.
2014-10-08 22:43:39 +02:00
Christian Flothmann
d3a0a55455 properly handle exceptions in translator listener
The `setLocale()` method can throw an `\InvalidArgumentException` when
an invalid locale has been passed. These exceptions must be handled by
the `TranslatorListener` which should then pass the request's default
locale instead.
2014-10-08 22:39:21 +02:00
Tobias Schultze
28eabd84f8 [Form] fix form handling with unconventional request methods like OPTIONS 2014-10-08 20:31:39 +02:00
Adrian Olek
e7ad1729fd Removed fixed height from profiler resume box. 2014-10-07 23:43:42 +02:00
Fabien Potencier
46d18f44ce minor #12108 [Routing] Moving include instruction to separate method (Strate)
This PR was submitted for the 2.5 branch but it was merged into the 2.6-dev branch instead (closes #12108).

Discussion
----------

[Routing] Moving include instruction to separate method

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

Commits
-------

60ce31d [Routing] Moving include instruction to separate method
2014-10-07 16:17:15 +02:00
Artur Eshenbrener
60ce31d284 [Routing] Moving include instruction to separate method 2014-10-07 16:17:15 +02:00
Kristof Van Cauwenbergh
deb70aba15 CSRF warning docs on Request::enableHttpMethodParameterOverride()
[HttpFoundation] fixed the docs so that it gives some explanation about how you are vulnerable to CSRF when you enable the httpMethodeParameterOverride
2014-10-07 16:13:01 +02:00
Fabien Potencier
69770bd191 minor #12145 [VarDumper] Sfdump JS ns and VarCloner replacing Ext+PhpCloner (nicolas-grekas)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[VarDumper] Sfdump JS ns and VarCloner replacing Ext+PhpCloner

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

As VarDumper is independant of the WDT, this patch creates a new JavaScript namespace used for HTML dumps.

Commits
-------

da96ad8 [VarDumper] Sfdump JS ns and VarCloner replacing Ext+PhpCloner
2014-10-07 16:10:40 +02:00
Fabien Potencier
0476ce883c minor #12146 [HttpFoundation] Fix PdoSessionHandler to work properly with streams (rybakit)
This PR was squashed before being merged into the 2.6-dev branch (closes #12146).

Discussion
----------

[HttpFoundation] Fix PdoSessionHandler to work properly with streams

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

Ref: https://github.com/symfony/symfony/pull/10931#discussion_r18387931

Commits
-------

9531a2b [HttpFoundation] Fix PdoSessionHandler to work properly with streams
2014-10-07 16:06:26 +02:00
Eugene Leonovich
9531a2b3f1 [HttpFoundation] Fix PdoSessionHandler to work properly with streams 2014-10-07 16:06:18 +02:00
Fabien Potencier
530813519e minor #12150 [Framework+SecurityBundle] remove recently introduced *.class parameters (nicolas-grekas)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[Framework+SecurityBundle] remove recently introduced *.class parameters

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

This is just a cleanup that removes `*.class` parameters introduced in the master branch (and not in the 2.5 one).
#12145 also removes the remaining params for the Debug/TwigBundle

Commits
-------

56ae544 [Framework+SecurityBundle] remove recently introduced *.class parameters
2014-10-07 16:01:27 +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
Maciej Schmidt
9a0b2cc818 [TwigBridge] Replace default list style to icon 2014-10-07 12:18:14 +02:00