Commit Graph

21692 Commits

Author SHA1 Message Date
Fabien Potencier 96e211d2da Merge branch '2.7' into 2.8
* 2.7:
  [Yaml] throw a ParseException on invalid data type
  [TwigBridge] type-dependent path discovery
  Resources as string have the same problem
  Introduce failing test case when a SplFileInfo object is passed to the extract() method in the TwigExtractor.
  #15331 add infos about deprecated classes to UPGRADE-3.0
  [Asset] removed unused private property.
  [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:09:29 +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 415e6f658f Merge branch '2.7' into 2.8
* 2.7:
  [Twig+FrameworkBundle] Fix forward compat with Form 2.8
  [2.6] Static Code Analysis for Components
  [Security/Http] Fix test relying on a private property
  [Serializer] Fix bugs reported in b5990be491 (commitcomment-12301266)

Conflicts:
	src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig
	src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/widget_attributes.html.php
	src/Symfony/Component/Security/Http/Tests/Firewall/AnonymousAuthenticationListenerTest.php
2015-07-24 10:37:00 +02: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 8eb86818f2 minor #15337 [Form] Fix not-BC test assertion (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[Form] Fix not-BC test assertion

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

The 2.6 branch is failing because of this case for `Validation::API_VERSION_2_4`, that can't work because `$this->context` is not a mock object, thus has no "expect" method.
See https://travis-ci.org/symfony/symfony/jobs/72100346#L2902
This got unnoticed because only 2.6 is testing the 2.4 validator api.

Commits
-------

5ef7ae9 [Form] Fix not-BC test assertion
2015-07-24 09:10:29 +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
Fabien Potencier 49959000fc feature #15185 Implement resettable containers (stof)
This PR was merged into the 2.8 branch.

Discussion
----------

Implement resettable containers

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

This allows to release remove references to all services during shutdown, giving much more chances to destruct services and the container through refcounting rather than waiting GC, as it will break cycles between the container and container-aware services.

There is a small BC break for a very edge case: if someone keeps a reference to the container and then shutdowns the kernel, the container would now be cleared and so would not work as intended anymore. But I don't think it is a supported use case. If you shutdown the kernel, the container of this kernel is released by the kernel and should not be used anymore IMO.
Thus, shutting down the kernel generally does not happen except during tests on teardown.

I'm not sure a doc PR is needed here: users of the fullstack framework should never use this feature (the kernel is using it for them). What do you think @weaverryan ?

Commits
-------

4457745 Implement resettable containers
2015-07-23 04:06:16 +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
Nicolas Grekas 5ef7ae9647 [Form] Fix not-BC test assertion 2015-07-22 19:02:20 +02:00
Fabien Potencier 86b218ec0e feature #15131 [Security] Moved Simple{Form,Pre}AuthenticatorInterfaces to Security\Http (WouterJ)
This PR was squashed before being merged into the 2.8 branch (closes #15131).

Discussion
----------

[Security] Moved Simple{Form,Pre}AuthenticatorInterfaces to Security\Http

Description
---

The `SimpleFormAuthenticatorInterface` and `SimplePreAuthenticatorInterface` rely on `Request`, which means it's a Http land class. This means they don't belong in core.

Having a form login that doesn't depend on the request is an option as well (e.g. a console application might use the question helper to implement a "form" login). However, then there is a need for a new abstraction of the request. I don't think it's worth it.

Furthermore, the only classes typehinting/relying on this interfaces can be found in `Security\Http`.

Implementation
---

The new interfaces extend the old ones for better backwards compability. Symfony doesn't trigger deprecation errors for interfaces, see 6f57b7b552

PR Info Table
---

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

Commits
-------

ebb2064 [Security] Moved Simple{Form,Pre}AuthenticatorInterfaces to Security\Http
2015-07-22 15:13:29 +02:00
WouterJ ebb20640af [Security] Moved Simple{Form,Pre}AuthenticatorInterfaces to Security\Http 2015-07-22 15:13:13 +02:00
Hugo Hamon 1fc03155d4 [Security] removed useless else condition in SwitchUserListener class. 2015-07-22 15:05:05 +02:00
Nicolas Grekas c1d915b07c minor #15182 [2.8] Fix 3.0 incompatible deps (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[2.8] Fix 3.0 incompatible deps

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

This should fix the failing the deps=2.8 tests on master.

Commits
-------

753812e [2.8] Fix 3.0 incompatible deps
2015-07-22 14:33:46 +02:00
Nicolas Grekas 753812e746 [2.8] Fix 3.0 incompatible deps 2015-07-22 14:27:44 +02:00
Nicolas Grekas d3874eca2c [travis] Tests deps=low with PHP 5.6 2015-07-22 13:57:38 +02:00
Nicolas Grekas 6d82fb8c0c Merge branch '2.7' into 2.8
* 2.7:
  [HttpKernel] Fix lowest dep
  [Security] fix check for empty usernames
  [Form] updated exception message of ButtonBuilder::setRequestHandler()
  [travis] Fix deps=high jobs
  Fix typo 'assets.package' => 'assets.packages' in UPGRADE-2.7
  [Serializer] Simplify AbstractNormalizer::prepareForDenormalization()
  [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/HttpKernel/composer.json
2015-07-22 13:24:41 +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
Christophe Coevoet 4457745929 Implement resettable containers
This allows to remove references to all services during shutdown, giving
much more chances to destruct services and the container through
refcounting rather than waiting GC, as it will break cycles between the
container and container-aware services.
2015-07-22 10:09:28 +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