Commit Graph

16667 Commits

Author SHA1 Message Date
Fabien Potencier
ec82e32b13 bug #12170 [Form] fix form handling with OPTIONS request method (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[Form] fix form handling with OPTIONS request method

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

The OPTIONS request is just handled as any other request method. And accoring to the spec, an options request can also contain a request body like a POST. This only applied when using the deprecated form processing with `$form->submit($request)`. The change also makes the handling consistent with the `handleRequest` behavior via https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/Extension/HttpFoundation/HttpFoundationRequestHandler.php

Commits
-------

28eabd8 [Form] fix form handling with unconventional request methods like OPTIONS
2014-11-02 02:03:36 +01:00
Fabien Potencier
97a8f7e395 [TwigBundle] added a test 2014-11-02 01:56:08 +01:00
James Hudson
b1bffc0516 Indicate which file was being parsed if an exception is thrown while running translation:debug
When running the translation:debug command, if a template contains invalid twig markup,
an exception is thrown. This patch rethrows a new exception that includes the filename
being parsed in the message to aid debuging.
2014-11-02 01:45:12 +01:00
Fabien Potencier
9ea4296028 bug #12235 [Validator] Fixed Regex::getHtmlPattern() to work with complex and negated patterns (webmozart)
This PR was merged into the 2.3 branch.

Discussion
----------

[Validator] Fixed Regex::getHtmlPattern() to work with complex and negated patterns

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

According to my own testing, this should fix the generation of HTML patterns when `Regex::$match` is set to false. Additionally, patterns containing pipes (or statements) are fixed. See the test cases for examples.

Commits
-------

bf006f5 [Validator] Fixed Regex::getHtmlPattern() to work with complex and negated patterns
2014-11-02 01:32:54 +01:00
Fabien Potencier
eb4b20f471 bug #12326 [Session] remove invalid hack in session regenerate (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[Session] remove invalid hack in session regenerate

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

The original issue #7380 was just caused because the developer missed to save the session before doing the redirect. That's all. Such mistakes won't happen anymore with #12341

This reverts #8270 and following. Also it makes absolutely no sense to do this only for the `files` save handler which creates huge inconsistencies. All save handlers are affected and it's more a documentation thing.

Commits
-------

703d906 [Session] remove invalid workaround in session regenerate
2014-11-02 01:24:31 +01:00
Fabien Potencier
9c1e4686eb bug #12341 [Kernel] ensure session is saved before sending response (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[Kernel] ensure session is saved before sending response

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

Saves the session, in case it is still open, before sending the response.

This ensures several things in case the developer did not save the session explicitly:

- If a session save handler without locking is used, it ensures the data is available
on the next request, e.g. after a redirect. PHPs auto-save at script end via
session_register_shutdown is executed after fastcgi_finish_request. So in this case
the data could be missing the next request because it might not be saved the moment
the new request is processed.

- A locking save handler (e.g. the native 'files') circumvents concurrency problems like
the one above. By saving the session before long-running things in the terminate event,
we ensure the session is not blocked longer than needed.

- When regenerating the session ID no locking is involved in PHPs session design. See
https://bugs.php.net/bug.php?id=61470 for a discussion. So in this case, the session must
be saved anyway before sending the headers with the new session ID. Otherwise session
data could get lost again for concurrent requests with the new ID. One result could be
that you get logged out after just logging in.

This listener should be executed as one of the last listeners, so that previous listeners
can still operate on the open session. This prevents the overhead of restarting it.
Listeners after closing the session can still work with the session as usual because
 Symfonys session implementation starts the session on demand. So writing to it after
it is saved will just restart it.

Commits
-------

b7bfef0 [Kernel] ensure session is saved before sending response
2014-11-02 01:22:14 +01:00
Fabien Potencier
495cba6e07 minor #12371 [ClassLoader] Cast $useIncludePath property to boolean (GeertDD)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #12371).

Discussion
----------

[ClassLoader] Cast $useIncludePath property to boolean

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

Commits
-------

32001a4 [ClassLoader] Cast $useIncludePath property to boolean
2014-11-02 01:04:15 +01:00
Geert De Deckere
32001a44a1 [ClassLoader] Cast $useIncludePath property to boolean 2014-11-02 01:04:15 +01:00
Fabien Potencier
ef0bf427b5 minor #12374 [HttpFoundation] Minor spelling fix in PHPDocs (GeertDD)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #12374).

Discussion
----------

[HttpFoundation] Minor spelling fix in PHPDocs

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

Commits
-------

35791fd [HttpFoundation] Minor spelling fix in PHPDocs
2014-11-02 01:01:55 +01:00
Geert De Deckere
35791fd0af [HttpFoundation] Minor spelling fix in PHPDocs 2014-11-02 01:01:55 +01:00
Christian Flothmann
c77fdcb2dc improve error message for multiple documents
The YAML parser doesn't support multiple documents. This pull requests
improves the error message when the parser detects multiple YAML
documents.
2014-11-01 13:21:10 +01:00
Fabien Potencier
97bb22c48c minor #12206 [Config] fix filelocator with empty name (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[Config] fix filelocator with empty name

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

fix filelocator with empty name + phpdoc in config component

Commits
-------

63b8c07 [DependencyInjection] use inheritdoc for loaders
ddd2fe2 [Config] fix filelocator with empty name
2014-10-30 17:06:22 +01:00
Tobias Schultze
703d906758 [Session] remove invalid workaround in session regenerate
The original issue #7380 was just caused because the developer missed to save the session before doing the redirect. That's all. This reverts #8270 and following.
2014-10-30 15:59:22 +01:00
Tobias Schultze
b7bfef07be [Kernel] ensure session is saved before sending response 2014-10-30 15:44:48 +01:00
Fabien Potencier
9a8ac524df bug #12329 [Routing] serialize the compiled route to speed things up (Tobion)
This PR was merged into the 2.3 branch.

Discussion
----------

[Routing] serialize the compiled route to speed things up

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | not really
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #12012, #12220
| License       | MIT
| Doc PR        | -

This also makes the CompiledRoute implement Serializable in order to:

1. make the serialization format shorter
2. have no null bytes in there, which the native serializer add for private properties, and thus would complicate saving in databases etc.
3.  Since the Route now includes the CompiledRoute in the serialization, the CompiledRoute serialization must be consistent as well. We can only ensure that in future symfony version by implementing Serializable.

We should add to our symfony BC promise, that only classes that implement Serializable are ensured to be deserializable correctly with serialized representations of the class in previous symfony versions.

Commits
-------

fd88de7 [Routing] serialize the compiled route to speed things up
2014-10-28 17:07:24 +01:00
Tobias Schultze
fd88de79ff [Routing] serialize the compiled route to speed things up
This also makes the CompiledRoute implement Serializable in order to:
1. make the serialization format shorter
2. have no null bytes in there, which the native serializer add for private properties, and thus would complicate saving in databases etc.
3. We should add to our symfony BC promise, that only classes that implement Serializable are ensured to be deserializable correctly with serialized representations of the class in previous symfony versions.
2014-10-27 15:27:32 +01:00
Fabien Potencier
20e7cf12ba minor #12293 Remove aligned '=>' and '=' (disquedur)
This PR was squashed before being merged into the 2.3 branch (closes #12293).

Discussion
----------

Remove aligned '=>' and '='

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | [https://github.com/symfony/symfony/issues/12284]
| License       | MIT

Could you said to me if i should make an other PR for 2.5 branch.

Commits
-------

51312d3 Remove aligned '=>' and '='
2014-10-26 08:31:56 +01:00
Disquedur
51312d31cc Remove aligned '=>' and '=' 2014-10-26 08:30:58 +01:00
Fabien Potencier
383b7fa783 bug #12316 Break infinite loop while resolving aliases (chx)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #12316).

Discussion
----------

Break infinite loop while resolving aliases

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

Commits
-------

acbde50 Break infinite loop while resolving aliases
2014-10-26 08:26:27 +01:00
Karoly Negyesi
acbde502bf Break infinite loop while resolving aliases 2014-10-26 08:26:27 +01:00
Fabien Potencier
6a62318894 bug #12313 [Security][listener] change priority of switchuser (aitboudad)
This PR was merged into the 2.3 branch.

Discussion
----------

[Security][listener] change priority of switchuser

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

Hi,
I have the following users:
  - Manager: Allowed to access to (/admin) and has a role ROLE_ALLOWED_TO_SWITCH
  - Partner: Allowed to access to (/partner)

When I attempt to switch to partner user I get "Access denied", well I think the switchuser listener must be registred before access listener.

Commits
-------

5f8047d [Security][listener] change priority of switchuser
2014-10-24 19:47:28 +02:00
Fabien Potencier
39d91b9f43 minor #12310 Improved the phpdoc for security token classes (stof)
This PR was merged into the 2.3 branch.

Discussion
----------

Improved the phpdoc for security token classes

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

This will avoid to have Scrutinizer complaining that we pass an array of string rather than an array of RoleInterface for instance.

Commits
-------

7b6d115 Improved the phpdoc for security token classes
2014-10-24 19:46:43 +02:00
Abdellatif AitBoudad
5f8047d242 [Security][listener] change priority of switchuser 2014-10-24 14:38:29 +01:00
Christophe Coevoet
7b6d115a27 Improved the phpdoc for security token classes 2014-10-24 11:21:28 +02:00
Fabien Potencier
016b0a9ad2 bumped Symfony version to 2.3.22 2014-10-24 08:50:18 +02:00
Fabien Potencier
0a6e90e091 updated VERSION for 2.3.21 2014-10-24 07:54:08 +02:00
Fabien Potencier
297b704287 update CONTRIBUTORS for 2.3.21 2014-10-24 07:53:52 +02:00
Fabien Potencier
f8bc2b092f updated CHANGELOG for 2.3.21 2014-10-24 07:53:40 +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
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
Bernhard Schussek
bf006f5202 [Validator] Fixed Regex::getHtmlPattern() to work with complex and negated patterns 2014-10-20 12:47:44 +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
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
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
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