Commit Graph

21621 Commits

Author SHA1 Message Date
Nicolas Grekas
c37387dc02 Merge branch '2.3' into 2.7
* 2.3:
  [php7] Fix for substr() always returning a string
  [Security] Do not save the target path in the session for a stateless firewall
  [DependencyInjection] fixed FrozenParameterBag and improved Parameter…

Conflicts:
	src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php
	src/Symfony/Component/Security/Http/Firewall/ExceptionListener.php
2015-07-28 16:07:07 +02:00
Fabien Potencier
ccf52ecd6e bug #15386 [php7] Fix for substr() always returning a string (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[php7] Fix for substr() always returning a string

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

This should be the last required fix for PHP7 support.

The patch in the debug component is a workaround for a bug in PHP7 (http://3v4l.org/8rm9B) that is going to be fixed soon (@jpauli power).

Commits
-------

77ee866 [php7] Fix for substr() always returning a string
2015-07-28 15:07:31 +02:00
Nicolas Grekas
77ee866dd8 [php7] Fix for substr() always returning a string 2015-07-28 14:38:40 +02:00
WouterJ
a336f0e98e Skip ::class constant 2015-07-27 20:12:35 +02:00
Fabien Potencier
633d0d835c bug #15355 [Security] Do not save the target path in the session for a stateless firewall (lyrixx)
This PR was submitted for the 2.8 branch but it was merged into the 2.3 branch instead (closes #15355).

Discussion
----------

[Security] Do not save the target path in the session for a stateless firewall

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

Note: I think this PR can be merged into 2.3 because it's like a bug fix

Commits
-------

3358253 [Security] Do not save the target path in the session for a stateless firewall
2015-07-26 20:14:14 +02:00
Grégoire Pineau
335825363d [Security] Do not save the target path in the session for a stateless firewall 2015-07-26 20:14:09 +02:00
Fabien Potencier
0252e4e2e4 bug #15306 [HttpKernel] [HttpCache] Fix deprecated error in HttpCache#getSurrogate (m14t)
This PR was submitted for the 2.8 branch but it was merged into the 2.7 branch instead (closes #15306).

Discussion
----------

[HttpKernel] [HttpCache] Fix deprecated error in HttpCache#getSurrogate

| Q             | A
| ------------- | ---
| Bug fix?      | yes? - I could not find an open issue, but it does appear to be a but to throw a `E_USER_DEPRECATED` when calling a non-depreciated method.
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no - but related to
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

Currently calls to `HttpCache#getEsi` correctly trigger a `E_USER_DEPRECATED` error and inform the user that they should instead use `HttpCache#getSurrogate`.

Unfortunately `HttpCache#getSurrogate` currently calls `$this->getEsi();` which will result in the `E_USER_DEPRECATED` still being triggered.

This pull request simply moves the logic that was previously in `getEsi` to `getSurrogate`, and leaves `getEsi` as a wrapper around `getSurrogate` with the addition of also triggering this warning.

This pull request also effects the 2.7 branch.

Commits
-------

32d964b Fix calls to HttpCache#getSurrogate triggering E_USER_DEPRECATED errors.
2015-07-26 20:11:56 +02:00
Matt Farmer
32d964ba39 Fix calls to HttpCache#getSurrogate triggering E_USER_DEPRECATED errors. 2015-07-26 20:11:55 +02:00
Fabien Potencier
f1ebfd7b47 minor #15172 [DependencyInjection] fixed FrozenParameterBag and improved Parameter… (Tomaz Ahlin)
This PR was squashed before being merged into the 2.3 branch (closes #15172).

Discussion
----------

[DependencyInjection] fixed FrozenParameterBag and improved Parameter…

The ParameterBagInterface was missing some @throws annotations, so the FrozenParameterBag class was a violation of Liskov subtitution principle. Also the ParameterBagInterface was missing the remove method.

(Optionally the ParameterBagInterface can be later split into two smaller interfaces, because the FrozenParameterBag shouldn't have the add, remove methods in the first place.)

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

I have also fixed removing elements from FrozenParameterBag, as introduced by @satahippy
https://github.com/symfony/DependencyInjection/pull/8

Commits
-------

3ad0794 [DependencyInjection] fixed FrozenParameterBag and improved Parameter…
2015-07-26 20:10:55 +02:00
Tomaz Ahlin
3ad0794aa1 [DependencyInjection] fixed FrozenParameterBag and improved Parameter… 2015-07-26 20:10:26 +02:00
Fabien Potencier
cd8ccffbad Merge branch '2.6' into 2.7
* 2.6:
  [Yaml] throw a ParseException on invalid data type
  #15331 add infos about deprecated classes to UPGRADE-3.0
  [Security] removed useless else condition in SwitchUserListener class.
  [travis] Tests deps=low with PHP 5.6
  [Console] Fix console output with closed stdout
2015-07-26 11:08:49 +02:00
Fabien Potencier
939c305374 Merge branch '2.3' into 2.6
* 2.3:
  #15331 add infos about deprecated classes to UPGRADE-3.0
  [Security] removed useless else condition in SwitchUserListener class.
  [travis] Tests deps=low with PHP 5.6
  [Console] Fix console output with closed stdout
2015-07-26 11:08:40 +02:00
Fabien Potencier
9943fd1b64 minor #15332 [travis] Tests deps=low with PHP 5.6 (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[travis] Tests deps=low with PHP 5.6

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

I noticed that testing deps=low with the lowest supported PHP skips some tests/features.
I propose to merge the 5.6 and deps=low lines of the test matrix in order to both fix this issue and remove one line in the matrix (thus making tests a bit lighter/faster on travis).

Commits
-------

d3874ec [travis] Tests deps=low with PHP 5.6
2015-07-26 11:04:17 +02:00
Fabien Potencier
0198784c58 minor #15357 #15331 add infos about deprecated classes to UPGRADE-3.0 (vincentaubert)
This PR was merged into the 2.3 branch.

Discussion
----------

#15331 add infos about deprecated classes to UPGRADE-3.0

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

Commits
-------

e391446 #15331 add infos about deprecated classes to UPGRADE-3.0
2015-07-26 11:02:50 +02:00
Fabien Potencier
6bb0c4898e bug #15369 [TwigBridge] type-dependent path discovery (marcosdsanchez, xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[TwigBridge] type-dependent path discovery

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

With the introduction of the `AbstractFileExtractor` in Symfony 2.7, the
`extract()` method in the `TwigExtractor` class does not necessarily
deal with `SplFileInfo` instances from the Finder component, but also
receives `\SplFileInfo` objects initialized by the base extractor class.

Commits
-------

1e15761 [TwigBridge] type-dependent path discovery
2bf78e5 Resources as string have the same problem
aa7cbbd Introduce failing test case when a SplFileInfo object is passed to the extract() method in the TwigExtractor.
2015-07-26 11:01:14 +02:00
Fabien Potencier
e338281601 bug #15361 [Yaml] throw a ParseException on invalid data type (xabbuh)
This PR was submitted for the 2.8 branch but it was merged into the 2.6 branch instead (closes #15361).

Discussion
----------

[Yaml] throw a ParseException on invalid data type

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

Without this check, PHP would trigger a warning when an array was passed
to `trim()`. The parser must throw a `ParseException` instance on a
malformed YAML string instead.

Commits
-------

adc6b30 [Yaml] throw a ParseException on invalid data type
2015-07-26 10:59:42 +02:00
Christian Flothmann
adc6b3067d [Yaml] throw a ParseException on invalid data type
Without this check, PHP would trigger a warning when an array was passed
to `trim()`. The parser must throw a `ParseException` instance on a
malformed YAML string instead.
2015-07-26 10:59:42 +02:00
Fabien Potencier
e0c058172b minor #15367 [Asset] removed unused private property. (hhamon)
This PR was merged into the 2.7 branch.

Discussion
----------

[Asset] removed unused private property.

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

Commits
-------

a1772b6 [Asset] removed unused private property.
2015-07-26 10:55:39 +02:00
Christian Flothmann
1e15761ac7 [TwigBridge] type-dependent path discovery
With the introduction of the `AbstractFileExtractor` in Symfony 2.7, the
`extract()` method in the `TwigExtractor` class does not necessarily
deal with `SplFileInfo` instances from the Finder component, but also
receives `\SplFileInfo` objects initialized by the base extractor class.
2015-07-26 08:32:57 +02:00
Marcos Sánchez
2bf78e5f20 Resources as string have the same problem 2015-07-26 08:32:57 +02:00
Marcos Sánchez
aa7cbbd205 Introduce failing test case when a SplFileInfo object is passed to the extract() method in the TwigExtractor.
The problem is that when there's a twig error, symfony expects the `getRelativePath` method that the native object doesn't have.
2015-07-26 08:32:57 +02:00
Vincent AUBERT
e3914460f3 #15331 add infos about deprecated classes to UPGRADE-3.0 2015-07-26 08:07:15 +02:00
Hugo Hamon
a1772b6a23 [Asset] removed unused private property. 2015-07-25 23:47:31 +03:00
Nicolas Grekas
38b9a88968 Merge branch '2.6' into 2.7
* 2.6:
  [2.6] Static Code Analysis for Components
  [Security/Http] Fix test relying on a private property
2015-07-24 10:19:55 +02:00
Fabien Potencier
4b136f9e35 bug #15345 [Twig+FrameworkBundle] Fix forward compat with Form 2.8 (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Twig+FrameworkBundle] Fix forward compat with Form 2.8

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

When these layouts are used with form 2.8, the readonly attribute is rendered twice. This has no practical consequence, but it breaks tests. This is the last fix required to make 2.7 green again.

Commits
-------

75dc464 [Twig+FrameworkBundle] Fix forward compat with Form 2.8
2015-07-24 09:08:55 +02:00
Nicolas Grekas
75dc464db8 [Twig+FrameworkBundle] Fix forward compat with Form 2.8 2015-07-23 11:16:04 +02:00
Fabien Potencier
e60795691c bug #15330 [Console] Fix console output with closed stdout (jakzal)
This PR was merged into the 2.3 branch.

Discussion
----------

[Console] Fix console output with closed stdout

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

Commits
-------

534d9fc [Console] Fix console output with closed stdout
2015-07-23 11:15:22 +02:00
Fabien Potencier
ee98096db0 bug #15339 [Serializer] Fix 2 bugs regarding private setters (dunglas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Serializer] Fix 2 bugs regarding private setters

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

Fix two bugs reported in b5990be491 (commitcomment-12301266)

1. Arguments set in the constructor was not properly removed from `$data`
2. `GetSetMethodNormalizer` was calling private setters, throwing an exception

cc @StanAngeloff

Commits
-------

65e9f26 [Serializer] Fix bugs reported in b5990be491 (commitcomment-12301266)
2015-07-23 04:30:43 +02:00
Fabien Potencier
08f696c3e6 minor #15317 [2.6] Static Code Analysis for Components (kalessil)
This PR was squashed before being merged into the 2.6 branch (closes #15317).

Discussion
----------

[2.6] Static Code Analysis for Components

| 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

Static Code Analysis with Php Inspections (EA Extended):
    - fixed couple potential issues when code is running in a phar-file

Commits
-------

37a2353 [2.6] Static Code Analysis for Components
2015-07-23 04:17:28 +02:00
Vladimir Reznichenko
37a235394e [2.6] Static Code Analysis for Components 2015-07-23 04:17:26 +02:00
Fabien Potencier
fa1ab249bc minor #15333 [Security] removed useless else condition in SwitchUserListener class. (hhamon)
This PR was merged into the 2.3 branch.

Discussion
----------

[Security] removed useless else condition in SwitchUserListener class.

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

Commits
-------

1fc0315 [Security] removed useless else condition in SwitchUserListener class.
2015-07-23 04:13:32 +02:00
Fabien Potencier
713a8b0b31 minor #15338 [Security/Http] Fix test relying on a private property (nicolas-grekas)
This PR was merged into the 2.6 branch.

Discussion
----------

[Security/Http] Fix test relying on a private property

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

I'm not 100% sure what was tested by this, but this test was using a private property (`AnonymousToken->key`), that has been renamed to `secret` in later Sf versions.

Commits
-------

2d29ac1 [Security/Http] Fix test relying on a private property
2015-07-23 04:10:27 +02:00
Nicolas Grekas
2d29ac1e10 [Security/Http] Fix test relying on a private property 2015-07-22 23:35:10 +02:00
Kévin Dunglas
65e9f268fe [Serializer] Fix bugs reported in b5990be491 (commitcomment-12301266) 2015-07-22 21:42:44 +02:00
Hugo Hamon
1fc03155d4 [Security] removed useless else condition in SwitchUserListener class. 2015-07-22 15:05:05 +02:00
Nicolas Grekas
d3874eca2c [travis] Tests deps=low with PHP 5.6 2015-07-22 13:57:38 +02:00
Nicolas Grekas
5d841a2b03 Merge branch '2.6' into 2.7
* 2.6:
  [HttpKernel] Fix lowest dep

Conflicts:
	src/Symfony/Component/HttpKernel/composer.json
2015-07-22 13:20:14 +02:00
Nicolas Grekas
07b3fa9c1c [HttpKernel] Fix lowest dep 2015-07-22 13:18:53 +02:00
Nicolas Grekas
bf889d3534 Merge branch '2.6' into 2.7
* 2.6:
  [Security] fix check for empty usernames
  [Form] updated exception message of ButtonBuilder::setRequestHandler()
  [travis] Fix deps=high jobs
  [HttpFoundation] [PSR-7] Allow to use resources as content body and to return resources from string content
  [DependencyInjection] Remove unused code in XmlFileLoader
  [HttpFoundation] Behaviour change in PHP7 for substr
  bumped Symfony version to 2.3.32
  updated VERSION for 2.3.31
  update CONTRIBUTORS for 2.3.31
  updated CHANGELOG for 2.3.31

Conflicts:
	src/Symfony/Bridge/Twig/composer.json
	src/Symfony/Bundle/FrameworkBundle/composer.json
2015-07-22 12:11:00 +02:00
Nicolas Grekas
b0d97b71c5 Merge branch '2.3' into 2.6
* 2.3:
  [Security] fix check for empty usernames
  [Form] updated exception message of ButtonBuilder::setRequestHandler()
  [travis] Fix deps=high jobs
  [HttpFoundation] [PSR-7] Allow to use resources as content body and to return resources from string content
  [DependencyInjection] Remove unused code in XmlFileLoader
  [HttpFoundation] Behaviour change in PHP7 for substr
  bumped Symfony version to 2.3.32
  updated VERSION for 2.3.31
  update CONTRIBUTORS for 2.3.31
  updated CHANGELOG for 2.3.31

Conflicts:
	src/Symfony/Bridge/Twig/composer.json
	src/Symfony/Bundle/FrameworkBundle/composer.json
	src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php
	src/Symfony/Component/HttpKernel/Kernel.php
2015-07-22 12:08:40 +02:00
Fabien Potencier
18fe999349 minor #15322 [travis] Fix deps=high/low jobs (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[travis] Fix deps=high/low jobs

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

Commits
-------

1c9b433 [travis] Fix deps=high jobs
2015-07-22 10:24:19 +02:00
Jakub Zalas
534d9fc560 [Console] Fix console output with closed stdout 2015-07-22 09:03:09 +01:00
Fabien Potencier
0da0f9eb43 bug #15326 [Security] fix check for empty usernames (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

[Security] fix check for empty usernames

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

Commits
-------

6585fe4 [Security] fix check for empty usernames
2015-07-22 09:58:47 +02:00
Fabien Potencier
4842bfa52b minor #15311 [Serializer] Simplify AbstractNormalizer::prepareForDenormalization() (dunglas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Serializer] Simplify AbstractNormalizer::prepareForDenormalization()

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

72dce30 [Serializer] Simplify AbstractNormalizer::prepareForDenormalization()
2015-07-22 09:09:55 +02:00
Christian Flothmann
6585fe45a2 [Security] fix check for empty usernames 2015-07-22 08:52:48 +02:00
Fabien Potencier
45861d4490 minor #15324 [Form] updated exception message of ButtonBuilder::setRequestHandler() (issei-m)
This PR was submitted for the 2.7 branch but it was merged into the 2.3 branch instead (closes #15324).

Discussion
----------

[Form] updated exception message of ButtonBuilder::setRequestHandler()

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

Commits
-------

b483ee2 [Form] updated exception message of ButtonBuilder::setRequestHandler()
2015-07-22 05:26:59 +02:00
Issei.M
b483ee2d02 [Form] updated exception message of ButtonBuilder::setRequestHandler() 2015-07-22 05:26:59 +02:00
Nicolas Grekas
1c9b43396f [travis] Fix deps=high jobs 2015-07-21 19:12:21 +02:00
Christophe Coevoet
0a7c5834aa minor #15323 Fix typo 'assets.package' => 'assets.packages' in UPGRADE-2.7 (Kevinrob)
This PR was merged into the 2.7 branch.

Discussion
----------

Fix typo 'assets.package' => 'assets.packages' in UPGRADE-2.7

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

Commits
-------

6ecc38a Fix typo 'assets.package' => 'assets.packages' in UPGRADE-2.7
2015-07-21 17:42:13 +02:00
Kevin Robatel
6ecc38afd4 Fix typo 'assets.package' => 'assets.packages' in UPGRADE-2.7 2015-07-21 16:40:08 +02:00