Commit Graph

24239 Commits

Author SHA1 Message Date
Nicolas Grekas 777cdfc0f6 minor #20640 [HttpFoundation] Fix isMethodSafe test for cacheables (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] Fix isMethodSafe test for cacheables

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Tests pass?   | yes
| License       | MIT

Commits
-------

2699009 [HttpFoundation] Fix test ensuring isMethodSafe() checks cacheable
2016-11-26 09:09:28 +01:00
Robin Chalas 2699009770
[HttpFoundation] Fix test ensuring isMethodSafe() checks cacheable 2016-11-25 23:28:18 +01:00
Jules Pietri 7e8490715c [Form] fixed "empty_value" option deprecation 2016-11-25 20:10:28 +01:00
Andreas Braun 70c42f2676
Cast result to int before adding to it
This fixes the occasional warning about non-numeric values when using PHP 7.1
2016-11-25 15:42:00 +01:00
Nicolas Grekas e62b602dc4 bug #20374 [FrameworkBundle] Improve performance of ControllerNameParser (enumag)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Improve performance of ControllerNameParser

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

Today I was searching for bottlenecks in my application using Blackfire. And among other things I found one in Symfony. Blackfire showed that `Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser::findAlternative()` was called almost 300 times which took 28 miliseconds.

It turns out that `Symfony\Bundle\FrameworkBundle\Routing\DelegatingLoader::load()` is calling `ControllerNameParser::parse()` without actually needing to do so because `$controller` is in the class::method notation already. `ControllerNameParser` threw an exception, DelegatingLoader caught and ignored it - that's ok. The problem is that generating the exception message took a lot of time because findAlternative is slow. In my case it called the levenshtein function over 5000 times which was completely useless because the exception is ignored anyway.

Commits
-------

cf333f3 [FrameworkBundle] Improve performance of ControllerNameParser
2016-11-25 13:12:15 +01:00
Nicolas Grekas 8c2a77bbca bug #20474 [Routing] Fail properly when a route parameter name cannot be used as a PCRE subpattern name (fancyweb)
This PR was squashed before being merged into the 2.7 branch (closes #20474).

Discussion
----------

[Routing] Fail properly when a route parameter name cannot be used as a PCRE subpattern name

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

This is a follow up PR to https://github.com/symfony/symfony/pull/20327.

I also decided to improve the current `is_numeric()` check that is done by a truer one. The current limitation is that a PCRE subpattern name must not start with a digit which is different.

Commits
-------

73fbd08 [Routing] Fail properly when a route parameter name cannot be used as a PCRE subpattern name
2016-11-25 13:07:11 +01:00
Thomas Calvet 73fbd085f1 [Routing] Fail properly when a route parameter name cannot be used as a PCRE subpattern name 2016-11-25 13:06:46 +01:00
Jáchym Toušek cf333f32c5 [FrameworkBundle] Improve performance of ControllerNameParser 2016-11-25 12:34:09 +01:00
Nicolas Grekas b550d7ebd8 minor #20587 [SecurityBundle] Fix complete config tests (julienfalque)
This PR was merged into the 2.7 branch.

Discussion
----------

[SecurityBundle] Fix complete config tests

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

Fixes a little bug in `*CompleteConfigurationTest`: if a test fails for one format, subsequent tests for other formats will also fail. This is because subsequent tests actually use the container built from the very first tested config, which is PHP if all tests are ran.

This can be reproduced by changing a value in the PHP config fixtures. `PhpCompleteConfigurationTest` will fail as expected but `XmlCompleteConfigurationTest` and `YamlCompleteConfigurationTest` will fail too, which is not expected.

Commits
-------

b25c1d3 Fix complete config tests
2016-11-25 11:43:47 +01:00
Nicolas Grekas b0fd45347a minor #20629 [Form] [Validator] Update documentation link to the component (CoolGoose)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #20629).

Discussion
----------

[Form] [Validator] Update documentation link to the component

- [x] Update documentation link to the component since it has standalone examples

Commits
-------

25a6294 Update documentation link to the component
2016-11-25 11:12:25 +01:00
Alexandru Bucur 25a629419a Update documentation link to the component
Update documentation link to the component since it has standalone examples
2016-11-25 11:12:25 +01:00
Nicolas Grekas 821e7bbe7e minor #20622 [WebProfilerBundle] Dont use request attributes in RouterController (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[WebProfilerBundle] Dont use request attributes in RouterController

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

As spotted in #20621, it makes little sense to use request attributes here, and if it were to have, the current code is broken because the returned values here have already been processed by ValueExporter in RequestDataCollector.

Commits
-------

962325a [WebProfilerBundle] Dont use request attributes in RouterController
2016-11-25 11:10:06 +01:00
Nicolas Grekas bbddeec6d9 minor #20630 [HttpFoundation] Add links to RFC-7231 (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] Add links to RFC-7231

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

ping @xabbuh

Commits
-------

c17a85b [HttpFoundation] Add links to RFC-7231
2016-11-25 11:09:18 +01:00
Nicolas Grekas 7b33c0906b minor #20626 Tag missing internals (ogizanagi)
This PR was merged into the 2.7 branch.

Discussion
----------

Tag missing internals

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

Commits
-------

97e94b4 Tag missing internals
2016-11-25 11:02:25 +01:00
Nicolas Grekas c17a85beff [HttpFoundation] Add links to RFC-7231 2016-11-25 10:58:59 +01:00
Nicolas Grekas e62a390ff5 bug #20566 [DI] Initialize properties before method calls (ro0NL)
This PR was squashed before being merged into the 2.7 branch (closes #20566).

Discussion
----------

[DI] Initialize properties before method calls

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes-ish
| New feature?  | no
| BC breaks?    | not sure
| Deprecations? | no
| Tests pass?   | not yet (only dumps seem to fail)
| Fixed tickets | comma-separated list of tickets fixed by the PR, if any
| License       | MIT
| Doc PR        | reference to the documentation PR, if any

Given

```yml
services:
    handler:
        class: AppBundle\Handler
        properties:
            debug: '%kernel.debug%'
        calls:
            - [handle]
```

I totally expected `Handler::$debug` to be set before `Handler::handle` is called. It was not..  and it's really annoying :)

Commits
-------

0af433b [DI] Initialize properties before method calls
2016-11-25 10:44:34 +01:00
Roland Franssen 0af433b01f [DI] Initialize properties before method calls 2016-11-25 10:44:31 +01:00
Maxime Steinhausser 97e94b4019 Tag missing internals 2016-11-25 08:43:06 +01:00
Nicolas Grekas 962325a54e [WebProfilerBundle] Dont use request attributes in RouterController 2016-11-24 18:44:53 +01:00
Nicolas Grekas 3eb8a342f5 bug #20609 [DI] Fixed custom services definition BC break introduced in ec7e70fb… (kiler129)
This PR was squashed before being merged into the 2.7 branch (closes #20609).

Discussion
----------

[DI] Fixed custom services definition BC break introduced in ec7e70fb…

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no, fixes previous BC
| Deprecations? | no
| Tests pass?   | yes (verified on Win only)
| Fixed tickets | #20608
| License       | MIT
| Doc PR        | -

Commits
-------

7a5e11e [DI] Fixed custom services definition BC break introduced in ec7e70fb…
2016-11-24 11:37:50 +01:00
kiler129 7a5e11eb12 [DI] Fixed custom services definition BC break introduced in ec7e70fb… 2016-11-24 11:34:23 +01:00
Fabien Potencier af9c279e23 bug #20598 [DI] Aliases should preserve the aliased invalid behavior (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[DI] Aliases should preserve the aliased invalid behavior

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

Commits
-------

7752308 [DI] Aliases should preserve the aliased invalid behavior
2016-11-23 17:13:15 -08:00
Fabien Potencier 34b9fd681e bug #20602 [HttpKernel] Revert BC breaking change of Request::isMethodSafe() (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpKernel] Revert BC breaking change of Request::isMethodSafe()

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | yes (reverting a previous BC break)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #20562
| License       | MIT
| Doc PR        | -

As spotted in #20562, we should not have broken a minor version. Instead, we should have deprecated the bad behavior. This is done in #20603.

Commits
-------

0c3b7d7 [HttpKernel] Revert BC breaking change of Request::isMethodSafe()
2016-11-23 16:42:12 -08:00
Fabien Potencier 78d713ce36 minor #20614 [DI] minor FileLoaders tests update (ogizanagi)
This PR was merged into the 2.7 branch.

Discussion
----------

[DI] minor FileLoaders tests update

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

Strictly speaking not a bug fix but can be merged to 2.7 safely.

I don't know what was the idea behind this or if it simply was a mistake, but right now it seems weird 😅

Commits
-------

412fbe6 [DI] minor FileLoaders tests update
2016-11-23 16:35:20 -08:00
Maxime Steinhausser 412fbe613f [DI] minor FileLoaders tests update 2016-11-23 22:37:45 +01:00
Nicolas Grekas 0c3b7d7b8d [HttpKernel] Revert BC breaking change of Request::isMethodSafe() 2016-11-23 14:53:57 +01:00
Nicolas Grekas 7752308c96 [DI] Aliases should preserve the aliased invalid behavior 2016-11-22 19:19:49 +01:00
Fabien Potencier 30d161c0ae bug #20499 [Doctrine][Form] support large integers (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Doctrine][Form] support large integers

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

Commits
-------

6954a07 [Doctrine][Form] support large integers
2016-11-21 16:16:03 -08:00
Fabien Potencier 9c82a9bd92 minor #20505 [DOMCrawler] Bug fixed (Imangazaliev)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #20505).

Discussion
----------

[DOMCrawler] Bug fixed

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT
| Doc PR        | reference to the documentation PR, if any

Commits
-------

6c3150d [DOMCrawler] Bug fixed
2016-11-21 16:09:36 -08:00
Imangazaliev 6c3150df63 [DOMCrawler] Bug fixed 2016-11-21 16:09:36 -08:00
Fabien Potencier 7047e4d31f bug #20576 [Process] Do feat test before enabling TTY mode (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Process] Do feat test before enabling TTY mode

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

Commits
-------

69bfbbf [Process] Do feat test before enabling TTY mode
2016-11-21 15:59:43 -08:00
Julien Falque b25c1d30f6
Fix complete config tests 2016-11-21 23:48:35 +01:00
Nicolas Grekas 69bfbbf8c2 [Process] Do feat test before enabling TTY mode 2016-11-21 10:47:03 +01:00
Nicolas Grekas 2acaf5f511 [github] Tweak PR template 2016-11-21 10:13:36 +01:00
Fabien Potencier 2af58be68f bumped Symfony version to 2.7.22 2016-11-20 18:19:38 -08:00
Fabien Potencier cdc25e2d47 Merge pull request #20573 from fabpot/release-2.7.21
released v2.7.21
2016-11-20 17:13:05 -08:00
Fabien Potencier dec83adc4b updated VERSION for 2.7.21 2016-11-20 17:12:54 -08:00
Fabien Potencier 4367d0c853 update CONTRIBUTORS for 2.7.21 2016-11-20 17:12:28 -08:00
Fabien Potencier aefd0489a9 updated CHANGELOG for 2.7.21 2016-11-20 17:12:23 -08:00
Nicolas Grekas e968d0ff5d minor #20551 [ci] Testing with UTC hides bugs (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[ci] Testing with UTC hides bugs

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

As shown by #20550, we're having bugs because we don't in proper TZ conditions.
Let's do Europe on Travis, and America on Windows.

Commits
-------

e0f9bda [ci] Testing with UTC hides bugs
2016-11-18 15:46:21 -05:00
Nicolas Grekas e0f9bda49a [ci] Testing with UTC hides bugs 2016-11-18 15:26:45 -05:00
Fabien Potencier 015fe87266 bug #20543 [DI] Fix error when trying to resolve a DefinitionDecorator (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[DI] Fix error when trying to resolve a DefinitionDecorator

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

Instead of the currently obscure `ReflectionException: Class does not exist` message, let's throw a useful error message.

Commits
-------

8e0da2f [DI] Fix error when trying to resolve a DefinitionDecorator
2016-11-17 11:18:58 -05:00
Fabien Potencier d34333f41d minor #20531 [Validator] improve and added more Indonesian translation. (IndraGunawan)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] improve and added more Indonesian translation.

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

- Improve some translation's grammar.
- Added translation unit no. 73 - 80.

Commits
-------

af9016f [Validator] improve and added more Indonesian translation.
2016-11-17 10:46:31 -05:00
Nicolas Grekas 8e0da2f39e [DI] Fix error when trying to resolve a DefinitionDecorator 2016-11-17 06:21:23 -05:00
Fabien Potencier ef40651dd3 bug #20484 bumped min version of Twig to 1.28 (fabpot)
This PR was merged into the 2.7 branch.

Discussion
----------

bumped min version of Twig to 1.28

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | see twigphp/Twig#2236
| License       | MIT
| Doc PR        | n/a

Commits
-------

b8f7614 bumped min version of Twig to 1.28
2016-11-16 17:10:58 -05:00
Indra Gunawan af9016fa27 [Validator] improve and added more Indonesian translation. 2016-11-16 16:46:48 +07:00
Fabien Potencier a1afa21a8c minor #20506 DX: replace @link with @see annotation (keradus)
This PR was merged into the 2.7 branch.

Discussion
----------

DX: replace @link with @see annotation

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

Just to standardise.

```console
λ grep -r "* @see " src | wc -l
    360

λ grep -r "* @link " src | wc -l
     12
```

Commits
-------

f7326c1 DX: replace @link with @see annotation
2016-11-15 18:00:43 -05:00
Nicolas Grekas 0221ffcb8f bug #20519 [Debug] Remove GLOBALS from exception context to avoid endless recursion (Seldaek)
This PR was merged into the 2.7 branch.

Discussion
----------

[Debug] Remove GLOBALS from exception context to avoid endless recursion

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

This fixes a endless recursion as seen in https://github.com/felixfbecker/php-language-server/pull/137 - it only happens if you trigger an error in the global context so it's kinda hard to write a test for, but hopefully the fix can be accepted.

Commits
-------

1bb95ac [Debug] Remove GLOBALS from exception context to avoid endless recursion
2016-11-15 07:52:31 -05:00
Jordi Boggiano 1bb95acb84 [Debug] Remove GLOBALS from exception context to avoid endless recursion 2016-11-15 13:37:17 +01:00
Nicolas Grekas e24cedb19b bug #20455 [ClassLoader] Fix ClassCollectionLoader inlining with __halt_compiler (giosh94mhz)
This PR was squashed before being merged into the 2.7 branch (closes #20455).

Discussion
----------

[ClassLoader] Fix ClassCollectionLoader inlining with __halt_compiler

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

I have some PHP classes which ends with an `__halt_compiler` call which fail on production.

This is due to the ClassCollectionLoader inlining the class code (which is followed by random binary data) which breaks PHP parsing of the following classes.

I found this issue while using ZendGuardLoader module, but this apply to whatever php class using this function call.

I've made my fix, based on #19859, and tested it with symfony 2.7 and 2.8

Commits
-------

a60cd15 [ClassLoader] Fix ClassCollectionLoader inlining with __halt_compiler
2016-11-15 04:22:04 -05:00