Commit Graph

5337 Commits

Author SHA1 Message Date
Nicolas Grekas
9b7df39865 [DI] Add and wire ServiceSubscriberInterface 2017-03-22 20:26:09 +01:00
Fabien Potencier
065bf489fa feature #22011 [FrameworkBundle][Serializer] Add option to register a circular_reference_handler (lyrixx)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle][Serializer] Add option to register a circular_reference_handler

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

---

Right now, it's quite hard (especially for new comers) to register a CircularReferenceHandler:

![screenshot1](https://cloud.githubusercontent.com/assets/408368/23959193/ce19bcec-09a4-11e7-82c7-80abd7b7f602.png)

---

This PR introduce an option to wire a service to the internal Object Normalizer.

Commits
-------

0a638f5352 [FrameworkBundle][Serializer] Add option to register a "circular_reference_handler"
2017-03-22 12:06:37 -07:00
Fabien Potencier
d378947321 feature #20642 [FrameworkBundle] Add project directory default for installing assets (Noah Heck)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] Add project directory default for installing assets

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

This allows the `assets:install` console command to have a fallback default of the project root directory.

Current behavior is to install assets only in the `target` of the current working directory.

Commits
-------

7a11f3ecf3 [FrameworkBundle] Add project directory default for installing assets
2017-03-22 11:06:20 -07:00
Fabien Potencier
1cb9afde12 feature #20365 [TwigBridge] Handle form label attributes like others (ro0NL)
This PR was squashed before being merged into the 3.3-dev branch (closes #20365).

Discussion
----------

[TwigBridge] Handle form label attributes like others

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

The HTML for rendering attributes is duplicated in multiple blocks, making it error prone/hard to maintain.

Next, the label attributes followed a different approach. Imo. all should follow the same base rendering, showing the above is actually an issue.

Commits
-------

e317e0aeab [TwigBridge] Handle form label attributes like others
2017-03-22 10:41:18 -07:00
Roland Franssen
e317e0aeab [TwigBridge] Handle form label attributes like others 2017-03-22 10:41:14 -07:00
Robin Chalas
85177a649e [FrameworkBundle] Make Translator works with any PSR-11 container 2017-03-22 16:47:35 +01:00
Robin Chalas
5446903296 [FrameworkBundle] Allow configuring serializer mapping paths 2017-03-22 16:36:42 +01:00
Fabien Potencier
7d76227e06 removed usage of $that 2017-03-21 15:48:52 -07:00
Fabien Potencier
7ed3237645 [FrameworkBundle] deprecated cache:clear with warmup 2017-03-21 15:16:20 -07:00
Fabien Potencier
7f7b897ee2 feature #22098 [*Bundle] Add autowiring aliases for common services (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[*Bundle] Add autowiring aliases for common services

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

As spotted while working on #22060, we're missing many aliases to prevent any autowiring ambiguities.
I also removed the "Symfony\Component\EventDispatcher\EventDispatcher" and "Symfony\Component\DependencyInjection\Container" aliases: we'd better encourage using the corresponding interfaces instead.
On ControllerTrait, we need to type hint against SessionInterface, because otherwise, when session support is disabled, autowiring still auto-registers an "autowired.Session" service, which defeats the purpose of being able to enable/disable it.

Commits
-------

08c2ee32f1 [*Bundle] Add autowiring aliases for common services
2017-03-21 14:56:35 -07:00
Fabien Potencier
b0482963f1 Merge branch '3.2'
* 3.2:
  Fixes a typo in the form collector styles
  [WebProfilerBundle] Fix content-security-policy compatibility
  [WebProfilerBundle] Drop dead code
  [HttpKernel] Fixed bug with purging of HTTPS URLs
  fix some risky tests
  [DI] [YamlFileLoader] change error message of a non existing file
  [WebProfilerBundle] Handle Content-Security-Policy-Report-Only header correctly
  [Security] Added option to return true in the method isRememberMeRequested
2017-03-21 14:44:47 -07:00
Fabien Potencier
8cd835e658 Merge branch '2.8' into 3.2
* 2.8:
  Fixes a typo in the form collector styles
  [HttpKernel] Fixed bug with purging of HTTPS URLs
  fix some risky tests
  [DI] [YamlFileLoader] change error message of a non existing file
  [Security] Added option to return true in the method isRememberMeRequested
2017-03-21 14:44:32 -07:00
Fabien Potencier
295a8e0a82 Merge branch '2.7' into 2.8
* 2.7:
  [HttpKernel] Fixed bug with purging of HTTPS URLs
  fix some risky tests
  [DI] [YamlFileLoader] change error message of a non existing file
  [Security] Added option to return true in the method isRememberMeRequested
2017-03-21 14:39:01 -07:00
Nicolas Grekas
08c2ee32f1 [*Bundle] Add autowiring aliases for common services 2017-03-21 22:34:27 +01:00
Fabien Potencier
a96a99723a feature #21889 Deprecate the special SYMFONY__ environment variables (javiereguiluz)
This PR was squashed before being merged into the 3.3-dev branch (closes #21889).

Discussion
----------

Deprecate the special SYMFONY__ environment variables

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

Commits
-------

e3362e854c Deprecate the special SYMFONY__ environment variables
2017-03-21 08:27:08 -07:00
Javier Eguiluz
e3362e854c Deprecate the special SYMFONY__ environment variables 2017-03-21 08:27:06 -07:00
Robin Chalas
c99641a540 Document removal of server:* commands from the framework 2017-03-21 15:47:31 +01:00
Robin Chalas
ad501e5eeb Whitelist container.service_locator tag 2017-03-20 22:29:41 +01:00
Christian Flothmann
abf1787dcc fix some risky tests 2017-03-20 16:03:41 +01:00
Nicolas Grekas
4d48b58d19 Merge branch '3.2'
* 3.2:
  [Yaml] CS
  [DI] Fix PhpDumper generated doc block
  #20411 fix Yaml parsing for very long quoted strings
  [Workflow] add Phpdoc for better IDE support
  fix package name in conflict rule
  improve message when workflows are missing
  [Doctrine Bridge] fix priority for doctrine event listeners
  Use PHP functions as array_map callbacks when possible
  [Validator] revert wrong Phpdoc change
  Use proper line endings
2017-03-20 11:06:58 +01:00
Nicolas Grekas
d7e74b964f Merge branch '2.8' into 3.2
* 2.8:
  [DI] Fix PhpDumper generated doc block
  #20411 fix Yaml parsing for very long quoted strings
  [Doctrine Bridge] fix priority for doctrine event listeners
  Use PHP functions as array_map callbacks when possible
  [Validator] revert wrong Phpdoc change
  Use proper line endings
2017-03-20 10:32:19 +01:00
Nicolas Grekas
5d06acadd3 Merge branch '2.7' into 2.8
* 2.7:
  #20411 fix Yaml parsing for very long quoted strings
  [Doctrine Bridge] fix priority for doctrine event listeners
  Use PHP functions as array_map callbacks when possible
  [Validator] revert wrong Phpdoc change
  Use proper line endings
2017-03-20 09:46:40 +01:00
Christian Flothmann
418dcc39d4 harden the config when using workflow guards
This will forbid using the FrameworkBundle in 3.3 with previous releases
of the Workflow to avoid issues related to the GuardListener class not
being present. Additionally, it provides a useful exception in case the
guard option is used without the ExpressionLanguage component being
installed.
2017-03-17 18:55:12 +01:00
Fabien Potencier
3ae36f4552 feature #22024 [DI] Introduce "container.service_locator" tag, replaces ServiceLocatorArgument (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Introduce "container.service_locator" tag, replaces ServiceLocatorArgument

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

I first started working on adding this new "container.service_locator" tag, so here it is.
It allows defining and dumping service-locator services properly, where it wasn't possible previously (you had to create a DI extension to do so.)

Then I realized that this allowed us to entirely drop `ServiceLocatorArgument` and replace it with the more flexible `ServiceClosureArgument`.

This makes things simpler overall, see diff stat.

Commits
-------

5d230b5871 [DI] Introduce "container.service_locator" tag, replaces ServiceLocatorArgument
2017-03-17 10:07:04 -07:00
Nicolas Grekas
5d230b5871 [DI] Introduce "container.service_locator" tag, replaces ServiceLocatorArgument 2017-03-17 17:49:32 +01:00
Fabien Potencier
207d068a40 minor #22039 Skip abstract definitions in compiler passes (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

Skip abstract definitions in compiler passes

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

Commits
-------

fc1ba0d64a Skip abstract definitions in compiler passes
2017-03-17 09:47:45 -07:00
Fabien Potencier
64466395ea bug #22006 [FrameworkBundle] remove translator helper if Translator is disabled (xabbuh)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] remove translator helper if Translator is disabled

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/20928#issuecomment-274293396, #21374
| License       | MIT
| Doc PR        |

Commits
-------

25ea510ba4 remove translator helper if Translator is disabled
2017-03-17 09:19:12 -07:00
Grégoire Pineau
d50885cc16 bug #22040 [FrameworkBundle] improve message when workflows are missing (xabbuh)
This PR was merged into the 3.2 branch.

Discussion
----------

[FrameworkBundle] improve message when workflows are missing

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

Commits
-------

46c12c9d1d improve message when workflows are missing
2017-03-17 16:59:28 +01:00
Nicolas Grekas
398d78d758 Merge branch '3.2'
* 3.2:
  [Cache] cache/integration-tests is now compatible with phpunit namespaces
  [FrameworkBundle] Fix translation dep constraint
  [Workflow] Added more tests
  [Cache] Enhance error reporting for FilesystemAdapter
2017-03-17 15:59:00 +01:00
Christian Flothmann
71e93dddf2 fix package name in conflict rule 2017-03-17 15:28:59 +01:00
Christian Flothmann
46c12c9d1d improve message when workflows are missing 2017-03-17 15:26:20 +01:00
Robin Chalas
fc1ba0d64a Skip abstract definitions in compiler passes 2017-03-17 14:55:48 +01:00
Robin Chalas
e1caf7da7f [FrameworkBundle] Fix translation dep constraint 2017-03-17 11:28:35 +01:00
Fabien Potencier
18bbf3741a feature #21837 [FrameworkBundle] Lazy configuration of annotations' loader and @required (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] Lazy configuration of annotations' loader and `@required`

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

This would remove the need for https://github.com/symfony/symfony-standard/pull/1052 and for the `autoload.php` file altogether.

Tested on symfony-demo with great success so far.

Commits
-------

d332b37b4b [FrameworkBundle] Lazy configuration of annotations' loader and `@required`
2017-03-15 09:56:25 -07:00
Grégoire Pineau
0a638f5352 [FrameworkBundle][Serializer] Add option to register a "circular_reference_handler" 2017-03-15 17:32:58 +01:00
Christian Flothmann
25ea510ba4 remove translator helper if Translator is disabled 2017-03-15 12:04:33 +01:00
Fabien Potencier
cee0136acf feature #21979 [FrameworkBundle][TwigBundle] Require PSR-11 container instead of Symfony container (enumag)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle][TwigBundle] Require PSR-11 container instead of Symfony container

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

As discussed in #21978 here is the second PR.

Commits
-------

857ce7c7be [FrameworkBundle][TwigBundle] Require PSR-11 container instead of Symfony container
2017-03-14 14:32:46 -07:00
Jáchym Toušek
857ce7c7be
[FrameworkBundle][TwigBundle] Require PSR-11 container instead of Symfony container 2017-03-14 22:27:21 +01:00
Fabien Potencier
d1e591edd8 feature #21935 [FrameworkBundle][Workflow] Add a way to register a guard expression in the configuration (lyrixx)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle][Workflow] Add a way to register a guard expression in the configuration

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

---

Many people already asked for this feature so ... here we go 🎉

---

Usage:
```yml
            transitions:
                journalist_approval:
                    guard: "is_fully_authenticated() and has_role('ROLE_JOURNALIST') or is_granted('POST_EDIT', subject)"
                    from: wait_for_journalist
                    to: approved_by_journalist
                publish:
                    guard: "subject.isPublic()"
                    from: approved_by_journalist
                    to: published
```

Commits
-------

ab3b12d6dc [FrameworkBundle][Workflow] Add a way to register a guard expression in the configuration
2017-03-14 12:04:20 -07:00
Javier Eguiluz
405bd4cc81 Use PHP functions as array_map callbacks when possible 2017-03-14 12:32:10 +01:00
Nicolas Grekas
27dbfda18e Merge branch '3.2'
* 3.2:
  [FrameworkBundle] Fix cleaning of test dirs
2017-03-14 08:58:07 +01:00
Nicolas Grekas
efa74c5eab Merge branch '2.8' into 3.2
* 2.8:
  [FrameworkBundle] Fix cleaning of test dirs
2017-03-14 08:56:22 +01:00
Nicolas Grekas
6b4cfd6a25 Merge branch '2.7' into 2.8
* 2.7:
  [FrameworkBundle] Fix cleaning of test dirs
2017-03-14 08:55:42 +01:00
Nicolas Grekas
4842c86324 [FrameworkBundle] Fix cleaning of test dirs 2017-03-13 22:39:55 +01:00
Nicolas Grekas
dc52a3f85c Merge branch '3.2'
* 3.2:
  [VarDumper] Add missing isset() checks in some casters
  [VarDumper] Add missing isset() checks in some casters
  [Form] Choice type int values (BC Fix)
  bumped Symfony version to 3.2.7
  updated VERSION for 3.2.6
  updated CHANGELOG for 3.2.6
  Use PHPUnit 5.4 instead of 5.3
  [PropertyAccess] Use ArrayAdapter in debug mode
  bumped Symfony version to 3.2.6
  updated VERSION for 3.2.5
  updated CHANGELOG for 3.2.5
  cached files rely on umask
2017-03-12 16:46:41 +01:00
Grégoire Pineau
ab3b12d6dc [FrameworkBundle][Workflow] Add a way to register a guard expression in the configuration 2017-03-10 11:19:28 +01:00
Grégoire Pineau
b385ef1625 feature #21933 [FrameworkBundle][Workflow] Add a way to enable the AuditTrail Logger (lyrixx)
This PR was squashed before being merged into the 3.3-dev branch (closes #21933).

Discussion
----------

[FrameworkBundle][Workflow] Add a way to enable the AuditTrail Logger

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

---

This will increase the visibility of the Listener. We could encourage people to use at least  `%kernel.debug%` value.

---

Note for the merge: There are two commits, this is done on purpose (2 different things, but easier to do only one PR)

Commits
-------

633c0393b3 [Workflow] Added the workflow name in log generated by AuditTrailListener
b786bccb3a [FrameworkBundle][Workflow] Add a way to enable the AuditTrail Logger
2017-03-10 10:44:46 +01:00
Nicolas Grekas
64f9f7b193 bug #21927 [FrameworkBundle] Add missing resource tracking for validation mapping (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] Add missing resource tracking for validation mapping

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/19086#discussion_r104890636
| License       | MIT
| Doc PR        | n/a

https://github.com/symfony/symfony/pull/21927/files?w=1

Commits
-------

0a19cbe Add missing resource tracking for validation mapping
2017-03-09 11:46:22 +01:00
Robin Chalas
0a19cbe906 Add missing resource tracking for validation mapping 2017-03-09 11:23:13 +01:00
Robin Chalas
dca3f365d7 [PropertyAccess] Use ArrayAdapter in debug mode 2017-03-09 10:04:18 +01:00
Grégoire Pineau
b786bccb3a [FrameworkBundle][Workflow] Add a way to enable the AuditTrail Logger 2017-03-08 17:21:33 +01:00
Nicolas Grekas
414ac5d976 [FrameworkBundle] Fix autoloader in insulated clients 2017-03-08 10:00:17 +01:00
Nicolas Grekas
d332b37b4b [FrameworkBundle] Lazy configuration of annotations' loader and @required 2017-03-05 22:37:22 +01:00
Fabien Potencier
c6e1a49731 feature #21770 [DI] Allow extensions to create ServiceLocator as services (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Allow extensions to create ServiceLocator as services

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

https://github.com/symfony/symfony/pull/21770/files?w=1

With this PR, DI extensions are able to create "service locator" services.
They are easily created as such:
```php
$container->register('my_service_locator', ServiceLocator::class)
    ->addArgument(array(
        'exposed_id' => new ServiceClosureArgument(new Reference('internal_id')),
    ))
```
I already need this in two different PRs to come.

Commits
-------

1d9663326e [DI] Allow creating ServiceLocator-based services in extensions
2017-03-05 12:01:09 -08:00
Fabien Potencier
0db972355b feature #21767 [DI][Router][DX] Invalidate routing cache when container parameters changed (ogizanagi)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI][Router][DX] Invalidate routing cache when container parameters changed

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

Supersedes #21443 but only for master.

Indeed, this implementation uses a new feature: a `ContainerParametersResource` which compares cached containers parameters (collected at some point, here by the `Router`) with current ones in the container.

On the contrary of the previous PR targeting 2.7, this will only invalidate routing cache when parameters actually used in the routes changed and will avoid always rebuilding the routing cache when the container is rebuilt, just to catch the edge case of someone modifying a parameter.

Commits
-------

fad4d9e2ef [DI][Router][DX] Invalidate routing cache when container parameters changed
2017-03-05 11:44:35 -08:00
Maxime Steinhausser
fad4d9e2ef [DI][Router][DX] Invalidate routing cache when container parameters changed 2017-03-05 20:24:24 +01:00
Robin Chalas
32be16b239 Move RoutingResolverPass to the Routing component 2017-03-05 16:12:05 +01:00
Nicolas Grekas
1d9663326e [DI] Allow creating ServiceLocator-based services in extensions 2017-03-05 14:36:05 +01:00
Robin Chalas
8bad8a109c Move ControllerArgumentValueResolverPass to the HttpKernel component 2017-03-03 13:55:06 +01:00
Christian Flothmann
fdfcb220e5 [FrameworkBundle] fix a minor typo 2017-03-03 09:31:18 +01:00
Fabien Potencier
1a957100c2 Merge branch '3.2'
* 3.2:
  [Config] removed obsolete code
  [Form] Improve rounding precision
  [Routing] Ignore hidden directories when loading routes from annotations
  fixed CS
2017-03-02 13:35:04 -08:00
Fabien Potencier
86675f3faa Merge branch '2.8' into 3.2
* 2.8:
  fixed CS
2017-03-02 13:34:34 -08:00
Fabien Potencier
a19e3fe970 Merge branch '2.7' into 2.8
* 2.7:
  fixed CS
2017-03-02 13:33:27 -08:00
Kévin Dunglas
1f2521e347 [FrameworkBundle] Introduce autowirable ControllerTrait 2017-03-02 12:20:19 -08:00
Fabien Potencier
3fa8a0571d feature #21763 [DI] Replace wildcard-based methods autowiring by @required annotation (nicolas-grekas)
This PR was squashed before being merged into the 3.3-dev branch (closes #21763).

Discussion
----------

[DI] Replace wildcard-based methods autowiring by `@required` annotation

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no (affects things that are only on master)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

While playing a bit with new features in master around DI configuration, several people around me got bitten by wildcard-based autowiring. The typical example is adding `autowire: [set*]` in `_defaults`: use that on `resource: ../src/Command/` PSR4-based loading and boom, `setApplication` and `setHelperSet` will now be wrongly called. You could tell me "of course, don't to that" - but being bitten so early on a master-only feature makes me really unconfident that this will be easy enough for people after the release.

If wildcard-based autowiring is removed, then I don't see anymore the need for allowing arrays as in `autowire: [setFoo,getBar]`. Moreover, this array syntax has a core DX issue: it's a dead end as far as the learning curve is concerned. You learn it, then when becoming a more advanced dev, someone teaches you that you'd better use another syntax: explicit wiring.

And in fact, we don't need it at all, because something else already exists: just declare a method call, but don't define its arguments. If `autowire: true` is set, then the AutowiringPass already fills in the holes. There is only one tweak required to make this work: don't autowire optional arguments for method calls - or that'd be a BC break. To my PoV that's even better: this makes autowiring fit a "do the minimum to make it work" strategy. A really good one to me.

But there is still an issue: wildcard-based autowiring fits a need. Namely, it allows one to define a convention (eg. `'set*'`), and have all such methods that follow the convention be autowired. To me, this looks like doing it reverse (the DI config should adapt to the code, not reverse). So, to fill this need, let the declaration be in the source: just use an annotation!

This PR adds support for the `@required` annotation, borrowed from the Spring framework:
https://www.tutorialspoint.com/spring/spring_required_annotation.htm

Using the annotation is totally optional of course. If you do, *and if autowiring is on*, then it'll be autowired. If you don't, nothing changes: do manual wiring.

Even when not using autowiring, the annotation is still a nice hint for the consumer of your classes: it tells the reader that this method needs to be called for correct instantiation - thus lowering one drawback of setter injection (discoverability).

The implementation of the annotation parsing is done using a few regexp (no dep on any complex parser) - and works with inheritance, by leveraging the `@inheritdoc` tag (the default behavior being to *not* inherit anything from parent methods).

All in all, looking at the diff stats, it makes everything simpler. Good sign, isn't it?

Commits
-------

f286fcc25f [DI] Replace wildcard-based methods autowiring by `@required` annotation
9081699980 Revert "minor #21315 [DI][FrameworkBundle] Show autowired methods in descriptors (ogizanagi)"
2017-03-01 12:47:24 -08:00
Fabien Potencier
ad0bb6ac53 fixed CS 2017-03-01 11:43:24 -08:00
Fabien Potencier
8d99d5758a Merge branch '3.2'
* 3.2:
  fixed tests
  fixed tests
  revert typo fix
  [Form] Fix ChoiceType to ensure submitted data is not nested unnecessarily
  Fix phpstorm helper to the official format
  Test inline styles with non-decorated formatter
  Fix RuntimeException when an Emacs buffer is modified
  [Yaml] add tests for specific mapping keys
2017-03-01 10:19:35 -08:00
Robin Chalas
8ba1412cdd Fix broken AddConstraintValidatorsPassTest 2017-03-01 18:23:13 +01:00
Guilhem Niot
597b6bcab6 [DependencyInjection] Use a service locator in AddConstraintValidatorsPass 2017-03-01 08:17:18 -08:00
Fabien Potencier
891f4e7311 bug #21813 Update phpstorm helper to the official format (pierredup)
This PR was merged into the 3.2 branch.

Discussion
----------

Update phpstorm helper to the official format

| Q             | A
| ------------- | ---
| Branch?       | 3.2 <!--see comment below-->
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A

Commits
-------

eb09d7cc2e Fix phpstorm helper to the official format
2017-03-01 06:55:48 -08:00
Pierre du Plessis
eb09d7cc2e Fix phpstorm helper to the official format 2017-03-01 16:46:28 +02:00
Robin Chalas
7a7ff24a43 Move PropertyInfoPass to the PropertyInfo component 2017-03-01 09:44:14 +01:00
Fabien Potencier
526d396ccd bug #21627 [DependencyInjection] make the service container builder register its own self referencing definition (hhamon)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DependencyInjection] make the service container builder register its own self referencing definition

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

9c97496b5f [DependencyInjection] make the service container builder register the definition of its related service container service (and aliases) in order to make compiler passes be able to reference the special service_container service.
2017-02-28 14:49:08 -08:00
Fabien Potencier
2353a34180 feature #21768 [HttpKernel] Add a ContainerControllerResolver (psr-11) (ogizanagi)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[HttpKernel] Add a ContainerControllerResolver (psr-11)

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

Extracts the controller as service resolution from the framework bundle controller resolver in a `Symfony/Component/HttpKernel/Controller/Psr11ControllerResolver`, allowing you to use `HttpKernel` with your own psr-11 container.

Commits
-------

7bbae4159b [HttpKernel] Add a ContainerControllerResolver (psr-11)
2017-02-28 12:45:21 -08:00
Maxime Steinhausser
7bbae4159b [HttpKernel] Add a ContainerControllerResolver (psr-11) 2017-02-28 21:33:09 +01:00
Fabien Potencier
d1da474f8d feature #21690 [Form] allow form types + form type extensions + form type guessers to be private services (hhamon)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Form] allow form types + form type extensions + form type guessers to be private services

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

This pull request is about making internal form services (aka form types, form type extensions and form type guessers) private. They used to be public until Symfony 3.2 for one valid reason: lazyness. However, Symfony 3.3 now comes with built-in mechanism to support effective lazy loading of private services with service locators and proxies.

This PR makes the `DependencyInjectionExtension` class of the `Form` component leverage these new DI component mechanisms. Form types, form type extensions and form type guessers can now be declared private as a best practice. We decided to make these services private as of Symfony 3.3 and of course it would break BC. But this PR introduces a BC layer using a Symfony trick to keep internal form services public. The service container currently has a known issue where private services are not really private if they're referenced by at least two other services in the container. We use this trick to maintain the legacy services public even though the new API relies on private ones. This trick is done thanks to the `deprecated.form.registry` and `deprecated.form.registry.csrf` fake services that will be removed in Symfony 4.0.

Commits
-------

600e75ce88 [Form] use new service locator in DependencyInjectionExtension class, so that form types can be made private at some point.
2017-02-28 12:26:30 -08:00
Maxime Steinhausser
5a24ee2da1 [Config][FrameworkBundle] Lazy load resource checkers 2017-02-28 18:07:25 +01:00
Fabien Potencier
41fd5d1286 feature #21375 [FrameworkBundle][Config] Move ConfigCachePass from FrameworkBundle to Config (Deamon)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle][Config] Move ConfigCachePass from FrameworkBundle to Config

| Q             | A
| ------------- | ---
| Branch?       | master<!--see comment below-->
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes/no
| Fixed tickets | - <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | <!--highly recommended for new features-->

This MR is part of the #21284 todo list
<!--
- Bug fixes must be submitted against the lowest branch where they apply
  (lowest branches are regularly merged to upper ones so they get the fixes too).
- Features and deprecations must be submitted against the master branch.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

bce445f452 Move ConfigCachePass from FrameworkBundle to Config
2017-02-28 08:10:35 -08:00
Nicolas Grekas
3729a157b9 bug #21803 [master] Fix issues reported by static analyse (romainneutron)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[master] Fix issues reported by static analyse

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

Follow-up #21802

Commits
-------

671694d [master] Fix issues reported by static analyse
2017-02-28 16:52:13 +01:00
Fabien Potencier
adc6ba5d9d bug #21797 [DI] Simplify AutowirePass and other master-only cleanups (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Simplify AutowirePass and other master-only cleanups

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

A few minor cleanups and fixes, and an overall simplification of AutowirePass.

Commits
-------

34e5cc7698 [DI] Simplify AutowirePass and other master-only cleanups
2017-02-28 07:41:20 -08:00
Romain Neutron
671694d0d6
[master] Fix issues reported by static analyse 2017-02-28 16:38:18 +01:00
Nicolas Grekas
9e4f82e9cc Merge branch '3.2'
* 3.2:
  [3.2] Fix issues reported by static analyse
  [Workflow] Remove unnecessary method calls
2017-02-28 15:44:39 +01:00
Romain Neutron
a9ccaccd41
[3.2] Fix issues reported by static analyse 2017-02-28 15:39:50 +01:00
Nicolas Grekas
25d17345c0 Merge branch '3.2'
* 3.2:
  fix merge
  [2.8] Fix issues reported by static analyse
2017-02-28 15:21:44 +01:00
Nicolas Grekas
f03e93395e Merge branch '2.8' into 3.2
* 2.8:
  [2.8] Fix issues reported by static analyse
2017-02-28 15:10:24 +01:00
Romain Neutron
cb14bfd166
[2.8] Fix issues reported by static analyse 2017-02-28 15:08:20 +01:00
Nicolas Grekas
34e5cc7698 [DI] Simplify AutowirePass and other master-only cleanups 2017-02-28 12:39:23 +01:00
Hugo Hamon
600e75ce88 [Form] use new service locator in DependencyInjectionExtension class, so that form types can be made private at some point. 2017-02-28 10:16:52 +01:00
Nicolas Grekas
9081699980 Revert "minor #21315 [DI][FrameworkBundle] Show autowired methods in descriptors (ogizanagi)"
This reverts commit a27accf8e5, reversing
changes made to b056d40fb3.
2017-02-28 10:00:46 +01:00
Deamon
bce445f452 Move ConfigCachePass from FrameworkBundle to Config 2017-02-28 08:42:35 +01:00
Fabien Potencier
77f7a47dc5 feature #21625 Remove some container injections in favor of service locators (nicolas-grekas, chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

Remove some container injections in favor of service locators

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/21553#issuecomment-279214666
| License       | MIT
| Doc PR        | n/a

Commits
-------

8293b753cf Replace some container injections by service locators
0be9ea8ba1 [EventDispatcher] Fix abstract event subscribers registration
2017-02-27 18:18:26 -08:00
Hugo Hamon
9c97496b5f [DependencyInjection] make the service container builder register the definition of its related service container service (and aliases) in order to make compiler passes be able to reference the special service_container service. 2017-02-27 17:26:21 +01:00
Fabien Potencier
43e32b86a2 feature #21164 [HttpKernel] Added the SessionValueResolver (iltar)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[HttpKernel] Added the SessionValueResolver

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

This feature adds the `SessionValueResolver`. That means that you no longer have to rely on injecting a `SessionInterface` implementation via the constructor or getting this implementation from the `Request`. Regardless of method, it does not know about the `getFlashBag()`.

By adding the `Session` to the action arguments, you can now type-hint against the implementation rather than interface, which contains the `getFlashBag()`, making it accessible rather than using duck-typing.

_It should also feel less like injecting a service into the constructor which has a state or getting a service from the request._

**Old Situation**
```php
class Controller
{
    public function __construct(SessionInterface $session) { /* ... */ }

    public function fooAction(Request $request)
    {
        $this->get('session')->get(...);
        $request->getSession()->get(...);
        $this->session->get(...)

        // duck-typing
        $this->get('session')->getFlashBag();
        $request->getSession()->getFlashBag();
        $this->session->getFlashBag();

        $this->addFlash(...);
    }
}
```

**New Situation** _- The controller shortcut for flashbag could in theory be removed now_
```php
class Controller
{
    public function fooAction(Session $session)
    {
        $session->get(...);
        $session->getFlashBag();
    }
}
```

Commits
-------

b4464dcea1 Added the SessionValueResolver
2017-02-26 14:45:04 -08:00
Robin Chalas
8293b753cf Replace some container injections by service locators 2017-02-26 14:01:31 +01:00
Fabien Potencier
e58be70aca Merge branch '3.2'
* 3.2:
  Revamped the README file
  Fix missing namespace in AddConstraintValidatorPassTest
  [SecurityBundle] simplified code
  [ExpressionLanguage] Registering functions after calling evaluate(), compile() or parse() is not supported
2017-02-24 05:59:04 -08:00
Fabien Potencier
346eacd1a0 Merge branch '2.8' into 3.2
* 2.8:
  Revamped the README file
  Fix missing namespace in AddConstraintValidatorPassTest
  [ExpressionLanguage] Registering functions after calling evaluate(), compile() or parse() is not supported
2017-02-24 05:58:52 -08:00
Fabien Potencier
de95fd5fe5 Merge branch '2.7' into 2.8
* 2.7:
  Revamped the README file
  Fix missing namespace in AddConstraintValidatorPassTest
  [ExpressionLanguage] Registering functions after calling evaluate(), compile() or parse() is not supported
2017-02-24 05:57:05 -08:00
Robin Chalas
1e9ca7bead Fix missing namespace in AddConstraintValidatorPassTest 2017-02-23 22:30:07 +01:00
Iltar van der Berg
b4464dcea1 Added the SessionValueResolver 2017-02-22 09:50:54 +01:00
Nicolas Grekas
442cf595be Merge branch '2.8' into 3.2
* 2.8:
  Use PHPUnit 6.0 on PHP 7.* test lines
2017-02-21 15:41:00 +01:00
Nicolas Grekas
5db127bf1b Merge branch '2.7' into 2.8
* 2.7:
  Use PHPUnit 6.0 on PHP 7.* test lines
2017-02-21 15:21:52 +01:00
Nicolas Grekas
96ecd3c798 Use PHPUnit 6.0 on PHP 7.* test lines 2017-02-21 14:43:45 +01:00
Nicolas Grekas
e28f6b44e5 Merge branch '3.2'
* 3.2:
  Refactored other PHPUnit method calls to work with namespaced PHPUnit 6
  Refactored other PHPUnit method calls to work with namespaced PHPUnit 6
  Further refactorings to PHPUnit namespaces
  resolve parameters in definition classes
2017-02-21 11:07:34 +01:00
Peter Rehm
9eeec8d776 Refactored other PHPUnit method calls to work with namespaced PHPUnit 6 2017-02-21 11:04:38 +01:00
Nicolas Grekas
5fc3589381 Merge branch '2.8' into 3.2
* 2.8:
  Refactored other PHPUnit method calls to work with namespaced PHPUnit 6
  Further refactorings to PHPUnit namespaces
  resolve parameters in definition classes
2017-02-21 10:12:04 +01:00
Nicolas Grekas
f6893c7cc1 minor #21695 Refactored other PHPUnit method calls to work with namespaced PHPUnit 6 (peterrehm)
This PR was merged into the 2.8 branch.

Discussion
----------

Refactored other PHPUnit method calls to work with namespaced PHPUnit 6

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

Continued work to make Symfony PHPUnit 6 compatible.

Commits
-------

dbe8898 Refactored other PHPUnit method calls to work with namespaced PHPUnit 6
2017-02-21 10:07:19 +01:00
Peter Rehm
dbe8898644 Refactored other PHPUnit method calls to work with namespaced PHPUnit 6 2017-02-21 10:00:26 +01:00
Nicolas Grekas
13fff761a7 Merge branch '2.7' into 2.8
* 2.7:
  Further refactorings to PHPUnit namespaces
  resolve parameters in definition classes
2017-02-21 09:33:48 +01:00
Nicolas Grekas
c55b7349ae minor #21688 Further refactorings to PHPUnit namespaces (peterrehm)
This PR was squashed before being merged into the 2.7 branch (closes #21688).

Discussion
----------

Further refactorings to PHPUnit namespaces

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

Continued work to make Symfony PHPUnit 6 compatible

Commits
-------

de8106f Further refactorings to PHPUnit namespaces
2017-02-21 09:32:28 +01:00
Peter Rehm
de8106fea6 Further refactorings to PHPUnit namespaces 2017-02-21 09:32:25 +01:00
Fabien Potencier
f1cf0ad334 minor #21680 [FrameworkBundle] resolve parameters in definition classes (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] resolve parameters in definition classes

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/21637#discussion_r101814478
| License       | MIT
| Doc PR        |

Commits
-------

37ce682947 resolve parameters in definition classes
2017-02-20 08:59:53 -08:00
Nicolas Grekas
56642c4b3d Merge branch '3.2'
* 3.2:
  Updated PHPUnit namespaces
  Add missing conflict rules for phpunit
2017-02-20 14:49:17 +01:00
Nicolas Grekas
13983d986b minor #21686 Updated PHPUnit namespaces (peterrehm)
This PR was merged into the 3.2 branch.

Discussion
----------

Updated PHPUnit namespaces

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

Follow Up of #21663

Commits
-------

c2e80e3 Updated PHPUnit namespaces
2017-02-20 14:45:48 +01:00
Nicolas Grekas
3d4e163ddb Merge branch '2.8' into 3.2
* 2.8:
  Add missing conflict rules for phpunit
2017-02-20 14:40:00 +01:00
Nicolas Grekas
f9f53b2487 Merge branch '2.7' into 2.8
* 2.7:
  Add missing conflict rules for phpunit
2017-02-20 14:37:30 +01:00
Peter Rehm
c2e80e3b8b Updated PHPUnit namespaces 2017-02-20 14:34:33 +01:00
Nicolas Grekas
3e83e02f2c Add missing conflict rules for phpunit 2017-02-20 13:48:07 +01:00
Nicolas Grekas
2f20a6ceea Merge branch '3.2'
* 3.2:
  Updated PHPUnit namespaces
2017-02-20 13:38:57 +01:00
Nicolas Grekas
95f30de91d Merge branch '2.8' into 3.2
* 2.8:
  Updated PHPUnit namespaces
2017-02-20 13:38:41 +01:00
Nicolas Grekas
f2754ebe53 minor #21663 Updated PHPUnit namespaces (peterrehm)
This PR was squashed before being merged into the 2.8 branch (closes #21663).

Discussion
----------

Updated PHPUnit namespaces

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

Follow Up of #21564

Commits
-------

205ced4 Updated PHPUnit namespaces
2017-02-20 13:35:45 +01:00
Peter Rehm
205ced409b Updated PHPUnit namespaces 2017-02-20 13:35:43 +01:00
Christian Flothmann
37ce682947 resolve parameters in definition classes 2017-02-20 09:01:13 +01:00
Fabien Potencier
6d77cdfd65 feature #21478 [Asset] Add support for preloading with links and HTTP/2 push (dunglas)
This PR was squashed before being merged into the 3.3-dev branch (closes #21478).

Discussion
----------

[Asset] Add support for preloading with links and HTTP/2 push

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

Allows compatible clients to preload mandatory assets like scripts, stylesheets or images according to [the "preload" working draft of the W3C](https://www.w3.org/TR/preload/).
Thanks to this PR, Symfony will automatically adds `Link` HTTP headers with a `preload` relation for mandatory assets.  If an intermediate proxy supports HTTP/2 push, it will convert preload headers. For instance [Cloudflare supports this feature](https://blog.cloudflare.com/using-http-2-server-push-with-php/).

It dramatically increases pages speed and make the web greener because only one TCP connection is used to fetch all mandatory assets (decrease servers and devices loads, improve battery lives).

Usage:

Updated version:

```html
<html>
    <body>
    Hello
    <script src="{{ preload(asset('/scripts/foo.js'), 'script') }}"></script>
    </body>
</html>
```

~~First proposal:~~

```html
<html>
    <body>
    Hello
    <script src="{{ preloaded_asset('/scripts/foo.js', 'script') }}"></script>
    </body>
</html>
```

- [x] Add tests

Commits
-------

7bab21700d [Asset] Add support for preloading with links and HTTP/2 push
2017-02-19 14:57:15 -08:00
Kévin Dunglas
7bab21700d [Asset] Add support for preloading with links and HTTP/2 push 2017-02-19 14:56:07 -08:00
Fabien Potencier
4abd0c6fcf feature #20632 [FrameworkBundle] Make use of stderr for non reliable output (chalasr, ogizanagi)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] Make use of stderr for non reliable output

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

Built-in commands should make use of the proper outputs.
As a feature on master, considering that people may actually rely on stdout and the fact commands have been changed a lot since 2.7, I think it's not worth doing this change on lower branches.

Please see also #20586 which adds a `SymfonyStyle::getErrorStyle()` shortcut for easily switching to stderr.

Commits
-------

7b262d8c29 [FrameworkBundle] Use getErrorStyle() when relevant
9a3a5686c8 Use stderr for some other commands
1ee48bfd60 [FrameworkBundle] Make use of stderr for non reliable output
2017-02-19 14:38:27 -08:00
Fabien Potencier
42de1453e8 fixed Composer constraints 2017-02-18 11:16:58 -08:00
Fabien Potencier
86eb217de7 fixed Composer constraints 2017-02-18 11:15:38 -08:00
Fabien Potencier
0e1596df25 fixed Composer constraints 2017-02-18 11:13:35 -08:00
Fabien Potencier
245eaa8fa2 fixed Composer constraints 2017-02-18 10:28:08 -08:00
Nicolas Grekas
7a618fbd5f Merge branch '3.2'
* 3.2:
  Fix typo in process error message
  Update to PHPUnit namespaces
  Minor typo fix messsagesData -> messagesData
  remove translation data collector when not usable
2017-02-18 18:35:19 +01:00
Nicolas Grekas
66cad2e4c5 Merge branch '2.8' into 3.2
* 2.8:
  Update to PHPUnit namespaces
  Minor typo fix messsagesData -> messagesData
  remove translation data collector when not usable
2017-02-18 18:28:00 +01:00
Nicolas Grekas
33bae93a44 Merge branch '2.7' into 2.8
* 2.7:
  Update to PHPUnit namespaces
  remove translation data collector when not usable
2017-02-18 18:06:33 +01:00
Fabien Potencier
d7e8aec54e feature #21578 [Translation] Added a lint:xliff command for XLIFF files (javiereguiluz)
This PR was squashed before being merged into the 3.3-dev branch (closes #21578).

Discussion
----------

[Translation] Added a lint:xliff command for XLIFF files

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

It works exactly the same as the `lint:yaml` command:

### Lint a single file
![single-file](https://cloud.githubusercontent.com/assets/73419/22821214/6b459454-ef7a-11e6-9320-029c22ab8803.png)

### Lint a bundle

![bundle](https://cloud.githubusercontent.com/assets/73419/22821215/6c2c0196-ef7a-11e6-9de0-a1816eede9b3.png)

### Get the result in JSON

![json](https://cloud.githubusercontent.com/assets/73419/22829844/bacaa68e-efa4-11e6-9341-0c3d4821c5c7.png)

Commits
-------

7609e440ff [Translation] Added a lint:xliff command for XLIFF files
2017-02-18 08:27:04 -08:00
Javier Eguiluz
7609e440ff [Translation] Added a lint:xliff command for XLIFF files 2017-02-18 08:27:02 -08:00
Fabien Potencier
025585d5e8 added support for glob loaders in Config 2017-02-18 08:06:39 -08:00
Fabien Potencier
c9684ad31f minor #21564 Update to PHPUnit namespaces (peterrehm)
This PR was squashed before being merged into the 2.7 branch (closes #21564).

Discussion
----------

Update to PHPUnit namespaces

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

Replaces #21540

@nicolas-grekas Is the update of the cache-id like this sufficient? Do we maybe have to specifiy 4.8.35 in simple-phpunit?

Commits
-------

ddd2dff9b2 Update to PHPUnit namespaces
2017-02-18 08:02:55 -08:00
Peter Rehm
ddd2dff9b2 Update to PHPUnit namespaces 2017-02-18 08:02:39 -08:00
Nicolas Grekas
8c6ad5bfdc feature #21654 [PropertyInfo] Use iterators for PropertyInfoExtractor (GuilhemN)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[PropertyInfo] Use iterators for PropertyInfoExtractor

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

Most of the time, when using the cache, the property info extractors are not used: the new iterator feature looks perfect to prevent their instantiation.

Commits
-------

38523a9 [PropertyInfo] Use iterators for PropertyInfoExtractor
2017-02-18 09:12:57 +01:00
Guilhem N
38523a9736
[PropertyInfo] Use iterators for PropertyInfoExtractor 2017-02-17 20:38:32 +01:00
Fabien Potencier
9d2bbc6dbe bug #21637 [FrameworkBundle] remove translation data collector when not usable (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] remove translation data collector when not usable

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

Commits
-------

303bb73971 remove translation data collector when not usable
2017-02-17 08:12:20 -08:00
Fabien Potencier
d7aec48fa8 Merge branch '3.2'
* 3.2:
  Revert "bug #21436 [DependencyInjection] check for circular refs caused by method calls (xabbuh)"
  Static code analysis with Php Inspections (EA Extended)
  [VarDumper] Added missing persistent stream cast
  remove unused translation file
  reverted usage of isNan
2017-02-16 14:50:29 -08:00
Fabien Potencier
ea12123bcf Merge branch '2.8' into 3.2
* 2.8:
  Revert "bug #21436 [DependencyInjection] check for circular refs caused by method calls (xabbuh)"
  Static code analysis with Php Inspections (EA Extended)
  [VarDumper] Added missing persistent stream cast
2017-02-16 14:46:52 -08:00
Fabien Potencier
f53672f82b Merge branch '2.7' into 2.8
* 2.7:
  Revert "bug #21436 [DependencyInjection] check for circular refs caused by method calls (xabbuh)"
  Static code analysis with Php Inspections (EA Extended)
  [VarDumper] Added missing persistent stream cast
2017-02-16 14:43:37 -08:00
Fabien Potencier
a5c099c829 minor #21537 Static code analysis with Php Inspections (EA Extended) (kalessil)
This PR was squashed before being merged into the 2.7 branch (closes #21537).

Discussion
----------

Static code analysis with Php Inspections (EA Extended)

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

- Unnecessary proxy methods and methods duplicating  parents ones removed;
- Type casings instead of PHP4 functions;
- Usage of copy instead of file combining file get/put contents;
- One time use variables cleaned up;
- Superfluous functions calls in loop termination conditions fixed;

Commits
-------

3feeca74d0 Static code analysis with Php Inspections (EA Extended)
2017-02-16 14:27:03 -08:00
Vladimir Reznichenko
3feeca74d0 Static code analysis with Php Inspections (EA Extended) 2017-02-16 14:26:15 -08:00
Christian Flothmann
303bb73971 remove translation data collector when not usable 2017-02-16 23:20:46 +01:00
Fabien Potencier
6580a49706 Merge branch '3.2'
* 3.2:
  Permit empty suffix on Windows
  fixed CS
  [FrameworkBundle] Remove unused import
  [Console][Table] fixed render when using multiple rowspans.
  add docblocks for Twig url and path function to improve ide completion
  check for circular refs caused by method calls
  [Serializer] fix upper camel case conversion (see #21399)
  [DI] Auto register extension configuration classes as a resource
  [Console] Updated phpdoc on return types
2017-02-16 06:15:30 -08:00
Fabien Potencier
3860b0b392 optimized code 2017-02-16 05:36:15 -08:00
Fabien Potencier
02166d0101 fixed CS 2017-02-16 05:35:07 -08:00
Fabien Potencier
923d50b625 feature #21283 [Form][FrameworkBundle] Move FormPass to the Form component (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Form][FrameworkBundle] Move FormPass to the Form component

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

So that anyone using only Form and DI can use it for registering form types/type guessers.
Follows #19443, related to #21284

Commits
-------

e68a6d963c [FrameworkBundle][Form] Move FormPass to the Form component
2017-02-16 05:34:28 -08:00
Fabien Potencier
846d24ae36 feature #21293 [FrameworkBundle][Serializer] Move SerializerPass to the Serializer (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle][Serializer] Move SerializerPass to the Serializer

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

Part of #21284

Commits
-------

95cf5084c0 [FrameworkBundle][Serializer] Move SerializerPass to the Serializer
2017-02-16 05:30:28 -08:00
Fabien Potencier
a27accf8e5 minor #21315 [DI][FrameworkBundle] Show autowired methods in descriptors (ogizanagi)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI][FrameworkBundle] Show autowired methods in descriptors

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

so we can see the autowired methods using `debug:container`.

Commits
-------

482435c501 [DI][FrameworkBundle] Show autowired methods in descriptors
2017-02-16 05:25:28 -08:00
Fabien Potencier
5eabf64104 minor #21618 [FrameworkBundle] Remove unused import (dunglas)
This PR was merged into the 3.2 branch.

Discussion
----------

[FrameworkBundle] Remove unused import

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

aa5d32b57b [FrameworkBundle] Remove unused import
2017-02-16 04:09:56 -08:00
Fabien Potencier
07bf70d90f fixed CS 2017-02-16 04:05:35 -08:00
Kévin Dunglas
aa5d32b57b
[FrameworkBundle] Remove unused import 2017-02-15 11:27:17 +01:00
Maxime Steinhausser
1417f112a7 [DI][FrameworkBundle] ServiceLocator: fix XML descriptor to use dashes 2017-02-14 23:21:16 +01:00
Fabien Potencier
0976c86f3d minor #21600 [DI][FrameworkBundle] ServiceLocator: Tests dumpers & update descriptors (ogizanagi)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI][FrameworkBundle] ServiceLocator: Tests dumpers & update descriptors

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

This simply ensures the new feature is properly considered by the different dumpers, and updates the console descriptors to support the new `ServiceLocatorArgument`.

I also added the number of elements in an array/iterator/service_locator argument when using the `TextDescriptor` in this PR.

(fabbot is complaining about the new yaml tags support)

Commits
-------

aa9074d25a [DI][FrameworkBundle] ServiceLocator: Tests dumpers & update descriptors
2017-02-14 19:51:53 +01:00
Nicolas Grekas
db995dfaf8 Merge branch '3.2'
* 3.2: (27 commits)
  Improve tracking of environment variables in the case of private services
  [DI] Align AutowirePass with 2.8
  property constraints can be added in child classes
  added test for staticClassLoader in LazyLoadingMetadatafactory
  fixed PHPUnit setUp and tearDown method visibility
  spelling fixes
  Readd Symfony version status in the toolbar
  [Security] LdapUserProvider should not throw an exception if the UID key does not exist in an LDAP entry
  make sure that null can be the invalid value
  [VarDumper] Improve dump of AMQP* Object
  Fix annotations cache folder path
  [FrameworkBundle] Wire ArrayCache for annotation reader at bootstrap
  Ignore missing 'debug.file_link_formatter' service in Debug bundle
  [VarDumper] Fixed dumping of terminated generator
  bumped Symfony version to 3.2.4
  updated VERSION for 3.2.3
  updated CHANGELOG for 3.2.3
  bumped Symfony version to 2.8.18
  updated VERSION for 2.8.17
  updated CHANGELOG for 2.8.17
  ...
2017-02-14 17:35:24 +01:00
Nicolas Grekas
975411d7f0 Merge branch '2.8' into 3.2
* 2.8:
  property constraints can be added in child classes
  added test for staticClassLoader in LazyLoadingMetadatafactory
  spelling fixes
  Readd Symfony version status in the toolbar
  make sure that null can be the invalid value
  [VarDumper] Improve dump of AMQP* Object
  [VarDumper] Fixed dumping of terminated generator
  bumped Symfony version to 2.8.18
  updated VERSION for 2.8.17
  updated CHANGELOG for 2.8.17
  bumped Symfony version to 2.7.25
  updated VERSION for 2.7.24
  update CONTRIBUTORS for 2.7.24
  updated CHANGELOG for 2.7.24
  [FrameworkBundle] Simplify createPackageDefinition
  fix directory resource considers same timestamp not fresh
  return false early from directory resource
2017-02-14 17:27:43 +01:00
Nicolas Grekas
03194300ed Merge branch '2.7' into 2.8
* 2.7:
  property constraints can be added in child classes
  added test for staticClassLoader in LazyLoadingMetadatafactory
  spelling fixes
  make sure that null can be the invalid value
  bumped Symfony version to 2.7.25
  updated VERSION for 2.7.24
  update CONTRIBUTORS for 2.7.24
  updated CHANGELOG for 2.7.24
  [FrameworkBundle] Simplify createPackageDefinition
  fix directory resource considers same timestamp not fresh
  return false early from directory resource
2017-02-14 17:24:56 +01:00
Maxime Steinhausser
482435c501 [DI][FrameworkBundle] Show autowired methods in descriptors 2017-02-14 15:26:51 +01:00
Maxime Steinhausser
aa9074d25a [DI][FrameworkBundle] ServiceLocator: Tests dumpers & update descriptors 2017-02-13 20:22:27 +01:00
Fabien Potencier
4fd4cb900b fixed PHPUnit setUp and tearDown method visibility 2017-02-13 07:56:25 +01:00
Fabien Potencier
6ea39990c3 feature #21505 [Config][DI] Add ComposerResource to track the runtime engine + deps (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Config][DI] Add ComposerResource to track the runtime engine + deps

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

So that the container is invalidated whenever a new PHP runtime is used, a PHP-extension is added, or vendors are changed.

Commits
-------

a960c761d1 [Config][DI] Add ComposerResource to track runtime + vendors
2017-02-12 12:59:14 +01:00
Fabien Potencier
915cca84b6 feature #21533 [DI] Deprecate (un)setting pre-defined services (ro0NL)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Deprecate (un)setting pre-defined services

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

This PR is the subset of #19668 that fixes #19192: it deprecates (un)setting pre-defined services.
This opens the path to some optimizations in the dumped container in 4.0.

Commits
-------

fdb2140b81 [DI] Deprecate (un)setting pre-defined services
2017-02-12 12:52:54 +01:00
Fabien Potencier
50be214200 bug #21556 [FrameworkBundle] Wire ArrayCache for annotation reader at bootstrap (nicolas-grekas)
This PR was merged into the 3.2 branch.

Discussion
----------

[FrameworkBundle] Wire ArrayCache for annotation reader at bootstrap

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

Related to #21381 which disabled any cache at bootstrap.
Instead, this wires ArrayCache during bootstrapping, then swaps the cache provider for the real one.

Commits
-------

f90f53e915 [FrameworkBundle] Wire ArrayCache for annotation reader at bootstrap
2017-02-12 12:49:46 +01:00
Fabien Potencier
bcd897cfd4 feature #21265 [DI] Implement PSR-11 (greg0ire)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Implement PSR-11

TODO:

- [x] wait for a stable version of the psr/container package;
- [x] ~~deprecate instanciating ServiceNotFoundException directly, or using any of its methods directly;~~ not relevant anymore
- [x] act on the outcome of https://github.com/php-fig/container/issues/8 (solved in https://github.com/php-fig/container/issues/9) ;
- [x] ~~solve the mandatory NotFoundExceptionInterface on non-existing service
problem (with a flag ?);~~ non-issue, see comments below
- [x] provide meta-package psr/container-implementation if all problems can
be solved.

| Q             | A
| ------------- | ---
| Branch?       | master
| New feature?  | yes
| BC breaks?    | not at the moment
| Tests pass?   | didn't pass before pushing, or even starting to code, will see Travis
| License       | MIT
| Doc PR        | TODO

This PR is a first attempt at implementing PSR-11, or at least trying to get closer to it.
Delegate lookup is optional, and thus not implemented for now.

Commits
-------

bde0efd01c Implement PSR-11
2017-02-08 16:52:20 +01:00
Arjan Keeman
8e5cfa7e0a Fix annotations cache folder path
Argument 2 sets a cache path since e59f0e0fd7
2017-02-07 21:48:38 +01:00
Nicolas Grekas
f90f53e915 [FrameworkBundle] Wire ArrayCache for annotation reader at bootstrap 2017-02-07 17:17:32 +01:00
Nicolas Grekas
a960c761d1 [Config][DI] Add ComposerResource to track runtime + vendors 2017-02-07 15:42:58 +01:00
Fabien Potencier
6ccdcdc330 Merge branch '3.2'
* 3.2:
  Remove 3.1 from PR template
  fixed test name
  [Cache] Fix class exists checks in PhpArrayAdapter
  Casting TableCell value to string.
  [FrameworkBundle] fixed custom domain for translations in php templates
  [Form] Fixed DateType format option
  [Config] Fix checking cache for non existing meta file
2017-02-06 13:04:42 +01:00
Fabien Potencier
cfc6bafed2 Merge branch '2.8' into 3.2
* 2.8:
  Remove 3.1 from PR template
  fixed test name
  Casting TableCell value to string.
  [FrameworkBundle] fixed custom domain for translations in php templates
  [Form] Fixed DateType format option
  [Config] Fix checking cache for non existing meta file
2017-02-06 13:04:21 +01:00
Fabien Potencier
47a8b4dc58 Merge branch '2.7' into 2.8
* 2.7:
  Remove 3.1 from PR template
  fixed test name
  Casting TableCell value to string.
  [FrameworkBundle] fixed custom domain for translations in php templates
  [Form] Fixed DateType format option
2017-02-06 13:04:06 +01:00
Roland Franssen
fdb2140b81 [DI] Deprecate (un)setting pre-defined services 2017-02-05 11:30:27 +01:00
Kévin Dunglas
4b81393387
[FrameworkBundle] Simplify createPackageDefinition 2017-02-04 11:29:24 +01:00
Robin Chalas
d1001d4bac [SecurityBundle] Add AutowiringTypesTest 2017-02-03 16:32:53 +01:00
Robin Lehrmann
78c0ec5c13 [FrameworkBundle] fixed custom domain for translations in php templates 2017-02-03 15:56:44 +01:00
Fabien Potencier
da2710e400 feature #21517 [FrameworkBundle] Add missing autowiring aliases for common interfaces (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] Add missing autowiring aliases for common interfaces

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

Commits
-------

c3a2141a45 [FrameworkBundle] Add more autowiring aliases
2017-02-03 06:46:45 -08:00
Nicolas Grekas
23ba91272f Merge branch '3.2'
* 3.2:
  [FrameworkBundle][Console] JsonDescriptor: Respect original output
  [Process] Non ASCII characters disappearing during the escapeshellarg
2017-02-03 13:20:42 +01:00
Nicolas Grekas
d5a95323da Merge branch '2.8' into 3.2
* 2.8:
  [FrameworkBundle][Console] JsonDescriptor: Respect original output
  [Process] Non ASCII characters disappearing during the escapeshellarg
2017-02-03 13:11:38 +01:00
Robin Chalas
c3a2141a45 [FrameworkBundle] Add more autowiring aliases 2017-02-03 10:29:29 +01:00
Fabien Potencier
a46e691ae1 minor #21499 [FrameworkBundle][Console] Fix descriptors to support IteratorArgument, ClosureProxy and arrays (ogizanagi)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle][Console] Fix descriptors to support IteratorArgument, ClosureProxy and arrays

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

Fixes both array and iterator/closure-proxy arguments support in descriptors when using `--show-arguments`

Commits
-------

a94924c540 [FrameworkBundle][Console] Fix descriptors to support IteratorArgument, ClosureProxy and arrays
2017-02-02 15:06:10 -08:00
Maxime Steinhausser
a94924c540 [FrameworkBundle][Console] Fix descriptors to support IteratorArgument, ClosureProxy and arrays 2017-02-02 21:16:35 +01:00
Robin Chalas
02b4aaa25f
[HttpKernel] Lazy load argument value resolvers 2017-02-02 20:36:37 +01:00
Fabien Potencier
03b7cf72dc feature #21419 [DI][Config] Add & use ReflectionClassResource (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI][Config] Add & use ReflectionClassResource

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

With new changes comming to 3.3, we need a more generic reflection tracking logic than the one already managed by the autowiring subsystem.

This PR adds a new ReflectionClassResource in the Config component, and a new ContainerBuilder::getReflectionClass() method in the DI one (for fetching+tracking reflection-related info).

ReflectionClassResource tracks changes to any public or protected properties/method.

PR updated and ready, best viewed [ignoring whitespaces](https://github.com/symfony/symfony/pull/21419/files?w=1).

changelog:

* added `ReflectionClassResource` class
* added second `$exists` constructor argument to `ClassExistenceResource` - with a special mode that prevents fatal errors from happening when some parent class is broken (logic generalized from AutowiringPass)
* made `ClassExistenceResource` also work with interfaces and traits
* added `ContainerBuilder::getReflectionClass()` for retrieving and tracking reflection class info
* deprecated `ContainerBuilder::getClassResource()`, use `ContainerBuilder::getReflectionClass()` or `ContainerBuilder::addObjectResource()` instead

Commits
-------

37e44939ef [DI][Config] Add & use ReflectionClassResource
2017-02-02 10:28:05 -08:00
Maxime Steinhausser
bf71776e20 [FrameworkBundle][Console] JsonDescriptor: Respect original output 2017-02-02 18:43:33 +01:00
Nicolas Grekas
55a34b7b51 Merge branch '3.2'
* 3.2:
  Add HEADER_FORWARDED to setTrustedHeaderName docs
  Fix phpDoc typo
  [FrameworkBundle][Console] JsonDescriptor: Respect original output
  Remove dead code
  Enable dump() in autoload-dev
  add missing functional Serializer test case
2017-02-02 14:49:58 +01:00
Nicolas Grekas
4fd91481c2 Merge branch '2.8' into 3.2
* 2.8:
  Add HEADER_FORWARDED to setTrustedHeaderName docs
  Fix phpDoc typo
  [FrameworkBundle][Console] JsonDescriptor: Respect original output
  Enable dump() in autoload-dev
2017-02-02 14:47:35 +01:00
Nicolas Grekas
0a6d3c6d00 Merge branch '2.7' into 2.8
* 2.7:
  Add HEADER_FORWARDED to setTrustedHeaderName docs
  Fix phpDoc typo
  [FrameworkBundle][Console] JsonDescriptor: Respect original output
  Enable dump() in autoload-dev
2017-02-02 14:38:20 +01:00
Nicolas Grekas
37e44939ef [DI][Config] Add & use ReflectionClassResource 2017-02-02 14:15:15 +01:00
Robin Chalas
6b556b8b9b [DI] Add ContainerBuilder::fileExists()
Update TwigExtension
2017-02-02 11:26:40 +01:00
Grégoire Paris
bde0efd01c
Implement PSR-11
Delegate lookup is optional and thus, not implemented.
2017-02-02 08:42:59 +01:00
Maxime Steinhausser
08dd70b507 [FrameworkBundle][Console] JsonDescriptor: Respect original output 2017-02-01 19:43:31 +01:00
Nicolas Grekas
b11d391cb7 [DI] Deprecate autowiring-types in favor of aliases 2017-02-01 19:42:39 +01:00
Nicolas Grekas
fe55075c0e Merge branch '2.8' into 3.2
* 2.8:
  add missing functional Serializer test case
2017-02-01 11:33:06 +01:00
Christian Flothmann
24243ace89 add missing functional Serializer test case 2017-02-01 10:59:03 +01:00
Kévin Dunglas
1bf451cc70
[FrameworkBundle] Fix tests 2017-02-01 00:11:01 +01:00
Nicolas Grekas
2fb4fb93f8 Merge branch '3.2'
* 3.2:
  [Console] Fix too strict test
  [FrameworkBundle] Execute the PhpDocExtractor earlier
  [validator] Updated croatian translation
  Update DebugHandlersListener.php
  ignore invalid cookies expires date format
  [Console] SfStyleTest: Remove COLUMN env on tearDown
  [TwigBundle] Fix the name of the cache warming test class
  [Console] Fix TableCell issues with decoration
  Add missing pieces in the upgrade guide to 3.0
2017-01-31 22:52:27 +01:00
Nicolas Grekas
5b9e75e4a0 Merge branch '2.8' into 3.2
* 2.8:
  [Console] Fix too strict test
  [FrameworkBundle] Execute the PhpDocExtractor earlier
  [validator] Updated croatian translation
  ignore invalid cookies expires date format
  [TwigBundle] Fix the name of the cache warming test class
  [Console] Fix TableCell issues with decoration
  Add missing pieces in the upgrade guide to 3.0
2017-01-31 22:49:23 +01:00
Nicolas Grekas
ec8f1ad453 [DI] Remove usages of ClassExistenceResource 2017-01-31 00:00:52 +01:00
Guilhem N
0425e0549b [FrameworkBundle] Execute the PhpDocExtractor earlier 2017-01-30 14:26:57 -08:00
Fabien Potencier
5378bc9b55 minor #21424 [FrameworkBundle] Revert AbstractDescriptorTest output trimming (ogizanagi)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] Revert AbstractDescriptorTest output trimming

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no, but fixes an annoying/unhelping test output and fixes false positives
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/21129/files#diff-0e52187cbf1067a310538287da74ddb5R178
| License       | MIT
| Doc PR        | N/A

#### Before output when having a failing test, for instance, in a `TextDescriptor` fixture:

```diff
There was 1 failure:

1) Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\TextDescriptorTest::testDescribeContainerDefinitionWhichIsAnAlias with data set #1 (Symfony\Component\DependencyInjection\Alias Object (...), ' // This serv...------', Symfony\Component\DependencyInjection\ContainerBuilder Object (...), array('alias_2'))
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-' // This service is an alias for the service service_2 Information for Service "service_2" =================================== ------------------ ---------------------------------  Option   Value  ------------------ --------------------------------- Class Full\Qualified\Class2 Tags tag1 (attr1: val1, attr2: val2) tag1 (attr3: val3) tag2 Calls setMailer Public no Synthetic yes Lazy no Shared yes Abstract no Autowired no Autowiring Types - Required File /path/to/file Factory Service factory.service Factory Method get ------------------ ---------------------------------'
+' // This service is an alias for the service service_2 Information for Service "service_2" =================================== ------------------ ---------------------------------  Option   Value  ------------------ --------------------------------- Service ID service_2 Class Full\Qualified\Class2 Tags tag1 (attr1: val1, attr2: val2) tag1 (attr3: val3) tag2 Calls setMailer Public no Synthetic yes Lazy no Shared yes Abstract no Autowired no Autowiring Types - Required File /path/to/file Factory Service factory.service Factory Method get ------------------ ---------------------------------'
```

#### After:

```diff
There was 1 failure:

1) Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\TextDescriptorTest::testDescribeContainerDefinitionWhichIsAnAlias with data set #1 (Symfony\Component\DependencyInjection\Alias Object (...), ' // This serv...------', Symfony\Component\DependencyInjection\ContainerBuilder Object (...), array('alias_2'))
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
  ------------------ ---------------------------------
+  Service ID         service_2
   Class              Full\Qualified\Class2
   Tags               tag1 (attr1: val1, attr2: val2)
                      tag1 (attr3: val3)
                      tag2
   Calls              setMailer
   Public             no
   Synthetic          yes
   Lazy               no
   Shared             yes
   Abstract           no
   Autowired          no
   Autowiring Types   -
   Required File      /path/to/file
   Factory Service    factory.service
   Factory Method     get
  ------------------ ---------------------------------'
```

Commits
-------

efd00bac20 [FrameworkBundle] Revert AbstractDescriptorTest output trimming
2017-01-30 07:44:32 -08:00
Fabien Potencier
bbf91d29f9 feature #21396 [DI] Enhance logging in compiler passes (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Enhance logging in compiler passes

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

We should log more in compiler passes - and this should be better integrated in usual log reports.

For logging more, let's drop LoggingFormatter and add a simple "log" method on ContainerBuilder.
For better integration, let's throw silenced notices - they can be caught by our Debug handler.

Commits
-------

fb200a0d2f [DI] Enhance logging in compiler passes
2017-01-30 07:41:46 -08:00
Maxime Steinhausser
efd00bac20 [FrameworkBundle] Revert AbstractDescriptorTest output trimming 2017-01-29 20:35:38 +01:00
Nicolas Grekas
fb200a0d2f [DI] Enhance logging in compiler passes 2017-01-29 19:31:47 +01:00
Kévin Dunglas
f025392867
Merge branch '3.2'
* 3.2:
  [FrameworkBundle] Remove useless checks in descriptors
  fixed typo
2017-01-28 18:13:06 +01:00
Kévin Dunglas
39c81c2dce
Merge branch '2.8' into 3.2
* 2.8:
  [FrameworkBundle] Remove useless checks in descriptors
  fixed typo
2017-01-28 18:06:51 +01:00
Kévin Dunglas
c759345781
[FrameworkBundle] Remove useless checks in descriptors 2017-01-28 17:17:55 +01:00
Fabien Potencier
9f3072c416 Merge branch '3.2'
* 3.2:
  fixed typo
  fixed composer.json
  [HttpKernel] Fix Bundle name regression
  always check for all fields to be mapped
  clarify exception when no args are configured
  [PropertyAccess] Handle interfaces in the invalid argument exception
  [DI] Fix defaults overriding empty strings in AutowirePass
  [Debug] Workaround "null" $context
  [Debug] Remove $context arg from handleError(), preparing for PHP 7.2
  [FrameworkBundle] Dont wire "annotations.cached_reader" before removing passes
  [Routing] Fix BC break in AnnotationClassLoader defaults attributes handling
  Fix tests with ICU 57.1
  Fix the condition checking the minimum ICU version
2017-01-27 18:39:08 -08:00
Fabien Potencier
09d5f4eb72 Merge branch '3.1' into 3.2
* 3.1:
  fixed typo
  fixed composer.json
  always check for all fields to be mapped
  clarify exception when no args are configured
  [PropertyAccess] Handle interfaces in the invalid argument exception
  [DI] Fix defaults overriding empty strings in AutowirePass
  [Debug] Workaround "null" $context
  [Debug] Remove $context arg from handleError(), preparing for PHP 7.2
  [Routing] Fix BC break in AnnotationClassLoader defaults attributes handling
  Fix tests with ICU 57.1
  Fix the condition checking the minimum ICU version
2017-01-27 18:37:08 -08:00
Fabien Potencier
e8895ad102 Merge branch '2.8' into 3.1
* 2.8:
  always check for all fields to be mapped
  clarify exception when no args are configured
  [PropertyAccess] Handle interfaces in the invalid argument exception
  [DI] Fix defaults overriding empty strings in AutowirePass
  [Debug] Workaround "null" $context
  [Debug] Remove $context arg from handleError(), preparing for PHP 7.2
  [Routing] Fix BC break in AnnotationClassLoader defaults attributes handling
  Fix tests with ICU 57.1
  Fix the condition checking the minimum ICU version
2017-01-27 16:04:57 -08:00
Fabien Potencier
791b143914 Merge branch '2.7' into 2.8
* 2.7:
  always check for all fields to be mapped
  clarify exception when no args are configured
  [PropertyAccess] Handle interfaces in the invalid argument exception
  [Debug] Workaround "null" $context
  [Debug] Remove $context arg from handleError(), preparing for PHP 7.2
  [Routing] Fix BC break in AnnotationClassLoader defaults attributes handling
  Fix tests with ICU 57.1
  Fix the condition checking the minimum ICU version
2017-01-27 15:54:58 -08:00
Robin Chalas
95cf5084c0 [FrameworkBundle][Serializer] Move SerializerPass to the Serializer 2017-01-25 13:54:53 +01:00
Robin Chalas
e68a6d963c [FrameworkBundle][Form] Move FormPass to the Form component 2017-01-24 16:36:06 +01:00
Nicolas Grekas
e59f0e0fd7 [FrameworkBundle] Dont wire "annotations.cached_reader" before removing passes 2017-01-24 09:03:41 +01:00
Fabien Potencier
c2a6ddc0ea feature #21003 [Console][FrameworkBundle] Log console exceptions (jameshalsall, chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Console][FrameworkBundle] Log console exceptions

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #10895
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/7373

Continues #19382, fixing some issues including:
- ability to display the input string for any `InputInterface` implementation (cast to string if possible, use the command name otherwise)
- if the input can be casted as string, cleanup the result (from `command "'command:name' --foo=bar" ` to `command "command:name --foo=bar"`)
- made `ExceptionLister::$logger` private instead of protected
-  changed methods name from `onKernel*` to `onConsole*` (e.g. `onConsoleException`) and removed unnecessary doc blocks
- Added more tests

Log for an exception:

> [2016-12-22 00:34:42] app.ERROR: Exception thrown while running command: "cache:clear -vvv". Message: "An error occured!" {"exception":"[object] (RuntimeException(code: 0): An error occured! at /Volumes/HD/Sites/tests/sf-demo-3.2/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php:61)","command":"cache:clear -vvv","message":"An error occured!"} []

Commits
-------

919041c1ad Add Console ExceptionListener
9896547a4d Add basic support for automatic console exception logging
2017-01-23 14:46:36 -08:00
Robin Chalas
919041c1ad
Add Console ExceptionListener
Handle non string-castable inputs

Cleanup input for display

Naming changes

InputInterface doesnt have a toString()

Logger must be private

Remove useless doc blocks

Tweak tests
2017-01-23 23:15:00 +01:00
Robin Chalas
1d298f0417
[Routing] Fix BC break in AnnotationClassLoader defaults attributes handling 2017-01-23 21:38:04 +01:00
David Wolter
d696cfb04c [FrameworkBundle] Configurable paths for validation files 2017-01-23 15:03:50 +01:00
Nicolas Grekas
60d7d437b5 fix merge 2017-01-23 09:33:02 +01:00
Fabien Potencier
c633f912d8 Merge branch '3.2'
* 3.2: (40 commits)
  fixed CS
  fixed CS
  fixed CS fixer config
  fixed typo
  Revert "fixed typo"
  fixed typo
  fixed CS
  Avoid setting request attributes from signature arguments in AnnotationClassLoader
  [DependencyInjection] Add some missing typehints in YamlFileLoader
  [DependencyInjection] minor: Fix a DocBlock
  [HttpKernel] Give higher priority to adding request formats
  [Cache] Fix tags expiration
  [PhpUnit] Blacklist DeprecationErrorHandler in stack traces
  [PropertyInfo] Don't try to access a property thru a static method
  [PropertyInfo] Exclude static methods form properties guessing
  [Workflow] Added new validator to make sure each place has unique translation names
  [Cache] [PdoAdapter] Fix MySQL 1170 error (blob as primary key)
  [FrameworkBundle] Fix third level headers for MarkdownDescriptor
  [Ldap] Using Ldap stored username instead of form submitted one
  [Ldap] load users with the good username case
  ...
2017-01-21 09:10:26 -08:00
Fabien Potencier
ebdbd96449 Merge branch '3.1' into 3.2
* 3.1: (31 commits)
  fixed CS
  fixed CS
  fixed CS fixer config
  fixed typo
  Revert "fixed typo"
  fixed typo
  fixed CS
  Avoid setting request attributes from signature arguments in AnnotationClassLoader
  [DependencyInjection] Add some missing typehints in YamlFileLoader
  [DependencyInjection] minor: Fix a DocBlock
  [HttpKernel] Give higher priority to adding request formats
  [PropertyInfo] Don't try to access a property thru a static method
  [PropertyInfo] Exclude static methods form properties guessing
  [FrameworkBundle] Fix third level headers for MarkdownDescriptor
  [Ldap] Using Ldap stored username instead of form submitted one
  [Ldap] load users with the good username case
  [DoctrineBridge] Fixed invalid unique value as composite key
  [Doctrine Bridge] fix UniqueEntityValidator for composite object primary keys
  [TwigBundle] do not lose already set method calls
  #20411 fix Yaml parsing for very long quoted strings
  ...
2017-01-21 09:06:35 -08:00
Fabien Potencier
20bdaa6cc5 Merge branch '2.8' into 3.1
* 2.8: (26 commits)
  fixed CS
  fixed CS
  fixed CS fixer config
  fixed typo
  Revert "fixed typo"
  fixed typo
  fixed CS
  Avoid setting request attributes from signature arguments in AnnotationClassLoader
  [DependencyInjection] Add some missing typehints in YamlFileLoader
  [DependencyInjection] minor: Fix a DocBlock
  [HttpKernel] Give higher priority to adding request formats
  [PropertyInfo] Don't try to access a property thru a static method
  [PropertyInfo] Exclude static methods form properties guessing
  [FrameworkBundle] Fix third level headers for MarkdownDescriptor
  [TwigBundle] do not lose already set method calls
  #20411 fix Yaml parsing for very long quoted strings
  CS: apply is_null
  DX: remove invalid inheritdoc
  bumped Symfony version to 2.8.17
  updated VERSION for 2.8.16
  ...
2017-01-21 09:01:39 -08:00
Fabien Potencier
a784d5c01f Merge branch '2.7' into 2.8
* 2.7:
  fixed typo
  Revert "fixed typo"
  fixed typo
  fixed CS
  Avoid setting request attributes from signature arguments in AnnotationClassLoader
  [DependencyInjection] Add some missing typehints in YamlFileLoader
  [DependencyInjection] minor: Fix a DocBlock
  [HttpKernel] Give higher priority to adding request formats
  [FrameworkBundle] Fix third level headers for MarkdownDescriptor
  [TwigBundle] do not lose already set method calls
  #20411 fix Yaml parsing for very long quoted strings
  CS: apply is_null
  DX: remove invalid inheritdoc
  bumped Symfony version to 2.7.24
  updated VERSION for 2.7.23
  update CONTRIBUTORS for 2.7.23
  updated CHANGELOG for 2.7.23
  [FrameworkBundle] Skip test if xdebug.file_link_format is defined.
2017-01-21 08:40:50 -08:00
Fabien Potencier
735d0a6ce7 Revert "fixed typo"
This reverts commit 6830d9f4c9.
2017-01-21 08:37:26 -08:00
Fabien Potencier
6830d9f4c9 fixed typo 2017-01-21 08:33:48 -08:00
Fabien Potencier
065ac8b003 feature #21353 [ClassLoader] Deprecated the component (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[ClassLoader] Deprecated the component

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

Follow up of #20668

Commits
-------

8a37722adb [ClassLoader] Deprecated the component
2017-01-20 07:08:15 -08:00
Nicolas Grekas
8a37722adb [ClassLoader] Deprecated the component 2017-01-20 11:22:07 +01:00
Grégoire Pineau
134a58b4c4 [Workflow] Fixed code and tests 2017-01-18 17:03:37 +01:00
Andreas Kleemann
184301206f [Workflow] Introduce concept of SupprtStrategyInterface to allow other support checks than class instance 2017-01-18 14:25:21 +01:00
James Halsall
9896547a4d
Add basic support for automatic console exception logging 2017-01-18 08:53:03 +01:00
Fabien Potencier
e823e85a7c feature #21065 Added cache data collector and profiler page (Nyholm)
This PR was squashed before being merged into the 3.3-dev branch (closes #21065).

Discussion
----------

Added cache data collector and profiler page

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

Adding a first version of cache profiler page. Most things are taken from PHP-cache.
FYI: @aequasi

### What is included?

A collector, recording adapter and a profiler page.

![screen shot 2016-12-27 at 16 07 35](https://cloud.githubusercontent.com/assets/1275206/21502325/4bee2ed4-cc4f-11e6-89fc-37ed16aca864.png)
![screen shot 2016-12-27 at 16 07 45](https://cloud.githubusercontent.com/assets/1275206/21502326/4bee9450-cc4f-11e6-904d-527b7b0ce85b.png)

### What is not included?

* A good logo
* Nice design on the profiler page

This PR aims to pass as the minimum requirement for a cache page. Im happy to do fancy extra features but those should be a different PR.

Commits
-------

7497f1c6b6 Added cache data collector and profiler page
2017-01-17 21:46:26 -08:00
Tobias Nyholm
7497f1c6b6 Added cache data collector and profiler page 2017-01-17 21:46:25 -08:00
Maxime Steinhausser
ce29ab1d92 [FrameworkBundle] Fix third level headers for MarkdownDescriptor 2017-01-17 19:39:37 +01:00
Robin Chalas
57b17f4844
[FrameworkBundle] Fix debug:container --show-arguments missing cases 2017-01-14 15:39:08 +01:00
Robin Chalas
7b262d8c29
[FrameworkBundle] Use getErrorStyle() when relevant 2017-01-12 21:28:11 +01:00
Maxime Steinhausser
9a3a5686c8
Use stderr for some other commands 2017-01-12 21:28:11 +01:00
Robin Chalas
1ee48bfd60
[FrameworkBundle] Make use of stderr for non reliable output 2017-01-12 21:28:11 +01:00
Nicolas Grekas
136a5ffc55 Merge branch '3.2'
* 3.2:
  Fix test
2017-01-12 21:17:32 +01:00
Nicolas Grekas
3d0a69e50f Fix test 2017-01-12 21:17:20 +01:00
Nicolas Grekas
641bb1a890 Merge branch '3.2'
* 3.2:
  Fix getMock usage
  Remove dead code
  [Form] DateTimeToLocalizedStringTransformer does not use TZ when using only date
  [Validator] Fix caching of constraints derived from non-serializable parents
  [TwigBundle] Fix bug where namespaced paths don't take parent bundles in account
  [FrameworkBundle] Fix relative paths used as cache keys
  respect groups when merging constraints
  fix IPv6 address handling in server commands
2017-01-12 20:30:26 +01:00
Nicolas Grekas
ec858cea91 Merge branch '3.1' into 3.2
* 3.1:
  Fix getMock usage
  Remove dead code
  [Form] DateTimeToLocalizedStringTransformer does not use TZ when using only date
  [Validator] Fix caching of constraints derived from non-serializable parents
  [TwigBundle] Fix bug where namespaced paths don't take parent bundles in account
  [FrameworkBundle] Fix relative paths used as cache keys
  respect groups when merging constraints
  fix IPv6 address handling in server commands
2017-01-12 20:27:47 +01:00
Nicolas Grekas
473fd3b026 Merge branch '2.8' into 3.1
* 2.8:
  Fix getMock usage
  Remove dead code
  [Form] DateTimeToLocalizedStringTransformer does not use TZ when using only date
  [Validator] Fix caching of constraints derived from non-serializable parents
  [TwigBundle] Fix bug where namespaced paths don't take parent bundles in account
  [FrameworkBundle] Fix relative paths used as cache keys
  respect groups when merging constraints
  fix IPv6 address handling in server commands
2017-01-12 20:26:57 +01:00
Nicolas Grekas
5ca27373e8 Merge branch '2.7' into 2.8
* 2.7:
  [Form] DateTimeToLocalizedStringTransformer does not use TZ when using only date
  [Validator] Fix caching of constraints derived from non-serializable parents
  [TwigBundle] Fix bug where namespaced paths don't take parent bundles in account
  [FrameworkBundle] Fix relative paths used as cache keys
  respect groups when merging constraints
  fix IPv6 address handling in server commands
2017-01-12 20:18:05 +01:00
Nicolas Grekas
566732db1f Merge branch '3.2'
* 3.2:
  [FrameworkBundle] Add annotated validator cache test case
  Fix a typo
  [Ldap] Always have a valid connection when using the EntryManager
  [FrameworkBundle] Fix class_exists() checks in PhpArrayAdapter-related cache warmers
2017-01-12 20:06:21 +01:00
Grégoire Pineau
7f15bc39ea [FrameworkBundle] Skip test if xdebug.file_link_format is defined.
The test suite does not pass locally because I use a custom
file_link_format. I do it because it works everywhere.

Then, Symfony tries to read this value before the default one.
We could use ini_set before the test but unfortunatelly there are no way
to define the "cfg_var". For recall, get_cfg_var allows to return the
configuration value even if the extension is not loaded. And again it's
my case: I don't enable xdebug to have better performance.
2017-01-12 19:58:07 +01:00
Fabien Potencier
bcab8b8ac8 bug #21248 [FrameworkBundle] Prevent an error when the console component isn't installed (dunglas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] Prevent an error when the console component isn't installed

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

Finish #19443. Alternative to #21246.

Commits
-------

ab133caa8c [FrameworkBundle] Prevent an error when the console component isn't installed
2017-01-12 10:31:45 -08:00
Mikael Pajunen
e09dccc762 [FrameworkBundle] Add annotated validator cache test case 2017-01-12 17:32:18 +01:00
Kévin Dunglas
ab133caa8c
[FrameworkBundle] Prevent an error when the console component isn't installed 2017-01-12 15:52:48 +01:00
Nicolas Grekas
d7bc68a3ed bug #21104 [FrameworkBundle] fix IPv6 address handling in server commands (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] fix IPv6 address handling in server commands

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/21039#discussion_r93915788
| License       | MIT
| Doc PR        |

This fixes https://github.com/symfony/symfony/pull/21039#discussion_r93915788 as reported by @sstok for the existing commands by backporting @fabpot's patch from #21039.

Commits
-------

2bb4713 fix IPv6 address handling in server commands
2017-01-12 14:01:00 +01:00
Thomas Royer
5c151d0439 Add a --show-arguments flag to the container debug command 2017-01-12 13:51:04 +01:00
Nicolas Grekas
c60009eae8 [FrameworkBundle] Fix class_exists() checks in PhpArrayAdapter-related cache warmers 2017-01-12 12:00:26 +01:00
Nicolas Grekas
5441e9bc90 [FrameworkBundle] Fix relative paths used as cache keys 2017-01-11 16:18:12 +01:00
Benjamin Cremer
7743989675 Move AddConsoleCommandPass from FrameworkBundle to Console. 2017-01-11 13:05:48 +01:00
Fabien Potencier
8b354785b5 bug #21232 [FrameworkBundle] removed a deprecation notice when using autowiring (on kernel.class_cache.cache_warmer) (fabpot)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] removed a deprecation notice when using autowiring (on kernel.class_cache.cache_warmer)

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

When using autowiring, Symfony uses reflection to list all available classes. So, each class is loaded, and for the `ClassCacheCacheWarmer`, it means that a deprecation notice is triggered. So, I've moved it to when an instance is created instead.

Commits
-------

eb6ff9c7e3 [FrameworkBundle] removed a deprecation notice when using autowiring (on kernel.class_cache.cache_warmer)
2017-01-10 13:49:58 -08:00
Fabien Potencier
eb6ff9c7e3 [FrameworkBundle] removed a deprecation notice when using autowiring (on kernel.class_cache.cache_warmer) 2017-01-10 12:32:13 -08:00
Fabien Potencier
bdd0f9d94d feature #21231 [FrameworkBundle] allow to reference files directly from kernel.root_dir (fabpot)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] allow to reference files directly from kernel.root_dir

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

While working on a bundleless app, I want to be able to reference a directory for routing annotations like this:

```yaml
app:
    resource: "../src/Controller/"
    type: annotation
```

but that does not work because Symfony expects a bundle resource (`@AppBundle...`) or a directory referenced from the main app `Resources` directory. But as I don't have such a directory, even using `../../src/Controller` does not work.

So, I propose to add the %kernel.root_dir% to the list of allowed directories.

By the way, we don't have the same issue with the routing annotation **file** loader as it does not use the locator for whatever reason. Should we fix it?

Commits
-------

80b61e9127 [FrameworkBundle] allowed to reference files directly from kernel.root_dir
2017-01-10 12:30:05 -08:00
Fabien Potencier
80b61e9127 [FrameworkBundle] allowed to reference files directly from kernel.root_dir 2017-01-10 11:14:57 -08:00
Fabien Potencier
629de96792 feature #20689 [Config][FrameworkBundle] Allow to dump extension config reference sub-path (ogizanagi)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Config][FrameworkBundle] Allow to dump extension config reference sub-path

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

Same as https://github.com/symfony/symfony/pull/18940 but for the `config:dump-reference` command:

<img width="975" alt="screenshot 2016-11-29 a 19 09 04" src="https://cloud.githubusercontent.com/assets/2211145/20722577/6c9f9b98-b667-11e6-9683-9a304ff80895.PNG">

Only available for yaml, because it's the most common format when developing an end-application, and dumping a sub xml document causes some issues and raises more questions with the current `XmlReferenceDumper` implementation (namespaces, root name, ...).

Commits
-------

869bb1530b [Config][FrameworkBundle] Allow to dump extension config reference sub path
2017-01-10 07:47:15 -08:00
Nicolas Grekas
16d33e1fff Merge branch '3.2'
* 3.2:
  [DI] Add missing legacy group on testLegacy
  Minor tweaks
  Fix merge
  [DI] Dont share service when no id provided
  Fix Container and PhpDumper test inaccuracies
  [DI] Fix missing new line after private alias
  [ClassLoader] Throw an exception if the cache is not writeable
  Fixing regression in TwigEngine exception handling.
2017-01-10 15:32:56 +01:00
Nicolas Grekas
80ed2c5173 Minor tweaks 2017-01-10 15:21:25 +01:00
Nicolas Grekas
783abab7ae Merge branch '3.1' into 3.2
* 3.1:
  Fix merge
  [DI] Dont share service when no id provided
  Fix Container and PhpDumper test inaccuracies
  [DI] Fix missing new line after private alias
  [ClassLoader] Throw an exception if the cache is not writeable
  Fixing regression in TwigEngine exception handling.
2017-01-10 15:14:38 +01:00
Nicolas Grekas
15ff7f9195 Merge branch '2.8' into 3.1
* 2.8:
  Fix merge
  [DI] Dont share service when no id provided
  Fix Container and PhpDumper test inaccuracies
  [DI] Fix missing new line after private alias
  [ClassLoader] Throw an exception if the cache is not writeable
  Fixing regression in TwigEngine exception handling.
2017-01-10 15:09:41 +01:00
Nicolas Grekas
144eb54fcd Merge branch '2.7' into 2.8
* 2.7:
  [DI] Dont share service when no id provided
  Fix Container and PhpDumper test inaccuracies
  [DI] Fix missing new line after private alias
  [ClassLoader] Throw an exception if the cache is not writeable
  Fixing regression in TwigEngine exception handling.
2017-01-10 15:03:07 +01:00
Nicolas Grekas
814f63390d [DI] Dont share service when no id provided 2017-01-10 14:32:11 +01:00
Maxime STEINHAUSSER
869bb1530b [Config][FrameworkBundle] Allow to dump extension config reference sub path 2017-01-09 22:03:44 +01:00
Fabien Potencier
ef80873d06 [FrameworkBundle] changed some default configs from canBeEnabled to canBeDisabled 2017-01-07 14:17:04 -08:00
Fabien Potencier
98ce21a351 [FrameworkBundle] changed the default value of annotation setting based on the existence of Doctrine Annotations 2017-01-06 16:42:03 -08:00
Nicolas Grekas
36aedd8b2c Merge branch '3.2'
* 3.2:
  [Bridge/PhpUnit] Relax expectedDeprecation for forward compat
  [FrameworkBundle] Remove Response* from classes to compile
  [Workflow] Removed twig from composer.json (dev section, not used)
2017-01-06 18:58:22 +01:00
Nicolas Grekas
9ab59824a1 [FrameworkBundle] Remove Response* from classes to compile 2017-01-06 17:22:25 +01:00
Fabien Potencier
6f6100a8e1 feature #20547 [FrameworkBundle] Allowed symlinks when searching for translation, searialization and validation files (tifabien)
This PR was squashed before being merged into the 3.3-dev branch (closes #20547).

Discussion
----------

[FrameworkBundle] Allowed symlinks when searching for translation, searialization and validation files

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

When we have a symlink folder in app/Resources/translations, files inside this symlink are not handled.

Commits
-------

4874e43a4c [FrameworkBundle] Allowed symlinks when searching for translation, searialization and validation files
2017-01-06 07:23:52 -08:00
Fabien Lucas
4874e43a4c [FrameworkBundle] Allowed symlinks when searching for translation, searialization and validation files 2017-01-06 07:23:44 -08:00
Fabien Potencier
dda376032d feature #20735 Deprecate ClassCollectionLoader and Kernel::loadClassCache (dbrumann)
This PR was merged into the 3.3-dev branch.

Discussion
----------

Deprecate ClassCollectionLoader and Kernel::loadClassCache

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

As suggested by @nicolas-grekas in #20668 I added deprecation notices to ClassCollectionLoader and Kernel::loadClassCache.

Commits
-------

660d79a186 Deprecates ClassCache-cache warmer.
2017-01-06 07:22:02 -08:00
Fabien Potencier
be85fcc2b8 feature #21039 Web server bundle (fabpot)
This PR was squashed before being merged into the 3.3-dev branch (closes #21039).

Discussion
----------

Web server bundle

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

Moved the `server:*` commands to a new bundle. It makes them more easily discoverable and more decoupled. Discoverability is important when not using symfony/symfony. In that case, the commands are not available unless you have the symfony/process component installed. With a dedicated bundle, installing the bundle also installs the dependency, making the whole process easier.

Usage is the same as the current commands for basic usage:

To start a web server in the foreground:

```
bin/console server:run
```

To manage a background server:

```
bin/console server:start
bin/console server:stop
bin/console server:status
```

The big difference is that port is auto-determined if something is already listening on port 8000.

Usage is **different** if you pass options:

```
bin/console server:start 127.0.0.1:8888
bin/console server:stop # no need to pass the address again
bin/console server:status # no need to pass the address again
```

That's possible as the web server now stores its address in a pid file stored in the current directory.

Commits
-------

f39b32735b [WebServerBundle] switched auto-run of server:start to off by default
961d1cea55 [WebServerBundle] fixed server:start when already running
126f4d9ec4 [WebServerBundle] added support for port auto-detection
6f689d6597 [WebServerBundle] changed the way we keep track of the web server
585d4451c8 [WebServerBundle] tweaked command docs
fa7ebc57de [WebServerBundle] moved most of the logic in a new class
951a1a227d [WebServerBundle] changed wording
ac1ba7700e made the router configurable via env vars
48dd2b0dbe removed obsolete check
132902c621 moved server:* command to a new bundle
2017-01-05 19:09:35 -08:00
Fabien Potencier
0d1f53f48b Merge branch '3.2'
* 3.2:
  Fix serializer/translations/validator resources loading for bundles overriding getPath()
  Fix the priority order of compiler pass trait
2017-01-04 11:58:57 -08:00
Fabien Potencier
be882c4663 Merge branch '3.1' into 3.2
* 3.1:
  Fix serializer/translations/validator resources loading for bundles overriding getPath()
2017-01-04 11:58:34 -08:00
Fabien Potencier
8f82bf7076 Merge branch '2.8' into 3.1
* 2.8:
  Fix serializer/translations/validator resources loading for bundles overriding getPath()
2017-01-04 11:57:42 -08:00
Fabien Potencier
829b6bd475 Merge branch '2.7' into 2.8
* 2.7:
  Fix serializer/translations/validator resources loading for bundles overriding getPath()
2017-01-04 11:55:18 -08:00
Robin Chalas
fef3146b3b
Fix serializer/translations/validator resources loading for bundles overriding getPath() 2017-01-04 20:27:15 +01:00
Robin Chalas
cd4b15e605 [FrameworkBundle] Display original definition for aliases in debug:container 2017-01-04 14:20:26 +01:00
Nicolas Grekas
601648e0e8 feature #21108 [Cache] Add DSN, createClient & better error reporting to MemcachedAdapter (nicolas-grekas, robfrawley)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Cache] Add DSN, createClient & better error reporting to MemcachedAdapter

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

Replaces #20863
ping @robfrawley: would you mind opening a doc PR for this?

Commits
-------

87030b4 [cache] Add tests for MemcachedAdapter::createClient()
e109438 [Cache] Add DSN, createClient & better error reporting to MemcachedAdapter
2017-01-04 07:51:37 +01:00
Fabien Potencier
f71c699289 Merge branch '3.2'
* 3.2:
  updated LICENSE year
  updated LICENSE year
  updated LICENSE year
  Fixed `@return self` with `$this`
  [Yaml] add missing indicator character
2017-01-02 12:33:09 -08:00
Fabien Potencier
3f4e6cce8c Merge branch '3.1' into 3.2
* 3.1:
  updated LICENSE year
  updated LICENSE year
  Fixed `@return self` with `$this`
2017-01-02 12:32:22 -08:00
Fabien Potencier
d05e9e03cb Merge branch '2.8' into 3.1
* 2.8:
  updated LICENSE year
  updated LICENSE year
  Fixed `@return self` with `$this`
2017-01-02 12:31:54 -08:00
Fabien Potencier
ed70281d49 Merge branch '2.7' into 2.8
* 2.7:
  updated LICENSE year
  Fixed `@return self` with `$this`
2017-01-02 12:30:24 -08:00
Fabien Potencier
9879c8193f updated LICENSE year 2017-01-02 12:30:00 -08:00
Fabien Potencier
cbcc6ca726 feature #20809 [FrameworkBundle] Display the controller class name in 'debug:router' (lyrixx)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] Display the controller class name in 'debug:router'

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

---

Before:
![screenshot7](https://cloud.githubusercontent.com/assets/408368/21152351/318af764-c166-11e6-8245-1729779e9809.png)

After:
![screenshot3](https://cloud.githubusercontent.com/assets/408368/21563210/02cf043e-ce80-11e6-94be-34736d85bb3b.png)

Commits
-------

157a8306a2 [FrameworkBundle] Display the controller class name in 'debug:router'
2017-01-02 12:07:21 -08:00
Nicolas Grekas
e10943814e [Cache] Add DSN, createClient & better error reporting to MemcachedAdapter 2017-01-02 17:22:30 +01:00
Nicolas Grekas
3e7ff2194e Merge branch '3.2'
* 3.2:
  do not depend on a fixed date in layout tests
  [Console] Escape default value when dumping help
  [Console] OS X Can't call cli_set_process_title php without superuser
  Fixed @return when returning this or static #bis
  fixed @return when returning this or static
  Polish translation improvement in Validator component
  [Console] Descriptors should use Helper::strlen
  [Config] Improve PHPdoc / IDE autocomplete
  [Debug] Wrap call to ->log in a try catch block
  [Debug] UndefinedMethodFatalErrorHandler - Handle anonymous classes
  fix merge
  [cache] Bump RedisAdapter timeout to 5s
  fixed @return when returning this or static
  [SecurityBundle] Made collection of user provider unique when injecting them to the RemberMeService
  remove is_writable check on filesystem cache
2017-01-02 15:58:37 +01:00
Nicolas Grekas
8df0540c9f Merge branch '3.1' into 3.2
* 3.1:
  do not depend on a fixed date in layout tests
  [Console] Escape default value when dumping help
  [Console] OS X Can't call cli_set_process_title php without superuser
  Fixed @return when returning this or static #bis
  fixed @return when returning this or static
  Polish translation improvement in Validator component
  [Console] Descriptors should use Helper::strlen
  [Config] Improve PHPdoc / IDE autocomplete
  [Debug] Wrap call to ->log in a try catch block
  [Debug] UndefinedMethodFatalErrorHandler - Handle anonymous classes
  fix merge
  [cache] Bump RedisAdapter timeout to 5s
  fixed @return when returning this or static
  [SecurityBundle] Made collection of user provider unique when injecting them to the RemberMeService
  remove is_writable check on filesystem cache
2017-01-02 15:57:35 +01:00
Nicolas Grekas
0dbc5cec7f Merge branch '2.8' into 3.1
* 2.8:
  do not depend on a fixed date in layout tests
  [Console] Escape default value when dumping help
  [Console] OS X Can't call cli_set_process_title php without superuser
  Fixed @return when returning this or static #bis
  Polish translation improvement in Validator component
  [Console] Descriptors should use Helper::strlen
  [Config] Improve PHPdoc / IDE autocomplete
  [Debug] Wrap call to ->log in a try catch block
  [Debug] UndefinedMethodFatalErrorHandler - Handle anonymous classes
  [SecurityBundle] Made collection of user provider unique when injecting them to the RemberMeService
2017-01-02 15:50:07 +01:00
Nicolas Grekas
23590eb51a Merge branch '2.7' into 2.8
* 2.7:
  do not depend on a fixed date in layout tests
  [Console] Escape default value when dumping help
  [Console] OS X Can't call cli_set_process_title php without superuser
  Polish translation improvement in Validator component
  [Console] Descriptors should use Helper::strlen
  [Config] Improve PHPdoc / IDE autocomplete
  [Debug] Wrap call to ->log in a try catch block
  [Debug] UndefinedMethodFatalErrorHandler - Handle anonymous classes
  [SecurityBundle] Made collection of user provider unique when injecting them to the RemberMeService
2017-01-02 15:44:49 +01:00
Christian Flothmann
97b7fabf51 do not depend on a fixed date in layout tests
By default, the `DateType` as well as the `DateTimeType` set the choices
being available for the year to a range starting five years in the past.
After some time, this will make tests fail when the year of the fixed
date being used as the initial data is before the first year being part
of the choices.
2017-01-01 13:43:56 +01:00
Grégoire Pineau
157a8306a2 [FrameworkBundle] Display the controller class name in 'debug:router' 2016-12-30 11:47:35 +01:00
Christian Flothmann
2bb47136df fix IPv6 address handling in server commands 2016-12-30 11:19:53 +01:00
Fabien Potencier
132902c621 moved server:* command to a new bundle 2016-12-30 08:54:28 +01:00
Fabien Potencier
d0e8476afc Merge branch '3.2'
* 3.2:
  [FrameworkBundle] Ignore AnnotationException exceptions in the AnnotationsCacheWarmer
  fixed @return when returning this or static
  override property constraints in child class
  removed unneeded comment
  [Console] improved code coverage of Command class
  [FrameworkBundle] Make TemplateController working without the Templating component
  [FrameworkBundle] Allow multiple transactions with the same name
  Only count on arrays or countables to avoid warnings in PHP 7.2
2016-12-27 11:45:09 +01:00
Fabien Potencier
f4a635957e Merge branch '3.1' into 3.2
* 3.1:
  fixed @return when returning this or static
  override property constraints in child class
  removed unneeded comment
  [Console] improved code coverage of Command class
  [FrameworkBundle] Make TemplateController working without the Templating component
  Only count on arrays or countables to avoid warnings in PHP 7.2
2016-12-27 11:44:30 +01:00
Fabien Potencier
4c453f617d Merge branch '2.8' into 3.1
* 2.8:
  fixed @return when returning this or static
  override property constraints in child class
  removed unneeded comment
  [Console] improved code coverage of Command class
  [FrameworkBundle] Make TemplateController working without the Templating component
  Only count on arrays or countables to avoid warnings in PHP 7.2
2016-12-27 11:43:25 +01:00
Nicolas Grekas
59dc976caf bug #20959 [FrameworkBundle] Ignore AnnotationException exceptions in the AnnotationsCacheWarmer (fancyweb)
This PR was squashed before being merged into the 3.2 branch (closes #20959).

Discussion
----------

[FrameworkBundle] Ignore AnnotationException exceptions in the AnnotationsCacheWarmer

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

I ran into a case that led to an `AnnotationException` in the `AnnotationsCacheWarmer`. I deduced that these exceptions should be ignored to not break the cache warming process.

The case :
* You have a controller in your `AppBundle\Controller\` directory.
* You have an annotation in this controller that will never be found (because you made a mistake in the class / annotation name) or not every time : for example your controller is only used in dev env and it uses an annotation that is defined in a vendor bundle that is only under the `require-dev` key in your `composer.json` because you don't need it in your production deployment. So in production, your controller exists but will never be used. However the vendor bundle does not exist.
* You dump your autoload files with composer using the `--optimize` option.
* You end up with an `AnnotationException`.

Why :
* In the [`FrameworkExtension`](https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php#L189), the `**Bundle\Controller\` pattern is added as an "annotated class to compile".
* In the [`AddClassesToCachePass`](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/DependencyInjection/AddClassesToCachePass.php#L50), all the classes defined in the `autoload_classmap.php` file are matched against the previous pattern.
* Your controller will match. So even if you don't use it at all in your application, the annotation will still be read and the exception will be thrown.

Commits
-------

6749569 [FrameworkBundle] Ignore AnnotationException exceptions in the AnnotationsCacheWarmer
2016-12-27 10:59:18 +01:00
Thomas Calvet
67495693a4 [FrameworkBundle] Ignore AnnotationException exceptions in the AnnotationsCacheWarmer 2016-12-27 10:59:17 +01:00
Fabien Potencier
085171fc50 bug #20795 [FrameworkBundle] Allow multiple transitions with the same name (Padam87)
This PR was merged into the 3.2 branch.

Discussion
----------

[FrameworkBundle] Allow multiple transitions with the same name

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

Commits
-------

7c86e16 [FrameworkBundle] Allow multiple transactions with the same name
2016-12-26 21:42:16 +01:00
Fabien Potencier
e5ce4c9383 removed unneeded comment 2016-12-23 22:13:36 +01:00
Kévin Dunglas
89ccbc450c
[FrameworkBundle] Make TemplateController working without the Templating component 2016-12-23 16:30:22 +01:00
Fabien Potencier
e618ff3ecb fixed tests 2016-12-19 17:18:40 +01:00
Fabien Potencier
ab520a13c6 fixed tests 2016-12-19 17:17:38 +01:00
Fabien Potencier
2819a57172 fixed obsolete getMock() usage 2016-12-19 17:14:19 +01:00
Fabien Potencier
6126018b9f Merge branch '3.2'
* 3.2:
  fixed obsolete getMock() usage
  fixed obsolete getMock() usage
  fixed obsolete getMock() usage
  fixed obsolete getMock() usage
  [WebProfilerBundle] Display multiple HTTP headers in WDT
  do not remove the Twig ExceptionController service
  removed obsolete condition
  do not try to register incomplete definitions
2016-12-19 17:13:57 +01:00
Fabien Potencier
0a9e391f36 fixed obsolete getMock() usage 2016-12-19 17:09:34 +01:00
Fabien Potencier
3f96468942 Merge branch '3.1' into 3.2
* 3.1:
  fixed obsolete getMock() usage
  fixed obsolete getMock() usage
  fixed obsolete getMock() usage
  [WebProfilerBundle] Display multiple HTTP headers in WDT
  do not remove the Twig ExceptionController service
  removed obsolete condition
  do not try to register incomplete definitions
2016-12-19 17:07:36 +01:00
Fabien Potencier
a3058245db fixed obsolete getMock() usage 2016-12-19 17:00:11 +01:00
Fabien Potencier
7ae26ed5f1 Merge branch '2.8' into 3.1
* 2.8:
  fixed obsolete getMock() usage
  fixed obsolete getMock() usage
  [WebProfilerBundle] Display multiple HTTP headers in WDT
  do not remove the Twig ExceptionController service
  removed obsolete condition
  do not try to register incomplete definitions
2016-12-19 16:53:49 +01:00
Fabien Potencier
0f9a7287c3 fixed obsolete getMock() usage 2016-12-19 16:48:05 +01:00
Fabien Potencier
84e75a78b3 Merge branch '2.7' into 2.8
* 2.7:
  fixed obsolete getMock() usage
  [WebProfilerBundle] Display multiple HTTP headers in WDT
2016-12-19 16:38:44 +01:00
Fabien Potencier
71d059cad1 fixed obsolete getMock() usage 2016-12-19 16:22:46 +01:00
Nicolas Grekas
c885d23a39 Merge branch '3.2'
* 3.2:
  [Security] Fix test
  [Validator] phpize default option values
  test for the Validator component to be present
  [Serializer] Fix MaxDepth annotation exceptions
  [DependencyInjection] Fix on-invalid attribute type in xsd
  [FrameworkBundle] Fix PHP form templates on translatable attributes
  [VarDumper] Fix dumping by-ref variadics
  [Validator] add Indonesian translation
  fixed CS
  [config] Fix issue when key removed and left value only
  [HttpFoundation] Fix cookie to string conversion for raw cookies
  Fix misresolved parameters in debug:config on 3.2
  [Console] fixed BC issue with static closures
  [TwigBundle] Config is now a hard dependency
  [FrameworkBundle] framework.annotations default should be true only if doctrine/annotations is installed
  [Security] AbstractVoter method supportsAttribute gives false positive if attribute is zero (0)
2016-12-17 11:47:22 +01:00
Nicolas Grekas
b9a74f35ba Merge branch '3.1' into 3.2
* 3.1:
  [Security] Fix test
  [Validator] phpize default option values
  test for the Validator component to be present
  [Serializer] Fix MaxDepth annotation exceptions
  [DependencyInjection] Fix on-invalid attribute type in xsd
  [FrameworkBundle] Fix PHP form templates on translatable attributes
  [VarDumper] Fix dumping by-ref variadics
  [Validator] add Indonesian translation
  fixed CS
  [config] Fix issue when key removed and left value only
  [HttpFoundation] Fix cookie to string conversion for raw cookies
  [Console] fixed BC issue with static closures
  [Security] AbstractVoter method supportsAttribute gives false positive if attribute is zero (0)
2016-12-17 11:46:44 +01:00
Nicolas Grekas
f4b3b87ef7 Merge branch '2.8' into 3.1
* 2.8:
  [Security] Fix test
  [Validator] phpize default option values
  test for the Validator component to be present
  [DependencyInjection] Fix on-invalid attribute type in xsd
  [FrameworkBundle] Fix PHP form templates on translatable attributes
  [VarDumper] Fix dumping by-ref variadics
  [Validator] add Indonesian translation
  fixed CS
  [config] Fix issue when key removed and left value only
  [Console] fixed BC issue with static closures
  [Security] AbstractVoter method supportsAttribute gives false positive if attribute is zero (0)
2016-12-17 11:46:00 +01:00
Nicolas Grekas
55da229acb Merge branch '2.7' into 2.8
* 2.7:
  [Validator] phpize default option values
  test for the Validator component to be present
  [DependencyInjection] Fix on-invalid attribute type in xsd
  [FrameworkBundle] Fix PHP form templates on translatable attributes
  [VarDumper] Fix dumping by-ref variadics
2016-12-17 11:44:20 +01:00
Fabien Potencier
4a597bdb37 feature #20618 [DI] Make ContainerBuilder::resolveEnvPlaceholders() able to inline the values of referenced env vars. (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Make ContainerBuilder::resolveEnvPlaceholders() able to inline the values of referenced env vars.

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

Being able to resolve environment variables at compile time as a replacement for `SYMFONY__` special env vars, unlocking their deprecation (see #20100).

Commits
-------

713b081 [DI] Make ContainerBuilder::resolveEnvPlaceholders() able to inline the values of referenced env vars.
2016-12-17 09:53:28 +01:00
Fabien Potencier
2344c2204b bug #20934 [FrameworkBundle] Fix PHP form templates on translatable attributes (ro0NL)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Fix PHP form templates on translatable attributes

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/20365#issuecomment-267333293
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

Separated from #20365

Commits
-------

10806e0 [FrameworkBundle] Fix PHP form templates on translatable attributes
2016-12-17 08:43:35 +01:00
Christian Flothmann
1e67155225 don't load translator services if not required 2016-12-16 14:04:52 +01:00
Christian Flothmann
fb9b08396b test for the Validator component to be present 2016-12-16 14:02:12 +01:00
Roland Franssen
10806e056e [FrameworkBundle] Fix PHP form templates on translatable attributes 2016-12-15 14:04:46 +00:00
Fabien Potencier
8de22de869 bug #20749 [FrameworkBundle] Smarter default for framework.annotations (ogizanagi)
This PR was merged into the 3.2 branch.

Discussion
----------

[FrameworkBundle] Smarter default for framework.annotations

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | yesish (could be considered as a minor BC break)
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A

`framework.annotations` default should be true only if `doctrine/annotations` is installed.

Indeed, in https://github.com/symfony/symfony/pull/20097, the dependency on `doctrine/annotations` was removed from the framework bundle.
Thus, an application can break (not talking from one actually relying on annotations) as soon as it uses the framework bundle without the `framework.annotations` key explicitly set to `false` (I had the case in a fixture application in the testsuite of a package).

Commits
-------

e38be09 [FrameworkBundle] framework.annotations default should be true only if doctrine/annotations is installed
2016-12-14 09:14:24 +01:00
Robin Chalas
c88bc899d4
Fix misresolved parameters in debug:config on 3.2 2016-12-13 20:36:21 +01:00
Adam Prager
7c86e1609b [FrameworkBundle] Allow multiple transactions with the same name 2016-12-13 19:14:16 +01:00
Fabien Potencier
a3577eb5b0 Merge branch '3.2'
* 3.2:
  [Console] Review Application docblocks
  [Cache] Improve performances into foreach (PhpFilesAdapter)
  bumped Symfony version to 3.2.2
  updated VERSION for 3.2.1
  updated CHANGELOG for 3.2.1
  bumped Symfony version to 3.1.9
  updated VERSION for 3.1.8
  updated CHANGELOG for 3.1.8
  Add support for REDIS_URL environment variables.
  bumped Symfony version to 2.8.16
  updated VERSION for 2.8.15
  updated CHANGELOG for 2.8.15
  bumped Symfony version to 2.7.23
  updated VERSION for 2.7.22
  update CONTRIBUTORS for 2.7.22
  updated CHANGELOG for 2.7.22
  Update PHP CS Fixer config file
2016-12-13 16:32:21 +01:00
Robin van der Vleuten
4e6086f7db Add support for REDIS_URL environment variables. 2016-12-13 13:50:44 +01:00
Christian Flothmann
184f7ff125 replace DefinitionDecorator with ChildDefinition
The DefinitionDecorator class does not deal with decorated services. It
reflects a parent-child-relationship between definitions instead. To
avoid confusion, this commit deprecates the existing DefinitionDecorator
class and introduces a new ChildDefinition class as replacement.
2016-12-13 12:26:14 +01:00
Fabien Potencier
40280f203c Merge branch '3.2'
* 3.2:
  [WebProfilerBundle] Fix AJAX panel with fetch requests
  Don’t compile when Opcache is not enabled on CLI
  DateIntervalType: 'invert' should not inherit the 'required' option
  [Form] DateIntervalType: Do not try to translate choices
  [TwigBridge] fix constructor args check
  Allow simple-phpunit to be used with an HTTP proxy
  Minor fixes for 3.2
  Fix a web profiler form issue with fields added to the form after the form was built
  do not trigger deprecations for valid YAML
  Write an exception message in a one heading line
  [Workflow] Added missing docblock
  [Finder] Refine phpdoc about argument for NumberComparator
  Fixed max width from ajax request url element (td)
  Fix unresolved parameters from default bundle configs in debug:config
  [github] Tweak PR template
  [Serializer] Optimize max depth checking
2016-12-13 10:39:51 +01:00
Fabien Potencier
1943c26d47 Merge branch '3.1' into 3.2
* 3.1:
  Write an exception message in a one heading line
  [Finder] Refine phpdoc about argument for NumberComparator
  Fixed max width from ajax request url element (td)
  Fix unresolved parameters from default bundle configs in debug:config
  [github] Tweak PR template
  [Serializer] Optimize max depth checking
2016-12-13 10:39:43 +01:00
Fabien Potencier
ed73b0c629 Merge branch '2.8' into 3.1
* 2.8:
  Write an exception message in a one heading line
  [Finder] Refine phpdoc about argument for NumberComparator
  Fix unresolved parameters from default bundle configs in debug:config
  [github] Tweak PR template
2016-12-13 10:38:21 +01:00
Fabien Potencier
c9d08b61c3 Merge branch '2.7' into 2.8
* 2.7:
  Write an exception message in a one heading line
  [Finder] Refine phpdoc about argument for NumberComparator
  Fix unresolved parameters from default bundle configs in debug:config
  [github] Tweak PR template
2016-12-13 10:38:12 +01:00
Fabien Potencier
814177d79c fixed CS 2016-12-13 09:43:09 +01:00
Fabien Potencier
1cde01ddbd feature #20773 [FrameworkBundle] Added GlobalVariables::getToken() (HeahDude)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] Added GlobalVariables::getToken()

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony-docs/pull/7191 comments
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/7191

I propose this feature as bug fix in 3.2, since I don't use the PHP templating I forgot to add the method in the `FrameworkBundle`, to keep it align with the `TwigBridge` in https://github.com/symfony/symfony/pull/19991.

Is this acceptable or should it go in master?

Commits
-------

099b848 Added GlobalVariables::getToken()
2016-12-13 09:41:56 +01:00
Fabien Potencier
cd0bb3d528 bug #20714 [FrameworkBundle] Fix unresolved parameters from default configs in debug:config (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Fix unresolved parameters from default configs in debug:config

| 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

When using the `debug:config` command, if the dumped configuration is explicitly defined by the user, then parameters are properly resolved in the output. If it is not, and values come from the bundle default configuration directly, they are not.

Steps to reproduce:
- Checkout the symfony demo
- Run `debug:config twig`
- Look at the `debug` key, it is the `kernel.debug` parameter properly resolved: `true`
- Look at the `cache` key, it is not resolved: `'%kernel.cache_dir%/twig'`

This fixes it by resolving the configs once again after processing the configuration.
ping @weaverryan

Commits
-------

26f588a Fix unresolved parameters from default bundle configs in debug:config
2016-12-13 08:41:32 +01:00
Nicolas Grekas
d93024b6a5 minor #20870 Minor fixes for 3.2 (ogizanagi)
This PR was merged into the 3.2 branch.

Discussion
----------

Minor fixes for 3.2

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

This only fix minor issues in the codebase introduced in 3.2.

Refs:

- YamlEncoder 9366a7dc77

- File helper: d9a84990cf

- VarDumper ClassStub: 788f7e84b0

- Cache tag based invalidation 19764af74f

- CacheWarmer for Serializer: 810f4694af

- SymfonyStyle simplified test: 85e5060fa1

- Workflow Definition builder: ffaeba39fc

---

There are other issues in older branches, but I guess it's not worth it for them, as it'll only add more conflicts. But for 3.2, it should be feasible.

Commits
-------

7bdfc84 Minor fixes for 3.2
2016-12-12 12:53:05 +01:00
Maxime Steinhausser
7bdfc84ef8 Minor fixes for 3.2 2016-12-11 15:34:22 +01:00
Denis Brumann
660d79a186
Deprecates ClassCache-cache warmer. 2016-12-11 13:00:40 +01:00
Fabien Potencier
51bc35cc84 Merge branch '3.2'
* 3.2:
  [Routing] Mention minor BC break about UrlGenerator & query strings
  fixed composer.json
  fixed composer.json
  Skip test when iconv extension is missing
  Fix upgrade notes
  [Config] fix dev dependencies
  Fix bundle commands are not available via find()
2016-12-10 15:25:01 +01:00
Fabien Potencier
fef1546a7e Merge branch '3.1' into 3.2
* 3.1:
  Skip test when iconv extension is missing
  Fix bundle commands are not available via find()
2016-12-10 15:24:53 +01:00
Fabien Potencier
3ff118af87 Merge branch '2.8' into 3.1
* 2.8:
  Skip test when iconv extension is missing
  Fix bundle commands are not available via find()
2016-12-10 15:24:45 +01:00
Fabien Potencier
8f2ea7a5b0 Merge branch '2.7' into 2.8
* 2.7:
  Skip test when iconv extension is missing
  Fix bundle commands are not available via find()
2016-12-10 15:24:35 +01:00
Fabien Potencier
a9d92748b5 bug #20442 [FrameworkBundle] Bundle commands are not available via find() (julienfalque)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Bundle commands are not available via find()

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

The `Symfony\Bundle\FrameworkBundle\Console\Application::find()` method does not retrieve the bundle commands and only checks the ones that were added manually.

Commits
-------

dd69b88 Fix bundle commands are not available via find()
2016-12-10 15:19:05 +01:00
Robin Chalas
b71df3f295
[FrameworkBundle] Allow clearing private cache pools 2016-12-10 11:52:34 +01:00
Noah Heck
7a11f3ecf3 [FrameworkBundle] Add project directory default for installing assets 2016-12-09 08:07:39 -07:00
Nicolas Grekas
713b0813bc [DI] Make ContainerBuilder::resolveEnvPlaceholders() able to inline the values of referenced env vars. 2016-12-09 11:57:39 +01:00
Jules Pietri
099b8481f7 Added GlobalVariables::getToken() 2016-12-08 23:22:48 +01:00
Nicolas Grekas
726ad262ef Merge branch '3.2'
* 3.2: (51 commits)
  [FrameworkBundle] [Workflow] Fix service marking store configuration
  Fix merge
  [Validator] add class name to the cache key
  [Serializer] Remove AbstractObjectNormalizer::isAttributeToNormalize
  Throw less misleading exception when property access not found
  [Twig] Fix deprecations with Twig 1.29
  [FrameworkBundle] Fix validation cache warmer with failing or missing classes
  Fixed typo
  [FrameworkBundle] Removed the kernel.debug parameter from the cache pool namespace seed
  Fix email address
  fix the docblock in regard to the role argument
  [Bridge\Twig] Trigger deprecation when using FormExtension::$renderer
  Don't use the "app" global variable in the profiler
  [VarDumper] fix tests when xdebug is enabled
  Fix merge
  FIXED NON EXISTING TYPE DECLARATION
  [Form] Add failing test for data collector bug
  [Cache] Fix dumping SplDoublyLinkedList iter mode
  [Form] Fix FormDataCollector
  Ignore missing 'debug.file_link_formatter' service in Debug and Twig bundles
  ...
2016-12-08 16:31:48 +01:00
Nicolas Grekas
8e6023b882 bug #20688 [FrameworkBundle] Resolve env params in debug:config command (nicolas-grekas)
This PR was merged into the 3.2 branch.

Discussion
----------

[FrameworkBundle] Resolve env params in debug:config command

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

Displays e.g. `url: '%env(DATABASE_URL)%'`
instead of `url: env_DATABASE_URL_b188317b1d181eca5f0be35aefdae9c4`
when doing `bin/console debug:config doctrine`

Commits
-------

695d100 [FrameworkBundle] Resolve env params in debug:config command
2016-12-08 16:27:33 +01:00
Nicolas Grekas
a7b5080806 bug #20725 [HttpKernel] Fix annotation cache warmer with failing or missing classes (nicolas-grekas)
This PR was merged into the 3.2 branch.

Discussion
----------

[HttpKernel] Fix annotation cache warmer with failing or missing classes

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

Commits
-------

dcf9fbb [HttpKernel] Fix annotation cache warmer with failing or missing classes
2016-12-08 16:22:53 +01:00
Nicolas Grekas
2293b18c43 bug #20830 [FrameworkBundle] Fix validation cache warmer with failing or missing classes (nicolas-grekas)
This PR was merged into the 3.2 branch.

Discussion
----------

[FrameworkBundle] Fix validation cache warmer with failing or missing classes

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

Commits
-------

53234e9 [FrameworkBundle] Fix validation cache warmer with failing or missing classes
2016-12-08 16:21:32 +01:00
fduch
3289b10d9f [FrameworkBundle] [Workflow] Fix service marking store configuration 2016-12-08 16:19:07 +01:00
Nicolas Grekas
a28c522790 Merge branch '3.1' into 3.2
* 3.1: (28 commits)
  Fix merge
  [Validator] add class name to the cache key
  [Serializer] Remove AbstractObjectNormalizer::isAttributeToNormalize
  Throw less misleading exception when property access not found
  [Twig] Fix deprecations with Twig 1.29
  Fixed typo
  [FrameworkBundle] Removed the kernel.debug parameter from the cache pool namespace seed
  Fix email address
  fix the docblock in regard to the role argument
  Don't use the "app" global variable in the profiler
  [VarDumper] fix tests when xdebug is enabled
  Fix merge
  FIXED NON EXISTING TYPE DECLARATION
  [Cache] Fix dumping SplDoublyLinkedList iter mode
  [Console] fixed PHP7 Errors when not using Dispatcher
  Regression test for missing controller arguments (3.1)
  Regression test for missing controller arguments
  fix a test checking for a value
  [Form][DX] FileType "multiple" fixes
  fixed CS
  ...
2016-12-08 16:18:22 +01:00
Nicolas Grekas
53234e907a [FrameworkBundle] Fix validation cache warmer with failing or missing classes 2016-12-08 13:38:08 +01:00
Sander Toonen
8e1dac5507 [FrameworkBundle] Removed the kernel.debug parameter from the cache pool namespace seed 2016-12-07 14:49:48 +01:00
Maxime Steinhausser
e38be091ce [FrameworkBundle] framework.annotations default should be true only if doctrine/annotations is installed 2016-12-07 09:18:33 +01:00
Fabien Potencier
4033b602ff feature #20260 [DependencyInjection] Support autowiring for EventDispatcher/EventDispatcherInterface (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DependencyInjection] Support autowiring for EventDispatcher/EventDispatcherInterface

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

As it is a very common dependency. Currently it gives:

> [Symfony\Component\DependencyInjection\Exception\RuntimeException]
> Unable to autowire argument of type "Symfony\Component\EventDispatcher\EventDispatcherInterface" for the service "dummy". Multiple services exist for this interface (debug.event_dispatcher, debug.event_dispatcher.parent).

After this, the `TraceableEventDispatcher` will be injected in dev and the `ContainerAwareEventDispatcher` in prod, as when injecting `@event_dispatcher` explicitly.

ping @weaverryan

IMHO this could be treated as a an enhancement for the autowiring feature and be part of 3.2.

Commits
-------

5fd4733 Support autowiring for EventDispatcher/EventDispatcherInterface
2016-12-06 15:46:10 +01:00
Nicolas Grekas
fa36e1d377 [ClassLoader] Deprecate Apc/WinCache/Xcache class loaders 2016-12-06 11:57:32 +01:00
Nicolas Grekas
dcf9fbb18c [HttpKernel] Fix annotation cache warmer with failing or missing classes 2016-12-02 15:52:29 +01:00
Johan DESMYTER
dbf4850268 debug service with one line by tag 2016-12-02 13:03:32 +01:00
Robin Chalas
26f588a7b5 Fix unresolved parameters from default bundle configs in debug:config 2016-12-01 15:23:59 +01:00
Nicolas Grekas
695d10071b [FrameworkBundle] Resolve env params in debug:config command 2016-11-30 16:21:24 +01:00
Nicolas Grekas
a931002ca2 [FrameworkBundle] Forbid env parameters in routing configuration 2016-11-29 18:09:44 +01:00
Nicolas Grekas
2cdc6d2a07 Merge branch '3.2'
* 3.2:
  [Config] ConfigCache::isFresh() should return false on __PHP_Incomplete_Class
  [VarDumper] Use default color for ellipsed namespaces/paths
  mark alias as private during creation
  [Serializer] Remove unused GetSetMethodNormalizer::denormalize
2016-11-29 12:12:53 +01:00
Nicolas Grekas
bd5af67f08 Merge branch '3.1' into 3.2
* 3.1:
  [Config] ConfigCache::isFresh() should return false on __PHP_Incomplete_Class
  mark alias as private during creation
  [Serializer] Remove unused GetSetMethodNormalizer::denormalize
2016-11-29 12:12:32 +01:00
Christian Flothmann
828c76154f mark alias as private during creation 2016-11-28 07:44:24 +01:00
Fabien Potencier
ea7e2452bd Merge branch '3.2'
* 3.2:
  Fix tests that do not trigger any depreciation
  [HttpFoundation] Fix test ensuring isMethodSafe() checks cacheable
  [Cache] Mark FilesystemAdapterTrait as internal
  [FrameworkBundle] Dont rely on any parent definition for "cache.annotations"
2016-11-26 20:22:04 -08:00
Fabien Potencier
24c40e0d22 bug #20601 [FrameworkBundle] Don't rely on any parent definition for "cache.annotations" (nicolas-grekas)
This PR was merged into the 3.2 branch.

Discussion
----------

[FrameworkBundle] Don't rely on any parent definition for "cache.annotations"

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

Instead of a generic approach that failed in #20537, let's focus on the `cache.annotations` service, which is the one that needs special care because it can be required while the container is being built. See e.g.:
- #20234
- http://stackoverflow.com/questions/39625863/vichuploadbundle-inb-symfony-3-cant-load-cache-annotations-service/40626277
- https://github.com/schmittjoh/JMSDiExtraBundle/issues/262

When the service is required at build time, we can't provide it a logger, because no logger service is ready at that time. Still, that doesn't prevent the service from working. The late `CachePoolClearerPass` wires the logger for later instantiations so that `cache.annotations` has a properly configured logger *for the next requests*.

Commits
-------

f62b820 [FrameworkBundle] Dont rely on any parent definition for "cache.annotations"
2016-11-26 13:21:39 -08:00
Nicolas Grekas
13265aece3 Merge branch '3.2'
* 3.2:
  [Routing] Fail properly when a route parameter name cannot be used as a PCRE subpattern name
  [FrameworkBundle] Improve performance of ControllerNameParser
  Update documentation link to the component
  [HttpFoundation] Add links to RFC-7231
  [DI] Initialize properties before method calls
  [Bridge/Doctrine] Use cache.prefix.seed parameter for generating cache namespace
  Tag missing internals
  Add missing example for 'path' argument in debug:config
  [WebProfilerBundle] Dont use request attributes in RouterController
  Fix complete config tests
2016-11-25 13:33:00 +01:00
Nicolas Grekas
5461c1ed53 Merge branch '3.1' into 3.2
* 3.1:
  [Routing] Fail properly when a route parameter name cannot be used as a PCRE subpattern name
  [FrameworkBundle] Improve performance of ControllerNameParser
  Update documentation link to the component
  [HttpFoundation] Add links to RFC-7231
  [DI] Initialize properties before method calls
  Tag missing internals
  [WebProfilerBundle] Dont use request attributes in RouterController
  Fix complete config tests
2016-11-25 13:32:42 +01:00
Nicolas Grekas
966d45f889 Merge branch '2.8' into 3.1
* 2.8:
  [Routing] Fail properly when a route parameter name cannot be used as a PCRE subpattern name
  [FrameworkBundle] Improve performance of ControllerNameParser
  Update documentation link to the component
  [HttpFoundation] Add links to RFC-7231
  [DI] Initialize properties before method calls
  Tag missing internals
  [WebProfilerBundle] Dont use request attributes in RouterController
  Fix complete config tests
2016-11-25 13:27:14 +01:00
Nicolas Grekas
4d04c40ae3 Merge branch '2.7' into 2.8
* 2.7:
  [Routing] Fail properly when a route parameter name cannot be used as a PCRE subpattern name
  [FrameworkBundle] Improve performance of ControllerNameParser
  Update documentation link to the component
  [HttpFoundation] Add links to RFC-7231
  [DI] Initialize properties before method calls
  Tag missing internals
  [WebProfilerBundle] Dont use request attributes in RouterController
  Fix complete config tests
2016-11-25 13:26:42 +01:00
Nicolas Grekas
e62b602dc4 bug #20374 [FrameworkBundle] Improve performance of ControllerNameParser (enumag)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Improve performance of ControllerNameParser

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

Today I was searching for bottlenecks in my application using Blackfire. And among other things I found one in Symfony. Blackfire showed that `Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser::findAlternative()` was called almost 300 times which took 28 miliseconds.

It turns out that `Symfony\Bundle\FrameworkBundle\Routing\DelegatingLoader::load()` is calling `ControllerNameParser::parse()` without actually needing to do so because `$controller` is in the class::method notation already. `ControllerNameParser` threw an exception, DelegatingLoader caught and ignored it - that's ok. The problem is that generating the exception message took a lot of time because findAlternative is slow. In my case it called the levenshtein function over 5000 times which was completely useless because the exception is ignored anyway.

Commits
-------

cf333f3 [FrameworkBundle] Improve performance of ControllerNameParser
2016-11-25 13:12:15 +01:00
Jáchym Toušek
cf333f32c5 [FrameworkBundle] Improve performance of ControllerNameParser 2016-11-25 12:34:09 +01:00
Nicolas Grekas
b1e87714ab minor #20625 [FrameworkBundle] Add missing example for 'path' argument in debug:config (chalasr)
This PR was merged into the 3.2 branch.

Discussion
----------

[FrameworkBundle] Add missing example for 'path' argument in debug:config

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| 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 argument has been introduced in #18940 .

Commits
-------

c6b7aeb Add missing example for 'path' argument in debug:config
2016-11-25 11:03:22 +01:00
Nicolas Grekas
5e19c51bbd bug #20616 [Bridge/Doctrine] Use cache.prefix.seed parameter for generating cache namespace (nicolas-grekas)
This PR was merged into the 3.2 branch.

Discussion
----------

[Bridge/Doctrine] Use cache.prefix.seed parameter for generating cache namespace

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

Exactly the same issue as in #20610, but for Doctrine ORM's cache:
> That's a design issue: using root_dir as discriminant doesn't work with blue/green deployment strategies, and doesn't prevent collision when different apps are deployed in the same path while sharing the same cache backend.

Commits
-------

5e3cbec [Bridge/Doctrine] Use cache.prefix.seed parameter for generating cache namespace
2016-11-25 10:51:05 +01:00
Nicolas Grekas
5e3cbecd54 [Bridge/Doctrine] Use cache.prefix.seed parameter for generating cache namespace 2016-11-25 10:37:59 +01:00
Fabien Potencier
d23fabfdc7 Merge branch '3.2'
* 3.2:
  [Workflow] Fixed graphviz dumper for state machine
  [HttpKernel] Fix exception when serializing request attributes
2016-11-24 13:23:15 -08:00
Grégoire Pineau
330c069604 [Workflow] Fixed graphviz dumper for state machine 2016-11-24 13:22:36 -08:00
Robin Chalas
c6b7aeb439
Add missing example for 'path' argument in debug:config 2016-11-24 21:38:42 +01:00
Nicolas Grekas
f62b82055b [FrameworkBundle] Dont rely on any parent definition for "cache.annotations" 2016-11-24 12:47:42 +01:00
Fabien Potencier
df7f83ca6d Merge branch '3.2'
* 3.2: (24 commits)
  [Filesystem] Remove extra argv in dumpFile() tests
  [DI] minor FileLoaders tests update
  [FrameworkBundle] Add framework.cache.prefix_seed for predictible cache key prefixes
  [SecurityBundle] Remove FirewallContext mandatory FirewallConfig argument deprecation
  [HttpKernel] Revert BC breaking change of Request::isMethodSafe()
  [DI] Allow null as default env value
  [WebProfilerBundle] Fix deprecated uses of profiler_dump
  [SecurityBundle] Fix FirewallConfig nullable arguments
  [FrameworkBundle] Avoid warming up the validator cache for non-existent classes
  [DOMCrawler] Bug fixed
  [FrameworkBundle] Mark cache.default_*_provider services private
  [Process] Do feat test before enabling TTY mode
  bumped Symfony version to 3.1.8
  updated VERSION for 3.1.7
  updated CHANGELOG for 3.1.7
  bumped Symfony version to 2.8.15
  updated VERSION for 2.8.14
  updated CHANGELOG for 2.8.14
  bumped Symfony version to 2.7.22
  updated VERSION for 2.7.21
  ...
2016-11-23 16:46:49 -08:00
Fabien Potencier
02b1e75757 Merge branch '3.1' into 3.2
* 3.1:
  [Filesystem] Remove extra argv in dumpFile() tests
  [DI] minor FileLoaders tests update
  [HttpKernel] Revert BC breaking change of Request::isMethodSafe()
  [DOMCrawler] Bug fixed
  [FrameworkBundle] Mark cache.default_*_provider services private
  [Process] Do feat test before enabling TTY mode
  bumped Symfony version to 3.1.8
  updated VERSION for 3.1.7
  updated CHANGELOG for 3.1.7
  bumped Symfony version to 2.8.15
  updated VERSION for 2.8.14
  updated CHANGELOG for 2.8.14
  bumped Symfony version to 2.7.22
  updated VERSION for 2.7.21
  update CONTRIBUTORS for 2.7.21
  updated CHANGELOG for 2.7.21
  Fix annotation type for $context
  [Doctrine][Form] support large integers
2016-11-23 16:46:43 -08:00
Nicolas Grekas
82952bd43f [FrameworkBundle] Add framework.cache.prefix_seed for predictible cache key prefixes 2016-11-23 19:16:07 +01:00
Jordi Boggiano
cb12f2200d [FrameworkBundle] Avoid warming up the validator cache for non-existent classes 2016-11-21 16:13:32 -08:00
Nicolas Grekas
09adfda57e [FrameworkBundle] Mark cache.default_*_provider services private 2016-11-21 11:06:34 +01:00
Fabien Potencier
a4edafbd7d updated version to 3.3 2016-11-19 12:35:20 -08:00
Robin Chalas
5fd47332b7
Support autowiring for EventDispatcher/EventDispatcherInterface
CS Fixes
2016-11-16 19:46:34 +01:00
Christian Flothmann
b1fb2a4a0a [Workflow] improve workflow config validation 2016-11-16 09:44:50 +01:00
Christian Flothmann
94a7e7ea88 [Workflow] streamline XML schema definition 2016-11-15 15:59:09 +01:00
Wouter J
6381caa0e2 Added XML support for Workflow configuration 2016-11-15 15:47:56 +01:00
Jules Pietri
91237c903b [FrameworkBundle] [Workflow] Fixed initial place config 2016-11-15 15:03:49 +01:00
Grégoire Pineau
e4e638056b minor #20492 [Workflow] Clarify validator API + fixed unknown "scalar" marking store (ro0NL)
This PR was squashed before being merged into the 3.2-dev branch (closes #20492).

Discussion
----------

[Workflow] Clarify validator API + fixed unknown "scalar" marking store

| Q             | A
| ------------- | ---
| Branch?       | "master"
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no, if merged in 3.2
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | comma-separated list of tickets fixed by the PR, if any
| License       | MIT
| Doc PR        | reference to the documentation PR, if any

See also https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Compiler/ValidateWorkflowsPass.php#L48

Commits
-------

a9cb38b [Workflow] Clarify validator API + fixed unknown "scalar" marking store
2016-11-15 10:46:40 +01:00
Roland Franssen
a9cb38bee3 [Workflow] Clarify validator API + fixed unknown "scalar" marking store 2016-11-15 10:46:39 +01:00
Fabien Potencier
b8cae3fa94 Merge branch '3.1'
* 3.1:
  [TwigBridge] fix tests
  Tag the FormFieldRegistry as being internal
  [Form] Fix Date\TimeType marked as invalid on request with single_text and zero seconds
  [FrameworkBundle] Register the ArrayDenormalizer
  [Serializer] Fix DataUriNormalizer's regex
  [Validator] Added missing swedish translation
  [TranslationDebug] workaround for getFallbackLocales.
  [Translation] fixed nested fallback catalogue  using multiple locales.
  fixed phpdoc
  [Command] Fixed method comments as phpDoc syntax
  Added single quotes for upgrade guides.
2016-11-14 08:20:13 -08:00
Fabien Potencier
61fea5a3f1 Merge branch '2.8' into 3.1
* 2.8:
  [TwigBridge] fix tests
  Tag the FormFieldRegistry as being internal
  [Form] Fix Date\TimeType marked as invalid on request with single_text and zero seconds
  [Validator] Added missing swedish translation
  [TranslationDebug] workaround for getFallbackLocales.
  [Translation] fixed nested fallback catalogue  using multiple locales.
  fixed phpdoc
  [Command] Fixed method comments as phpDoc syntax
  Added single quotes for upgrade guides.
2016-11-14 08:20:02 -08:00
Fabien Potencier
2cf474e2eb Merge branch '2.7' into 2.8
* 2.7:
  [TwigBridge] fix tests
  Tag the FormFieldRegistry as being internal
  [Form] Fix Date\TimeType marked as invalid on request with single_text and zero seconds
  [Validator] Added missing swedish translation
  [TranslationDebug] workaround for getFallbackLocales.
  [Translation] fixed nested fallback catalogue  using multiple locales.
  fixed phpdoc
  [Command] Fixed method comments as phpDoc syntax
2016-11-14 08:15:57 -08:00
Fabien Potencier
62533f322e bug #20432 [FrameworkBundle] Add --no-prefix option to translation:update (chalasr)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[FrameworkBundle] Add --no-prefix option to translation:update

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/20044
| License       | MIT
| Doc PR        | n/a

This adds an option `--no-prefix` to the `translation:update` command, allowing to use an empty string as prefix. I guess it should be treated as a feature as it adds a new option to the command, but it indeed fixes the bug reported in #20044 (yeah, really this time).

Commits
-------

b5a1584 [FrameworkBundle] Add --no-prefix option to translation:update
2016-11-11 07:53:50 -08:00
Kévin Dunglas
2eedafc231 [FrameworkBundle] Register the ArrayDenormalizer 2016-11-11 07:48:09 -08:00
Tobias Nyholm
caa3d6ffb3 [Workflow] Removed definition builder 2016-11-10 16:20:19 +01:00
Abdellatif Ait boudad
31deea1d3d [TranslationDebug] workaround for getFallbackLocales. 2016-11-09 20:23:10 +00:00
Nicolas Grekas
a81b048127 Merge branch '3.1'
* 3.1:
  [Cache] Make directory hashing case insensitive
2016-11-09 19:19:25 +01:00
Grégoire Pineau
08464c9f2c [Workfow] Rename current MarkingStore
* ScalarMarkingStore -> SingleStateMarkingStore
* PropertyAccessorMarkingStore -> MultipleStateMarkingStore

And I also made optionnal the `marking_store` config, to let the
componant choose the best marking store depending on the type
(state_machine or workflow).
2016-11-09 16:22:39 +01:00
Tobias Nyholm
ffaeba39fc [Workflow] Added Definition builder 2016-11-09 16:20:37 +01:00
Nicolas Grekas
6d4a658ab7 [Cache] Make directory hashing case insensitive 2016-11-09 15:09:05 +01:00
HeahDude
4fcce4c465 [FrameworkBundle] Fixed WorkflowCommand to support state machines 2016-11-09 13:57:17 +01:00
Julien Falque
dd69b8875d
Fix bundle commands are not available via find() 2016-11-07 20:38:43 +01:00
Robin Chalas
b5a1584c52
[FrameworkBundle] Add --no-prefix option to translation:update
Remove ending dot from option description for consistency
2016-11-07 20:37:55 +01:00
Fabien Potencier
b376d92320 Merge branch '3.1'
* 3.1:
  prefer getSourceContext() over getSource()
  [HttpFoundation] Avoid implicit null to array conversion in request matcher
  Revert "bug #20184 [FrameworkBundle] Convert null prefix to an empty string in translation:update (chalasr)"
  Update UPGRADE-2.7.md
2016-11-07 11:34:59 -08:00
Fabien Potencier
790e7dd74d Merge branch '2.8' into 3.1
* 2.8:
  prefer getSourceContext() over getSource()
  [HttpFoundation] Avoid implicit null to array conversion in request matcher
  Revert "bug #20184 [FrameworkBundle] Convert null prefix to an empty string in translation:update (chalasr)"
  Update UPGRADE-2.7.md
2016-11-07 11:34:53 -08:00
Fabien Potencier
570bebdcb3 Merge branch '2.7' into 2.8
* 2.7:
  prefer getSourceContext() over getSource()
  [HttpFoundation] Avoid implicit null to array conversion in request matcher
  Revert "bug #20184 [FrameworkBundle] Convert null prefix to an empty string in translation:update (chalasr)"
  Update UPGRADE-2.7.md
2016-11-07 11:34:39 -08:00
Grégoire Pineau
9e491982cf [Workflow] Made the code more robbust and ease on-boarding 2016-11-07 20:11:39 +01:00
Tobias Nyholm
bdd3f95da6 Make the Workflow support State Machines 2016-11-07 20:11:39 +01:00
Robin Chalas
b2fa7c4f07 Revert "bug #20184 [FrameworkBundle] Convert null prefix to an empty string in translation:update (chalasr)"
This reverts commit 3f650f864c, reversing
changes made to 962248dbd9.
2016-11-07 13:32:19 +01:00
Nicolas Grekas
7572a53b84 [Bridge\Monolog][FrameworkBundle] Add & wire a DebugProcessor 2016-11-05 10:30:35 +01:00
Nicolas Grekas
7e766dae4a erge branch '3.1'
* 3.1:
  Remove trailing space
  CS fixes
  Remove trailing space
  CS: apply rules
  [Yaml] Clean some messages + add test case
  [Console] simplified code
  [Form] Fix UrlType transforms valid protocols
  [SecurityBundle] Changed encoder configuration example to bcrypt
2016-11-03 09:11:03 +01:00
Nicolas Grekas
63a626e4c8 Merge branch '2.8' into 3.1
* 2.8:
  CS fixes
  Remove trailing space
  CS: apply rules
  [Yaml] Clean some messages + add test case
  [Console] simplified code
  [Form] Fix UrlType transforms valid protocols
  [SecurityBundle] Changed encoder configuration example to bcrypt
2016-11-03 09:04:31 +01:00
Nicolas Grekas
37956db606 Merge branch '2.7' into 2.8
* 2.7:
  CS fixes
  Remove trailing space
  CS: apply rules
  [Yaml] Clean some messages + add test case
  [Form] Fix UrlType transforms valid protocols
  [SecurityBundle] Changed encoder configuration example to bcrypt
2016-11-03 08:52:58 +01:00
Nicolas Grekas
0aca495522 minor #20364 CS: apply rules (keradus)
This PR was squashed before being merged into the 2.7 branch (closes #20364).

Discussion
----------

CS: apply rules

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

Commits
-------

22d4e15 CS: apply rules
2016-11-03 08:44:55 +01:00
Dariusz Ruminski
22d4e15634 CS: apply rules 2016-11-03 08:44:53 +01:00
Nicolas Grekas
87ef7235be Merge branch '3.1'
* 3.1:
  [PhpUnitBridge] Fix undefined variable
  Compatibility with Twig 1.27
  Remove extra line in doc-block comment
  [VarDumper] Fix dumping Twig source in stack traces
  Enhance GAE compat by removing some realpath()
  [DependencyInjection] Remove old code in XML loader
  bumped Symfony version to 3.1.7
  updated VERSION for 3.1.6
  updated CHANGELOG for 3.1.6
  bumped Symfony version to 2.8.14
  updated VERSION for 2.8.13
  updated CHANGELOG for 2.8.13
  bumped Symfony version to 2.7.21
  updated VERSION for 2.7.20
  update CONTRIBUTORS for 2.7.20
  updated CHANGELOG for 2.7.20
  [SecurityBundle] Fix twig-bridge lowest dep
2016-10-28 10:25:06 +02:00
Nicolas Grekas
b77d6d90c5 Merge branch '2.8' into 3.1
* 2.8:
  Compatibility with Twig 1.27
  [VarDumper] Fix dumping Twig source in stack traces
  Enhance GAE compat by removing some realpath()
  bumped Symfony version to 2.8.14
  updated VERSION for 2.8.13
  updated CHANGELOG for 2.8.13
  bumped Symfony version to 2.7.21
  updated VERSION for 2.7.20
  update CONTRIBUTORS for 2.7.20
  updated CHANGELOG for 2.7.20
  [SecurityBundle] Fix twig-bridge lowest dep
2016-10-28 10:18:15 +02:00
Nicolas Grekas
d12f26992b Merge branch '2.7' into 2.8
* 2.7:
  Compatibility with Twig 1.27
  Enhance GAE compat by removing some realpath()
  bumped Symfony version to 2.7.21
  updated VERSION for 2.7.20
  update CONTRIBUTORS for 2.7.20
  updated CHANGELOG for 2.7.20
  [SecurityBundle] Fix twig-bridge lowest dep
2016-10-28 10:10:49 +02:00
Nicolas Grekas
f2f232d599 Enhance GAE compat by removing some realpath() 2016-10-27 11:13:40 +02:00
Jérémy Romey
ba6bccabfe Added a default ide file link web view 2016-10-25 15:27:26 +02:00
Fabien Potencier
728034c44d Merge branch '3.1'
* 3.1:
  [TwigBundle] fixed usage of getSource in tests
  Trim constant values in XmlFileLoader
  move test to the HttpKernel component
  [TwigBridge] fixed Twig_Source required argument
  [HttpKernel] Fix a regression in the RequestDataCollector
  [HttpKernel] Refactor a RequestDataCollector test case to use a data provider
2016-10-22 18:13:47 -07:00
Fabien Potencier
d1e0ba973c Merge branch '2.8' into 3.1
* 2.8:
  [TwigBundle] fixed usage of getSource in tests
  Trim constant values in XmlFileLoader
  move test to the HttpKernel component
  [TwigBridge] fixed Twig_Source required argument
2016-10-22 18:13:38 -07:00
Fabien Potencier
5dfaf584fb Merge branch '2.7' into 2.8
* 2.7:
  [TwigBundle] fixed usage of getSource in tests
  Trim constant values in XmlFileLoader
  move test to the HttpKernel component
  [TwigBridge] fixed Twig_Source required argument
2016-10-22 18:13:14 -07:00
Christian Flothmann
c9ca322825 move test to the HttpKernel component 2016-10-22 11:18:43 +02:00
Nicolas Grekas
22f00a20ba Merge branch '3.1'
* 3.1:
  [2.8][PhpUnitBridge] Drop ErrorAssert in favor of @expectedDeprecation
  [3.1][PhpUnitBridge] Drop ErrorAssert in favor of @expectedDeprecation
2016-10-21 23:10:51 +02:00
Nicolas Grekas
5735255467 [3.1][PhpUnitBridge] Drop ErrorAssert in favor of @expectedDeprecation 2016-10-21 22:36:24 +02:00
Fabien Potencier
de4a650d8c Merge branch '3.1'
* 3.1:
  [TwigBridge] removed deprecations added in Twig 1.27
  PHP CS Fixer: use php_unit_dedicate_assert
  3.0 Upgrade Guide: Added details describing how to pass data to a form through the options resolver
  fixed Filesystem:makePathRelative and added 2 more testcases
  no 304 response if method is not cacheable
  move tags from decorated to decorating service
2016-10-17 21:30:21 -07:00
Fabien Potencier
f07bf03667 Merge branch '2.8' into 3.1
* 2.8:
  [TwigBridge] removed deprecations added in Twig 1.27
  PHP CS Fixer: use php_unit_dedicate_assert
  3.0 Upgrade Guide: Added details describing how to pass data to a form through the options resolver
  fixed Filesystem:makePathRelative and added 2 more testcases
  no 304 response if method is not cacheable
  move tags from decorated to decorating service
2016-10-17 21:30:12 -07:00
Fabien Potencier
ee8203a599 Merge branch '2.7' into 2.8
* 2.7:
  [TwigBridge] removed deprecations added in Twig 1.27
  PHP CS Fixer: use php_unit_dedicate_assert
  fixed Filesystem:makePathRelative and added 2 more testcases
  no 304 response if method is not cacheable
  move tags from decorated to decorating service
2016-10-17 21:28:30 -07:00
Dariusz Ruminski
b0df3a7eb9 PHP CS Fixer: use php_unit_dedicate_assert 2016-10-16 22:09:53 +02:00
Ryan Weaver
da7daee407 Removing the Controller::getUser() deprecation 2016-10-14 19:46:34 -04:00
Nicolas Grekas
f065095db7 Merge branch '3.1'
* 3.1:
  [travis] Test on PHP 7.1
  simplified code
  Remove unused variable
  3.0 Upgrade Guide: Added Table of Contents
  [HttpFoundation] add missing upgrade entry
  [FrameworkBundle] Convert null prefix to an empty string in translation:update command
  Improved the deprecation messages for service aliases
  [Serializer] minor: Remove an extra space in a YamlFileLoader error
  [HttpKernel] Clean ArgumentMetadataFactory::getType()
  [PropertyInfo] Fix edge cases in ReflectionExtractor
2016-10-13 08:29:04 +02:00
Nicolas Grekas
6d329d99fd Merge branch '2.8' into 3.1
* 2.8:
  [travis] Test on PHP 7.1
  simplified code
  Remove unused variable
  [FrameworkBundle] Convert null prefix to an empty string in translation:update command
  [PropertyInfo] Fix edge cases in ReflectionExtractor
2016-10-13 08:28:43 +02:00
Nicolas Grekas
7108c375a2 Merge branch '2.7' into 2.8
* 2.7:
  [travis] Test on PHP 7.1
  [FrameworkBundle] Convert null prefix to an empty string in translation:update command
2016-10-13 08:28:24 +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
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
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
Christian Flothmann
32451b1a09 add missing use statement 2016-10-05 18:08:03 +02:00
Nicolas Grekas
9a2bc59205 Merge branch '3.1'
* 3.1:
  Fix event annotation for arguments resolving event
  [HttpKernel] Fix nullable types handling
  [FrameworkBundle] Alter container class instead of kernel name in cache:clear command
  [VarDumper] Fix ReflectionNamedType->getName() detection
  [Console] Fix validation of null values using SymfonyStyle::ask()
  [Validator] Add Czech and Slovak translations for BIC
  [Console] Escape default value and question in SymfonyStyle::ask()
2016-10-05 10:12:34 +02:00
Nicolas Grekas
f89789f49b Merge branch '2.8' into 3.1
* 2.8:
  [FrameworkBundle] Alter container class instead of kernel name in cache:clear command
  [VarDumper] Fix ReflectionNamedType->getName() detection
  [Console] Fix validation of null values using SymfonyStyle::ask()
  [Validator] Add Czech and Slovak translations for BIC
  [Console] Escape default value and question in SymfonyStyle::ask()
2016-10-05 10:09:31 +02:00
Nicolas Grekas
ed8ccd1689 Merge branch '2.7' into 2.8
* 2.7:
  [FrameworkBundle] Alter container class instead of kernel name in cache:clear command
  [Console] Fix validation of null values using SymfonyStyle::ask()
  [Console] Escape default value and question in SymfonyStyle::ask()
2016-10-05 10:09:05 +02:00
Fabien Potencier
63308cd492 minor #20101 Simplified link-to-source mapping definitions in debug.file_link_format (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

Simplified link-to-source mapping definitions in debug.file_link_format

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #19950
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/7019

Having to json_encode here (or any other kind of encoding) is really tedious to deal with: it makes it hard to have things working quickly. `%f` and `%l` aren't encoded anyway, so let's use very unlikely chars as separators here also instead.

Commits
-------

27df38e Simplified link-to-source mapping definitions in debug.file_link_format
2016-10-04 19:32:40 -07:00
Nicolas Grekas
73c96939cd [FrameworkBundle] Alter container class instead of kernel name in cache:clear command 2016-10-04 16:32:03 +02:00
Fabien Potencier
53d2bdee76 Merge branch '2.8' into 3.1
* 2.8:
  Use "more entropy" option for uniqid()
  reset constraint options
  added checks for public services on compiler passes that use service id and not references
2016-10-03 08:50:10 -07:00
Fabien Potencier
8de92ab32d fixed Twig version 2016-10-01 08:45:01 -07:00
Fabien Potencier
b14c8e750b Merge branch '2.7' into 2.8
* 2.7:
  added checks for public services on compiler passes that use service id and not references
2016-10-01 08:39:05 -07:00
Fabien Potencier
996c1ee3cb added checks for public services on compiler passes that use service id and not references 2016-10-01 08:38:16 -07:00
Fabien Potencier
ee114d64f9 bug #20116 fixed AddConstraintValidatorsPass config (fabpot)
This PR was merged into the 3.2-dev branch.

Discussion
----------

fixed AddConstraintValidatorsPass config

| 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

Commits
-------

65131e2 added checks for public services on compiler passes that use service id and not references
2016-10-01 08:24:54 -07:00
Fabien Potencier
65131e2cbf added checks for public services on compiler passes that use service id and not references 2016-10-01 08:06:30 -07:00
Fabien Potencier
df3a485a86 reverted unneeded code 2016-09-30 11:45:21 -07:00
Fabien Potencier
8da0c5ada7 feature #20097 [FrameworkBundle] removed the Doctrine Annotations lib dependency on FrameworkBundle (fabpot)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[FrameworkBundle] removed the Doctrine Annotations lib dependency on FrameworkBundle

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | yes (fixing this is easy by adding doctrine/annotations explicitly)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #15748 partially
| License       | MIT
| Doc PR        | n/a

Another PR to reduce the number of required dependencies on FrameworkBundle. This PR removes the Doctrine annotations library from the list.

Commits
-------

c2d8356 [FrameworkBundle] removed the Doctrine Annotations lib dependency on FrameworkBundle
2016-09-30 11:37:17 -07:00
Fabien Potencier
c2d8356cb6 [FrameworkBundle] removed the Doctrine Annotations lib dependency on FrameworkBundle 2016-09-30 09:58:09 -07:00
Martin Hasoň
450c37cb49 [FrameworkBundle] Add phpstorm ide 2016-09-30 14:10:15 +02:00
Nicolas Grekas
27df38e2f3 Simplified link-to-source mapping definitions in debug.file_link_format 2016-09-30 11:45:11 +01:00
Fabien Potencier
469818cceb feature #20075 [FrameworkBundle] removed the Security Core and Security CSRF component dependencies on FrameworkBundle (fabpot)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[FrameworkBundle] removed the Security Core and Security CSRF component dependencies on FrameworkBundle

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no (except for people using FrameworkBundle without requiring symfony/symfony which should be pretty rare; and fixing this is easy by adding symfony/security-core and symfony/security-csrf explicitly)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #15748 partially
| License       | MIT
| Doc PR        | n/a

Another PR to reduce the number of required dependencies on FrameworkBundle. This PR removes the Security Core and CSRF components from the list.

Commits
-------

d703784 [FrameworkBundle] removed the Security Core and Security CSRF component dependencies on FrameworkBundle
2016-09-28 10:27:44 -07:00
Fabien Potencier
0e4523fc31 feature #20072 [FrameworkBundle] removed the Templating component dependency on FrameworkBundle (fabpot)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[FrameworkBundle] removed the Templating component dependency on FrameworkBundle

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no (except for people using FrameworkBundle without requiring symfony/symfony which should be pretty rare; and fixing this is easy by adding symfony/templating explicitly)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #15748 partially
| License       | MIT
| Doc PR        | n/a

Another PR to reduce the number of required dependencies on FrameworkBundle. This PR removes the Templating component from the list.

I made most of the work in previous version, so this change is really just about adding a good error message when templating is not enabled. For the record, this is also in the path of making possible to use Symfony with Twig without using the Templating component indirection (I think that this is in fact the last step).

Commits
-------

b3de62f [FrameworkBundle] removed the Templating component dependency on FrameworkBundle
2016-09-28 10:25:38 -07:00
Fabien Potencier
d703784d1f [FrameworkBundle] removed the Security Core and Security CSRF component dependencies on FrameworkBundle 2016-09-28 10:11:47 -07:00
Fabien Potencier
b3de62f0b3 [FrameworkBundle] removed the Templating component dependency on FrameworkBundle 2016-09-28 08:53:44 -07:00
Fabien Potencier
a496a2a1ad [FrameworkBundle] removed the Translation component dependency on FrameworkBundle 2016-09-28 08:31:25 -07:00
Fabien Potencier
6acf54f26b bug #20066 [FrameworkBundle] fix yaml:lint when yaml is not installed along side framework-bundle (fabpot)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[FrameworkBundle] fix yaml:lint when yaml is not installed along side framework-bundle

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

YAML is not an explicit dependency of FrameworkBundle. If it is not installed, the console is broken as the yaml:lint commands tries to extends the one in the YAML component. This bug only exists in master as this refactoring happened in 3.2

Commits
-------

b1c5a68 [FrameworkBundle] fixed yaml:lint when yaml is not installed along side framwork-bundle
2016-09-28 07:37:20 -07:00
Fabien Potencier
b1c5a686c8 [FrameworkBundle] fixed yaml:lint when yaml is not installed along side framwork-bundle 2016-09-28 07:20:56 -07:00
Fabien Potencier
1dd4e21fad [FrameworkBundle] removed the Asset component dependency on FrameworkBundle 2016-09-28 06:51:58 -07:00
Fabien Potencier
2318b60984 Merge branch '3.1'
* 3.1:
  expectedException expects FQCN
  Fixed expectedException annotations
  [Cache] Fix password used to make the redis connection.
  Security and validators messages translation to Latvian
  [Form] FormView->isRendered() remove dead code and simplify the flow
  Fixed issue with legacy find() method not working as expected
2016-09-24 08:57:00 -07:00
Fabien Potencier
90f6b30f81 Merge branch '2.8' into 3.1
* 2.8:
  expectedException expects FQCN
  Fixed expectedException annotations
  Security and validators messages translation to Latvian
  [Form] FormView->isRendered() remove dead code and simplify the flow
2016-09-24 08:56:48 -07:00
Fabien Potencier
b049d098d3 Merge branch '2.7' into 2.8
* 2.7:
  Fixed expectedException annotations
  Security and validators messages translation to Latvian
  [Form] FormView->isRendered() remove dead code and simplify the flow
2016-09-24 08:56:40 -07:00
Roland Franssen
b074a7156a Fixed expectedException annotations 2016-09-23 11:13:36 -07:00
Fabien Potencier
7f1f23257d feature #20012 [Translation] added Base Exception for the component. (aitboudad)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[Translation] added Base Exception for the component.

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

Commits
-------

0fa4397 [Translation] added Base Exception for the component.
2016-09-21 10:50:29 -07:00
Abdellatif Ait boudad
0fa4397b27 [Translation] added Base Exception for the component. 2016-09-21 18:16:56 +01:00
Christian Flothmann
fed3c3d0a0 [FrameworkBundle] add changes to upgrade file too 2016-09-21 18:58:17 +02:00
Fabien Potencier
9e8825bda7 removed obsolete images (since 2.2) 2016-09-21 07:17:40 -07:00
Fabien Potencier
8993c8c32f feature #19997 inlined some CSS (fabpot)
This PR was merged into the 3.2-dev branch.

Discussion
----------

inlined some CSS

| 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

This PR has several goals:

* It fixes the discrepancy between where CSS files were stored (FrameworkBundle) and where there were used (TwigBundle);

* It removes the need to install the assets to get exceptions (think Silex, micro-kernel-based-edition, ...);

* It makes things consistent with how we already manage images for exceptions (they are inlined);

* It makes things consistent with how we manage assets for the web profiler.

Commits
-------

f354638 inlined some CSS
2016-09-21 07:15:58 -07:00
Fabien Potencier
f354638717 inlined some CSS 2016-09-21 07:14:31 -07:00
Fabien Potencier
84229f84fb Merge branch '3.1'
* 3.1:
  [TwigBridge] removed Twig null nodes (deprecated as of Twig 1.25)
  Make redis host configurable in tests
  [Console] Fix empty optionnal options with = separator in argv
2016-09-19 13:29:03 -07:00
Fabien Potencier
8b7c3d38b3 minor #19974 Make redis host configurable in tests (jakzal)
This PR was squashed before being merged into the 3.1 branch (closes #19974).

Discussion
----------

Make redis host configurable in tests

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

Makes running tests on dockerized environments possible, since we can now export the `REDIS_HOST` environment variable:

```
REDIS_HOST=redis ./phpunit src/Symfony/Component/Cache
```

If this gets merged, in master we can later replace the `SYMFONY__REDIS_HOST` usage in the FrameworkBundle with the new `env(REDIS_HOST)`.

Commits
-------

c87de00 Make redis host configurable in tests
2016-09-19 12:25:04 -07:00
Jakub Zalas
c87de00e9a Make redis host configurable in tests 2016-09-19 12:25:01 -07:00
Christian Flothmann
9603ffa458 AccessDeniedException: rename object to subject
With this change the name is inline with what we use in the base voter
interface.
2016-09-19 13:01:06 +02:00
WouterJ
41a76494ec [HttpKernel] Use VarDumper in the profiler 2016-09-17 16:23:20 +02:00
Nicolas Grekas
f532322fe3 bug #19950 [FrameworkBundle] Parse source link maps using json_decode() instead of parse_str() (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[FrameworkBundle] Parse source link maps using json_decode() instead of parse_str()

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | updated code exists only on master
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #19807
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/6944

Because `parse_str()` turns some characters into underscores in keys (e.g. `.`).

Commits
-------

9b174fb [FrameworkBundle] Parse source link maps using json_decode() instead of parse_str()
2016-09-16 15:58:28 +02:00
Nicolas Grekas
9b174fb0c1 [FrameworkBundle] Parse source link maps using json_decode() instead of parse_str() 2016-09-16 15:37:46 +02:00
Fabien Potencier
835176c932 Merge branch '3.1'
* 3.1:
  added a comment about a workaround
  [Finder] no PHP warning on empty directory iteration
  [HttpKernel] Fixed the nullable support for php 7.1 and below
  fixed CS
  [Form] Fix typo in doc comment
  Fix version constraint
  [Config] Handle open_basedir restrictions in FileLocator
  Fixed bad merge
  [DoctrineBridge][PropertyInfo] Treat Doctrine decimal type as string
  [bugfix] [Console] Set `Input::$interactive` to `false` when command is executed with `--quiet` as verbosity level
  Use JSON_UNESCAPED_SLASHES for lint commands output
  Fixed collapsed ChoiceType options attributes
  [FrameworkBundle] Remove cache clearer default value in config
  Consider the umask setting when dumping a file.
  Fixed the nullable support for php 7.1 and below
  Make ReflectionExtractor compatible with ReflectionType changes in PHP 7.1
2016-09-14 15:49:28 -07:00
Fabien Potencier
47657e55d2 feature #19197 [Serializer][FrameworkBundle] Add a CSV encoder (dunglas)
This PR was squashed before being merged into the 3.2-dev branch (closes #19197).

Discussion
----------

[Serializer][FrameworkBundle] Add a CSV encoder

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

Usage:

```php
use Symfony\Component\Serializer\Serializer;
use Symfony\Component\Serializer\Encoder\CsvEncoder;
use Symfony\Component\Serializer\Normalizer\ObjectNormalizer;

$serializer = new Serializer(array(new ObjectNormalizer()), array(new CsvEncoder()));
// or $serializer = $container->get('serializer'); when using the full stack framework
$serializer->encode($something, 'csv');
$serializer->decode(<<<'CSV'
id,name
1,Kévin
CSV
, 'csv');
```

CSV files must contain a header line with property names as keys.

ping @clementtalleu @Simperfit @gorghoa

Commits
-------

e71f5be [Serializer][FrameworkBundle] Add a CSV encoder
2016-09-14 15:14:31 -07:00
Kévin Dunglas
e71f5bea96 [Serializer][FrameworkBundle] Add a CSV encoder 2016-09-14 15:10:23 -07:00
Fabien Potencier
d6d6a47fcf feature #19326 [Serializer][FrameworkBundle] Add a YAML encoder (dunglas)
This PR was squashed before being merged into the 3.2-dev branch (closes #19326).

Discussion
----------

[Serializer][FrameworkBundle] Add a YAML encoder

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

Add YAML support to the Serializer.

Commits
-------

9366a7d [Serializer][FrameworkBundle] Add a YAML encoder
2016-09-14 14:57:14 -07:00
Kévin Dunglas
9366a7dc77 [Serializer][FrameworkBundle] Add a YAML encoder 2016-09-14 14:57:11 -07:00
Fabien Potencier
68737ebbf3 feature #19485 [FrameworkBundle] Introduce a cache warmer for Validator based on PhpArrayAdapter (tgalopin)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[FrameworkBundle] Introduce a cache warmer for Validator based on PhpArrayAdapter

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

Following the cache warmer for annotations PR (https://github.com/symfony/symfony/pull/18533), this PR introduces a cache warmer for YAML and XML Validator configuration.

Based on the PhpArrayAdapter, it uses the naming conventions (`Resources/config/validation`) to find the files and compile them into a single PHP file stored in the cache directory. This file uses shared memory on PHP 7.

The benefit of this PR are the same than the ones of the annotations PR:

- validation configuration can be warmed up offline
- on PHP 7, there is no need for user extension to get maximum performances (ie. if you use this PR and the other one, you probably won't need to enable APCu to have great performances)
- on PHP 7 again, we are not sensitive to APCu memory fragmentation
- last but not least, global performance is slightly better (I get 30us per class gain in Blackfire)

This PR also deprecates the framework.validator.cache key in favor of the cache pool introduced in https://github.com/symfony/symfony/pull/18544.

Commits
-------

6bdaf0b [FrameworkBundle] Introduce a cache warmer for Validator based on PhpArrayAdapter
2016-09-14 14:10:29 -07:00
Fabien Potencier
3416f2128d feature #19790 [FrameworkBundle] add support for prioritizing form type extension tags (dmaicher)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[FrameworkBundle] add support for prioritizing form type extension tags

| Q             | A
| ------------- | ---
| Branch?       | "master"
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #19735
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/6958

This PR proposes to add support for `priority` on `form.type_extension` dependecyinjection tags to enable sorting/prioritizing form type extensions.

Issue was mentioned here: https://github.com/symfony/symfony/issues/19735

Commits
-------

a3db5f0 [FrameworkBundle] add support for prioritizing form type extension tags
2016-09-14 14:07:36 -07:00
Fabien Potencier
46dd1d5719 feature #19507 [FrameworkBundle] Introduce a cache warmer for Serializer based on PhpArrayAdapter (tgalopin)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[FrameworkBundle] Introduce a cache warmer for Serializer based on PhpArrayAdapter

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

Following the cache warmer for annotations (#18533) and for the validator (#19485), this PR introduces a cache warmer for the Serializer YAML and XML metadata configuration (mainly groups).

Based on the PhpArrayAdapter, it uses the naming conventions (Resources/config/serialization) to find the files and compile them into a single PHP file stored in the cache directory. This file uses shared memory on PHP 7.

The benefit of this PR are the same than the ones of the previous PR:

- serialization metadata cache can be warmed up offline
- on PHP 7, there is no need for user extension to get maximum performances (ie. if you use this PR and the other one, you probably won't need to enable APCu to have great performances)
- on PHP 7 again, we are not sensitive to APCu memory fragmentation
last but not least, global performance is slightly better (I get 30us per class gain in Blackfire)

As previous work on the Serializer cache system introduced issues (see 96e418a14f), it would be interesting to pay careful attention to the backward compatibility during the review (ping @Ener-Getick).

Commits
-------

810f469 [FrameworkBundle] Introduce a cache warmer for Serializer based on PhpArrayAdapter
2016-09-14 13:50:36 -07:00
Fabien Potencier
0d5dbb75ee Merge branch '2.8' into 3.1
* 2.8:
  [Form] Fix typo in doc comment
  [Config] Handle open_basedir restrictions in FileLocator
  [bugfix] [Console] Set `Input::$interactive` to `false` when command is executed with `--quiet` as verbosity level
  Use JSON_UNESCAPED_SLASHES for lint commands output
  Fixed collapsed ChoiceType options attributes
  Fixed the nullable support for php 7.1 and below
2016-09-14 13:33:02 -07:00
Fabien Potencier
be3a827ef1 Merge branch '2.7' into 2.8
* 2.7:
  [Form] Fix typo in doc comment
  [Config] Handle open_basedir restrictions in FileLocator
  [bugfix] [Console] Set `Input::$interactive` to `false` when command is executed with `--quiet` as verbosity level
  Use JSON_UNESCAPED_SLASHES for lint commands output
  Fixed collapsed ChoiceType options attributes
  Fixed the nullable support for php 7.1 and below
2016-09-14 13:31:12 -07:00
Fabien Potencier
059b4363d4 feature #19807 [FrameworkBundle] Add %debug.file_link_format% with remapping for IDE links (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[FrameworkBundle] Add %debug.file_link_format% with remapping for IDE links

| Q             | A
| ------------- | ---
| Branch?       | master
| New feature?  | yes
| Tests pass?   | yes
| Fixed tickets | #14340
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/6944

`templating.helper.code.file_link_format` is a parameter that requires templating to be defined, but holds a concept that is used beyond templating borders.
Let's make it a general parameter that can be injected easily when required.

Commits
-------

1c4ca8c [FrameworkBundle] Add %debug.file_link_format% with remapping for IDE links
2016-09-14 12:22:10 -07:00
Fabien Potencier
277c7fa6a8 feature #19891 [FrameworkBundle] Add cache:pool:clear command (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[FrameworkBundle] Add cache:pool:clear command

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

Useful when deploying apps to get better control of cache pool clearing.

Commits
-------

37c5b18 [FrameworkBundle] Add cache:pool:clear command
2016-09-14 12:20:05 -07:00
Fabien Potencier
f9ccdd3db6 feature #19900 [FrameworkBundle] Add CachePoolClearerPass for weak cache pool refs in cache clearers (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[FrameworkBundle] Add CachePoolClearerPass for weak cache pool refs in cache clearers

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

On 3.1, when a cache pool is private and not injected anywhere, it is still added to its clearer service.
The `CachePoolClearerPass` fixes this by referencing pools in clearers only after the removing passes.

Commits
-------

c4b9f7d [FrameworkBundle] Add CachePoolClearerPass for weak cache pool refs in cache clearers
2016-09-14 12:17:33 -07:00
Nicolas Grekas
1c4ca8c9a4 [FrameworkBundle] Add %debug.file_link_format% with remapping for IDE links 2016-09-14 21:12:42 +02:00
Nicolas Grekas
37c5b183e5 [FrameworkBundle] Add cache:pool:clear command 2016-09-14 11:09:26 +02:00
Fabien Potencier
26e2846c8a bug #19904 [Form] Fixed collapsed ChoiceType options attributes (HeahDude)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Fixed collapsed ChoiceType options attributes

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

Commits
-------

7806e2a Fixed collapsed ChoiceType options attributes
2016-09-13 17:22:22 -07:00
Fabien Potencier
c2b660dc60 bug #19893 [FrameworkBundle] Remove cache clearer default value in config (nicolas-grekas)
This PR was merged into the 3.1 branch.

Discussion
----------

[FrameworkBundle] Remove cache clearer default value in config

| Q             | A
| ------------- | ---
| Branch?       | 3.1
| Bug fix?      | yes
| Tests pass?   | yes
| License       | MIT

`cache.default_clearer` is already the default behavior (tested), but duplicating this in the configuration prevents inheriting the `clearer` setting when configuring child pools.

Commits
-------

193542f [FrameworkBundle] Remove cache clearer default value in config
2016-09-13 17:01:35 -07:00
Fabien Potencier
946b96b70d bug #19922 [Yaml][TwigBridge] Use JSON_UNESCAPED_SLASHES for lint commands output (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[Yaml][TwigBridge] Use JSON_UNESCAPED_SLASHES for lint commands output

| 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

Slashes are escaped when sing the `lint:twig` and `lint:yaml` commands with the `format` option set to `json`, giving such results:

```json
[
    {
        "file": "yaml\/wrong\/1.yml",
        "valid": false,
        "message": "Unable to parse at line 1 (near \";:cc`\")."
    }
]
```

That's not convenient as file paths may be reused (e.g. copy-pasted).
Results stay fine as error messages are already escaped:

```json
[
    {
        "file": "yaml/wrong/1.yml",
        "valid": false,
        "message": "Unable to parse at line 1 (near \";:cc`\")."
    }
]
```

Commits
-------

0427594 Use JSON_UNESCAPED_SLASHES for lint commands output
2016-09-13 16:35:36 -07:00
Jakub Zalas
d093c406ca [FrameworkBundle] Fix TranslationUpdateCommand tests after a merge 2016-09-13 11:19:55 +01:00
Robin Chalas
04275945ef
Use JSON_UNESCAPED_SLASHES for lint commands output 2016-09-12 23:15:58 +02:00
Nicolas Grekas
f5c1b1c077 Merge branch '3.1'
* 3.1:
  [travis/appveyor] Wire simple-phpunit
  [Console] fixed PHP7 Errors are now handled and converted to Exceptions
  Fix #19721
  Fix translation:update command count
  bumped Symfony version to 2.8.12
  updated VERSION for 2.8.11
  updated CHANGELOG for 2.8.11
  bumped Symfony version to 2.7.19
  updated VERSION for 2.7.18
  update CONTRIBUTORS for 2.7.18
  updated CHANGELOG for 2.7.18
  [Security] Optimize RoleHierarchy's buildRoleMap method
  [FrameworkBundle] Fix Incorrect line break in exception message (500 debug page)
  [Security] Added note inside phpdoc.
  Minor cleanups and improvements
  [form] lazy trans `post_max_size_message`.
  [DI] Fix setting synthetic services on ContainerBuilder
  [ClassLoader] Fix ClassCollectionLoader inlining with declare(strict_types=1)
2016-09-12 21:03:45 +02:00
Fabien Potencier
fad40286ee Merge branch '2.8' into 3.1
* 2.8:
  [travis/appveyor] Wire simple-phpunit
  [Console] fixed PHP7 Errors are now handled and converted to Exceptions
  Fix #19721
  Fix translation:update command count
  bumped Symfony version to 2.8.12
  updated VERSION for 2.8.11
  updated CHANGELOG for 2.8.11
  bumped Symfony version to 2.7.19
  updated VERSION for 2.7.18
  update CONTRIBUTORS for 2.7.18
  updated CHANGELOG for 2.7.18
  [Security] Optimize RoleHierarchy's buildRoleMap method
2016-09-12 11:17:37 -07:00
Nicolas Grekas
c4b9f7db67 [FrameworkBundle] Add CachePoolClearerPass for weak cache pool refs in cache clearers 2016-09-11 22:09:22 +02:00
HeahDude
7806e2a05d Fixed collapsed ChoiceType options attributes 2016-09-11 01:56:49 +02:00
David Maicher
a3db5f06c9 [FrameworkBundle] add support for prioritizing form type extension tags 2016-09-09 19:24:04 +02:00
Nicolas Grekas
193542f84f [FrameworkBundle] Remove cache clearer default value in config 2016-09-09 13:10:26 +02:00
Titouan Galopin
ffdd15ee06 Fix translation:update command count 2016-09-07 10:57:26 +02:00
Fabien Potencier
86f8d74ba1 Merge branch '2.8' into 3.1
* 2.8:
  [FrameworkBundle] Fix Incorrect line break in exception message (500 debug page)
  [Security] Added note inside phpdoc.
  Minor cleanups and improvements
  [form] lazy trans `post_max_size_message`.
  [DI] Fix setting synthetic services on ContainerBuilder
  [ClassLoader] Fix ClassCollectionLoader inlining with declare(strict_types=1)
2016-09-06 16:30:54 -07:00
Fabien Potencier
9e9b41d0ea Merge branch '2.7' into 2.8
* 2.7:
  [FrameworkBundle] Fix Incorrect line break in exception message (500 debug page)
  Minor cleanups and improvements
  [form] lazy trans `post_max_size_message`.
  [DI] Fix setting synthetic services on ContainerBuilder
  [ClassLoader] Fix ClassCollectionLoader inlining with declare(strict_types=1)
2016-09-06 16:19:39 -07:00
Robin Chalas
f2e30bcc58
Use DI exceptions in components compiler passes 2016-09-07 01:13:31 +02:00
Pedro Resende
1393e3e913 [FrameworkBundle] Fix Incorrect line break in exception message (500 debug page) 2016-09-06 15:45:52 -07:00
Nicolas Grekas
a2a442b554 Merge branch '3.1'
* 3.1:
  [FrameworkBundle] Check for class existence before is_subclass_of
  Update GroupSequence.php
  Code enhancement and cleanup
  [Form] Fix transformer tests after the ICU update
  [DI] Add anti-regression test
  Revert "minor #19689 [DI] Cleanup array_key_exists (ro0NL)"
  bumped Symfony version to 3.1.5
  updated VERSION for 3.1.4
  updated CHANGELOG for 3.1.4
  bumped Symfony version to 2.8.11
  updated VERSION for 2.8.10
  updated CHANGELOG for 2.8.10
  [BrowserKit] Fix cookie expiration on 32 bit systems
  bumped Symfony version to 2.7.18
  updated VERSION for 2.7.17
  update CONTRIBUTORS for 2.7.17
  updated CHANGELOG for 2.7.17
  Update misleading comment about RFC4627
2016-09-06 13:07:23 +02:00
Nicolas Grekas
c5aa4f0a7e Merge branch '2.8' into 3.1
* 2.8:
  [FrameworkBundle] Check for class existence before is_subclass_of
  Update GroupSequence.php
  Code enhancement and cleanup
  [Form] Fix transformer tests after the ICU update
  [DI] Add anti-regression test
  Revert "minor #19689 [DI] Cleanup array_key_exists (ro0NL)"
  bumped Symfony version to 2.8.11
  updated VERSION for 2.8.10
  updated CHANGELOG for 2.8.10
  [BrowserKit] Fix cookie expiration on 32 bit systems
  bumped Symfony version to 2.7.18
  updated VERSION for 2.7.17
  update CONTRIBUTORS for 2.7.17
  updated CHANGELOG for 2.7.17
  Update misleading comment about RFC4627
2016-09-06 13:02:40 +02:00
Nicolas Grekas
ccf63e6b8d Merge branch '2.7' into 2.8
* 2.7:
  [FrameworkBundle] Check for class existence before is_subclass_of
  Update GroupSequence.php
  Code enhancement and cleanup
  [DI] Add anti-regression test
  Revert "minor #19689 [DI] Cleanup array_key_exists (ro0NL)"
  [BrowserKit] Fix cookie expiration on 32 bit systems
  bumped Symfony version to 2.7.18
  updated VERSION for 2.7.17
  update CONTRIBUTORS for 2.7.17
  updated CHANGELOG for 2.7.17
  Update misleading comment about RFC4627
2016-09-06 12:55:00 +02:00
Nicolas Grekas
8693611b12 bug #19842 [FrameworkBundle] Check for class existence before is_subclass_of (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Check for class existence before is_subclass_of

| 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

Same as #19342

Commits
-------

8a9e0f5 [FrameworkBundle] Check for class existence before is_subclass_of
2016-09-06 11:20:32 +02:00
Robin Chalas
8a9e0f526d [FrameworkBundle] Check for class existence before is_subclass_of 2016-09-06 10:59:36 +02:00
Yonel Ceruto
325da3c0d8 Code enhancement and cleanup 2016-09-06 09:26:07 +02:00
Fabien Potencier
816a3349ed minor #19774 [TwigBundle] Use vector images on the exception page (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[TwigBundle] Use vector images on the exception page

| Q             | A
| ------------- | ---
| Branch?       | master
| New feature?  | yes
| Tests pass?   | yes
| Fixed tickets | #19756
| License       | MIT

Before:
![capture du 2016-08-29 15-40-37](https://cloud.githubusercontent.com/assets/243674/18053289/f5ab33cc-6dfe-11e6-94cf-720098c214d8.png)

After:
![capture du 2016-08-29 21-00-36](https://cloud.githubusercontent.com/assets/243674/18063547/b274f520-6e2b-11e6-95cd-180ccb4cbf28.png)

Ghost SVG provided by  @patrick-mcdougle, thanks to him.

Commits
-------

1a3a4be [TwigBundle] Use vector images on the exception page
2016-08-30 10:02:24 -07:00
Nicolas Grekas
1a3a4be10d [TwigBundle] Use vector images on the exception page 2016-08-29 21:00:23 +02:00
Nicolas Grekas
d2d4b3ca82 [Yaml] Fix test scanning the full tmp directory 2016-08-29 17:14:38 +02:00
Nicolas Grekas
0cf50e2788 Merge branch '3.1'
* 3.1:
  fix typo
  add "provides" for psr/cache-implementation
  [Validator][GroupSequence] fixed GroupSequence validation ignores PropertyMetadata of parent classes
  [FrameworkBundle][Security] Remove useless mocks
  Add symfony/inflector to composer.json "replaces"
  [DoctrineBridge] Enhance exception message in EntityUserProvider
  added friendly exception when constraint validator does not exist or it is not enabled
  remove duplicate instruction
  [FrameworkBundle] Remove TranslatorBagInterface check
  [FrameworkBundle] Remove duplicated code in RouterDebugCommand
  [Validator] fixed duplicate constraints with parent class interfaces
  SecurityBundle:BasicAuthenticationListener: removed a default argument on getting a header value
2016-08-26 14:08:28 +02:00
Nicolas Grekas
224ebc0aff Merge branch '2.8' into 3.1
* 2.8:
  [Validator][GroupSequence] fixed GroupSequence validation ignores PropertyMetadata of parent classes
  [FrameworkBundle][Security] Remove useless mocks
  [DoctrineBridge] Enhance exception message in EntityUserProvider
  added friendly exception when constraint validator does not exist or it is not enabled
  remove duplicate instruction
  [FrameworkBundle] Remove TranslatorBagInterface check
  [FrameworkBundle] Remove duplicated code in RouterDebugCommand
  [Validator] fixed duplicate constraints with parent class interfaces
  SecurityBundle:BasicAuthenticationListener: removed a default argument on getting a header value
2016-08-26 14:04:02 +02:00
Nicolas Grekas
b05de7d2be Merge branch '2.7' into 2.8
* 2.7:
  [Validator][GroupSequence] fixed GroupSequence validation ignores PropertyMetadata of parent classes
  [FrameworkBundle][Security] Remove useless mocks
  [DoctrineBridge] Enhance exception message in EntityUserProvider
  added friendly exception when constraint validator does not exist or it is not enabled
  remove duplicate instruction
  [FrameworkBundle] Remove TranslatorBagInterface check
  [FrameworkBundle] Remove duplicated code in RouterDebugCommand
  [Validator] fixed duplicate constraints with parent class interfaces
  SecurityBundle:BasicAuthenticationListener: removed a default argument on getting a header value
2016-08-26 13:57:43 +02:00
Fabien Potencier
6de4359e4b minor #19736 [FrameworkBundle][Security] Remove useless mocks (Ener-Getick)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle][Security] Remove useless mocks

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

Removes mocks causing issues in https://github.com/symfony/symfony/pull/19734.

Commits
-------

fcd3345 [FrameworkBundle][Security] Remove useless mocks
2016-08-25 10:52:51 -07:00
Ener-Getick
fcd3345e34
[FrameworkBundle][Security] Remove useless mocks 2016-08-25 14:52:03 +02:00
Yonel Ceruto
b66ea5e16e added friendly exception when constraint validator does not exist or it is not enabled 2016-08-24 03:54:03 -07:00
Fabien Potencier
f5f1e103c4 feature #19687 [FrameworkBundle] Use relative paths in templates paths cache (tgalopin)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[FrameworkBundle] Use relative paths in templates paths cache

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

This implements the usage of relative paths instead of absolute ones in `var/cache/*/templates.php`, important for ability to build the cache in a different context than where it will be used.

This PR transforms the following `templates.php`:

``` php
<?php return array (
  ':default:index.html.twig' => '/home/tgalopin/www/symfony-standard/app/Resources/views/default/index.html.twig',
  '::base.html.twig' => '/home/tgalopin/www/symfony-standard/app/Resources/views/base.html.twig',
);
```

Into:

``` php
<?php return array (
  ':default:index.html.twig' => __DIR__.'/../../../app/Resources/views/default/index.html.twig',
  '::base.html.twig' => __DIR__.'/../../../app/Resources/views/base.html.twig',
);
```

I also added tests for the TemplateCachePathsWarmer and improved tests for the TemplateLocator.

Commits
-------

6f6139c [FrameworkBundle] Use relative paths in templates paths cache
2016-08-23 10:17:40 -07:00
Fabien Potencier
d30c3184df minor #19713 [FrameworkBundle] Remove duplicated code in RouterDebugCommand (JhonnyL)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] Remove duplicated code in RouterDebugCommand

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

20a69aa [FrameworkBundle] Remove duplicated code in RouterDebugCommand
2016-08-23 10:14:32 -07:00
JhonnyL
fd27801cf1 [FrameworkBundle] Remove TranslatorBagInterface check 2016-08-23 10:02:31 -07:00
JhonnyL
20a69aa1cf [FrameworkBundle] Remove duplicated code in RouterDebugCommand 2016-08-23 14:39:28 +02:00
Fabien Potencier
c14fff01a4 minor #19656 [FrameworkBundle][Debug] Fix default config and cleaning of traces (nicolas-grekas)
This PR was merged into the 3.2-dev branch.

Discussion
----------

[FrameworkBundle][Debug] Fix default config and cleaning of traces

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| Tests pass?   | yes
| Fixed tickets | Follow up #19568
| License       | MIT
| Doc PR        | -

The default value of `framework.php_errors.log` must be `%kernel.debug%` to have deprecations and silenced errors logged in dev as before.

Cleaning the trace was broken because a closure can't be bound to an internal class.

This PR fixes both issues and enhance trace cleaning a bit by removing arguments from traces so that they take less memory when collected as part of the context of log messages.

Commits
-------

f640870 [FrameworkBundle][Debug] Fix default config and cleaning of traces
2016-08-22 10:31:21 -07:00
Titouan Galopin
6f6139c549 [FrameworkBundle] Use relative paths in templates paths cache 2016-08-22 14:30:54 +02:00
Nicolas Grekas
72dfda914d Merge branch '3.1'
* 3.1:
  Disable CLI color for Windows 10 greater than 10.0.10586
  Exception details break the layout
  [HttpKernel] Remove wrong docblock
  [HttpKernel] Fix HttpCache validation HTTP method
  [FrameworkBundle] Fix default lifetime of cache pools
  Move space from the before 'if' to the after 'if'
  [TwigBundle] Add a check for choice's attributes emptiness before calling block('attributes')
2016-08-19 08:48:55 +02:00
Nicolas Grekas
f6408702b8 [FrameworkBundle][Debug] Fix default config and cleaning of traces 2016-08-18 18:41:56 +02:00
Titouan Galopin
810f4694af [FrameworkBundle] Introduce a cache warmer for Serializer based on PhpArrayAdapter 2016-08-17 20:09:37 +02:00
Grégoire Pineau
8f245493f4 [Debug] Better error handling
1. Send the raw exception in the log context instead of custom formatting
2. Add config option to log in Symfony all PHP errors
2016-08-17 17:20:26 +02:00
Nicolas Grekas
ec603d3c7f [FrameworkBundle] Fix default lifetime of cache pools 2016-08-17 13:39:34 +02:00
Nicolas Grekas
77e0161870 Merge branch '3.1'
* 3.1:
  [Routing] Add missing options in docblock
  [VarDumper] Fix dumping continuations
  [PropertyInfo] Fix an error in PropertyInfoCacheExtractor
  [HttpFoundation] fixed Request::getContent() reusage bug
  [Form] Skip CSRF validation on form when POST max size is exceeded
  Use try-finally where it possible
  [DependencyInjection] ContainerBuilder: Remove obsolete definitions
  Enhance the phpDoc return types so IDEs can handle the configuration tree.
  fixes
  Remove 3.0 from branch suggestions for fixes in PR template
  [Process] Strengthen Windows pipe files opening (again...)
  [Cache] Handle unserialize() failures gracefully
  Fix #19531 [Form] DateType fails parsing when midnight is not a valid time
2016-08-16 18:09:30 +02:00
Fabien Potencier
d7f8ca72e8 Merge branch '2.8' into 3.1
* 2.8:
  [Routing] Add missing options in docblock
  [VarDumper] Fix dumping continuations
  [HttpFoundation] fixed Request::getContent() reusage bug
  [Form] Skip CSRF validation on form when POST max size is exceeded
  Enhance the phpDoc return types so IDEs can handle the configuration tree.
  fixes
  Remove 3.0 from branch suggestions for fixes in PR template
  [Process] Strengthen Windows pipe files opening (again...)
  Fix #19531 [Form] DateType fails parsing when midnight is not a valid time
2016-08-16 07:58:24 -07:00
Fabien Potencier
609ee2df0a Merge branch '2.7' into 2.8
* 2.7:
  [Routing] Add missing options in docblock
  [VarDumper] Fix dumping continuations
  [HttpFoundation] fixed Request::getContent() reusage bug
  [Form] Skip CSRF validation on form when POST max size is exceeded
  Enhance the phpDoc return types so IDEs can handle the configuration tree.
  fixes
  Remove 3.0 from branch suggestions for fixes in PR template
  [Process] Strengthen Windows pipe files opening (again...)
  Fix #19531 [Form] DateType fails parsing when midnight is not a valid time
2016-08-16 07:56:08 -07:00
Fabien Potencier
1a059e54cf bug #19373 [Form] Skip CSRF validation on form when POST max size is exceeded (jameshalsall)
This PR was squashed before being merged into the 2.7 branch (closes #19373).

Discussion
----------

[Form] Skip CSRF validation on form when POST max size is exceeded

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

In #19140 the CSRF validation listener was not aware that the POST max size had exceeded, and was adding a form error message that wasn't relevant to the actual error.

This introduces the `ServerParams` utility class into the `CsrfValidationListener` and checks that the POST max size has not been exceeded. If it has then it won't bother trying to validate the CSRF token.

My main concern with this change is that it opens up an attack vector around tokens, but I've encapsulated the request size validation in a single method in `ServerParams` now so that the request handlers are using the same logic.

Commits
-------

289531f [Form] Skip CSRF validation on form when POST max size is exceeded
2016-08-15 15:45:28 -07:00
James Halsall
289531f0d0 [Form] Skip CSRF validation on form when POST max size is exceeded 2016-08-15 15:45:25 -07:00