Commit Graph

27863 Commits

Author SHA1 Message Date
Christian Flothmann
7def83c0b1 move tags from decorated to decorating service 2016-10-11 23:07:33 +02:00
Christian Flothmann
2a970ceafb [TwigBridge] update the upgrade instructions 2016-10-11 22:49:30 +02:00
Fabien Potencier
406462f895 bug #20199 [DependencyInjection] Fix duplication of placeholders (mickadoo)
This PR was squashed before being merged into the 3.2-dev branch (closes #20199).

Discussion
----------

[DependencyInjection] Fix duplication of placeholders

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  |no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #20198
| License       | MIT
| Doc PR        | reference to the documentation PR, if any

Fixes performance issues related to merging parameter bags when using the `env()` parameters introduced in #19681

Commits
-------

124f30d [DependencyInjection] Fix duplication of placeholders
2016-10-11 08:16:26 -07:00
Michael Devery
124f30d4c6 [DependencyInjection] Fix duplication of placeholders 2016-10-11 08:16:23 -07:00
Robin Chalas
ffacec12c3
[SecurityBundle] Cache contexts per request in FirewallMap 2016-10-10 23:02:34 +02:00
Fabien Potencier
3f650f864c bug #20184 [FrameworkBundle] Convert null prefix to an empty string in translation:update (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Convert null prefix to an empty string in translation:update

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

This command needs the ability to use an empty string as prefix, which is not possible using `bin/console translation:update --prefix=""` because `$argv` doesn't parse empty strings thus the value is converted to `null` by `ArgvInput` (only since #19946, before the option was not considered to be set, giving the default `'__'` thus this should be fine from a BC pov).

Here I propose to explicitly convert the `prefix` value to an empty string if set to `null`, as it is a very specific need and we can't guess that from `ArgvInput`.
An other way to fix it could be to add a `--no-prefix` option to the command but I don't think it is worth it, and it couldn't be treated as a bug fix thus not fixed before `3.2`.

Commits
-------

f02b687 [FrameworkBundle] Convert null prefix to an empty string in translation:update command
2016-10-09 04:27:22 -07:00
Robin Chalas
f02b6876b4
[FrameworkBundle] Convert null prefix to an empty string in translation:update command 2016-10-09 13:14:32 +02:00
Fabien Potencier
a5d134b136 minor #20172 [Cache] Accept only array in TagAwareAdapter::invalidateTags() (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Cache] Accept only array in TagAwareAdapter::invalidateTags()

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

Just to be sure that we won't suffer from some stupid incompatibility if a cache-tags PSR is published one day. See discussion: https://github.com/symfony/symfony/issues/19728#issuecomment-251674712

Commits
-------

a08acc7 [Cache] Accept only array in TagAwareAdapter::invalidateTags()
2016-10-09 04:12:45 -07:00
Fabien Potencier
eee1a446cd feature #20113 Use the method map as authoritative list of factories for dumped containers (stof)
This PR was merged into the 3.2-dev branch.

Discussion
----------

Use the method map as authoritative list of factories for dumped containers

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | only for weird broken cases
| Deprecations? | yes (but only for people doing weird things)
| Tests pass?   | yes
| Fixed tickets | #11761, #19690
| License       | MIT
| Doc PR        | n/a

The initial implementation of the method factory discovery was based on a naming convention for factory methods. However, this naming convention allowed to generate the same name for multiple ids. In the meantime, a method map was introduced to solve this issue (and others).
When accessing a service with a different id than the official one (thanks to ambiguities), this breaks the sharing of the service, as it creates a new instance each time and replaces the existing shared instance. This was also inconsistent between a dumped container (affected by this) and a non-dumped container (reporting a service not found error for the other id).

The method map is now the authoritative way to discover available service factories. When the dumped container was generated with a method map (which is the case when using the dumper shipped in the component), the logic based on defined methods is not executed anymore. This forbids using another id than the real one to access the service (preventing to trigger the broken behavior). So this breaks BC for people being lucky (i.e. they were using the broken id only once and *before* any usage of the official id) and fixes a WTF bug for all others.
When using a dumper which does not fill the method map, the old logic is still applied, but deprecation warnings are triggered on access to dumped services. Currently, this will trigger a deprecation warning for each new service instantiation. I have not found an easy way to trigger it only once (except adding a private property to remember we already triggered it, but is it worth it ?), but only people writing a project container by hand or writing their own dumper would ever see such deprecation anyway (as the core dumper generates the method map).

Additionally, this makes ``getServiceIds`` faster by avoiding doing a regex match for each method in the class.

Commits
-------

03b9108 Use the method map as authoritative list of factories for dumped containers
2016-10-08 11:47:22 -07:00
Fabien Potencier
451cdac477 minor #20186 [HttpKernel] removed implicit dep on Console (fabpot)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[HttpKernel] removed implicit dep on Console

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

HttpKernel does not have console as a dependency, so we must ensure that this is not implicitly required (`DebugHandlersListener` already has this check).

Commits
-------

414206d [HttpKernel] removed implicit dep on Console
2016-10-08 11:41:43 -07:00
Fabien Potencier
414206db89 [HttpKernel] removed implicit dep on Console 2016-10-08 09:57:37 -07:00
maxime.steinhausser
00d54597ca [Doctrine] [Bridge] Add a way to select the repository used by the UniqueEntity validator
The new option expects an entity path, in order to select its repository.
This allows to properly use the UniqueEntity constraint on hierarchical (inheritance) entities, using the root class repository in order to check the uniqueness, and not just the child repository.
2016-10-08 00:45:53 +02:00
Fabien Potencier
e9c30f537a minor #20182 Fix typo in copyright comment (chalasr)
This PR was merged into the 3.2-dev branch.

Discussion
----------

Fix typo in copyright comment

| Q             | A
| ------------- | ---
| Branch?       | master
| Tests pass?   | yes
| License       | MIT

This was merged on 3.2 in #20127

Commits
-------

8619c7f Fix typo in copyright comment
2016-10-07 15:27:01 -07:00
Fabien Potencier
98e627a7af minor #20180 Improved the deprecation messages for service aliases (javiereguiluz)
This PR was squashed before being merged into the 3.1 branch (closes #20180).

Discussion
----------

Improved the deprecation messages for service aliases

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

Commits
-------

b1b21bf Improved the deprecation messages for service aliases
2016-10-07 15:26:03 -07:00
Javier Eguiluz
b1b21bf43d Improved the deprecation messages for service aliases 2016-10-07 15:26:02 -07:00
Robin Chalas
8619c7f27d
Fix typo in copyright comment 2016-10-07 21:50:49 +02:00
Fabien Potencier
90a952d32d minor #20174 [Serializer] minor: Remove an extra space in a YamlFileLoader error (dunglas)
This PR was squashed before being merged into the 3.1 branch (closes #20174).

Discussion
----------

[Serializer] minor: Remove an extra space in a YamlFileLoader error

| Q             | A
| ------------- | ---
| Branch?       | 3.1
| 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
-------

a1bc96b [Serializer] minor: Remove an extra space in a YamlFileLoader error
2016-10-07 09:40:46 -07:00
Kévin Dunglas
a1bc96bf43 [Serializer] minor: Remove an extra space in a YamlFileLoader error 2016-10-07 09:40:45 -07:00
Fabien Potencier
a4a68bc56c minor #20170 [HttpKernel] Clean ArgumentMetadataFactory::getType() (nicolas-grekas)
This PR was merged into the 3.1 branch.

Discussion
----------

[HttpKernel] Clean ArgumentMetadataFactory::getType()

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

By using the string representation of the parameter to get the type hint (on PHP5 only of course), we prevent autoloading of the corresponding class.

Commits
-------

c780978 [HttpKernel] Clean ArgumentMetadataFactory::getType()
2016-10-06 14:51:50 -07:00
Alexandre GESLIN
a7352ff975 [ExpressionLanguage] Making cache PSR6 compliant 2016-10-06 17:21:07 +02:00
Nicolas Grekas
a08acc721c [Cache] Accept only array in TagAwareAdapter::invalidateTags() 2016-10-06 12:43:30 +02:00
Kévin Dunglas
781c923c93
bug #20154 [PropertyInfo] Fix edge cases in ReflectionExtractor (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[PropertyInfo] Fix edge cases in ReflectionExtractor

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

This should make ReflectionExtractor a bit more robust.

ping @dunglas (~~don't miss the changed test case~~).

Commits
-------

bffdfad [PropertyInfo] Fix edge cases in ReflectionExtractor
2016-10-06 11:22:33 +02:00
Nicolas Grekas
c780978158 [HttpKernel] Clean ArgumentMetadataFactory::getType() 2016-10-06 11:12:13 +02:00
Nicolas Grekas
117bd4c305 Merge branch '3.1'
* 3.1:
  Minor fixes & cleanups
  [DependencyInjection] Add missing PHPDoc type
  Correct a typo in the ReflectionExtractor's description
  [HttpFoundation] JSONP callback validation
  [Console] Improved the explanation of the hasOption() method
  Uniformize exception vars according to our CS
  add missing use statement
  bug #18042 [Security] $attributes can be anything, but RoleVoter assumes strings
2016-10-06 10:59:27 +02:00
Nicolas Grekas
134556a24b Merge branch '2.8' into 3.1
* 2.8:
  Minor fixes & cleanups
2016-10-06 10:56:36 +02:00
Nicolas Grekas
7f56c22076 Merge branch '2.7' into 2.8
* 2.7:
  Minor fixes & cleanups
2016-10-06 10:56:19 +02:00
Nicolas Grekas
962248dbd9 minor #20169 Minor fixes & cleanups (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

Minor fixes & cleanups

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

Commits
-------

dcf601f Minor fixes & cleanups
2016-10-06 10:55:03 +02:00
Nicolas Grekas
bffdfad41e [PropertyInfo] Fix edge cases in ReflectionExtractor 2016-10-06 10:50:21 +02:00
Nicolas Grekas
dcf601f3fa Minor fixes & cleanups 2016-10-06 10:40:01 +02:00
Fabien Potencier
d9dfed2976 Merge branch '2.8' into 3.1
* 2.8:
  [DependencyInjection] Add missing PHPDoc type
  Correct a typo in the ReflectionExtractor's description
  [HttpFoundation] JSONP callback validation
  [Console] Improved the explanation of the hasOption() method
  Uniformize exception vars according to our CS
  add missing use statement
  bug #18042 [Security] $attributes can be anything, but RoleVoter assumes strings
2016-10-05 18:44:51 -07:00
Fabien Potencier
f09b1ed561 Merge branch '2.7' into 2.8
* 2.7:
  [HttpFoundation] JSONP callback validation
  [Console] Improved the explanation of the hasOption() method
  add missing use statement
  bug #18042 [Security] $attributes can be anything, but RoleVoter assumes strings
2016-10-05 18:43:09 -07:00
Fabien Potencier
a5a91a7fa1 bug #19725 [Security] $attributes can be anything, but RoleVoter assumes strings (Jonatan Männchen)
This PR was merged into the 2.7 branch.

Discussion
----------

[Security] $attributes can be anything, but RoleVoter assumes strings

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | yes
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #18042
| License       | MIT
| Doc PR        | reference to the documentation PR, if any

Commits
-------

ad3ac95 bug #18042 [Security] $attributes can be anything, but RoleVoter assumes strings
2016-10-05 18:42:44 -07:00
Fabien Potencier
dcc7c41bbb minor #20166 [DependencyInjection] Add missing PHPDoc type (dunglas)
This PR was merged into the 2.8 branch.

Discussion
----------

[DependencyInjection] Add missing PHPDoc type

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

Commits
-------

4cae9c0 [DependencyInjection] Add missing PHPDoc type
2016-10-05 16:58:12 -07:00
Fabien Potencier
8f4f40a3d5 minor #20165 Correct a typo in the ReflectionExtractor's description (dunglas)
This PR was merged into the 2.8 branch.

Discussion
----------

Correct a typo in the ReflectionExtractor's description

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

Information is uncountable. Standardize with the description of the `PhpDocExtractor`.

Commits
-------

1427d33 Correct a typo in the ReflectionExtractor's description
2016-10-05 16:56:45 -07:00
Kévin Dunglas
4cae9c0947
[DependencyInjection] Add missing PHPDoc type 2016-10-05 22:47:52 +02:00
Kévin Dunglas
1427d33153
Correct a typo in the ReflectionExtractor's description 2016-10-05 21:27:34 +02:00
Fabien Potencier
d040748e16 bug #20127 [HttpFoundation] JSONP callback validation (ro0NL)
This PR was submitted for the master branch but it was merged into the 2.7 branch instead (closes #20127).

Discussion
----------

[HttpFoundation] JSONP callback validation

| Q             | A
| ------------- | ---
| Branch?       | "master"
| Bug fix?      | yes
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #17923
| License       | MIT
| Doc PR        | reference to the documentation PR, if any

Maybe this is too small for a new dep, but at least it's stable. Symfony itself will make no assumption on validation by default, ie. things should keep working as usual.

Commits
-------

1159f8b [HttpFoundation] JSONP callback validation
2016-10-05 12:15:52 -07:00
Roland Franssen
1159f8bba6 [HttpFoundation] JSONP callback validation 2016-10-05 12:15:52 -07:00
Fabien Potencier
42e20f362f minor #20164 Uniformize exception vars according to our CS (dunglas)
This PR was merged into the 2.8 branch.

Discussion
----------

Uniformize exception vars according to our CS

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

My initial intent was to [fix this typo](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php#L269). But we use `$e` almost everywhere else in this case, so I updated the whole component to be consistent.

Commits
-------

cc9a499 Uniformize exception vars according to our CS
2016-10-05 12:13:49 -07:00
Fabien Potencier
df46bb774a bug #20163 add missing use statement (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

add missing use statement

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

Commits
-------

32451b1 add missing use statement
2016-10-05 10:41:39 -07:00
Fabien Potencier
d2543a70fb fixed CS 2016-10-05 10:37:14 -07:00
Fabien Potencier
2101c10259 feature #19576 [WebProfiler] added support for window.fetch calls in ajax section (ivoba)
This PR was squashed before being merged into the 3.2-dev branch (closes #19576).

Discussion
----------

[WebProfiler] added support for window.fetch calls in ajax section

| Q             | A
| ------------- | ---
| Branch?       | "master"
| Bug fix?      | yes
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |  #17444
| License       | MIT
| Doc PR        | reference to the documentation PR, if any

This adds support for window.fetch calls to the Ajax section of the WebProfiler toolbar.

Credits to @tbopec for  implementation :)

Commits
-------

b1b4d70 [WebProfiler] added support for window.fetch calls in ajax section
2016-10-05 10:36:17 -07:00
Ivo Bathke
b1b4d7021a [WebProfiler] added support for window.fetch calls in ajax section 2016-10-05 10:36:16 -07:00
Fabien Potencier
549bc59136 minor #20159 [Console] Improved the explanation of the hasOption() method (javiereguiluz)
This PR was squashed before being merged into the 2.7 branch (closes #20159).

Discussion
----------

[Console] Improved the explanation of the hasOption() method

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

Commits
-------

29226ef [Console] Improved the explanation of the hasOption() method
2016-10-05 10:26:58 -07:00
Javier Eguiluz
29226ef116 [Console] Improved the explanation of the hasOption() method 2016-10-05 10:26:56 -07:00
Kévin Dunglas
cc9a499482
Uniformize exception vars according to our CS 2016-10-05 19:26:54 +02:00
Christophe Coevoet
03b91089e0 Use the method map as authoritative list of factories for dumped containers
The initial implementation of the method factory discovery was based on a
naming convention for factory methods. However, this naming convention allowed
to generate the same name for multiple ids. In the meantime, a method map was
introduced to solve this issue (and others).
When accessing a service with a different id than the official one (thanks to
ambiguities), this breaks the sharing of the service, as it creates a new
instance each time and replaces the existing shared instance. This was also
inconsistent between a dumped container (affected by this) and a non-dumped
container (reporting a service not found error for the other id).

The method map is now the authoritative way to discover available service
factories. When the dumped container was generated with a method map (which
is the case when using the dumper shipped in the component), the logic based
on defined methods is not executed anymore. This forbids using another id than
the real one to access the service (preventing to trigger the broken behavior).
When using a dumper which does not fill the method map, the old logic is still
applied, but deprecation warnings are triggered on access to dumped services.
2016-10-05 19:22:04 +02:00
Christian Flothmann
32451b1a09 add missing use statement 2016-10-05 18:08:03 +02:00
Nicolas Grekas
0b640de11c Merge branch '3.1'
* 3.1:
  Fixed a missing legacy groups
2016-10-05 15:10:21 +02:00
Nicolas Grekas
33ac4df2c7 minor #20160 Fixed a missing legacy groups (iltar)
This PR was merged into the 3.1 branch.

Discussion
----------

Fixed a missing legacy groups

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

Added missing `@group legacy` statements.

ping @nicolas-grekas

Commits
-------

fbd73f0 Fixed a missing legacy groups
2016-10-05 15:09:33 +02:00