Commit Graph

23200 Commits

Author SHA1 Message Date
Javier Eguiluz
2c45f461c2 Escape the delimiter in Glob::toRegex 2016-01-25 17:35:23 +01:00
Fabien Potencier
ce0946dde0 Merge branch '2.3' into 2.7
* 2.3:
  fixed undefined variable
  Fixed the phpDoc of UserInterface
  fixed APCu dep version
  Added support for the `0.0.0.0/0` trusted proxy
  [DoctrineBridge][Validator] >= 2.3 Pass association instead of ID as argument
  [HttpKernel] Lookup the response even if the lock was released after 2 seconds
2016-01-25 17:27:59 +01:00
Fabien Potencier
ca96e334b4 bug #17527 fixed undefined variable (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

fixed undefined variable

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

Commits
-------

4b21351 fixed undefined variable
2016-01-25 17:23:42 +01:00
Fabien Potencier
1d3fc10bca minor #17525 Fixed the phpDoc of UserInterface (javiereguiluz)
This PR was merged into the 2.3 branch.

Discussion
----------

Fixed the phpDoc of UserInterface

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

#13037 is the original issue ... which was tried to be fixed in #13146 ... which was closed without merging it.

Commits
-------

8e2a33e Fixed the phpDoc of UserInterface
2016-01-25 17:22:59 +01:00
Fabien Potencier
4b21351f36 fixed undefined variable 2016-01-25 17:19:48 +01:00
Javier Eguiluz
8e2a33ec2d Fixed the phpDoc of UserInterface 2016-01-25 16:23:13 +01:00
Tobias Schultze
d9f02fb9b7 minor #17524 fixed APCu dep version (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

fixed APCu dep version

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

Commits
-------

3b7f4c7 fixed APCu dep version
2016-01-25 15:51:35 +01:00
Fabien Potencier
3b7f4c7050 fixed APCu dep version 2016-01-25 15:47:02 +01:00
Fabien Potencier
81ab4ee008 minor #17521 make apc class loader testable against apcu without apc bc layer (Tobion)
This PR was merged into the 2.7 branch.

Discussion
----------

make apc class loader testable against apcu without apc bc layer

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

Commits
-------

24160b3 make apc class loader testable against apcu without apc bc layer
2016-01-25 14:21:14 +01:00
Tobias Schultze
24160b3a2f make apc class loader testable against apcu without apc bc layer 2016-01-25 14:16:04 +01:00
Fabien Potencier
81605dd7c9 bug #15706 [framework-bundle] Added support for the 0.0.0.0/0 trusted proxy (zerkms)
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #15706).

Discussion
----------

[framework-bundle] Added support for the `0.0.0.0/0` trusted proxy

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

It is relevant to my other PR: https://github.com/symfony/symfony/pull/14690

The original intention was to start accepting `0.0.0.0/0` as a trusted proxy (which is a valid CIDR notation).

The prupose is to allow all requests to be treated as trusted and to eliminate using dirty `['0.0.0.0/1', '128.0.0.0/1']` workaround.

Commits
-------

3188e1b Added support for the `0.0.0.0/0` trusted proxy
2016-01-25 13:36:48 +01:00
Ivan Kurnosov
3188e1b5d2 Added support for the 0.0.0.0/0 trusted proxy 2016-01-25 13:36:47 +01:00
Fabien Potencier
8059dc1bab bug #16274 [HttpKernel] Lookup the response even if the lock was released after two second wait (jakzal)
This PR was merged into the 2.3 branch.

Discussion
----------

[HttpKernel] Lookup the response even if the lock was released after two second wait

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

While looking into #15813 I noticed that we [wait for the lock to be released for five seconds, but then only do a lookup if the lock was released in two seconds](fa604d3c6f/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php (L540-L562)), no more.

I think it's worth to make both values the same (so either two or five seconds). I see no reason why we should wait for the lock for five seconds, but then only do a lookup if we waited for two. One way the wait either takes too long, the other way we loose the opportunity to actually return a response.

Commits
-------

9963170 [HttpKernel] Lookup the response even if the lock was released after 2 seconds
2016-01-25 13:21:38 +01:00
Fabien Potencier
a52ae99735 bug #17355 [DoctrineBridge][Validator] >= 2.3 Pass association instead of ID as argument (xavismeh)
This PR was squashed before being merged into the 2.3 branch (closes #17355).

Discussion
----------

[DoctrineBridge][Validator] >= 2.3 Pass association instead of ID as argument

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

No verification on doctrine-orm version has been provided since the `composer.json` requires `"doctrine/orm": "~2.4,>=2.4.5"` and performing a query with an object as array argument has been added in 2.2.0-BETA1 (see https://github.com/doctrine/doctrine2/blob/2.2.0-BETA1/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php#L1511)

Commits
-------

5c2d534 [DoctrineBridge][Validator] >= 2.3 Pass association instead of ID as argument
2016-01-25 12:44:21 +01:00
Xavier Coureau
5c2d534a1f [DoctrineBridge][Validator] >= 2.3 Pass association instead of ID as argument 2016-01-25 12:44:19 +01:00
Fabien Potencier
1ec3e51444 added missing constant 2016-01-25 12:39:25 +01:00
Fabien Potencier
8ef7c53c83 Merge branch '2.3' into 2.7
* 2.3:
  Added 451 status code
2016-01-25 12:39:01 +01:00
Fabien Potencier
a5e1062a03 minor #17095 [HttpFoundation] Added 451 status code (AndrewCarterUK)
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #17095).

Discussion
----------

[HttpFoundation] Added 451 status code

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

https://datatracker.ietf.org/doc/draft-ietf-httpbis-legally-restricted-status/?include_text=1

The HTTP 451 status code was approved by the ISG a few days ago on the 18th December '15.

Commits
-------

df8952f Added 451 status code
2016-01-25 12:38:40 +01:00
Andrew Carter
df8952f2a3 Added 451 status code 2016-01-25 12:38:22 +01:00
Fabien Potencier
778e4f6302 Merge branch '2.3' into 2.7
* 2.3:
  [ClassLoader] Use symfony/polyfill-apcu
2016-01-25 12:10:58 +01:00
Fabien Potencier
11257ee89a minor #17396 [ClassLoader] Use symfony/polyfill-apcu (gapple)
This PR was merged into the 2.3 branch.

Discussion
----------

[ClassLoader] Use symfony/polyfill-apcu

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

#17358 updated ApcClassLoader to use polyfill-apcu, but not ApcUniversalClassLoader

2.7 / 2.8 tests are in LegacyApcUniversalClassLoaderTest

Commits
-------

a0dc399 [ClassLoader] Use symfony/polyfill-apcu
2016-01-25 12:06:45 +01:00
Fabien Potencier
36c72623e6 bug #17454 Allow absolute URLs to be displayed in the debug toolbar (javiereguiluz)
This PR was merged into the 2.7 branch.

Discussion
----------

Allow absolute URLs to be displayed in the debug toolbar

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

If you agree with the original issue, this should do the trick. If you don't agree, please explain the reasons and close #12221. Thanks!

Commits
-------

11b63ff Allow absolute URLs to be displayed in the debug toolbar
2016-01-25 12:02:24 +01:00
Fabien Potencier
a1143ed36c minor #17476 Remove unnecessary code (yapro)
This PR was merged into the 2.7 branch.

Discussion
----------

Remove unnecessary code

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | -
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | -
```
php > echo (E_ALL | E_STRICT) & (0 | E_RECOVERABLE_ERROR | E_USER_ERROR) & ~E_USER_DEPRECATED & ~E_DEPRECATED;
4352
php > echo (0 | E_RECOVERABLE_ERROR | E_USER_ERROR) & ~E_USER_DEPRECATED & ~E_DEPRECATED;
4352
php > echo (2 | E_RECOVERABLE_ERROR | E_USER_ERROR) & ~E_USER_DEPRECATED & ~E_DEPRECATED;
4354
```
$ php -v
```
PHP 5.6.11-1ubuntu3.1 (cli)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies
    with Xdebug v2.3.3, Copyright (c) 2002-2015, by Derick Rethans
```

Commits
-------

548d803 Remove unnecessary code
2016-01-25 11:59:23 +01:00
Fabien Potencier
0fe08a800e fixed test 2016-01-25 10:56:38 +01:00
Fabien Potencier
2173c78da2 Merge branch '2.3' into 2.7
* 2.3:
  [Request] Ignore invalid IP addresses sent by proxies
  Able to load big xml files with DomCrawler
  fixed typo
  [Form] Fix constraints could be null if not set
  [Finder] Check PHP version before applying a workaround for a PHP bug
  fixed CS
  sort bundles in config:dump-reference command
  Fixer findings.
2016-01-25 10:55:53 +01:00
Fabien Potencier
50b48f6516 bug #16736 [Request] Ignore invalid IP addresses sent by proxies (GromNaN)
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #16736).

Discussion
----------

[Request] Ignore invalid IP addresses sent by proxies

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

The [RFC 7239](https://tools.ietf.org/html/rfc7239#section-6.2) allows other values that IP addresses to be passed in `Forwarded`header and [Nginx can add `unknown` to the `X-Forwarded-For`header](http://www.squid-cache.org/Doc/config/forwarded_for/).

To prevent these invalid IP addresses from being returned as "Client IP", this PR ensure that they are excluded.

Commits
-------

6578806 [Request] Ignore invalid IP addresses sent by proxies
2016-01-25 10:51:01 +01:00
Jérôme Tamarelle
6578806fc3 [Request] Ignore invalid IP addresses sent by proxies
Fixes symfony/symfony#15525
2016-01-25 10:50:55 +01:00
Fabien Potencier
2ab5edbf48 bug #17486 [FrameworkBundle] Throw for missing container extensions (kix)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #17486).

Discussion
----------

[FrameworkBundle] Throw for missing container extensions

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

This covers the case when an existing bundle does not have an extension, and its config is dumped. Before, calling `app/console config:dump` on such bundle lead to FatalErrorException with ```Call to a member function getAlias() on null```, now we process such cases and throw an exception with some explanatory text.

Commits
-------

884368e Throw for missing container extensions
2016-01-25 10:38:11 +01:00
Stepan Anchugov
884368e709 Throw for missing container extensions
This covers cases when a bundle does not have an extension, which
lead to FatalErrorException with ```Call to a member function getAlias() on null```
2016-01-25 10:38:10 +01:00
Fabien Potencier
fc56a5cefa minor #16859 [TwigBridge] add missing unit tests (AppVariable) (FlorianLB)
This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes #16859).

Discussion
----------

[TwigBridge] add missing unit tests (AppVariable)

Just add few missing unit tests.

---

| 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]

Commits
-------

156cdb5 [TwigBridge] add missing unit tests (AppVariable)
2016-01-25 09:30:57 +01:00
FlorianLB
156cdb5ab0 [TwigBridge] add missing unit tests (AppVariable) 2016-01-25 09:30:56 +01:00
Fabien Potencier
ec26f6ece0 bug #16873 Able to load big xml files with DomCrawler (zorn-v)
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #16873).

Discussion
----------

Able to load big xml files with DomCrawler

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

Commits
-------

3dae825 Able to load big xml files with DomCrawler
2016-01-25 09:23:30 +01:00
zorn
3dae8257f2 Able to load big xml files with DomCrawler 2016-01-25 09:23:17 +01:00
Fabien Potencier
898f3890ff fixed typo 2016-01-25 09:20:12 +01:00
Fabien Potencier
07d99c2b6f bug #16897 [Form] Fix constraints could be null if not set (DZunke)
This PR was squashed before being merged into the 2.3 branch (closes #16897).

Discussion
----------

[Form] Fix constraints could be null if not set

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

If the form options has no key for constraints the default should be an empty array to be ignored by the loop in the FormValidator. The default without this fix is ```null``` and foreach will throw an error.

The "Bug" also still exists in master-Branch.

Commits
-------

f80e0eb [Form] Fix constraints could be null if not set
2016-01-25 09:19:47 +01:00
DZunke
f80e0eb143 [Form] Fix constraints could be null if not set 2016-01-25 09:19:45 +01:00
Fabien Potencier
9c5a6f5770 bug #16912 [Translation][Writer] avoid calling setBackup if the dumper is not FileDumper (aitboudad)
This PR was merged into the 2.7 branch.

Discussion
----------

[Translation][Writer] avoid calling setBackup if the dumper is not FileDumper

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

369b2d4 [Translation][Writer] avoid calling setBackup if the dumper is not an instance of FileDumper.
2016-01-25 09:14:19 +01:00
Fabien Potencier
c738085cb3 minor #16941 [FrameworkBundle] Compute the kernel root hash only one time (dunglas)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Compute the kernel root hash only one time

| 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

Commits
-------

23431e9 [FrameworkBundle] Compute the kernel root hash only one time
2016-01-25 09:11:55 +01:00
Fabien Potencier
414365d8ef minor #17134 [Finder] Check PHP version before applying a workaround for a PHP bug (alebo)
This PR was squashed before being merged into the 2.3 branch (closes #17134).

Discussion
----------

[Finder] Check PHP version before applying a workaround for a PHP bug

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

Commits
-------

cba206a [Finder] Check PHP version before applying a workaround for a PHP bug
2016-01-25 08:55:01 +01:00
Alex Bogomazov
cba206ab18 [Finder] Check PHP version before applying a workaround for a PHP bug 2016-01-25 08:54:54 +01:00
Fabien Potencier
d44add24b2 bug #17505 sort bundles in config:dump-reference command (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

sort bundles in config:dump-reference command

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

This backports #17495 to the `2.3` branch.

Commits
-------

a5c8811 sort bundles in config:dump-reference command
2016-01-25 08:33:31 +01:00
Fabien Potencier
fb729eecfa fixed CS 2016-01-25 08:27:56 +01:00
Fabien Potencier
4b9f6c7aa8 minor #17487 [2.3] [CS] MethodSeparationFixer - findings. (SpacePossum)
This PR was merged into the 2.3 branch.

Discussion
----------

[2.3] [CS] MethodSeparationFixer - findings.

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

Th goal of this PR is _not_ to have it merged, but to see if the `MethodSeparationFixer` (https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/1426) is suitable for SF level/configuration in the PHP-CS-Fixer (and thereby might later become part of `fabbot.io`).

Commits
-------

d7b730f Fixer findings.
2016-01-25 08:27:13 +01:00
Fabien Potencier
e68ebab1b1 bug #17514 [2.7][Asset] Add defaultNull to version configuration (ewgRa)
This PR was merged into the 2.7 branch.

Discussion
----------

[2.7][Asset] Add defaultNull to version configuration

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

In #16511 PR was omitted defaultNull version for one case.

Commits
-------

65adb72 add defaultNull to version
2016-01-25 08:26:37 +01:00
Evgeniy Sokolov
65adb7282c add defaultNull to version 2016-01-25 01:05:43 +01:00
Fabien Potencier
93d5bf7424 Merge branch '2.3' into 2.7
* 2.3:
  [SecurityBundle] Optimize dependency injection tests
  [HttpFoundation] Do not overwrite the Authorization header if it is already set
  tag for dumped PHP objects must be a local one
2016-01-24 12:05:56 +01:00
Fabien Potencier
c1b091702a bug #16511 [2.7][Asset] Ability to set empty version strategy in packages (ewgRa)
This PR was merged into the 2.7 branch.

Discussion
----------

[2.7][Asset] Ability to set empty version strategy in packages

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no, but not sure, as for me test was wrong
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #14832
| License       | MIT
| Doc PR        |

Comment about '' thing. As you can see in xml test - we can't for attribute set null value. And for xml version '' empty string considered as null value, that affect all others formats and test is changed.

Commits
-------

646fc9c Ability to set empty version strategy in packages
2016-01-24 11:31:00 +01:00
Evgeniy Sokolov
646fc9caaa Ability to set empty version strategy in packages 2016-01-23 23:57:07 +01:00
Christian Flothmann
a5c881182f sort bundles in config:dump-reference command
This backports #17495 to the `2.3` branch.
2016-01-23 17:38:15 +01:00
Fabien Potencier
870b40cf59 minor #17495 [2.7] [FrameworkBundle] [DX] Sort bundles in config commands (kix)
This PR was merged into the 2.7 branch.

Discussion
----------

[2.7] [FrameworkBundle] [DX] Sort bundles in config commands

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

Reopened against `2.7` instead of #17490

This makes the behaviour of config commands a bit more user-friendly. Scanning through an ordered list should be a lot easier for the user, especially if she knows what's the exact bundle they're looking for. The sort is applied to the bundle name, as the extension alias might not always be present.

Before:
![before](https://cloud.githubusercontent.com/assets/345754/12498061/8e0ff30a-c0c1-11e5-9c96-561065eedc79.png)
After:
![after](https://cloud.githubusercontent.com/assets/345754/12498064/93019bde-c0c1-11e5-8bbc-c85a74b3f5e8.png)

Commits
-------

80d51e0 Sort bundles in config commands
2016-01-23 11:38:31 +01:00