Commit Graph

35477 Commits

Author SHA1 Message Date
Nicolas Grekas c026ec63e3 bug #25762 [DependencyInjection] always call the parent class' constructor (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[DependencyInjection] always call the parent class' constructor

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

Commits
-------

a1b1484 always call the parent class' constructor
2018-02-04 11:57:21 +01:00
Nicolas Grekas 7a461cff0c minor #25867 [DI] Put non-shared service factories in closures (nicolas-grekas)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[DI] Put non-shared service factories in closures

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

With this change, non-shared services are moved to dedicated files (unless they are on the hot path).
Previously, they were always dumped as methods.

The goal of this change is to dump factories as methods *if and only if* the services they build are on the hot-path. By doing so, it will become very easy to figure out which services are on the hot path, vs the rest. And then people will be able to optimize their configurations: if too many things are dumped as  methods, it will trivially mean some laziness is missing in definitions.

I spotted this while reviewing the dumped container of Blackfire, where we sometimes have long chains of dependencies that are on the hot path for no real reason - mixed with big non-shared factories (Sonata admin blocks in our case.)

Commits
-------

22c5325 [DI] Put non-shared service factories in closures
2018-02-04 11:44:28 +01:00
Nicolas Grekas a469490272 bug #25976 [Config] Handle Service/EventSubscriberInterface in ReflectionClassResource (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Config] Handle Service/EventSubscriberInterface in ReflectionClassResource

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

@weaverryan that should fix an issue you reported.

Commits
-------

67e821b [Config] Handle Service/EventSubscriberInterface in ReflectionClassResource
2018-02-04 11:33:42 +01:00
Nicolas Grekas c57258b308 bug #25989 [DI][Routing] Fix tracking of globbed resources (nicolas-grekas, sroze)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI][Routing] Fix tracking of globbed resources

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

The current `GlobFileLoader` in `Config` misses resource tracking, so we can't use it and have to use a per-component one instead.

(deps=high failures will be fixed after merging up to master.)

Commits
-------

945c753 Add tests for glob loaders
ad98c1fa [DI][Routing] Fix tracking of globbed resources
2018-02-04 11:32:13 +01:00
Nicolas Grekas 9a3aa07d35 minor #26002 Improve assertions (carusogabriel)
This PR was merged into the 3.4 branch.

Discussion
----------

Improve assertions

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

Following #25420 in `3.4` branch.

Commits
-------

829f59d Improve assertions
2018-02-04 11:29:43 +01:00
Nicolas Grekas 1d5c229720 bug #26009 [SecurityBundle] Allow remember-me factory creation when multiple user providers are configured. (iisisrael)
This PR was merged into the 3.4 branch.

Discussion
----------

[SecurityBundle] Allow remember-me factory creation when multiple user providers are configured.

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

When more than one user provider is configured, and `remember_me` is enabled on a firewall, this avoids the deprecation notice in 3.4 and thrown `InvalidConfigurationException` in 4.0 ("Not configuring explicitly the provider for the "remember_me" listener on "foo" firewall is ambiguous as there is more than one registered provider.").  The `RememberMeFactory` ignores the `$userProvider` argument and uses the secret configured for the firewall.  (If no secret is configured, it throws its own exception.)

The added test passes in 3.4 with a deprecation notice without the change, so would expect it to fail in 4.0 without the change.

Other tests in the `SecurityBundle` already included two errors and one failure, not related to this change.

Commits
-------

6ab8dd9 Allow remember-me factory creation when multiple user providers are configured.
2018-02-04 11:27:39 +01:00
Nicolas Grekas 003e616008 minor #26037 [Lock] Fix strategy tests (Valouleloup)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #26037).

Discussion
----------

[Lock] Fix strategy tests

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

Not sure if it is a mistake, but in Phpunit tests need to begin with ` test ` to be played, right ?

Commits
-------

afbb8be Fix lock strategy tests
2018-02-04 11:01:34 +01:00
Valouleloup afbb8bec18 Fix lock strategy tests 2018-02-04 11:01:34 +01:00
Nicolas Grekas b9def8ab50 [travis] cache compiled php extensions 2018-02-04 10:47:47 +01:00
Nicolas Grekas 9be03d8911 Merge branch '4.0'
* 4.0:
  [CssSelector] For AND operator, the left operand should have parentheses, not only right operand
  Removed unused parameter from flattenDataProvider().
  Update MongoDB extension on travis to make the builds green again.
2018-02-03 15:58:56 +01:00
Nicolas Grekas e1e523bf5d Merge branch '3.4' into 4.0
* 3.4:
  [CssSelector] For AND operator, the left operand should have parentheses, not only right operand
  Removed unused parameter from flattenDataProvider().
  Update MongoDB extension on travis to make the builds green again.
2018-02-03 15:58:37 +01:00
Nicolas Grekas 48db494b19 fix merge 2018-02-03 15:55:47 +01:00
Nicolas Grekas 18510f8352 Merge branch '2.8' into 3.4
* 2.8:
  [CssSelector] For AND operator, the left operand should have parentheses, not only right operand
  Removed unused parameter from flattenDataProvider().
  Update MongoDB extension on travis to make the builds green again.
2018-02-03 15:55:07 +01:00
Nicolas Grekas 30fc304626 Merge branch '2.7' into 2.8
* 2.7:
  [CssSelector] For AND operator, the left operand should have parentheses, not only right operand
  Removed unused parameter from flattenDataProvider().
  Update MongoDB extension on travis to make the builds green again.
2018-02-03 15:53:47 +01:00
Samuel ROZE 0ee4cf1019
The Security Component's exceptions should implements Security's ExceptionInterface 2018-02-03 11:03:47 +00:00
Nicolas Grekas 1111da7363 bug #26010 [CssSelector] For AND operator, the left operand should have parentheses, not only right operand (Arnaud CHASSEUX)
This PR was merged into the 2.7 branch.

Discussion
----------

[CssSelector] For AND operator, the left operand should have parentheses, not only right operand

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

From https://github.com/symfony/css-selector/pull/3

Commits
-------

76b40dc [CssSelector] For AND operator, the left operand should have parentheses, not only right operand
2018-02-03 12:00:12 +01:00
Arnaud CHASSEUX 76b40dc10e [CssSelector] For AND operator, the left operand should have parentheses, not only right operand 2018-02-03 11:49:50 +01:00
Nicolas Grekas d0e03a4bbe minor #26029 Removed unused parameter from flattenDataProvider() (derrabus)
This PR was merged into the 2.7 branch.

Discussion
----------

Removed unused parameter from flattenDataProvider()

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

While working on #26028, I noticed that FlattenExceptionTest::FlattenExceptionTest.php() exposes two arguments although all tests consuming that provider only use the first one. This PR removes the unnecessary second argument.

Commits
-------

d6f4f51 Removed unused parameter from flattenDataProvider().
2018-02-03 11:40:13 +01:00
Dmitriy Fedorenko 52c9cb4025 [Config] Only using filemtime to check file freshness 2018-02-03 11:33:09 +01:00
Nicolas Grekas dbe5b14620 minor #26018 Update MongoDB extension on travis to make the builds green again (derrabus)
This PR was merged into the 2.7 branch.

Discussion
----------

Update MongoDB extension on travis to make the builds green again

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

Currently, php 7.1 and 7.2 runs on travis are failing because we're testing against `mongodb/mongodb` 1.3-dev which requires a more recent version of `ext-mongodb` than Travis provides.

This PR attempts to fix the issue by installing that version via PECL.

Commits
-------

e0132cc Update MongoDB extension on travis to make the builds green again.
2018-02-03 11:27:25 +01:00
Robin Chalas 1e90ddd00d Merge branch '4.0'
* 4.0:
  [Intl] Fixed the broken link
  Fix typo
  Fix typo
  Fixed issue #25985
  Don't show wanna-be-private services as public in debug:container
  [Routing] Fix trailing slash redirection for non-safe verbs
  [DI] Fix tracking of source class changes for lazy-proxies
  Proxy class names should be deterministic and independent of spl_object_hash() which is somewhat random
  [Debug] Fix bad registration of exception handler, leading to mem leak
  [Form] Fixed empty data on expanded ChoiceType and FileType
  collect extension information as late as possible
2018-02-03 01:58:16 +01:00
Robin Chalas c7ab3a9555 Merge branch '3.4' into 4.0
* 3.4:
  [Intl] Fixed the broken link
  Fix typo
  Fix typo
  Fixed issue #25985
  Don't show wanna-be-private services as public in debug:container
  [Routing] Fix trailing slash redirection for non-safe verbs
  [DI] Fix tracking of source class changes for lazy-proxies
  Proxy class names should be deterministic and independent of spl_object_hash() which is somewhat random
  [Debug] Fix bad registration of exception handler, leading to mem leak
  [Form] Fixed empty data on expanded ChoiceType and FileType
  collect extension information as late as possible
2018-02-03 01:57:23 +01:00
Robin Chalas 9f64a0fbd9 Merge branch '2.8' into 3.4
* 2.8:
  [Intl] Fixed the broken link
  [Routing] Fix trailing slash redirection for non-safe verbs
  [Debug] Fix bad registration of exception handler, leading to mem leak
  [Form] Fixed empty data on expanded ChoiceType and FileType
2018-02-03 01:57:06 +01:00
Alexander M. Turek d6f4f5129e Removed unused parameter from flattenDataProvider(). 2018-02-03 01:09:36 +01:00
Robin Chalas 0293f3756d Merge branch '2.7' into 2.8
* 2.7:
  [Intl] Fixed the broken link
  [Routing] Fix trailing slash redirection for non-safe verbs
  [Debug] Fix bad registration of exception handler, leading to mem leak
  [Form] Fixed empty data on expanded ChoiceType and FileType
2018-02-03 00:51:31 +01:00
Fabien Potencier b49a6b7fa3 minor #26016 [Intl] Fixed the broken link (bocharsky-bw)
This PR was merged into the 2.7 branch.

Discussion
----------

[Intl] Fixed the broken link

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

From https://github.com/symfony/intl/pull/6

Commits
-------

5733e02960 [Intl] Fixed the broken link
2018-02-02 14:04:48 +01:00
Fabien Potencier a48849e58e bug #26000 Fixed issue #25985 (KevinFrantz)
This PR was merged into the 3.4 branch.

Discussion
----------

Fixed issue #25985

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

Oppress Zend OPcache API - ContextErrorException

Commits
-------

acb1cad841 Fixed issue #25985
2018-02-02 13:57:40 +01:00
Alexander M. Turek e0132cc5d7 Update MongoDB extension on travis to make the builds green again. 2018-02-02 12:44:37 +01:00
Victor Bocharsky 5733e02960 [Intl] Fixed the broken link 2018-02-02 10:30:16 +01:00
Israel J. Carberry 6ab8dd92e9 Allow remember-me factory creation when multiple user providers are configured. 2018-02-01 09:00:52 -06:00
Robin Chalas db10ee7a98 minor #26008 [Lock] remove duplicated 'the' from comment (Oussama Elgoumri)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Lock] remove duplicated 'the' from comment

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

Commits
-------

b84639d [Lock] remove duplicated 'the' from comment
2018-02-01 15:14:44 +01:00
Robin Chalas a1fb7244bd minor #26004 Fix typo (carusogabriel)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix typo

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

Following #26003

Commits
-------

566bb57 Fix typo
2018-02-01 15:13:26 +01:00
Oussama Elgoumri b84639dc35 [Lock] remove duplicated 'the' from comment 2018-02-01 15:10:05 +01:00
Samuel ROZE 945c753d44
Add tests for glob loaders 2018-02-01 08:54:27 +00:00
Gabriel Caruso 829f59da7f Improve assertions 2018-02-01 04:11:27 -02:00
Gabriel Caruso 566bb57428
Fix typo 2018-02-01 03:46:23 -02:00
Fabien Potencier 8dadff2ece minor #26003 Fix typo (carusogabriel)
This PR was merged into the 3.4 branch.

Discussion
----------

Fix typo

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

Commits
-------

45d730ba85 Fix typo
2018-02-01 06:33:49 +01:00
Gabriel Caruso 45d730ba85 Fix typo 2018-02-01 03:18:45 -02:00
Fabien Potencier 14615247c1 bug #25996 Don't show wanna-be-private services as public in debug:container (chalasr)
This PR was merged into the 3.4 branch.

Discussion
----------

Don't show wanna-be-private services as public in debug:container

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

Commits
-------

31f43e5226 Don't show wanna-be-private services as public in debug:container
2018-02-01 06:02:03 +01:00
Fabien Potencier f284004f8d bug #25914 [HttpKernel] collect extension information as late as possible (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] collect extension information as late as possible

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

Commits
-------

58cdbd03e1 collect extension information as late as possible
2018-02-01 05:53:05 +01:00
Fabien Potencier 6cfcfae009 bug #25981 [DI] Fix tracking of source class changes for lazy-proxies (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Fix tracking of source class changes for lazy-proxies

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

Commits
-------

4f18e4b0dc [DI] Fix tracking of source class changes for lazy-proxies
2018-02-01 05:50:52 +01:00
Fabien Potencier 0924c001f9 bug #25971 [Debug] Fix bad registration of exception handler, leading to mem leak (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Debug] Fix bad registration of exception handler, leading to mem leak

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

Commits
-------

926b1bee18 [Debug] Fix bad registration of exception handler, leading to mem leak
2018-02-01 05:48:20 +01:00
Fabien Potencier ceb4e73e83 bug #25962 [Routing] Fix trailing slash redirection for non-safe verbs (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Routing] Fix trailing slash redirection for non-safe verbs

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

This test dumped matchers using the existing test cases for (Redirectable)UrlMatcher so that we are sure they behave the same. Fixes the differences found while doing so.

Commits
-------

ad593aef2f [Routing] Fix trailing slash redirection for non-safe verbs
2018-02-01 05:28:18 +01:00
Fabien Potencier 471c410ce6 bug #25948 [Form] Fixed empty data on expanded ChoiceType and FileType (HeahDude)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Fixed empty data on expanded ChoiceType and FileType

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

Alternative of https://github.com/symfony/symfony/pull/25924.

I don't think we have to do this by adding overhead in master and getting it properly fixed in 2 years.

This is bug I've introduced while fixing another bug #17822. Which then has been replicated in #20418 and #24993.

I propose instead to clean up the code for all LTS, since this is a wrong behaviour that has never been documented, and most of all unreliable.
The `empty_data` can by anything in the view format as long as the reverse view transformation supports it. Even an object derived from the data class could be invokable.

I think we should remain consistent with https://github.com/symfony/symfony/blob/2.7/src/Symfony/Component/Form/Form.php#L615.

Commits
-------

9722c063fb [Form] Fixed empty data on expanded ChoiceType and FileType
2018-02-01 05:22:43 +01:00
Kevin Frantz acb1cad841 Fixed issue #25985 2018-01-31 23:22:47 +01:00
Grégoire Paris 9e37873860
Always show all deprecations except legacy ones
When using any mode but the weak mode, you want your build to fail on
some or all deprecations, but it is still nice to be able to see what
you could fix without having to change modes.
2018-01-31 21:33:26 +01:00
Nicolas Grekas 7f8e215d91 feature #25892 Adding an array adapter (weaverryan)
This PR was merged into the 4.1-dev branch.

Discussion
----------

Adding an array adapter

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

There's no simple way to *disable* caching (e.g. in the dev) environment. Setting up an array adapter is a very simple way to allow this :).

Commits
-------

f92e03d adding an array adapter
2018-01-31 21:13:43 +01:00
Robin Chalas 31f43e5226 Don't show wanna-be-private services as public in debug:container 2018-01-31 18:08:05 +01:00
Nicolas Grekas ad98c1fa90 [DI][Routing] Fix tracking of globbed resources 2018-01-31 16:05:11 +01:00
Fabien Potencier 5f770d77e8 bug #25978 Deterministic proxy names (lstrojny)
This PR was merged into the 3.4 branch.

Discussion
----------

Deterministic proxy names

Proxy class names should be deterministic and independent of spl_object_hash() which is somewhat random to better support reproducible builds. See #25958

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

Commits
-------

b173b81f46 Proxy class names should be deterministic and independent of spl_object_hash() which is somewhat random
2018-01-31 12:32:49 +01:00