Commit Graph

16640 Commits

Author SHA1 Message Date
Martin Hasoň 0bd19aa491 [Bridge/Propel1] Changed deps to accepts all upcoming propel1 versions 2014-11-17 21:30:08 +01:00
Christian Flothmann 367ed3ce85 compare version using PHP_VERSION_ID
To let opcode caches optimize cached code, the `PHP_VERSION_ID`
constant is used to detect the current PHP version instead of calling
`version_compare()` with `PHP_VERSION`.
2014-11-17 17:27:42 +01:00
Jerome TAMARELLE 656d45f06a [Form] Add doc for FormEvents 2014-11-17 14:54:58 +01:00
Fabien Potencier 8d18c98de0 minor #12372 [Yaml] don't override internal PHP constants (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[Yaml] don't override internal PHP constants

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

Commits
-------

376cc03 don't override internal PHP constants
2014-11-16 19:04:21 +01:00
Christian Flothmann 376cc0332d don't override internal PHP constants 2014-11-16 18:59:41 +01:00
Fabien Potencier 83c6ead761 minor #12468 Update filesystem readme.md to include exists method (ericduran)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #12468).

Discussion
----------

Update filesystem readme.md to include exists method

Read the contributing docs, I don't think I missed anything but to be fair I went through it pretty fast :-/

Commits
-------

16c1b66 Update filesystem readme.md to include exists method
2014-11-16 18:27:15 +01:00
Eric J. Duran 16c1b6669d Update filesystem readme.md to include exists method 2014-11-16 18:27:15 +01:00
Fabien Potencier b53adf9e37 minor #12299 Add machine readable events (dawehner)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #12299).

Discussion
----------

Add machine readable events

As discussed in [#11878] it would be great to have some simple machine readable way to find events

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

Commits
-------

ace9a22 Add machine readable events
2014-11-16 18:21:19 +01:00
Daniel Wehner ace9a22101 Add machine readable events 2014-11-16 18:21:02 +01:00
Fabien Potencier 5decdd7734 minor #12449 fixed typo (ojhaujjwal)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #12449).

Discussion
----------

fixed typo

Commits
-------

a7c2a9a fixed typo
2014-11-12 09:11:35 +01:00
Ujjwal Ojha a7c2a9a623 fixed typo 2014-11-12 09:11:34 +01:00
Fabien Potencier 58eab0a3d4 minor #12450 [Translations] Added missing Hebrew language trans-unit sources (excelwebzone)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #12450).

Discussion
----------

[Translations] Added missing Hebrew language trans-unit sources

[Form] [Validator] [Translations] added missing files
[Security][Translations] added missing files

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

Commits
-------

918b16b [Translations] Added missing Hebrew language trans-unit sources
2014-11-12 09:10:14 +01:00
Michael H. Arieli 918b16b16c [Translations] Added missing Hebrew language trans-unit sources 2014-11-12 09:10:13 +01:00
Fabien Potencier 0cbba7f317 bug #12393 [DependencyInjection] inlined factory not referenced (boekkooi)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #12393).

Discussion
----------

[DependencyInjection] inlined factory not referenced

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

While working with the DI I encountered a `You have requested a non-existent service "xxxxx"` exception.
Research it seems that a private reference was inlined but the private factory that was also referencing to the service was ignored.

A example of the problem:
```XML
        <service id="manager"
                 class="\stdClass"
                 factory-method="getX"
                 factory-service="factory"
                 public="false">
            <argument>X</argument>
        </service>
        <service id="repository"
                 class="\stdClass"
                 factory-method="getRepository"
                 factory-service="manager"
                 public="false">
            <argument>X</argument>
        </service>
        <service id="storage" class="\stdClass" public="false">
            <argument type="service" id="manager"/>
            <argument type="service" id="repository"/>
        </service>
```

What happens before the patch:
1. repository get's inlined
2. manager get's inlined for the first argument
3. manager get's removed since there was no reference.

After the first commit the following will happen:
1. repository get's inlined
2. manager get's inlined for the first argument
3. manager will not be removed since the inlined repository still references manager

This introduced a smell since InlineServiceDefinitionsPass was still inlining the manager for the first argument.

To fix this I have chosen that not inline factories if they are used more then once by the same definition.

So after the second commit the following will happen:
1. repository get's inlined

Personally I feel that the InlineServiceDefinitionsPass patch isn't the best possible one but that a different fix would probably mean breaking BC so it's probably a good idea to look at this for Symfony 3.0.

Commits
-------

7816a98 [DependencyInjection] inlined factory not referenced
2014-11-12 08:52:53 +01:00
Warnar Boekkooi 7816a98204 [DependencyInjection] inlined factory not referenced 2014-11-12 08:52:52 +01:00
Fabien Potencier 1f55706be9 bug #12436 [Filesystem] Fixed case for empty folder (yosmanyga)
This PR was merged into the 2.3 branch.

Discussion
----------

[Filesystem] Fixed case for empty folder

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

The mirror function should work with an empty folder as source. It should create an empty folder on target path.

Commits
-------

5321741 Fixed case for empty folder
2014-11-09 08:44:54 +01:00
Yosmany Garcia 5321741ab5 Fixed case for empty folder 2014-11-08 14:35:51 -05:00
Fabien Potencier 08bebaba2c minor #12398 [TwigBridge] TwigExtractor tests require the Finder component (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[TwigBridge] TwigExtractor tests require the Finder component

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

The tests for the `TwigExtractor`(as introduced in #12377) require the Finder component to be run properly.

Commits
-------

8fc3e03 TwigExtractor tests require the Finder component
2014-11-03 18:52:52 +01:00
Christian Flothmann 8fc3e03a0e TwigExtractor tests require the Finder component 2014-11-03 16:33:47 +01:00
Fabien Potencier a08fda5e5c added missing files 2014-11-03 00:30:21 +01:00
Fabien Potencier 8d2c2964bb minor #12168 [HttpFoundation] CSRF warning docs on Request::enableHttpMethodParameterOverride() (Kristof Van Cauwenbergh)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpFoundation] CSRF warning docs on Request::enableHttpMethodParameterOverride()

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

Since I wanted to understand this issue I did some research and altered the comment block. Is this a clear enough explanation or does it need more?

Commits
-------

deb70ab CSRF warning docs on Request::enableHttpMethodParameterOverride()
2014-11-02 02:30:13 +01:00
Fabien Potencier b7f8f4eab7 bug #12370 [Yaml] improve error message for multiple documents (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[Yaml] improve error message for multiple documents

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

The YAML parser doesn't support multiple documents. This pull requests
improves the error message when the parser detects multiple YAML
documents.

see also #11840

Commits
-------

c77fdcb improve error message for multiple documents
2014-11-02 02:10:02 +01:00
Fabien Potencier f3ad406599 minor #12377 Translation debug improve error reporting (mrthehud, fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

Translation debug improve error reporting

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

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

Commits
-------

97a8f7e [TwigBundle] added a test
b1bffc0 Indicate which file was being parsed if an exception is thrown while running translation:debug
2014-11-02 02:05:26 +01:00
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