Commit Graph

19546 Commits

Author SHA1 Message Date
Fabien Potencier
45fe468074 Merge branch '2.8'
* 2.8:
  removed usage of the deprecated StringUtils::equals() method
  Fix: Resolve tempdir symlink, not working on OSX
  fixed tests
  migrate session after remember me authentication
  prevent timing attacks in digest auth listener
  mitigate CSRF timing attack vulnerability
  fix potential timing attack issue
  [WebProfilerBundle] Added a top left border radius to the minified to…
  [Routing] Changing RouteCollectionBuilder::import() behavior to add to the builder
  [HttpKernel] Don't reset on shutdown but in FrameworkBundle/Test/KernelTestCase
  [Process] PhpExecutableFinder: add regression test
2015-11-23 11:41:47 +01:00
Fabien Potencier
2dbb75aef4 removed usage of the deprecated StringUtils::equals() method 2015-11-23 11:39:33 +01:00
Fabien Potencier
8a6da3f021 Merge branch '2.7' into 2.8
* 2.7:
  fixed tests
  migrate session after remember me authentication
  prevent timing attacks in digest auth listener
  mitigate CSRF timing attack vulnerability
  fix potential timing attack issue
2015-11-23 11:34:41 +01:00
Fabien Potencier
5edc71e2fc Merge branch '2.3' into 2.7
* 2.3:
  migrate session after remember me authentication
  prevent timing attacks in digest auth listener
  mitigate CSRF timing attack vulnerability
  fix potential timing attack issue
2015-11-23 11:34:14 +01:00
Fabien Potencier
f95078c409 security #16631 n/a (xabbuh)
This PR was merged into the 2.3 branch.

Discussion
----------

n/a

n/a

Commits
-------

f88e600 migrate session after remember me authentication
2015-11-23 11:22:15 +01:00
toretto460
3aee6b93e2 Fix: Resolve tempdir symlink, not working on OSX 2015-11-23 11:19:46 +01:00
Fabien Potencier
d12cf1904c fixed tests 2015-11-23 11:17:36 +01:00
Christian Flothmann
f88e600833 migrate session after remember me authentication 2015-11-23 11:04:06 +01:00
Christian Flothmann
819aa54fe4 prevent timing attacks in digest auth listener 2015-11-23 11:02:49 +01:00
Christian Flothmann
557ea17eeb mitigate CSRF timing attack vulnerability 2015-11-23 11:02:49 +01:00
Christian Flothmann
f1fd7686c5 fix potential timing attack issue 2015-11-23 11:02:49 +01:00
Fabien Potencier
551d164b4f minor #16606 [Process] PhpExecutableFinder: add regression test (ogizanagi)
This PR was merged into the 2.8 branch.

Discussion
----------

[Process] PhpExecutableFinder: add regression test

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

I guess it won't be a shame to have this simple test after #16599 .

Commits
-------

576f802 [Process] PhpExecutableFinder: add regression test
2015-11-23 10:36:02 +01:00
Fabien Potencier
06959c045d bug #16607 [HttpFoundation] Delete not existing session handler proxy member (belka-ew)
This PR was merged into the 3.0-dev branch.

Discussion
----------

[HttpFoundation] Delete not existing session handler proxy member

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

open() and close() SessionHandlerProxy method suse $this->active
that was removed from the parent AbstractProxy class after 2.8.

Commits
-------

b06b93f [HttpFoundation] Remove not existing class member
2015-11-23 10:33:29 +01:00
Fabien Potencier
922b9468b1 bug #16609 [HttpKernel] Don't reset on shutdown but in FrameworkBundle/Test/KernelTestCase (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[HttpKernel] Don't reset on shutdown but in FrameworkBundle/Test/KernelTestCase

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

While trying to migrate Blackfire to 2.8-beta, I found this BC-break: by resetting the container on kernel shut-down, functional tests are broken when they need to use the container after a call to `$this->client->request()`. Broken because e.g . the session or the profiler state is lost between consecutive requests in the same test, and because a call to $container->get('kernel') throws a synthetic-related exception.

This PR fixes the BC-break by reverting to the <=2.7 behavior (not resetting the container on kernel shut-down), and moving resetting to the KernelTestCase.

Commits
-------

baad4da [HttpKernel] Don't reset on shutdown but in FrameworkBundle/Test/KernelTestCase
2015-11-23 10:32:50 +01:00
Fabien Potencier
43d82e7845 minor #16628 [WebProfilerBundle] Added a top left border radius to the minified to… (Jelle Kapitein)
This PR was squashed before being merged into the 2.8 branch (closes #16628).

Discussion
----------

[WebProfilerBundle] Added a top left border radius to the minified to…

| 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

The minified toolbar (to us at least) looked very out of place in all of our projects. Adding a border radius to the top left fixes that.

Chrome 46
![schermafbeelding 2015-11-23 om 09 29 06](https://cloud.githubusercontent.com/assets/6209772/11332470/41240b96-91c6-11e5-9d03-4738ff213295.png)

Firefox 42
![schermafbeelding 2015-11-23 om 09 29 53](https://cloud.githubusercontent.com/assets/6209772/11332476/55fbf574-91c6-11e5-898b-1ba2590a813b.png)

Safari 9
![schermafbeelding 2015-11-23 om 09 30 33](https://cloud.githubusercontent.com/assets/6209772/11332485/6351525a-91c6-11e5-8cbc-14b7efd82ce0.png)

Cannot test on IE/Edge at the moment, will be able to later today.

(The screenshots do not have commit 0459912523)

Commits
-------

ca9f446 [WebProfilerBundle] Added a top left border radius to the minified to…
2015-11-23 10:30:31 +01:00
Jelle Kapitein
ca9f446f03 [WebProfilerBundle] Added a top left border radius to the minified to… 2015-11-23 10:30:25 +01:00
Fabien Potencier
57e0468cc3 bug #16477 [Routing] Changing RouteCollectionBuilder::import() behavior to add to the builder (weaverryan)
This PR was squashed before being merged into the 2.8 branch (closes #16477).

Discussion
----------

[Routing] Changing RouteCollectionBuilder::import() behavior to add to the builder

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

Based on conversation starting here: https://github.com/symfony/symfony/pull/15990#issuecomment-154081718.

```php
// Before:
$routes->mount('/admin', $routes->import(__DIR__.'/config/admin.yml');

// After:
$routes->import(__DIR__.'/config/admin.yml', '/admin');
```

This makes `import()` actually add the `RouteCollectionBuilder` into itself. We didn't do this before at Fabien's request, and actually the current implementation (before this PR) is quite "clean". However, I agree with @WouterJ that `import()` really sounds/looks like it will actually *import* those routes *into* this `RouteCollectionBuilder`.

This change is subjective - we just need to pick which way we like better and run full steam with it.

Commits
-------

8feb9ef [Routing] Changing RouteCollectionBuilder::import() behavior to add to the builder
2015-11-23 10:29:40 +01:00
Ryan Weaver
8feb9ef080 [Routing] Changing RouteCollectionBuilder::import() behavior to add to the builder 2015-11-23 10:29:39 +01:00
Eugene Wissner
4ffe14cab4 [HttpFoundation] Remove deprecated class method parameter 2015-11-23 09:57:30 +01:00
Nicolas Grekas
4d2ea16b90 Merge branch '2.8'
* 2.8:
  Add Spanish translation for BIC validator
  Added translation for BIC validator
  Sent out a status text for unknown HTTP headers.
  [DependencyInjection] Unescape parameters for all types of injection
  [Process] Fix trailing space in PHP binary finder
  Remove tmp addition of zend-stdlib
  [WebProfilerBundle] Fix minitoolbar height
  [Form] Fix ResolvedFormType deprecation notices
  [Serializer] add missing unit tests related to Encoder
  add it back

Conflicts:
	src/Symfony/Bridge/ProxyManager/composer.json
	src/Symfony/Component/Form/ResolvedFormType.php
2015-11-20 18:45:52 +01:00
Nicolas Grekas
fe6e9e4543 Merge branch '2.7' into 2.8
* 2.7:
  Sent out a status text for unknown HTTP headers.
  [DependencyInjection] Unescape parameters for all types of injection
2015-11-20 18:41:52 +01:00
Nicolas Grekas
c91638f826 Merge branch '2.3' into 2.7
* 2.3:
  Sent out a status text for unknown HTTP headers.
  [DependencyInjection] Unescape parameters for all types of injection
2015-11-20 18:41:18 +01:00
Fabien Potencier
02c31ad773 minor #16610 Add Spanish translation for BIC validator (ajgarlag)
This PR was merged into the 2.8 branch.

Discussion
----------

Add Spanish translation for BIC validator

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

Commits
-------

357dea1 Add Spanish translation for BIC validator
2015-11-20 15:39:26 +01:00
Antonio J. García Lagar
357dea1ea8 Add Spanish translation for BIC validator 2015-11-20 14:32:45 +01:00
Nicolas Grekas
baad4da9b7 [HttpKernel] Don't reset on shutdown but in FrameworkBundle/Test/KernelTestCase 2015-11-20 13:20:48 +01:00
Joshua Thijssen
a591ba3d80 Added translation for BIC validator 2015-11-20 11:06:22 +01:00
ogizanagi
576f802917 [Process] PhpExecutableFinder: add regression test 2015-11-20 08:33:53 +01:00
Fabien Potencier
b6857ba405 minor #16557 [Serializer] add missing unit tests related to Encoder (FlorianLB)
This PR was merged into the 2.8 branch.

Discussion
----------

[Serializer] add missing unit tests related to Encoder

Add some missing unit tests on the Serializer component.

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

Commits
-------

7418d29 [Serializer] add missing unit tests related to Encoder
2015-11-20 07:33:45 +01:00
Eugene Wissner
b06b93fd30 [HttpFoundation] Remove not existing class member
open() and close() SessionHandlerProxy method suse $this->active
that was removed from the parent AbstractProxy class after 2.8.
2015-11-20 04:02:44 +01:00
Daniel Wehner
eec6fbc768 Sent out a status text for unknown HTTP headers. 2015-11-19 17:24:57 +01:00
Fabien Potencier
4e1fffe016 bug #16377 [WebProfilerBundle] Fix minitoolbar height (rvanlaak)
This PR was merged into the 2.8 branch.

Discussion
----------

[WebProfilerBundle] Fix minitoolbar height

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

The height of the minimized toolbar icon was a bit off. This change makes sure the icon has the same height as the toolbar itself.

Commits
-------

0459912 [WebProfilerBundle] Fix minitoolbar height
2015-11-19 17:15:38 +01:00
Fabien Potencier
5a17f80858 Merge branch '2.7' into 2.8
* 2.7:
  [Process] Fix trailing space in PHP binary finder
  Remove tmp addition of zend-stdlib
2015-11-19 17:12:55 +01:00
Fabien Potencier
16fb7016c8 Merge branch '2.3' into 2.7
* 2.3:
  [Process] Fix trailing space in PHP binary finder
  Remove tmp addition of zend-stdlib
2015-11-19 17:11:24 +01:00
Tristan Darricau
331a0469c1 [DependencyInjection] Unescape parameters for all types of injection 2015-11-19 15:08:33 +01:00
Nicolas Grekas
1728dcca82 minor #16599 [Process] Fix trailing space in PHP binary finder (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

[Process] Fix trailing space in PHP binary finder

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

Commits
-------

f15e6e0 [Process] Fix trailing space in PHP binary finder
2015-11-19 13:57:32 +01:00
Nicolas Grekas
f15e6e0ba9 [Process] Fix trailing space in PHP binary finder 2015-11-19 13:49:26 +01:00
Nicolas Grekas
6e015e7e0e Remove tmp addition of zend-stdlib 2015-11-19 13:33:53 +01:00
Richard
0459912523 [WebProfilerBundle] Fix minitoolbar height 2015-11-19 10:07:51 +01:00
Tobias Schultze
a22a43636f minor #16592 [Form] Fix ResolvedFormType deprecation notices (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[Form] Fix ResolvedFormType deprecation notices

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

Commits
-------

baafb7a [Form] Fix ResolvedFormType deprecation notices
2015-11-19 00:57:27 +01:00
Nicolas Grekas
baafb7a88b [Form] Fix ResolvedFormType deprecation notices 2015-11-18 19:46:46 +01:00
Fabien Potencier
36bf7069ac bug #16585 Add support for HTTP status code 418 back (dawehner)
This PR was merged into the 2.8 branch.

Discussion
----------

Add support for HTTP status code 418 back

See https://gist.github.com/anonymous/a863d7b493c4b09733ec what this results into

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

Commits
-------

db5fbe0 add it back
2015-11-18 18:36:10 +01:00
Nicolas Grekas
dba51b40fc Merge branch '2.8'
* 2.8:
  [Process] Fix PhpProcess with phpdbg runtime

Conflicts:
	src/Symfony/Bridge/ProxyManager/composer.json
2015-11-18 17:57:58 +01:00
Nicolas Grekas
7748b05747 Merge branch '2.7' into 2.8
* 2.7:
  [Process] Fix PhpProcess with phpdbg runtime

Conflicts:
	composer.json
	src/Symfony/Bridge/ProxyManager/composer.json
2015-11-18 17:56:24 +01:00
Nicolas Grekas
aa82cd338a Merge branch '2.3' into 2.7
* 2.3:
  [Process] Fix PhpProcess with phpdbg runtime

Conflicts:
	composer.json
	src/Symfony/Bridge/ProxyManager/composer.json
2015-11-18 17:27:55 +01:00
Nicolas Grekas
9669238af6 [Process] Fix PhpProcess with phpdbg runtime 2015-11-18 16:41:59 +01:00
Nicolas Grekas
2abbb8a451 Merge branch '2.8'
* 2.8:
  Fix undefined array $server
  Fix call to undefined function json_last_error_message
  Fix bug in windows detection
  [ProxyManager] Tmp fix composer reqs issue in ZF
  Fix PropertyInfo extractor namespace in framework bundle
  Add missing exclusions from phpunit.xml.dist
  [Serializer] ObjectNormalizer: don't serialize static methods and props
  [Form] Enhance some FormRegistry deprecation messages
  [Validator] [sl] BIC (SWIFT-BIC) validation constraint
  [WebProfilerBundle] correct typo in show stack trace link
  bumped Symfony version to 2.8.0
  updated VERSION for 2.8.0-BETA1
  updated CHANGELOG for 2.8.0-BETA1
  Fix the server variables in the router_*.php files
  [Validator] Allow an empty path with a non empty fragment or a query
  The following change adds support for Armenian pluralization.
  [2.3][Process] fix Proccess run with pts enabled

Conflicts:
	src/Symfony/Bridge/ProxyManager/composer.json
	src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/FormPass.php
	src/Symfony/Component/Form/FormRegistry.php
2015-11-18 14:48:51 +01:00
Nicolas Grekas
ecdd681898 Merge branch '2.7' into 2.8
* 2.7:
  Fix undefined array $server
  Fix bug in windows detection
  [ProxyManager] Tmp fix composer reqs issue in ZF
  Add missing exclusions from phpunit.xml.dist
  [Serializer] ObjectNormalizer: don't serialize static methods and props
  Fix the server variables in the router_*.php files
  [Validator] Allow an empty path with a non empty fragment or a query
  The following change adds support for Armenian pluralization.
  [2.3][Process] fix Proccess run with pts enabled

Conflicts:
	composer.json
	src/Symfony/Bridge/ProxyManager/composer.json
	src/Symfony/Component/Security/phpunit.xml.dist
2015-11-18 14:45:00 +01:00
Nicolas Grekas
a8d21b5ca9 Merge branch '2.3' into 2.7
* 2.3:
  Fix undefined array $server
  [ProxyManager] Tmp fix composer reqs issue in ZF
  Add missing exclusions from phpunit.xml.dist
  Fix the server variables in the router_*.php files
  [Validator] Allow an empty path with a non empty fragment or a query
  The following change adds support for Armenian pluralization.
  [2.3][Process] fix Proccess run with pts enabled

Conflicts:
	composer.json
	src/Symfony/Bridge/ProxyManager/composer.json
	src/Symfony/Bundle/DebugBundle/phpunit.xml.dist
	src/Symfony/Component/Security/phpunit.xml.dist
2015-11-18 14:41:01 +01:00
FlorianLB
7418d29ae9 [Serializer] add missing unit tests related to Encoder 2015-11-18 11:51:45 +01:00
Fabien Potencier
e122d88eb6 minor #16565 [Validator] BIC (SWIFT-BIC) validation constraint sl translation (peterkokot)
This PR was merged into the 2.8 branch.

Discussion
----------

[Validator] BIC (SWIFT-BIC) validation constraint sl translation

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

39f0989 [Validator] [sl] BIC (SWIFT-BIC) validation constraint
2015-11-18 11:19:47 +01:00
Fabien Potencier
6f72d6346e minor #16580 Add missing exclusions from phpunit.xml.dist (nicolas-grekas)
This PR was merged into the 2.3 branch.

Discussion
----------

Add missing exclusions from phpunit.xml.dist

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

Commits
-------

d4880c4 Add missing exclusions from phpunit.xml.dist
2015-11-18 11:16:24 +01:00
Eugene Wissner
75aa6f68f8 Fix undefined array $server 2015-11-18 11:13:04 +01:00
Fabien Potencier
362974b85b bug #16581 Fix call to undefined function json_last_error_message (dawehner)
This PR was squashed before being merged into the 2.8 branch (closes #16581).

Discussion
----------

Fix call to undefined function json_last_error_message

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

Commits
-------

15f9cf2 Fix call to undefined function json_last_error_message
2015-11-18 11:05:39 +01:00
Daniel Wehner
15f9cf2740 Fix call to undefined function json_last_error_message 2015-11-18 11:05:38 +01:00
Kevin Bond
c4068d923d Fix bug in windows detection 2015-11-18 10:54:26 +01:00
Daniel Wehner
db5fbe0e23 add it back 2015-11-18 10:45:48 +01:00
Nicolas Grekas
01251455c0 [ProxyManager] Tmp fix composer reqs issue in ZF 2015-11-18 10:04:13 +01:00
Jérôme Vasseur
d04984ad05 Fix PropertyInfo extractor namespace in framework bundle 2015-11-18 09:40:44 +01:00
Nicolas Grekas
d4880c4785 Add missing exclusions from phpunit.xml.dist 2015-11-18 09:19:46 +01:00
Kévin Dunglas
1fab27b58c [Serializer] ObjectNormalizer: don't serialize static methods and props 2015-11-17 20:34:27 +01:00
Tobias Schultze
17608389f1 minor #16568 [Form] Enhance some FormRegistry deprecation messages (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[Form] Enhance some FormRegistry deprecation messages

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

Commits
-------

02d2148 [Form] Enhance some FormRegistry deprecation messages
2015-11-17 12:52:32 +01:00
Nicolas Grekas
02d2148f37 [Form] Enhance some FormRegistry deprecation messages 2015-11-17 11:33:11 +01:00
Peter Kokot
39f09893b9 [Validator] [sl] BIC (SWIFT-BIC) validation constraint 2015-11-17 02:04:18 +01:00
Douglas Greenshields
9b0850511f [WebProfilerBundle] correct typo in show stack trace link 2015-11-17 00:47:20 +00:00
Fabien Potencier
9835236a54 bumped Symfony version to 3.0.0 2015-11-16 15:59:01 +01:00
Fabien Potencier
d96ccf7c95 updated VERSION for 3.0.0-BETA1 2015-11-16 15:06:56 +01:00
Fabien Potencier
86b4c0536c bumped Symfony version to 2.8.0 2015-11-16 13:50:22 +01:00
Fabien Potencier
021c087486 updated VERSION for 2.8.0-BETA1 2015-11-16 10:09:15 +01:00
Fabien Potencier
c0f7463c3e bug #16352 Fix the server variables in the router_*.php files (leofeyer)
This PR was squashed before being merged into the 2.3 branch (closes #16352).

Discussion
----------

Fix the server variables in the router_*.php files

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

The built-in web server automatically rewrites everything to the `app_dev.php` script, but it does not adjust the server variables accordingly.

Here is the output of `print_r($_SERVER)` on Apache with mod_rewrite enabled (relevant lines only):

```
Array
(
    [REQUEST_URI] => /text-elements.html
    [SCRIPT_NAME] => /app_dev.php
    [PHP_SELF] => /app_dev.php
)
```

And here is the output of the exact same script on the built-in server:

```
Array
(
    [REQUEST_URI] => /text-elements.html
    [SCRIPT_NAME] => /text-elements.html
    [PHP_SELF] => /text-elements.html
)
```

And here is the return value of Symfony's `Request::getScriptName()` method:

```php
// Apache: http://localhost/text-elements.html
echo $this->container->get('request_stack')->getCurrentRequest()->getScriptName(); // /app_dev.php

// Built-in web server: http://127.0.0.1:8000/text-elements.html
echo $this->container->get('request_stack')->getCurrentRequest()->getScriptName(); // /text-elements.html
```

This PR fixes the two server variables in the `router_dev.php` script.

Commits
-------

4923411 Fix the server variables in the router_*.php files
2015-11-13 09:09:50 +01:00
Leo Feyer
4923411062 Fix the server variables in the router_*.php files 2015-11-13 09:09:48 +01:00
Jakub Zalas
2d0af8e719 [Validator] Allow an empty path with a non empty fragment or a query 2015-11-13 07:29:58 +00:00
Marcos Sánchez
5f1980ba5c The following change adds support for Armenian pluralization.
According to http://www.unicode.org/cldr/charts/27/supplemental/language_plural_rules.html#hy
Armenian has 2 forms of pluralization.
2015-11-12 10:09:48 +01:00
Tobias Schultze
819154127b Merge branch '2.8' 2015-11-12 02:15:38 +01:00
Tobias Schultze
fef28b2fa1 Merge branch '2.7' into 2.8 2015-11-12 02:14:48 +01:00
Michal Piotrowski
185950c5d4 OptionsResolver test coverage 2015-11-12 02:13:15 +01:00
WouterJ
6f2782b188 Revert removal of framework.csrf_protection section 2015-11-11 11:02:58 +01:00
Fabien Potencier
779833be05 Merge branch '2.8'
* 2.8:
  Fixed tabs when there are several groups of tabs in the same page
  Fix mode
  Fixed failing test for HHVM
  Removed unused logic in MockStream
  Update coding standard for MockStream
  [Filesystem] added tempnam() stream wrapper aware version of PHP's native tempnam() and fixed dumpFile to allow dumping to streams
  Renamed key to secret
2015-11-10 14:34:42 +01:00
Nicolas Grekas
ab3c8f891a bug #16510 [2.3][Process] fix Proccess run with pts enabled (ewgRa)
This PR was squashed before being merged into the 2.3 branch (closes #16510).

Discussion
----------

[2.3][Process] fix Proccess run with pts enabled

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

Commits
-------

9cf90fb [2.3][Process] fix Proccess run with pts enabled
2015-11-10 11:50:50 +01:00
Evgeniy Sokolov
9cf90fbcbf [2.3][Process] fix Proccess run with pts enabled 2015-11-10 11:49:25 +01:00
Nicolas Grekas
5aa4a3b64c Remove some more legacy code 2015-11-10 11:42:06 +01:00
Javier Eguiluz
c5daff0143 Fixed tabs when there are several groups of tabs in the same page 2015-11-10 11:20:15 +01:00
Fabien Potencier
0fc513e611 feature #16156 [Filesystem] Changed dumpFile to allow dumping to streams (markchalloner, pierredup)
This PR was merged into the 2.8 branch.

Discussion
----------

[Filesystem] Changed dumpFile to allow dumping to streams

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #10018
| License       | MIT
| Doc PR        | symfony/symfony-docs#5393

This is a follow-up of #14970 with comments addressed

Commits
-------

5ca7dee Fix mode
a17aa5e Fixed failing test for HHVM
61a3afd Removed unused logic in MockStream
247266c Update coding standard for MockStream
c6a7747 [Filesystem] added tempnam() stream wrapper aware version of PHP's native tempnam() and fixed dumpFile to allow dumping to streams
2015-11-09 22:34:48 +01:00
Fabien Potencier
456e55846d bug #16493 [Security] Renamed key to secret Part 2 (WouterJ)
This PR was merged into the 2.8 branch.

Discussion
----------

[Security] Renamed key to secret Part 2

Anonymous and RememberMe were already changed in https://github.com/symfony/symfony/pull/15141 This PR renames 2 more occurences of key in the Security: AnonymousAuthenticationListener and the Digest entry point.

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

Commits
-------

55f59d5 Renamed key to secret
2015-11-09 22:34:05 +01:00
Pierre du Plessis
5ca7dee2fd Fix mode 2015-11-09 17:11:40 +02:00
Pierre du Plessis
a17aa5e091 Fixed failing test for HHVM 2015-11-09 17:11:40 +02:00
Pierre du Plessis
61a3afd829 Removed unused logic in MockStream 2015-11-09 17:11:40 +02:00
Pierre du Plessis
247266cdef Update coding standard for MockStream 2015-11-09 17:11:40 +02:00
Mark Challoner
c6a774761d [Filesystem] added tempnam() stream wrapper aware version of PHP's native tempnam() and fixed dumpFile to allow dumping to streams 2015-11-09 17:11:40 +02:00
Nicolas Grekas
1c1c4e7005 Merge branch '2.8'
* 2.8:
  Fix merge
2015-11-09 14:21:10 +01:00
Nicolas Grekas
0bb46c1ae2 Fix merge 2015-11-09 14:20:59 +01:00
Nicolas Grekas
d33879a9db Merge branch '2.8'
* 2.8:
  [ci] Phpunit tests wont run if composer is installed in a wrapper
  [ci] Add version tag in phpunit wrapper to trigger cache-reset on demand
  fix race condition at mkdir (#16258)
  [VarDumper] Fix PHP7 type-hints compat
  [Bridge] [PhpUnit] fixes documentation markup.
  [PropertyAccess] Port of the performance optimization from 2.3
  trigger deprecation warning when using empty_value
  [PropertyAccess] Test access to dynamic properties
  [PropertyAccess] Fix dynamic property accessing.
  [Serializer] GetSetNormalizer shouldn't set/get static methods
  [Serializer] PropertyNormalizer shouldn't set static properties
  JsonDescriptor - encode container params only once

Conflicts:
	src/Symfony/Component/Form/Extension/Core/Type/ChoiceType.php
	src/Symfony/Component/Form/Extension/Core/Type/DateType.php
	src/Symfony/Component/Form/Extension/Core/Type/TimeType.php
	src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php
2015-11-09 13:52:14 +01:00
Nicolas Grekas
d86a3f3172 Merge branch '2.7' into 2.8
* 2.7:
  [ci] Phpunit tests wont run if composer is installed in a wrapper
  [ci] Add version tag in phpunit wrapper to trigger cache-reset on demand
  fix race condition at mkdir (#16258)
  [VarDumper] Fix PHP7 type-hints compat
  [Bridge] [PhpUnit] fixes documentation markup.
  [PropertyAccess] Port of the performance optimization from 2.3
  trigger deprecation warning when using empty_value
  [PropertyAccess] Test access to dynamic properties
  [PropertyAccess] Fix dynamic property accessing.
  [Serializer] GetSetNormalizer shouldn't set/get static methods
  [Serializer] PropertyNormalizer shouldn't set static properties
  JsonDescriptor - encode container params only once

Conflicts:
	src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php
2015-11-09 13:46:59 +01:00
Nicolas Grekas
1bc1931ede Merge branch '2.3' into 2.7
* 2.3:
  [ci] Phpunit tests wont run if composer is installed in a wrapper
  [ci] Add version tag in phpunit wrapper to trigger cache-reset on demand
  fix race condition at mkdir (#16258)
  [PropertyAccess] Test access to dynamic properties
  [PropertyAccess] Fix dynamic property accessing.

Conflicts:
	src/Symfony/Component/PropertyAccess/Tests/PropertyAccessorTest.php
2015-11-09 13:45:14 +01:00
Nicolas Grekas
481bf6603d [ci] Add version tag in phpunit wrapper to trigger cache-reset on demand 2015-11-09 13:13:33 +01:00
Nicolas Grekas
b2afc3286e [Bridge/PhpUnit] Allow PHP 5.3.3 for testing with Symfony 2.3 2015-11-09 13:11:16 +01:00
Nicolas Grekas
b1ad6232b7 Merge branch '2.8'
* 2.8:
  [Bridge\PhpUnit] Add extra clock-mocked namespaces in phpunit.xml.dist
  [DependencyInjection] Autowing: exclude abstract definitons
  [DependencyInjection] Autowiring: support parent/decorators
  [FrameworkBundle] Autowiring support for debug:container
  Fixing bad type-hint auto-wiring bug
  [Yaml] deprecate unquoted indicator characters
  added a micro kernel
  Re-adding the ability to add a resource to the RouteCollectionBuilder
  [DependencyInjection] Add autowiring support to dumpers
  ldap_set_option should be called with a valid link identifier
  [FrameworkBundle][Form] Better exception message for private form tagged services

Conflicts:
	src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/FormPass.php
	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.xml
	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.xml
	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.xml
	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tags.xml
	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.txt
	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.xml
	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.txt
	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.xml
	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/legacy_synchronized_service_definition_1.json
	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/legacy_synchronized_service_definition_1.md
	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/legacy_synchronized_service_definition_1.txt
	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/legacy_synchronized_service_definition_1.xml
	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/legacy_synchronized_service_definition_2.json
	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/legacy_synchronized_service_definition_2.md
	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/legacy_synchronized_service_definition_2.txt
	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/legacy_synchronized_service_definition_2.xml
	src/Symfony/Component/DependencyInjection/Compiler/ResolveDefinitionTemplatesPass.php
	src/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php
2015-11-09 11:46:27 +01:00
Nicolas Grekas
cd36c07629 [Bridge\PhpUnit] Add extra clock-mocked namespaces in phpunit.xml.dist 2015-11-09 11:00:06 +01:00
WouterJ
55f59d55a2 Renamed key to secret 2015-11-07 18:34:16 +01:00
Evgeniy Sokolov
2c2836c599 fix race condition at mkdir (#16258) 2015-11-07 09:38:45 +01:00
Fabien Potencier
515007e941 bug #16469 [DependencyInjection] [FrameworkBundle] Enhance autowiring DX (dunglas)
This PR was merged into the 2.8 branch.

Discussion
----------

[DependencyInjection] [FrameworkBundle] Enhance autowiring DX

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

* Dump autowiring data when using the container
* Add autowiring data to the `debug:container` command

Commits
-------

9c3b910 [FrameworkBundle] Autowiring support for debug:container
18913e1 [DependencyInjection] Add autowiring support to dumpers
2015-11-07 09:30:54 +01:00
Fabien Potencier
da95b53604 bug #15945 [Form] trigger deprecation warning when using empty_value (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] trigger deprecation warning when using empty_value

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

The `empty_value` option is deprecated in the `choice`, `date`, and
`time` form types. Therefore, a deprecation warning must be triggered
when the users configures a value for this option.

The `datetime` form type does not need to be updated as it passes
configured values to the `date` and `time` form types which trigger
deprecation warnings anyway.

Commits
-------

405d4a8 trigger deprecation warning when using empty_value
2015-11-07 09:26:45 +01:00
Fabien Potencier
aacbcef537 bug #16384 [FrameworkBundle] JsonDescriptor - encode container params only once (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] JsonDescriptor - encode container params only once

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

Commits
-------

dd9d076 JsonDescriptor - encode container params only once
2015-11-07 09:20:26 +01:00
Fabien Potencier
9093f1f564 minor #16482 [Bridge] [PhpUnit] fixes documentation markup. (hhamon)
This PR was merged into the 2.7 branch.

Discussion
----------

[Bridge] [PhpUnit] fixes documentation markup.

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

Commits
-------

9e41d27 [Bridge] [PhpUnit] fixes documentation markup.
2015-11-07 09:12:54 +01:00
Fabien Potencier
479a42d91b minor #16475 [FrameworkBundle] Fix tests on Windows (nicolas-grekas)
This PR was merged into the 3.0-dev branch.

Discussion
----------

[FrameworkBundle] Fix tests on Windows

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

This PR fixes tests on appveyor by reverting a change made here:
https://github.com/symfony/symfony/pull/13121/files#diff-0e52187cbf1067a310538287da74ddb5

Commits
-------

53f4fd5 [FwB] Fix tests on Windows
2015-11-07 09:10:14 +01:00
Tobias Schultze
f75f44b7c5 bug #16480 [VarDumper] Fix PHP7 type-hints compat (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[VarDumper] Fix PHP7 type-hints compat

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

Commits
-------

edd5633 [VarDumper] Fix PHP7 type-hints compat
2015-11-06 18:48:55 +01:00
Nicolas Grekas
edd5633374 [VarDumper] Fix PHP7 type-hints compat 2015-11-06 15:49:25 +01:00
Kévin Dunglas
faefc6074f [DependencyInjection] Autowing: exclude abstract definitons 2015-11-06 14:16:58 +01:00
Kévin Dunglas
71d502a174 [DependencyInjection] Autowiring: support parent/decorators 2015-11-06 14:09:32 +01:00
Kévin Dunglas
9c3b910849 [FrameworkBundle] Autowiring support for debug:container 2015-11-06 14:08:21 +01:00
Hugo Hamon
9e41d27851 [Bridge] [PhpUnit] fixes documentation markup. 2015-11-06 11:15:01 +01:00
Nicolas Grekas
53f4fd50ed [FwB] Fix tests on Windows 2015-11-05 16:42:47 +01:00
Fabien Potencier
4acfc3e26f feature #11431 [Console] End of options (--) signal support (Seldaek)
This PR was squashed before being merged into the 3.0-dev branch (closes #11431).

Discussion
----------

[Console] End of options (--) signal support

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

The first commit is only about -- support + fixes a few other little issues I discovered while adding tests to cover my feature.
The second commit makes use of the first in the Application class, so that if you do `console foo -- --help` for example, it should not trigger the help anymore, but simply have --help available as a dummy arg.

To keep BC, I did this by adding a param to hasParameterOption/getParameterOption instead of doing it by default. This creates another BC issue though in that it changes the InputInterface. I don't think that's a major concern but it's worth mentioning.

The other only minor BC change is if you do getParameterOption() of a flag option i.e. `--foo` without a value. Before it was returning null in ArgvInput and true in ArrayInput. I normalized this to true for both since I think that makes more sense, but strictly speaking while it improves interface interchangeability, it's a BC break.

Commits
-------

834218e [Console] End of options (--) signal support
2015-11-05 15:03:06 +01:00
Jordi Boggiano
834218e1a7 [Console] End of options (--) signal support 2015-11-05 15:03:04 +01:00
Fabien Potencier
814c2727de bug #16463 [PropertyAccess] Port of the performance optimization from 2.3 (dunglas)
This PR was squashed before being merged into the 2.7 branch (closes #16463).

Discussion
----------

[PropertyAccess] Port of the performance optimization from 2.3

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

Portage of #16294 in the 2.7 branch.

Commits
-------

aa4cc90 [PropertyAccess] Port of the performance optimization from 2.3
2015-11-05 14:42:58 +01:00
Kévin Dunglas
aa4cc90a87 [PropertyAccess] Port of the performance optimization from 2.3 2015-11-05 14:42:52 +01:00
Fabien Potencier
8c4e756c1b bug #16442 [LDAP] ldap_set_option should be called with a valid link identifier (pierredup)
This PR was merged into the 2.8 branch.

Discussion
----------

[LDAP] ldap_set_option should be called with a valid link identifier

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

Commits
-------

7f89196 ldap_set_option should be called with a valid link identifier
2015-11-05 14:32:43 +01:00
Fabien Potencier
4f7fd74257 bug #16462 [PropertyAccess] Fix dynamic property accessing. (dunglas)
This PR was merged into the 2.3 branch.

Discussion
----------

[PropertyAccess] Fix dynamic property accessing.

| 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 a bug regarding dynamic properties access introduced by #16294.

Commits
-------

916f9e0 [PropertyAccess] Test access to dynamic properties
352dfb9 [PropertyAccess] Fix dynamic property accessing.
2015-11-05 14:31:32 +01:00
Fabien Potencier
bf849efa4b bug #16467 Fixing bad type-hint auto-wiring bug (weaverryan)
This PR was squashed before being merged into the 2.8 branch (closes #16467).

Discussion
----------

Fixing bad type-hint auto-wiring bug

| 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

Previously, if you type-hinted a bad class name, we did not set the argument value. In fact, with `continue`, we skipped setting the argument, which meant that if argument 2 was skipped, then argument 3 would be put into argument 2's location.

But really, if I type-hint a non-existent class, this should throw a clear exception. afaik, in the original PR, it was said that we cannot throw an exception for a non-existent class because a later compiler-pass may manipulate those class names and "fix" them to be real classes. But, that's an edge case, and I think if you're using advanced functionality like that, you should not use auto-wiring. Throwing an exception is much more user-friendly. I personally hit this issue and was trying to figure out what was going wrong :).

About the exception message: I would like to tell the user which class is type-hinted correctly, but getting the type-hinted class for a non-existent class is not possible with reflection.

Thanks!

cc @dunglas

Commits
-------

b7b182e Fixing bad type-hint auto-wiring bug
2015-11-05 14:26:35 +01:00
Ryan Weaver
b7b182ea9e Fixing bad type-hint auto-wiring bug 2015-11-05 14:26:31 +01:00
Fabien Potencier
3443230ad1 feature #16433 [Yaml] deprecate unquoted indicator characters (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[Yaml] deprecate unquoted indicator characters

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | FriendsOfPHP/security-advisories#111
| License       | MIT
| Doc PR        |

Commits
-------

8416f7b [Yaml] deprecate unquoted indicator characters
2015-11-05 14:24:29 +01:00
Fabien Potencier
1f57d5e33a feature #16419 [FrameworkBundle][Form] Better exception message for private form tagged services (ogizanagi)
This PR was merged into the 2.8 branch.

Discussion
----------

[FrameworkBundle][Form] Better exception message for private form tagged services

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

Similar to what is done in [RegisterListenerPass](https://github.com/symfony/symfony/blob/2.8/src/Symfony/Component/EventDispatcher/DependencyInjection/RegisterListenersPass.php#L61-L63), those changes allow to have a better exception message when defining a private `form.type`, `form.type_extension` or `form.form_guesser` tagged service, and at container compilation instead of runtime:

> The service "my.form.type" must be public as form types are lazy-loaded.

instead of:
> You have requested a non-existent service "my.form.type"

If I'm right, similar cases were considered as new features in the past, so this targets 2.8.

Commits
-------

11d675f [FrameworkBundle][Form] Better exception message for private form tagged services
2015-11-05 14:20:52 +01:00
Fabien Potencier
9b3224b19e feature #15990 added a micro kernel (fabpot)
This PR was merged into the 2.8 branch.

Discussion
----------

added a micro kernel

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

Related to #15948 and #15820

Commits
-------

eab0f0a added a micro kernel
2015-11-05 14:17:06 +01:00
Fabien Potencier
1bed1772f6 bug #16454 [Serializer] GetSetNormalizer shouldn't set/get static methods (boekkooi)
This PR was merged into the 2.7 branch.

Discussion
----------

[Serializer] GetSetNormalizer shouldn't set/get static methods

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

This PR fixes setting static getters and setters when serializing.
This is strictly speaking a BC break but in my opinion a needed one because the current behavior is unexpected.

Commits
-------

d8d4405 [Serializer] GetSetNormalizer shouldn't set/get static methods
2015-11-05 14:03:56 +01:00
Fabien Potencier
e21bf56c71 bug #16453 [Serializer] PropertyNormalizer shouldn't set static properties (boekkooi)
This PR was merged into the 2.7 branch.

Discussion
----------

[Serializer] PropertyNormalizer shouldn't set static properties

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

This PR fixes a bug where static properties where set by the PropertyNormalizer.

Commits
-------

b15bdca [Serializer] PropertyNormalizer shouldn't set static properties
2015-11-05 14:02:15 +01:00
Fabien Potencier
b587fa3e94 bug #16361 Re-adding the ability to add a resource to the RouteCollectionBuilder (weaverryan)
This PR was merged into the 2.8 branch.

Discussion
----------

Re-adding the ability to add a resource to the RouteCollectionBuilder

| 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

At the end of #15778, I removed the ability to add a resource to the RouteCollectionBuilder. But, this is needed (at least internally): if you import, the returned RouteCollection may have resources, which need to be brought forward into the new RouteCollectionBuilder (the code in `import()` to do this already exists, but is calling an undefined `addResource()` method).

This adds the test with minimal code to fix.

P.S. Fabien told me to remove `addResource` originally... so isn't this *kind of* his fault?

Commits
-------

3b67daa Re-adding the ability to add a resource to the RouteCollectionBuilder
2015-11-05 13:57:14 +01:00
Nicolas Grekas
4a177d7cb9 Merge branch '2.8'
* 2.8:
  Fix tests when no Intl extension
  [VarDumper] Fix casting for ReflectionParameter
  [HttpKernel] Keep 3.0 compat by not using ContainerAware
  [DI] Clean a phpdoc
  [Security\Core] Deprecate passing $salt to BCryptPasswordEncoder::encodePassword()

Conflicts:
	src/Symfony/Component/DependencyInjection/ContainerAware.php
	src/Symfony/Component/HttpKernel/Bundle/Bundle.php
	src/Symfony/Component/Intl/Tests/DateFormatter/AbstractIntlDateFormatterTest.php
	src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php
	src/Symfony/Component/VarDumper/Tests/Test/VarDumperTestTraitTest.php
2015-11-05 11:29:45 +01:00
Nicolas Grekas
c812b39ae7 Merge branch '2.7' into 2.8
* 2.7:
  [VarDumper] Fix casting for ReflectionParameter
  [DI] Clean a phpdoc

Conflicts:
	src/Symfony/Component/VarDumper/Tests/Caster/ReflectionCasterTest.php
2015-11-05 11:24:07 +01:00
Nicolas Grekas
c0f0ad3039 minor #16278 Fix tests when no Intl extension (ewgRa)
This PR was squashed before being merged into the 2.8 branch (closes #16278).

Discussion
----------

Fix tests when no Intl extension

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

I haven't Intl extension installed and testFormatWithIntlTimeZone is fail because use \IntlTimeZone.

This PR fix it.

Commits
-------

84c7567 Fix tests when no Intl extension
2015-11-05 11:18:51 +01:00
Evgeniy Sokolov
84c75674fd Fix tests when no Intl extension 2015-11-05 11:18:48 +01:00
Nicolas Grekas
a3f2f5c441 bug #16471 [VarDumper] Fix casting for ReflectionParameter (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[VarDumper] Fix casting for ReflectionParameter

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

Commits
-------

8ff449d [VarDumper] Fix casting for ReflectionParameter
2015-11-05 10:58:21 +01:00
Nicolas Grekas
2c6e9e495a feature #16459 [Security\Core] Deprecate passing $salt to BCryptPasswordEncoder::encodePassword() (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[Security\Core] Deprecate passing $salt to BCryptPasswordEncoder::encodePassword()

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

Commits
-------

770bd8c [Security\Core] Deprecate passing $salt to BCryptPasswordEncoder::encodePassword()
2015-11-05 10:51:14 +01:00
Nicolas Grekas
8ff449d86c [VarDumper] Fix casting for ReflectionParameter 2015-11-05 10:33:55 +01:00
Christian Flothmann
8416f7ba51 [Yaml] deprecate unquoted indicator characters 2015-11-05 10:04:44 +01:00
Tobias Schultze
f75a940881 [VarDumper] fix filename 2015-11-05 00:39:41 +01:00
Christian Flothmann
405d4a8ead trigger deprecation warning when using empty_value
The `empty_value` option is deprecated in the `choice`, `date`, and
`time` form types. Therefore, a deprecation warning must be triggered
when the users configures a value for this option.

The `datetime` form type does not need to be updated as it passes
configured values to the `date` and `time` form types which trigger
deprecation warnings anyway.
2015-11-04 21:57:50 +01:00
Kévin Dunglas
916f9e0671 [PropertyAccess] Test access to dynamic properties 2015-11-04 20:02:36 +01:00
Nicolas Grekas
6fe192601c Merge branch '2.3' into 2.7
* 2.3:
  [DI] Clean a phpdoc
2015-11-04 19:50:51 +01:00
Nicolas Grekas
31a0669cf5 [HttpKernel] Keep 3.0 compat by not using ContainerAware 2015-11-04 19:15:57 +01:00
Nicolas Grekas
2030f62bb5 [DI] Clean a phpdoc 2015-11-04 19:12:53 +01:00
Tobias Schultze
230990188d [VarDumper] replace VarDumperTestCase by trait 2015-11-04 18:48:20 +01:00
Tobias Schultze
24ff770679 [TwigBundle] use ContainerAwareTrait in commands
I made the class final because it is not meant to be extended. By using the trait, which uses protected visibility for the container property, it would otherwise make the container property part of of BC promise
2015-11-04 18:31:30 +01:00
Fabien Potencier
eab0f0a4f4 added a micro kernel 2015-11-04 18:19:57 +01:00
Tobias Schultze
e337ce6bf7 Remove deprecated ContainerAware class and make use of the trait in another class 2015-11-04 18:12:35 +01:00
blanchonvincent
52c50e3b1e Remove abstract class and use Interface+Trait
Conflicts:
	src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php
	src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LocalizedController.php
	src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/FormLoginBundle/Controller/LoginController.php
	src/Symfony/Component/DependencyInjection/ContainerAware.php
2015-11-04 18:03:42 +01:00
Ryan Weaver
3b67daacd5 Re-adding the ability to add a resource to the RouteCollectionBuilder
We need this because when you import a RouteCollection and this has a resource
on it, we need to pass that resource forward to the RouteCollectionBuilder
2015-11-04 11:00:43 -05:00
Kévin Dunglas
352dfb9890 [PropertyAccess] Fix dynamic property accessing. 2015-11-04 16:07:49 +01:00
Nicolas Grekas
770bd8cfda [Security\Core] Deprecate passing $salt to BCryptPasswordEncoder::encodePassword() 2015-11-04 14:11:51 +01:00
Nicolas Grekas
d67feb4fc8 Merge branch '2.8'
* 2.8:
  [HttpKernel] Clean clock-mock injection, replaced by #16455
  [Bridge\PhpUnit] Fix clock-mock registration
2015-11-04 10:24:46 +01:00
Nicolas Grekas
7beea17a02 Merge branch '2.7' into 2.8
* 2.7:
  [HttpKernel] Clean clock-mock injection, replaced by #16455
2015-11-04 10:24:34 +01:00
Nicolas Grekas
c24ca431ff Merge branch '2.3' into 2.7
* 2.3:
  [HttpKernel] Clean clock-mock injection, replaced by #16455

Conflicts:
	src/Symfony/Component/HttpKernel/Tests/Fragment/FragmentHandlerTest.php
2015-11-04 10:24:24 +01:00
Nicolas Grekas
388534ecbf [HttpKernel] Clean clock-mock injection, replaced by #16455 2015-11-04 10:02:52 +01:00
Nicolas Grekas
0a6a10a923 [Bridge\PhpUnit] Fix clock-mock registration 2015-11-04 09:57:16 +01:00
Nicolas Grekas
bceb2d969c Merge branch '2.8'
* 2.8:
  asset test coverage
  [HttpKernel] PostResponseEvent should extend the KernelEvent
  [travis] session.gc_probability=0 to fix transient tests on hhvm
  Write the log message on a single line againn
  [DI] Deprecate ContainerAware in favor of ContainerAwareTrait
  [VarDumper] Deprecate VarDumperTestCase in favor of the trait
  Check whether $this->logger is not null on GuardAuthenticationListener
  [Console] Add progress indicator helper

Conflicts:
	.travis.yml
2015-11-04 09:18:19 +01:00
Nicolas Grekas
9e393291cb Merge branch '2.7' into 2.8
* 2.7:
  asset test coverage
  [travis] session.gc_probability=0 to fix transient tests on hhvm

Conflicts:
	.travis.yml
2015-11-04 09:15:58 +01:00
Nicolas Grekas
4ccfe49f4a Merge branch '2.3' into 2.7
* 2.3:
  [travis] session.gc_probability=0 to fix transient tests on hhvm

Conflicts:
	.travis.yml
	src/Symfony/Component/HttpKernel/Tests/Fragment/FragmentHandlerTest.php
2015-11-04 09:13:32 +01:00
Warnar Boekkooi
d8d4405e50 [Serializer] GetSetNormalizer shouldn't set/get static methods 2015-11-04 15:11:04 +08:00
Warnar Boekkooi
b15bdca96d [Serializer] PropertyNormalizer shouldn't set static properties 2015-11-04 15:01:32 +08:00
Fabien Potencier
69af9eac35 feature #16409 [Console] Add progress indicator helper (kbond)
This PR was merged into the 2.8 branch.

Discussion
----------

[Console] Add progress indicator helper

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

Commits
-------

be0a364 [Console] Add progress indicator helper
2015-11-04 01:47:19 +01:00
Fabien Potencier
ed4e3e87ac feature #16423 [VarDumper] Deprecate VarDumperTestCase in favor of the trait (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[VarDumper] Deprecate VarDumperTestCase in favor of the trait

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

Because people must upgrade to PHP 5.5 before upgrading to Sf 3.0, this can be done on the 2.8 branch.

Commits
-------

31e51ba [VarDumper] Deprecate VarDumperTestCase in favor of the trait
2015-11-04 01:37:54 +01:00
Fabien Potencier
a594b9fc18 feature #16424 [DI] Deprecate ContainerAware in favor of ContainerAwareTrait (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[DI] Deprecate ContainerAware in favor of ContainerAwareTrait

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

To be merged before #16411 (that then should be rebased) if we agree that this is the right approach (which I believe personally).
The deprecation notice will be triggered by the existing mechanism in the DebugClassLoader (it can't be added inline because that would make symfony itself trigger it).
PHP 5.3 users migrating to 3.0 must already move to 2.8+5.5 beforehand so this is really on the CUP (Continuous Upgrade Path).

Commits
-------

807ebac [DI] Deprecate ContainerAware in favor of ContainerAwareTrait
2015-11-04 01:36:48 +01:00
Michal Piotrowski
5a6c1f2626 asset test coverage 2015-11-04 01:23:35 +01:00
Fabien Potencier
4fd60aacd4 minor #16416 [Security][Guard] Check whether $this->logger is not null on GuardAuthenticationListener (aeoris, Diego Agulló)
This PR was merged into the 2.8 branch.

Discussion
----------

[Security][Guard] Check whether $this->logger is not null on GuardAuthenticationListener

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

Commits
-------

ebc751d Write the log message on a single line againn
713b99f Check whether $this->logger is not null on GuardAuthenticationListener
2015-11-04 01:18:15 +01:00
Fabien Potencier
1da126802a feature #16430 [HttpKernel] PostResponseEvent should extend the KernelEvent (jakzal)
This PR was merged into the 2.8 branch.

Discussion
----------

[HttpKernel] PostResponseEvent should extend the KernelEvent

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

Technically the `PostResponseEvent` is a `KernelEvent`.

Commits
-------

b9863d5 [HttpKernel] PostResponseEvent should extend the KernelEvent
2015-11-04 01:17:14 +01:00
Kévin Dunglas
18913e15d5 [DependencyInjection] Add autowiring support to dumpers 2015-11-03 15:47:58 -08:00
Jakub Zalas
b9863d521d [HttpKernel] PostResponseEvent should extend the KernelEvent 2015-11-03 16:51:19 +00:00
Nicolas Grekas
b4dd254774 [travis] session.gc_probability=0 to fix transient tests on hhvm 2015-11-03 16:54:52 +01:00
Nicolas Grekas
3f0bb90ac6 Merge branch '2.8'
* 2.8:
  [Security] Clean deps
  [Security][2.7] Clean deps
  [HttpKernel] Fix time-sensitive test case
  [travis] Fail early when an invalid composer.json is found

Conflicts:
	src/Symfony/Component/Security/Core/composer.json
	src/Symfony/Component/Security/composer.json
2015-11-03 15:29:13 +01:00
Nicolas Grekas
5805cc5040 Merge branch '2.7' into 2.8
* 2.7:
  [Security][2.7] Clean deps
  [HttpKernel] Fix time-sensitive test case
  [travis] Fail early when an invalid composer.json is found

Conflicts:
	src/Symfony/Component/Security/Core/composer.json
	src/Symfony/Component/Security/composer.json
2015-11-03 15:28:10 +01:00
Nicolas Grekas
399b1d5cb0 minor #16441 [Security][2.7] Clean deps (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Security][2.7] Clean deps

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

Commits
-------

d51ab88 [Security][2.7] Clean deps
2015-11-03 15:25:10 +01:00
Nicolas Grekas
5d8ce715f1 Merge branch '2.3' into 2.7
* 2.3:
  [HttpKernel] Fix time-sensitive test case
  [travis] Fail early when an invalid composer.json is found
2015-11-03 15:24:30 +01:00
Nicolas Grekas
ae072b7366 [Security] Clean deps 2015-11-03 15:10:28 +01:00
Pierre du Plessis
7f891969c5 ldap_set_option should be called with a valid link identifier 2015-11-03 16:09:23 +02:00
Nicolas Grekas
d51ab88541 [Security][2.7] Clean deps 2015-11-03 15:07:35 +01:00
Nicolas Grekas
c188b35b18 [HttpKernel] Fix time-sensitive test case 2015-11-03 14:01:13 +01:00
Nicolas Grekas
0f6e478272 Merge branch '2.8'
* 2.8:
  [Security] Fix composer.json
  [VarDumper] Casters for Generator, ReflectionGenerator and ReflectionType

Conflicts:
	src/Symfony/Component/Security/composer.json
2015-11-03 12:45:45 +01:00
Nicolas Grekas
2c1bb06e54 Merge branch '2.7' into 2.8
* 2.7:
  [Security] Fix composer.json
2015-11-03 12:42:49 +01:00
Nicolas Grekas
39420e1eb9 [Security] Fix composer.json 2015-11-03 12:34:55 +01:00
Diego Agulló
ebc751d868 Write the log message on a single line againn 2015-11-03 10:13:43 +01:00
Nicolas Grekas
973fbb310e feature #16325 [VarDumper] Casters for Generator, ReflectionGenerator and ReflectionType (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[VarDumper] Casters for Generator, ReflectionGenerator and ReflectionType

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

I had this on a local branch since a few days:
- on PHP7, using ReflectionGenerator allows dumping interesting state info about generators (see test case for example output)
- caster for ReflectionType added
- source code excerpts are now left-trimmed (see adjusted test cases)

Commits
-------

d6c2d75 [VarDumper] Casters for Generator, ReflectionGenerator and ReflectionType
2015-11-03 09:48:22 +01:00
Fabien Potencier
04eda701cc Merge branch '2.8'
* 2.8:
  removed @covers annotations in tests
  removed @covers annotations in tests
  removed all @covers annotations
  checkCredentials() force it to be an affirmative yes!
  [PropertyAccess] Major performance improvement
2015-11-02 21:34:04 +01:00
Fabien Potencier
9a1574a7e5 removed @covers annotations in tests 2015-11-02 21:29:39 +01:00
Fabien Potencier
e3f09df02a Merge branch '2.7' into 2.8
* 2.7:
  removed @covers annotations in tests
  removed all @covers annotations
  [PropertyAccess] Major performance improvement
2015-11-02 21:29:24 +01:00
Fabien Potencier
d3008b420a removed @covers annotations in tests 2015-11-02 21:25:31 +01:00
Fabien Potencier
db54164a87 Merge branch '2.3' into 2.7
* 2.3:
  removed all @covers annotations
  [PropertyAccess] Major performance improvement
2015-11-02 21:20:53 +01:00
Fabien Potencier
30bd397366 minor #16414 removed all @covers annotations (fabpot)
This PR was merged into the 2.3 branch.

Discussion
----------

removed all @covers annotations

| 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

Some unit tests have a `@covers` PHPUnit annotations. Most of them were added a very long time ago, but since then, we did not use them anymore and the existing ones are not maintained (see #16413). So, I propose to remove them all.

Commits
-------

1e0af36 removed all @covers annotations
2015-11-02 19:22:02 +01:00
Nicolas Grekas
807ebac08c [DI] Deprecate ContainerAware in favor of ContainerAwareTrait 2015-11-02 16:38:36 +01:00
Nicolas Grekas
31e51ba75c [VarDumper] Deprecate VarDumperTestCase in favor of the trait 2015-11-02 16:23:18 +01:00
ogizanagi
11d675fdcf [FrameworkBundle][Form] Better exception message for private form tagged services 2015-11-02 11:45:59 +01:00
Diego Agulló
713b99fc8f Check whether $this->logger is not null on GuardAuthenticationListener 2015-11-01 23:24:34 +01:00
Fabien Potencier
1e0af36c7d removed all @covers annotations 2015-11-01 14:17:24 -08:00
Kevin Bond
be0a364c78 [Console] Add progress indicator helper 2015-11-01 12:44:27 +01:00
Fabien Potencier
64917c726d feature #16395 checkCredentials() force it to be an affirmative yes! (weaverryan)
This PR was squashed before being merged into the 2.8 branch (closes #16395).

Discussion
----------

checkCredentials() force it to be an affirmative yes!

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no (because 2.8 isn't released)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

This changes `GuardAuthenticatorInterface::checkCredentials()`: you now *must* return true in order for authentication to pass.

Before: You could do nothing (i.e. return null) and authentication would pass. You threw an AuthenticationException to cause a failure.

New: You *must* return `true` for authentication to pass. If you do nothing, we will throw a `BadCredentialsException` on your behalf. You can still throw your own exception.

This was a suggestion at symfony_live to make things more secure. I think it makes sense.

Commits
-------

14acadd checkCredentials() force it to be an affirmative yes!
2015-10-31 08:07:27 -07:00
Ryan Weaver
14acadda45 checkCredentials() force it to be an affirmative yes! 2015-10-31 08:07:17 -07:00
Tobias Schultze
d05023b125 feature #16400 [3.0] [Templating] remove deprecated method (TomasVotruba)
This PR was merged into the 3.0-dev branch.

Discussion
----------

[3.0] [Templating] remove deprecated method

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

Commits
-------

5d4b5b4 PhpEngine: remove deprecated method
2015-10-31 02:13:50 +01:00
Tobias Schultze
a42a8720e8 minor #16396 [3.0] [VarDumper] Tests fixed (TomasVotruba)
This PR was merged into the 3.0-dev branch.

Discussion
----------

[3.0] [VarDumper] Tests fixed

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

Fixes broken test after merge.
Original 2.8 commit: 303f05baaf (diff-c45f29f2b7f10a6e3583f92526da067dR55)

Fixes Travis failure of VarDumper: https://travis-ci.org/symfony/symfony/jobs/88382131#L2413

Commits
-------

358fb2d HtmlDumperTest fixed after merge
2015-10-31 02:11:10 +01:00
Fabien Potencier
bc0c8c1b5b Merge branch '2.8'
* 2.8:
  added the new Composer exclude-from-classmap option
  added the new Composer exclude-from-classmap option
  fix docblock description for the build() method
  fix expected argument type docblock
  Set back libxml settings after testings.
  fixed Twig deprecation notices
2015-10-30 16:35:59 -07:00
Fabien Potencier
3b2d0100ac bug #16294 [PropertyAccess] Major performance improvement (dunglas)
This PR was squashed before being merged into the 2.3 branch (closes #16294).

Discussion
----------

[PropertyAccess] Major performance improvement

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

This PR improves performance of the PropertyAccess component of ~70%.

The two main changes are:

* caching the `PropertyPath` initialization
* caching the guessed access strategy

This is especially important for the `ObjectNormalizer` (Symfony Serializer) and the JSON-LD normalizer ([API Platform](https://api-platform.com)) because they use the `PropertyAccessor` class in large loops (ex: normalization of a list of entities).

Here is the Blackfire comparison: https://blackfire.io/profiles/compare/c42fd275-2b0c-4ce5-8bf3-84762054d31e/graph

The code of the benchmark I've used (with Symfony 2.3 as dependency):

```php
<?php

require 'vendor/autoload.php';

class Foo
{
    private $baz;
    public $bar;

    public function getBaz()
    {
        return $this->baz;
    }

    public function setBaz($baz)
    {
        $this->baz = $baz;
    }
}

use Symfony\Component\PropertyAccess\PropertyAccess;

$accessor = PropertyAccess::createPropertyAccessor();

$start = microtime(true);

for ($i = 0; $i < 10000; ++$i) {
    $foo = new Foo();
    $accessor->setValue($foo, 'bar', 'Lorem');
    $accessor->setValue($foo, 'baz', 'Ipsum');
    $accessor->getValue($foo, 'bar');
    $accessor->getValue($foo, 'baz');
}

echo 'Time: '.(microtime(true) - $start).PHP_EOL;
```

This PR also adds an optional support for Doctrine cache to keep access information across requests and improve the overall application performance (even outside of loops).

Commits
-------

284dc75 [PropertyAccess] Major performance improvement
2015-10-30 15:37:44 -07:00
Kévin Dunglas
284dc75796 [PropertyAccess] Major performance improvement 2015-10-30 15:36:27 -07:00
Fabien Potencier
a15c9eb82d Merge branch '2.7' into 2.8
* 2.7:
  added the new Composer exclude-from-classmap option
  added the new Composer exclude-from-classmap option
  fix expected argument type docblock
  Set back libxml settings after testings.
  fixed Twig deprecation notices
2015-10-30 13:15:42 -07:00
Tomas Votruba
5d4b5b4fc0 PhpEngine: remove deprecated method 2015-10-30 21:14:22 +01:00