Commit Graph

19054 Commits

Author SHA1 Message Date
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
85b016f37b minor #12403 [Routing] correctly initialize condition as string (Tobion)
This PR was merged into the 2.5 branch.

Discussion
----------

[Routing] correctly initialize condition as string

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

Commits
-------

ffe863c [Routing] correctly initialize condition as string
2014-11-09 08:53:45 +01:00
Fabien Potencier
ad74db9916 bug #12411 [VarDumper] Use Unicode Control Pictures (nicolas-grekas)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[VarDumper] Use Unicode Control Pictures

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

I wasn't satisfied with how control chars where dumped, until I found the [Unicode Control Pictures](http://www.unicode.org/charts/PDF/U2400.pdf).
This PR takes advantage of them:

![capture du 2014-11-04 10 52 15](https://cloud.githubusercontent.com/assets/243674/4897678/752fac20-6408-11e4-9186-7b788c9a88bb.png)

Commits
-------

6258ae8 [DebugBundle] remove README.md
50021bd [Debug] No gc_collect_cycles(), it's costly and can segfault
b592e90 [VarDumper] inline dump() function loading
cd076e4 [VarDumper] Use Unicode Control Pictures
2014-11-09 08:50:20 +01:00
Fabien Potencier
4faf360653 minor #12422 Fixed whitespace control for password form widget (peterrehm)
This PR was merged into the 2.5 branch.

Discussion
----------

Fixed whitespace control for password form widget

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

When removing the spaceless tags the additional needed `-` has been forgotten for the password widget.

By the way, is in the {% tags the - at the end of the starting and at the beginning of the ending tag sufficient?
This does not correspond to the twig documentation where it is always documented on the beginning and at the end.

````php
{% block hidden_widget -%}
    {% set type = type|default('hidden') %}
    {{- block('form_widget_simple') -}}
{%- endblock hidden_widget -%}
````

Commits
-------

809cf24 Fixed whitespace control for password form widget
2014-11-09 08:46:24 +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
Fabien Potencier
5d8fbb86ce minor #12427 [SecurityBundle] Added AuthorizationChecker and TokenStorage to class cache (iltar)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[SecurityBundle] Added AuthorizationChecker and TokenStorage to class cache

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| Tests pass?   | yes
| License       | MIT

I've added the new `AuthorizationChecker` and `TokenStorage` to the list of classes to compile. The `SecurityContext` was already in there, but the new ones were missing. They are added because if the `SecurityContext` is always loaded, those are always loaded as of `2.6`.

Commits
-------

d238397 [SecurityBundle] Added AuthorizationChecker and TokenStorage to class cache
2014-11-09 08:40:26 +01:00
Yosmany Garcia
5321741ab5 Fixed case for empty folder 2014-11-08 14:35:51 -05:00
Nicolas Grekas
6258ae863b [DebugBundle] remove README.md 2014-11-07 21:20:29 +01:00
Iltar van der Berg
d238397c9c [SecurityBundle] Added AuthorizationChecker and TokenStorage to class cache 2014-11-07 11:59:28 +01:00
Nicolas Grekas
50021bdeaa [Debug] No gc_collect_cycles(), it's costly and can segfault 2014-11-06 21:49:33 +01:00
Nicolas Grekas
b592e90177 [VarDumper] inline dump() function loading 2014-11-06 21:49:33 +01:00
Nicolas Grekas
cd076e4cb7 [VarDumper] Use Unicode Control Pictures 2014-11-06 21:49:33 +01:00
Fabien Potencier
f1c34f937d minor #12413 Remove aligned '=>' and '=' (disquedur)
This PR was merged into the 2.6-dev branch.

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

PR for 2.3 branch : https://github.com/symfony/symfony/pull/12293
PR for 2.5 branch : https://github.com/symfony/symfony/pull/12362

Commits
-------

ac1f2b7 Remove aligned '=>' and '='
2014-11-06 20:46:11 +01:00
Peter Rehm
809cf24675 Fixed whitespace control for password form widget 2014-11-06 13:46:31 +01:00
Disquedur
ac1f2b76d6 Remove aligned '=>' and '=' 2014-11-04 15:29:39 +01:00
Fabien Potencier
604fefcd38 bumped Symfony version to 2.6.0 2014-11-03 22:47:57 +01:00
Fabien Potencier
9919918de4 fixed version in HttpKernel 2014-11-03 22:46:45 +01:00
Tobias Schultze
ffe863c543 [Routing] correctly initialize condition as string 2014-11-03 21:24:10 +01:00
Fabien Potencier
7bd1d4c0e6 updated VERSION for 2.6.0-BETA1 2014-11-03 21:15:26 +01:00
Fabien Potencier
8ee36dce3f updated CHANGELOG for 2.6.0-BETA1 2014-11-03 21:10:45 +01:00
Fabien Potencier
ecddaf6e58 Merge branch '2.5'
* 2.5:
  fixed test that randomly fails
2014-11-03 20:49:01 +01:00
Fabien Potencier
1bba7995df fixed test that randomly fails 2014-11-03 20:48:45 +01:00
Fabien Potencier
923c13f974 Merge branch '2.5'
* 2.5:
  TwigExtractor tests require the Finder component
  [Routing] fix BC

Conflicts:
	src/Symfony/Bridge/Twig/composer.json
2014-11-03 20:16:49 +01:00
Fabien Potencier
03aa49156a Merge branch '2.3' into 2.5
* 2.3:
  TwigExtractor tests require the Finder component

Conflicts:
	src/Symfony/Bridge/Twig/composer.json
2014-11-03 20:16:17 +01:00
Fabien Potencier
d0e9e6573f minor #12385 [VarDumper] symfony.com color scheme on the CLI (nicolas-grekas)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[VarDumper] symfony.com color scheme on the CLI

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

Commits
-------

d5620bf [VarDumper] symfony.com color scheme on the CLI
2014-11-03 18:58:01 +01:00
Fabien Potencier
4b01bc0ec4 minor #12384 [OptionsResolver] Documented BC break (webmozart)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[OptionsResolver] Documented BC break

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

Commits
-------

0b0bfc0 [OptionsResolver] Documented BC break
2014-11-03 18:55:34 +01:00
Fabien Potencier
acd515b0ba bug #12397 [Routing] fix BC (nicolas-grekas)
This PR was merged into the 2.5 branch.

Discussion
----------

[Routing] fix BC

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

Tests on master and 2.5 are failing because this patch is missing.

Commits
-------

86e667b [Routing] fix BC
2014-11-03 18:54:02 +01: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
Nicolas Grekas
86e667bf81 [Routing] fix BC 2014-11-03 15:26:52 +01:00
Nicolas Grekas
e18f7abdf1 Merge branch '2.5'
* 2.5:
  removed errors from git
2014-11-03 14:44:52 +01:00
Nicolas Grekas
318ad052d2 bug #12382 [Routing] removed errors from git (HeinZawHtet)
This PR was submitted for the master branch but it was merged into the 2.5 branch instead (closes #12382).

Discussion
----------

[Routing] removed errors from git

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

Commits
-------

2492dab removed errors from git
2014-11-03 14:43:52 +01:00
Hein Zaw Htet™
2492dab747 removed errors from git 2014-11-03 14:43:52 +01:00
Nicolas Grekas
d5620bf0a4 [VarDumper] symfony.com color scheme on the CLI 2014-11-03 14:20:02 +01:00
Bernhard Schussek
0b0bfc03d5 [OptionsResolver] Documented BC break 2014-11-03 10:04:37 +01:00
Fabien Potencier
4982984d31 Merge branch '2.5'
* 2.5:
  added missing files
  [TwigBundle] added a test
  Indicate which file was being parsed if an exception is thrown while running translation:debug
  [ClassLoader] Cast $useIncludePath property to boolean
  [HttpFoundation] Minor spelling fix in PHPDocs
  improve error message for multiple documents
  Remove aligned '=>' and '='
  [Session] remove invalid workaround in session regenerate
  [Kernel] ensure session is saved before sending response
  [Routing] serialize the compiled route to speed things up
  [Form] Fixed usage of "name" variable in form_start block
  [Validator] Fixed Regex::getHtmlPattern() to work with complex and negated patterns
  [DependencyInjection] use inheritdoc for loaders
  [Config] fix filelocator with empty name
  [Form] fix form handling with unconventional request methods like OPTIONS
  CSRF warning docs on Request::enableHttpMethodParameterOverride()

Conflicts:
	src/Symfony/Component/Console/Helper/ProgressBar.php
2014-11-03 04:55:50 +01:00
Fabien Potencier
14c417a391 Merge branch '2.3' into 2.5
* 2.3:
  added missing files
  [TwigBundle] added a test
  Indicate which file was being parsed if an exception is thrown while running translation:debug
  [ClassLoader] Cast $useIncludePath property to boolean
  [HttpFoundation] Minor spelling fix in PHPDocs
  improve error message for multiple documents
  [Session] remove invalid workaround in session regenerate
  [Kernel] ensure session is saved before sending response
  [Routing] serialize the compiled route to speed things up
  [Validator] Fixed Regex::getHtmlPattern() to work with complex and negated patterns
  [DependencyInjection] use inheritdoc for loaders
  [Config] fix filelocator with empty name
  [Form] fix form handling with unconventional request methods like OPTIONS
  CSRF warning docs on Request::enableHttpMethodParameterOverride()

Conflicts:
	src/Symfony/Component/Routing/Route.php
2014-11-03 04:54:42 +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
add32ce6b9 minor #12171 [Profiler] Flexible height for resume box (to accommodate long urls) (adrianolek)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[Profiler] Flexible height for resume box (to accommodate long urls)

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

There is an issue when the request url contains many parameters (eg. filter form values) - the url overflows the container.
My proposed solution would be to use ellipsis on it, and on mouseover display the complete url.
Tested it on IE9, Chromium 37 and Firefox 32.

Here is a preview of how it looks:

![profiler-url](https://cloud.githubusercontent.com/assets/886304/4548542/e985b718-4e55-11e4-9963-b97b59279a26.png)

Commits
-------

e7ad172 Removed fixed height from profiler resume box.
2014-11-02 02:24:26 +01:00
Fabien Potencier
0588f0e8fb feature #12330 [Debug] DI controllable ErrorHandler::register() (nicolas-grekas)
This PR was merged into the 2.6-dev branch.

Discussion
----------

[Debug] DI controllable ErrorHandler::register()

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

This enhances the `ErrorHandler::register()` signature in a BC way, allowing greater control.

See https://github.com/symfony/symfony/pull/12330/files?w=1

Commits
-------

417f021 [Debug] DI controllable ErrorHandler::register()
2014-11-02 02:14:41 +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
50bc5165df feature #12198 [HttpFoundation] Allow Cache-Control headers on StreamedResponse (dhotson)
This PR was squashed before being merged into the 2.6-dev branch (closes #12198).

Discussion
----------

[HttpFoundation] Allow Cache-Control headers on StreamedResponse

StreamedResponse currently always sets `Cache-Control: no-cache` headers, which prevents all caching of streamed responses.

This change removes this limitation to allow normal cache control response behaviour.

Some caching proxies support caching streamed responses using chunked encoding, most notably AWS CloudFront:
http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/RequestAndResponseBehaviorCustomOrigin.html#ResponseCustomTransferEncoding

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

Commits
-------

dd7a9b6 [HttpFoundation] Allow Cache-Control headers on StreamedResponse
2014-11-02 01:37:13 +01:00
Dennis Hotson
dd7a9b6231 [HttpFoundation] Allow Cache-Control headers on StreamedResponse 2014-11-02 01:37:08 +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