Commit Graph

10002 Commits

Author SHA1 Message Date
Fabien Potencier
d05f0a0e03 fixed Silex project's URL 2018-04-20 08:21:07 +02:00
Fabien Potencier
bb45c75d7b Merge branch '3.4' into 4.0
* 3.4:
  fixed deprecations in tests
  fixed Twig URL
  [Cache] Add missing `@internal` tag on ProxyTrait
  fix formatting arguments in plaintext format
  Fix PSR exception context key
  Don't assume that file binary exists on *nix OS
  Fix that ESI/SSI processing can turn a \"private\" response \"public\"
  [Form] Fixed trimming choice values
  fix rendering exception stack traces
  [Routing] Fix loading multiple class annotations for invokable classes
2018-04-20 08:20:23 +02:00
DQNEO
74ab256bec declare type for arguments of anonymous functions for v2.7 2018-04-20 06:20:29 +02:00
Fabien Potencier
3d40bfa1c4 bug #26877 Add working orphaned events template (kejwmen)
This PR was merged into the 4.1-dev branch.

Discussion
----------

Add working orphaned events template

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

Current template is broken, this PR introduces a simple working template to fix profiler.

Commits
-------

089817b9b1 Add working orphaned events template
2018-04-20 06:10:43 +02:00
Lars Strojny
8c1672743d Don’t normalize global values 2018-04-19 22:19:20 +02:00
Christian Flothmann
f1c1d36fda fix formatting arguments in plaintext format 2018-04-19 10:26:28 +02:00
Fabien Potencier
8c4fd1299b feature #26787 [Security] Make security.providers optional (MatTheCat)
This PR was squashed before being merged into the 4.1-dev branch (closes #26787).

Discussion
----------

[Security] Make security.providers optional

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

Don't really know if it's viable but I just hit #21998 so I would like to tackle this.

Commits
-------

ee54bfa646 [Security] Make security.providers optional
2018-04-19 08:45:32 +02:00
Mathieu Lechat
ee54bfa646 [Security] Make security.providers optional 2018-04-19 08:45:26 +02:00
Samuel ROZE
fe199317da feature #26941 [Messenger] Allow to configure the transport (sroze)
This PR was squashed before being merged into the 4.1-dev branch (closes #26941).

Discussion
----------

[Messenger] Allow to configure the transport

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | ish
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #26900, #26908, #26935
| License       | MIT
| Doc PR        | ø

We allow users to configure the encoder/decoder used by the built-in adapter(s). This also adds the support of configuring the default's encoder/decoder format and context.

Commits
-------

1a3f0bbb14 [Messenger] Allow to configure the transport
2018-04-17 17:47:47 +01:00
Samuel ROZE
1a3f0bbb14 [Messenger] Allow to configure the transport 2018-04-17 17:47:06 +01:00
Maxime Steinhausser
60af39b161 [DebugBundle][VarDumper] Fix server dumper placeholder command 2018-04-16 22:53:37 +02:00
Samuel ROZE
177cea0ee1 Support nested configuration on adapters 2018-04-16 18:40:17 +01:00
Fabien Potencier
7e4de96c03 minor #26909 [Messenger][DX] Uses the adapter name instead of the service name (sroze)
This PR was squashed before being merged into the 4.1-dev branch (closes #26909).

Discussion
----------

[Messenger][DX] Uses the adapter name instead of the service name

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

As a developer, I don't get why I would need to use the service name while I give a name to the adapters. This is basically what this PR means for me in terms of configuration:
```patch
framework:
    messenger:
        routing:
            # We want the command below to be handled async with the "messenger.default_sender" (AMQP producer).
-            'App\Message\Command\CreateNumber': messenger.sender.amqp
+            'App\Message\Command\CreateNumber': amqp

        adapters:
            amqp: "%env(AMQP_DSN)%"
```

And in terms of pulling the messages:
```patch
- bin/console messenger:consume-messages messenger.receiver.amqp
+ bin/console messenger:consume-messages amqp
```

Commits
-------

b5afb40441 [Messenger][DX] Uses the adapter name instead of the service name
2018-04-16 19:19:59 +02:00
Samuel ROZE
b5afb40441 [Messenger][DX] Uses the adapter name instead of the service name 2018-04-16 19:19:48 +02:00
Yonel Ceruto
eedad4c061 Make logger arg a hard dependency, remove dead code and add tests 2018-04-14 13:36:02 -04:00
Christian Flothmann
99302e72fc fix rendering exception stack traces 2018-04-13 17:45:35 +02:00
Samuel ROZE
d60425c868 Allow the logger to be null (as per every other bits in the FrameworkBundle) 2018-04-12 19:18:53 +01:00
Samuel ROZE
3c4be3cdda
Update the tests to also use interface_exists 2018-04-12 16:38:50 +01:00
Ryan Weaver
2405eae500 Fixing bad class_exists vs interface_exists 2018-04-12 11:21:29 -04:00
Samuel ROZE
aa04d06dc4 feature #26632 [Messenger] Add AMQP adapter (sroze)
This PR was squashed before being merged into the 4.1-dev branch (closes #26632).

Discussion
----------

[Messenger] Add AMQP adapter

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

- [x] Depends on the Messenger component #24411
- [x] Add tests once we are all happy about the structure

---

In order to give a great DX for simple needs such as sending messages through an AMQP broker such as RabbitMq, we should ship an AMQP adapter for the Messenger component within Symfony Core. It should be as simple as this proposal. We don't need to handle more specific use-cases nor brokers as other adapters such as the [enqueue adapter](https://github.com/sroze/enqueue-bridge) can also be used.

Configuring the adapter is as simple as the following configuration:
```yaml
# config/packages/messenger_adapters.yaml
framework:
    messenger:
        adapter: "%env(MESSENGER_DSN)%"
```

With the given `.env` for example:
```
MESSENGER_DSN=amqp://guest:guest@localhost:5672/%2f/messages
```

Keep in mind that after having configured the adapter, developers have to route their messages to the given adapter.

```yaml
# config/packages/messenger_routes.yaml
framework:
    messenger:
        routing:
producer).
            'App\Message\Command\CreateNumber': messenger.default_sender
```

---

Additionally, multiple adapters can be created and messages routed to these ones.

```yaml
# config/packages/messenger_routes.yaml
framework:
    messenger:
        adapters:
            commands: "amqp://guest:guest@localhost:5672/%2f/commands"
            maintenance: "amqp://guest:guest@localhost:5672/%2f/maintenance"
        routing:
producer).
            'App\Message\Command\CreateNumber': messenger.commands_sender
            'App\Message\Command\MaintenanceSpecificCommand': messenger.maintenance_sender
```

Commits
-------

798c230ad5 [Messenger] Add AMQP adapter
2018-04-12 09:16:00 +01:00
Samuel ROZE
798c230ad5 [Messenger] Add AMQP adapter 2018-04-12 09:15:52 +01:00
Mateusz Sip
089817b9b1
Add working orphaned events template 2018-04-10 01:02:34 +02:00
Grégoire Pineau
8e0fcf933c [FrameworkBundle] Fixed configuration of php_errors.log 2018-04-09 18:19:45 +02:00
Samuel ROZE
dd18445482 Rename the middleware tag from message_bus_middleware to messenger.bus_middleware 2018-04-08 10:53:48 +01:00
Fabien Potencier
f1a9d7098e Merge branch '4.0'
* 4.0:
  [Form] Fix typo in Upgrade 3.4/4.0
  [EventDispatcher] Dispatcher in stopEventPropagation test now registers correct listener
  Update da translations
  Fix Typo in Guard Factory
2018-04-06 09:35:57 +02:00
Fabien Potencier
5ea5ee2079 Merge branch '3.4' into 4.0
* 3.4:
  [Form] Fix typo in Upgrade 3.4/4.0
  [EventDispatcher] Dispatcher in stopEventPropagation test now registers correct listener
  Update da translations
  Fix Typo in Guard Factory
2018-04-06 09:35:43 +02:00
Fabien Potencier
ee054cd756 Merge branch '2.8' into 3.4
* 2.8:
  [EventDispatcher] Dispatcher in stopEventPropagation test now registers correct listener
  Update da translations
  Fix Typo in Guard Factory
2018-04-06 09:35:25 +02:00
Fabien Potencier
dc29b27a83 feature #26660 [SecurityBundle] allow using custom function inside allow_if expressions (dmaicher)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[SecurityBundle] allow using custom function inside allow_if expressions

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

This is a follow-up for https://github.com/symfony/symfony/pull/26263

As discussed there I propose to allow using custom functions as a new feature only and thus targeting `master` here.

If we agree to move forward with this there are some todos:
- [x] fix tests
- [x] add cache warmer for allow_if expressions
- [x] update documentation to mention this new feature
- [x] update UPGRADE files

ping @nicolas-grekas @stof

Commits
-------

41552cd896 [SecurityBundle] allow using custom function inside allow_if expressions
2018-04-06 08:18:32 +02:00
Fabien Potencier
3a37e41bfb bug #26816 [Messenger][FrameworkBundle] Move collector, command into the component & minor tweaks (ogizanagi)
This PR was squashed before being merged into the 4.1-dev branch (closes #26816).

Discussion
----------

[Messenger][FrameworkBundle] Move collector, command into the component & minor tweaks

| Q             | A
| ------------- | ---
| Branch?       | master <!-- see below -->
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | N/A   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

Some suggestions more aligned with most of the core practices, mainly:

- Move the command & collector to the component itself. They are not dependent of the Fwb in any way and are useful out of the fwb usage.
- Add an exception in FrameworkExtension if the `framework.messenger` key is enabled, but the component isn't installed.

Commits
-------

6aec62bad3 [FrameworkBundle] Minor messenger component tweaks
f9c9ca0514 [Messenger] Move data collector & command into the component
2018-04-06 07:28:47 +02:00
Christian Flothmann
79e898ffe8 remove CSRF Twig extension when class is missing 2018-04-05 18:06:51 +02:00
Maxime Steinhausser
6aec62bad3 [FrameworkBundle] Minor messenger component tweaks 2018-04-05 17:47:14 +02:00
Maxime Steinhausser
f9c9ca0514 [Messenger] Move data collector & command into the component 2018-04-05 17:21:58 +02:00
David Maicher
41552cd896 [SecurityBundle] allow using custom function inside allow_if expressions 2018-04-04 20:31:39 +02:00
Fabien Potencier
5b4e1c5b6b Merge branch '4.0'
* 4.0:
  [Security] register custom providers on ExpressionLanguage directly
  [PhpUnitBridge] Catch deprecation error handler
2018-04-04 20:25:14 +02:00
Fabien Potencier
eb7050ab50 Merge branch '3.4' into 4.0
* 3.4:
  [Security] register custom providers on ExpressionLanguage directly
  [PhpUnitBridge] Catch deprecation error handler
2018-04-04 20:24:59 +02:00
Fabien Potencier
572042c4ec feature #26684 [Messenger] Remove the Doctrine middleware configuration from the FrameworkBundle (sroze)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Messenger] Remove the Doctrine middleware configuration from the FrameworkBundle

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

As per @fabpot's request, remove the enabling feature of the DoctrineMiddleware from the FramworkBundle.

/cc @Nyholm

Commits
-------

27a8b1dc96 Remove the Doctrine middleware configuration from the FrameworkBundle
2018-04-04 19:46:16 +02:00
David Maicher
3a55a86609 [Security] register custom providers on ExpressionLanguage directly 2018-04-04 19:20:26 +02:00
Zan Baldwin
c0a051d46d Fix Typo in Guard Factory 2018-04-04 16:36:22 +01:00
Robin Chalas
e973f6f380 [master] fix test 2018-04-04 16:30:04 +02:00
Nicolas Grekas
bd4820b146 Merge branch '4.0'
* 4.0:
  [Routing] Fix throwing NoConfigurationException instead of 405
  [Security] Load the user before pre/post auth checks when needed
  [SecurityBundle] Add test for simple authentication config
  [WebProfilerBundle] fix version check
  [SecurityBundle] Add missing argument to security.authentication.provider.simple
  [Finder] fix tests
2018-04-04 15:53:40 +02:00
Nicolas Grekas
bc23cae7b0 Merge branch '3.4' into 4.0
* 3.4:
  [Routing] Fix throwing NoConfigurationException instead of 405
  [Security] Load the user before pre/post auth checks when needed
  [SecurityBundle] Add test for simple authentication config
  [WebProfilerBundle] fix version check
  [SecurityBundle] Add missing argument to security.authentication.provider.simple
  [Finder] fix tests
2018-04-04 15:50:32 +02:00
Nicolas Grekas
5d189e1018 Merge branch '2.8' into 3.4
* 2.8:
  [Security] Load the user before pre/post auth checks when needed
  [SecurityBundle] Add test for simple authentication config
  [SecurityBundle] Add missing argument to security.authentication.provider.simple
  [Finder] fix tests
2018-04-04 15:49:01 +02:00
Samuel ROZE
27a8b1dc96 Remove the Doctrine middleware configuration from the FrameworkBundle 2018-04-04 13:52:24 +01:00
Robin Chalas
c82c2f1efa [SecurityBundle] Add test for simple authentication config 2018-04-04 14:16:21 +02:00
Nicolas Grekas
946eefa284 [WebProfilerBundle] fix version check 2018-04-04 14:14:22 +02:00
Boris Vujicic
1b26aac8d2 [SecurityBundle] Add missing argument to security.authentication.provider.simple 2018-04-04 13:53:06 +02:00
Fabien Potencier
54268f1266 Merge branch '4.0'
* 4.0:
  fixed tests
  [Finder] Remove duplicate slashes in filenames
  [VarDumper] Skip some tests on custom xdebug.file_link_format
  [WebProfilerBundle][HttpKernel] Make FileLinkFormatter URL format generation lazy
  bumped Symfony version to 4.0.8
  updated VERSION for 4.0.7
  updated CHANGELOG for 4.0.7
  bumped Symfony version to 3.4.8
  updated VERSION for 3.4.7
  updated CHANGELOG for 3.4.7
2018-04-04 07:11:41 +02:00
Fabien Potencier
f76624a0b7 Merge branch '3.4' into 4.0
* 3.4:
  fixed tests
  [Finder] Remove duplicate slashes in filenames
  [VarDumper] Skip some tests on custom xdebug.file_link_format
  [WebProfilerBundle][HttpKernel] Make FileLinkFormatter URL format generation lazy
  bumped Symfony version to 3.4.8
  updated VERSION for 3.4.7
  updated CHANGELOG for 3.4.7
2018-04-04 07:10:37 +02:00
Samuel ROZE
235e037748 Fix validation configuration default test case 2018-04-03 22:35:24 +01:00
Samuel ROZE
d5b88eb7eb feature #26685 [Messenger] Add a MessageHandlerInterface (multiple messages + auto-configuration) (sroze)
This PR was squashed before being merged into the 4.1-dev branch (closes #26685).

Discussion
----------

[Messenger] Add a `MessageHandlerInterface` (multiple messages + auto-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        | ø

Based on @chalasr's PR: https://github.com/symfony/symfony/pull/26672.

This reduces the hassle of registering handlers: it allows the auto-configuration with a new interface `HandlerInterface`. At the same time, it allows a handler to handle multiple messages.

Commits
-------

07e6bc73a3 [Messenger] Add a `MessageHandlerInterface` (multiple messages + auto-configuration)
2018-04-03 21:23:24 +01:00
Samuel ROZE
07e6bc73a3 [Messenger] Add a MessageHandlerInterface (multiple messages + auto-configuration) 2018-04-03 21:23:12 +01:00
Tobias Nyholm
43a51714d4 [Messenger] Added a middleware that validates messages 2018-04-03 21:17:07 +01:00
Nicolas Grekas
e074c0550c [WebProfilerBundle][HttpKernel] Make FileLinkFormatter URL format generation lazy 2018-04-03 12:14:10 +02:00
Fabien Potencier
382b5868e4 bug #26740 [FrameworkBundle] fix log level support config handling (xabbuh)
This PR was squashed before being merged into the 4.1-dev branch (closes #26740).

Discussion
----------

[FrameworkBundle] fix log level support config handling

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

2ee6bb4897 fix log level support config handling
ad8c8d00aa add PHP errors options to XML schema definition
2018-04-02 14:14:00 +02:00
Grégoire Pineau
95049154b3 Revert "[FrameworkBundle] Partially revert HttpCache is not longer abstract (4d075da)"
This reverts commit 60730666ab.
2018-04-02 13:58:37 +02:00
Nicolas Grekas
6e95c2ad27 Merge branch '4.0'
* 4.0: (24 commits)
  moved Twig runtime to proper class
  fixed deprecated messages in tests
  add PHP errors options to XML schema definition
  [HttpCache] Unlink tmp file on error
  Added LB translation for #26327 (Errors sign for people that do not see colors)
  [TwigBridge] Fix rendering of currency by MoneyType
  Import InvalidArgumentException in PdoAdapter
  [DI] Do not suggest writing an implementation when multiple exist
  [Intl] Update ICU data to 61.1
  Use 3rd person verb form in command description
  [Validator] Add Japanese translation
  Support phpdbg SAPI in Debug::enable()
  [HttpKernel] DumpDataCollector: do not flush when a dumper is provided
  [DI] Fix hardcoded cache dir for warmups
  [Routing] fix tests
  [Routing] Fixed the importing of files using glob patterns that match multiple resources
  [Ldap] cast to string when checking empty passwords
  [Validator] sync validator translation id
  [WebProfilerBundle] use the router to resolve file links
  no type errors with invalid submitted data types
  ...
2018-04-02 12:08:33 +02:00
Nicolas Grekas
a5a44472c9 Merge branch '3.4' into 4.0
* 3.4: (24 commits)
  moved Twig runtime to proper class
  fixed deprecated messages in tests
  add PHP errors options to XML schema definition
  [HttpCache] Unlink tmp file on error
  Added LB translation for #26327 (Errors sign for people that do not see colors)
  [TwigBridge] Fix rendering of currency by MoneyType
  Import InvalidArgumentException in PdoAdapter
  [DI] Do not suggest writing an implementation when multiple exist
  [Intl] Update ICU data to 61.1
  Use 3rd person verb form in command description
  [Validator] Add Japanese translation
  Support phpdbg SAPI in Debug::enable()
  [HttpKernel] DumpDataCollector: do not flush when a dumper is provided
  [DI] Fix hardcoded cache dir for warmups
  [Routing] fix tests
  [Routing] Fixed the importing of files using glob patterns that match multiple resources
  [Ldap] cast to string when checking empty passwords
  [Validator] sync validator translation id
  [WebProfilerBundle] use the router to resolve file links
  no type errors with invalid submitted data types
  ...
2018-04-02 11:52:41 +02:00
Fabien Potencier
62eebd7d50 Merge branch '2.8' into 3.4
* 2.8:
  fixed deprecated messages in tests
  [HttpCache] Unlink tmp file on error
  Added LB translation for #26327 (Errors sign for people that do not see colors)
  [TwigBridge] Fix rendering of currency by MoneyType
  [HttpKernel] DumpDataCollector: do not flush when a dumper is provided
2018-04-02 11:38:44 +02:00
Fabien Potencier
92322f1be0 fixed deprecated messages in tests 2018-04-02 11:33:07 +02:00
Fabien Potencier
72501cd311 Merge branch '2.7' into 2.8
* 2.7:
  [HttpCache] Unlink tmp file on error
  Added LB translation for #26327 (Errors sign for people that do not see colors)
  [TwigBridge] Fix rendering of currency by MoneyType
  [HttpKernel] DumpDataCollector: do not flush when a dumper is provided
2018-04-02 11:31:53 +02:00
Christian Flothmann
2ee6bb4897 fix log level support config handling 2018-04-02 11:08:46 +02:00
Christian Flothmann
ad8c8d00aa add PHP errors options to XML schema definition 2018-04-02 10:42:40 +02:00
Christian Flothmann
7d39bac2dc add PHP errors options to XML schema definition 2018-04-02 10:41:14 +02:00
Fabien Potencier
46c9842a4c Revert "feature #26698 [Console] Use UTF-8 bullet for listing (ro0NL)"
This reverts commit 6bfc082b87, reversing
changes made to 9b25573e73.
2018-04-01 10:27:13 +02:00
Fabien Potencier
6bfc082b87 feature #26698 [Console] Use UTF-8 bullet for listing (ro0NL)
This PR was squashed before being merged into the 4.1-dev branch (closes #26698).

Discussion
----------

[Console] Use UTF-8 bullet for listing

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Inspired by the new table style, this updates the listing style.

before

![image](https://user-images.githubusercontent.com/1047696/38031214-019c79f4-329b-11e8-8352-9453c7ccc129.png)

after

![image](https://user-images.githubusercontent.com/1047696/38031186-ed8b1e66-329a-11e8-8538-2256a0e24a42.png)

Commits
-------

d1e4acb02e [Console] Use UTF-8 bullet for listing
2018-03-30 10:44:22 +02:00
Roland Franssen
d1e4acb02e [Console] Use UTF-8 bullet for listing 2018-03-30 10:44:16 +02:00
Fabien Potencier
f568271238 feature #26682 Improved the lint:xliff command (javiereguiluz)
This PR was squashed before being merged into the 4.1-dev branch (closes #26682).

Discussion
----------

Improved the lint:xliff command

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

This is how it looks:

![lint-xliff-output](https://user-images.githubusercontent.com/73419/37958502-fd8732e0-31b0-11e8-8688-8644ca930daf.png)

Commits
-------

6bbcc45d96 Improved the lint:xliff command
2018-03-30 10:39:14 +02:00
Javier Eguiluz
6bbcc45d96 Improved the lint:xliff command 2018-03-30 10:39:04 +02:00
Roland Franssen
a3a2ff0c74 [TwigBridge] Fix rendering of currency by MoneyType 2018-03-29 15:55:10 +02:00
Robin Chalas
9b6ed69a71 minor #26703 [Messenger] Fix messenger profiler name (sroze)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Messenger] Fix messenger profiler name

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #26674
| License       | MIT
| Doc PR        | ø

In #26674, the profiler name was not renamed properly, which means it wasn't displayed anymore.

Commits
-------

bd234ff Fix messenger profiler name
2018-03-29 10:09:35 +02:00
Samuel ROZE
bd234ff7f8 Fix messenger profiler name 2018-03-29 00:50:07 +02:00
Fabien Potencier
3d5f04cce3 Merge branch '2.8' into 3.4
* 2.8:
  [Intl] Update ICU data to 61.1
  [Validator] Add Japanese translation
  Support phpdbg SAPI in Debug::enable()
  [Ldap] cast to string when checking empty passwords
  [Validator] sync validator translation id
  no type errors with invalid submitted data types
  [FrameworkBundle] Partially revert HttpCache is not longer abstract (4d075da)
  [Finder] Fixed leading/trailing / in filename
  allow html5 compatible rendering of forms with null names
  Change datetime input to datetime-local
2018-03-28 20:23:39 +02:00
Fabien Potencier
e3201b8f37 Merge branch '2.7' into 2.8
* 2.7:
  [Intl] Update ICU data to 61.1
  [Validator] Add Japanese translation
  Support phpdbg SAPI in Debug::enable()
  [Validator] sync validator translation id
  no type errors with invalid submitted data types
  [FrameworkBundle] Partially revert HttpCache is not longer abstract (4d075da)
  [Finder] Fixed leading/trailing / in filename
  allow html5 compatible rendering of forms with null names
  Change datetime input to datetime-local
2018-03-28 20:22:50 +02:00
Fabien Potencier
e3f964f923 bug #26670 [FrameworkBundle] Remove double cache generation by detecting fresh kernels on cache:clear (nicolas-grekas)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[FrameworkBundle] Remove double cache generation by detecting fresh kernels on cache:clear

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

The `cache:clear` command currently runs non-optional cache warmers twice or more.
It also clears + warms up just created caches (when var/cache/dev doens't exist yet, eg on 1st `composer install`.)

This PR fixes both behaviors. To run only what's needed once.
Best reviewed [ignoring whitespaces](https://github.com/symfony/symfony/pull/26670/files?w=1).

Commits
-------

9d8eac213a [FrameworkBundle] Remove double cache generation by detecting fresh kernels on cache:clear
2018-03-28 20:12:22 +02:00
Nicolas Grekas
9d8eac213a [FrameworkBundle] Remove double cache generation by detecting fresh kernels on cache:clear 2018-03-28 19:19:11 +02:00
Marco Petersen
e467e4cc6e Use 3rd person verb form in command description 2018-03-27 23:06:51 +02:00
Fabien Potencier
44a6f60fdb feature #26504 [FrameworkBundle] framework.php_errors.log now accept a log level (Simperfit)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[FrameworkBundle] framework.php_errors.log now accept a log level

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #26267   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        |  todo <!-- required for new features -->

We are testing that `framework.php_errors.log` is either a bool or an int (set the value of the log level you want).
This fixes #26267, so it gives a way to not log some level on production.

Commits
-------

664f821895 [FrameworkBundle] framework.php_errors.log now accept a log level
2018-03-27 20:27:43 +02:00
Amrouche Hamza
664f821895
[FrameworkBundle] framework.php_errors.log now accept a log level 2018-03-27 16:39:44 +02:00
Samuel ROZE
ea6d8618ff feature #26647 [Messenger] Add a middleware that wraps all handlers in one Doctrine transaction. (Nyholm)
This PR was squashed before being merged into the 4.1-dev branch (closes #26647).

Discussion
----------

[Messenger] Add a middleware that wraps all handlers in one Doctrine transaction.

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

This is greatly inspired by SimpleBus. This middleware will rollback a transaction if the message handler throws an exception.

Commits
-------

623dc5fb16 [Messenger] Add a middleware that wraps all handlers in one Doctrine transaction.
2018-03-27 11:43:33 +01:00
Tobias Nyholm
623dc5fb16 [Messenger] Add a middleware that wraps all handlers in one Doctrine transaction. 2018-03-27 11:43:30 +01:00
Gabriel Ostrolucký
eb6974d14c [WebProfilerBundle] Live duration of AJAX request 2018-03-27 11:02:44 +02:00
Fabien Potencier
5b27c2f61f feature #26650 [Messenger] Clone messages to show in profiler (Nyholm)
This PR was squashed before being merged into the 4.1-dev branch (closes #26650).

Discussion
----------

[Messenger] Clone messages to show in profiler

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

We should make the profiler page more pretty by using the cloner.

![screen shot 2018-03-23 at 11 08 02](https://user-images.githubusercontent.com/1275206/37823687-816a373a-2e8a-11e8-824e-ac7f96a51e3b.png)

Commits
-------

4d1be87b70 [Messenger] Clone messages to show in profiler
2018-03-27 09:46:52 +02:00
Tobias Nyholm
4d1be87b70 [Messenger] Clone messages to show in profiler 2018-03-27 09:46:50 +02:00
Fabien Potencier
7b20b8cf3e feature #26281 [FrameworkBundle] keep query in redirect (Simperfit)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[FrameworkBundle] keep query in redirect

| Q             | A
| ------------- | ---
| Branch?       | 4.1
| Bug fix?      | no
| New feature?  | yes <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #26256   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | #9314

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - 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.
-->

Commits
-------

406bfc9896 [FrameworkBundle] keep query params in redirection
2018-03-27 09:45:03 +02:00
Fabien Potencier
a9494840f2 feature #26665 Improved the Ajax profiler panel when there are exceptions (javiereguiluz)
This PR was merged into the 4.1-dev branch.

Discussion
----------

Improved the Ajax profiler panel when there are exceptions

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

This makes the following changes in the Ajax panel:

* The `Profiler` column is now the first one.
* When the response status code is `400` or higher, the profiler link points to the exception panel instead of the default request/response panel

![ajax-panel](https://user-images.githubusercontent.com/73419/37874477-52cf3888-3030-11e8-8042-23351f2e7a0f.png)

Commits
-------

074d68d67f Improved the Ajax profiler panel when there are exceptions
2018-03-27 09:38:41 +02:00
Fabien Potencier
9dd89e014b feature #26332 Add a data_help method in Form (mpiot, Nyholm)
This PR was merged into the 4.1-dev branch.

Discussion
----------

Add a data_help method in Form

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

Add a form_help method in twig to display a help message in form. A `help` keyword is added to all FormType to define the message.

Commits
-------

585ca28b8a Add return type hint
859ee03785 Revert: remove comment line from twig templates
d723756331 Fix some mistakes
c74e0dc2da Use spaceless balises in Twig templates
8b937ff43f Try without try/catch
32bf1f68ad Test the renderHelp method in all Tests about help to skip them if necessary.
437b77e81a Skip renderHelp test as skipped if not override
d84be700b2 Update composer files
075fcfd07c [FrameworkBundle] Add widgetAtt to formTable/form_row
f1d13a860c Fix Fabpot.io
69ded67643 Added form_help on horizontal design and removed special variable
fd53bc579a Enable aria-described in row for all Templates
98065d38b5 fabpot.io fix
edb95f8e44 Use array long syntax
aada72c5d4 Set help option on nul as default
f948147e38 Rename help id (snake_case)
77fa3178bd Fix Test
30deaa9b28 PSR fix
bf4d08c5ae Add aria-describedBy on input
1f3a15e33b Rename id
058489d7df Add an id to the help
6ea7a2054b Remove vars option from form_help
ba798dfdf4 FrameworkBundle Tests
4f2581d7da Use array long syntax
f15bc79df1 Fix coding standards
c934e496d2 Add test without help set
8094804522 Add Tests
067c681580 Template for table, Foundation and Bootstrap 3
d3e3e492df Fix: check translation domain
2c2c04549f Adapt existant tests
831693ad45 Add trans filter
e311838aed Remove raw filter for help
8b97c1b516 Use a shortcut to acces help var in Twig template
1b89f9d9dd Add a template fot div_layout
c8914f591e Add a data_help method in Form
2018-03-27 09:25:04 +02:00
Fabien Potencier
d329a7a755 minor #26674 Updated the Messenger profiler panel (javiereguiluz)
This PR was squashed before being merged into the 4.1-dev branch (closes #26674).

Discussion
----------

Updated the Messenger profiler panel

| 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 profiler icon of the new Messenger component was still pending. After talking with @sroze, we settled on two possible ideas for the icon: 1) focus on "messages"; 2) focus on "bus" / "message bus".

These are the icons for the two proposals:

| "Messages" | "Message Bus"
| --- | ---
| ![icon-1](https://user-images.githubusercontent.com/73419/37912058-da8aabb8-3111-11e8-972c-e3535ab9e1e8.png) | ![icon-2](https://user-images.githubusercontent.com/73419/37912063-dc2df556-3111-11e8-9fe8-c52a2ea0e008.png)

This is how they look inside the profiler:

"Messages"

![icon-1-profiler](https://user-images.githubusercontent.com/73419/37912208-43c402f0-3112-11e8-9a33-4e45ceb44b8b.png)

"Message Bus"

![icon-2-profiler](https://user-images.githubusercontent.com/73419/37912106-f3912f10-3111-11e8-827b-c8cc06c71ebe.png)

-----

My opinion:

* "Messages" look like "forum messages" or "chat messages". It looks wrong to me.
* Inside the profiler, "Messages" looks similar to "Translation" and we already have another "messages" icon for the "Mailer".
* For these reasons, I'd use "Message Bus".

Now, let's hear the community opinion. Thanks!

-----

If you want to test then on your computer:

"Messages"

```svg
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" height="24" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve"><path fill="#aaa" d="M11.32 9.06h-8a3.07 3.07 0 0 0-3.35 3v5a3.09 3.09 0 0 0 3.35 3h2.75l4 3.69c.42.35.89.21.89-.34v-3c2 0 4-1.5 4-3.35v-5c.04-1.85-1.79-3-3.64-3zM11 16.5H4a.5.5 0 1 1 0-1h7a.5.5 0 0 1 0 1zm0-2.63H4a.5.5 0 0 1-.5-.5.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 .5.5.5.5 0 0 1-.5.5zM21.29.06h-6.46A2.83 2.83 0 0 0 12 2.89v5.33c3.31 0 4 2.28 4 4.72 0 .44.46.56.8.28l3.31-3.16h1.21A2.71 2.71 0 0 0 24 7.35V2.77A2.71 2.71 0 0 0 21.29.06zm-.81 6.66h-5a.5.5 0 0 1-.5-.5.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5.5.5 0 0 1-.5.5zm0-2.63h-5a.5.5 0 0 1-.5-.5.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5.5.5 0 0 1-.5.5z"/></svg>
```

"Message Bus"

```svg
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" height="24" viewBox="0 0 24 24" enable-background="new 0 0 24 24" xml:space="preserve"><path fill="#aaa" d="M16 9a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2h-3V4a1 1 0 0 0-1-1H8a2 2 0 0 0-2-2H2a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2h3v6H8a2 2 0 0 0-2-2H2a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2h3v9a1 1 0 0 0 2 0v-5h3a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2v-2a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2h-3V9zm2.52-2.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1zm0 1.63h3a.5.5 0 0 1 .5.5.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5.5.5 0 0 1 .5-.52zm-13-2.82h-3a.5.5 0 0 1-.5-.5.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5.5.5 0 0 1-.54.48zm0-1.62h-3a.5.5 0 0 1-.5-.5.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5.5.5 0 0 1-.54.48zm0 9.62h-3a.5.5 0 0 1-.5-.5.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5.5.5 0 0 1-.54.48zm0-1.62h-3a.5.5 0 0 1-.5-.5.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 .5.5.5.5 0 0 1-.54.48zm13 2.81h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1zm0 1.63h3a.5.5 0 0 1 .5.5.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5.5.5 0 0 1 .5-.52z"/></svg>
```

Commits
-------

92a041c074 Updated the Messenger profiler panel
2018-03-27 09:13:34 +02:00
Javier Eguiluz
92a041c074 Updated the Messenger profiler panel 2018-03-27 09:13:31 +02:00
Javier Eguiluz
510b05fb74 More compact display of vendor code in exception pages 2018-03-27 09:07:12 +02:00
Amrouche Hamza
406bfc9896
[FrameworkBundle] keep query params in redirection 2018-03-26 16:59:39 +02:00
Javier Eguiluz
074d68d67f Improved the Ajax profiler panel when there are exceptions 2018-03-25 13:25:04 +02:00
Grégoire Pineau
ce66ef028f bug #26657 [Workflow] Fixed default parameters (lyrixx)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Workflow] Fixed default parameters

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

fc303a8 [Workflow] Fixed default parameters
2018-03-23 17:00:48 +01:00
Mathieu Piot
585ca28b8a Add return type hint 2018-03-23 15:53:02 +01:00
Mathieu Piot
d723756331 Fix some mistakes 2018-03-23 15:53:02 +01:00
Mathieu Piot
d84be700b2 Update composer files 2018-03-23 15:53:02 +01:00
Mathieu Piot
075fcfd07c [FrameworkBundle] Add widgetAtt to formTable/form_row 2018-03-23 15:53:02 +01:00
Mathieu Piot
f1d13a860c Fix Fabpot.io 2018-03-23 15:53:02 +01:00
Nyholm
69ded67643 Added form_help on horizontal design and removed special variable 2018-03-23 15:53:02 +01:00
Mathieu Piot
98065d38b5 fabpot.io fix 2018-03-23 15:53:02 +01:00
Mathieu Piot
f948147e38 Rename help id (snake_case) 2018-03-23 15:53:02 +01:00
Mathieu Piot
30deaa9b28 PSR fix 2018-03-23 15:53:02 +01:00
Mathieu Piot
bf4d08c5ae Add aria-describedBy on input 2018-03-23 15:53:02 +01:00
Mathieu Piot
1f3a15e33b Rename id 2018-03-23 15:53:02 +01:00
Mathieu Piot
058489d7df Add an id to the help 2018-03-23 15:53:02 +01:00
Mathieu Piot
6ea7a2054b Remove vars option from form_help 2018-03-23 15:53:02 +01:00
Mathieu Piot
ba798dfdf4 FrameworkBundle Tests 2018-03-23 15:53:02 +01:00
Grégoire Pineau
fc303a8d9f [Workflow] Fixed default parameters 2018-03-23 15:16:51 +01:00
Fabien Potencier
4bbdf06c10 feature #23831 [VarDumper] Introduce a new way to collect dumps through a server dumper (ogizanagi, nicolas-grekas)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[VarDumper] Introduce a new way to collect dumps through a server dumper

| Q             | A
| ------------- | ---
| Branch?       | 4.1 <!-- see comment below -->
| Bug fix?      | no
| New feature?  | yes <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #22987 <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | todo <!--highly recommended for new features-->

Could also be interesting as alternate solution for #23442.

Inspired by the [`ServerLogHandler`](https://github.com/symfony/symfony/pull/21080) and @nicolas-grekas's [comment](https://github.com/symfony/symfony/pull/22987#issuecomment-305791102) in #22987.

---

## Description

This PR introduces a new `server:dump` command available in the `VarDumper` component.
Conjointly with a new `ServerDumper` data dumper, it allows to send serialized `Data` clones to a single centralized server, in charge of dumping them on CLI output, or in an file in HTML format.

## Showcase

### HTTP calls

For instance, when working on an API and dumping something, you might end up with a mix of your response and the CLI dumped version of the data you asked:

```php
class HelloController extends AbstractController
{
    /**
     * @Route("/hello")
     */
    public function hello(Request $request, UserInterface $user)
    {
        dump($request->attributes, $user);

        return JsonResponse::create([
            'status' => 'OK',
            'message' => "Hello {$user->getUsername()}"
        ]);
    }
}
```

<img width="732" alt="screenshot 2017-08-08 a 16 44 24" src="https://user-images.githubusercontent.com/2211145/29077731-0b2152d6-7c59-11e7-99dd-2d060a906d48.PNG">

You might even get the HTML dump version [under some conditions](https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/DataCollector/DumpDataCollector.php#L146-L157).

Dumping to a server allows collecting dumps in a separate place:

<!--![server-dumper-http-to-cli-output](https://user-images.githubusercontent.com/2211145/29077977-8ace19ce-7c59-11e7-998e-ee9c49e67958.gif)-->

![server-dump-http-to-cli](https://user-images.githubusercontent.com/2211145/29226044-dcc95f12-7ed0-11e7-8343-40aeb7b18dd5.gif)

~⚠️ By swallowing the previous dumpers output, the dump data collector is not active when running the dump server. Disable swallowing if you want both.~ ➜ Dumps are still collected in the profiler thanks to f24712effc9fab1163c0053e2a0a0d5cc4f6473e

### CLI calls

The best probably is (to me) that you can also debug CLI applications...

![server-dump-cli](https://user-images.githubusercontent.com/2211145/29225951-84e29098-7ed0-11e7-8067-abaa9c50d169.gif)

<!--![server-dumper-cli-to-cli-output](https://user-images.githubusercontent.com/2211145/29078261-1eb950ea-7c5a-11e7-94ee-aa3ae3bf7fb0.gif)-->

...and get HTML formatted dumps:

![server-dumper-cli-to-html-output](https://user-images.githubusercontent.com/2211145/30784609-d7dc19b8-a158-11e7-9b11-88ae819cfcca.gif)

<!--![server-dump-cli-to-html](https://user-images.githubusercontent.com/2211145/29225866-2b5675e4-7ed0-11e7-98eb-339611bd94a7.gif)-->

<!--![server-dumper-cli-to-html-output](https://user-images.githubusercontent.com/2211145/29078247-17e33e5c-7c5a-11e7-94f7-47de6774e0e8.gif)-->

hence, benefit from all the features of this format (collapse, search, ...)

### HTML output at a glance

<img width="831" alt="screenshot 2017-08-11 a 19 28 25" src="https://user-images.githubusercontent.com/2211145/29225513-eae349f2-7ece-11e7-9861-8cda9e80ba7f.PNG">

The HTML output benefits from all the `HtmlDumper` features and contains extra informations about the context (sources, requests, command line, ...). It doesn't aim to replace the profiler for HTTP calls with the framework, but is really handy for CLI apps or by wiring it in your own web app, out of the framework usage.

### CLI output at a glance

<img width="829" alt="screenshot 2017-08-11 a 19 52 57" src="https://user-images.githubusercontent.com/2211145/29225482-c24afe18-7ece-11e7-8e83-d019b0d8303e.PNG">

## Usage within the framework

### Config

For instance, in your `config_dev.yml`:

```yml
#config_dev.yml
debug:
    server_dump: true
```

or in your `config.yml`:

```yml
#config.yml
debug:
    server_dump: '%kernel.debug%'
```

~~The configuration also allows to set a `host` option, but there is already a sensible default value (`tcp://0.0.0.0:9912`) so you don't have to deal with it.~~ Since b002175, in case you want to change the default host value used, simply use the `VAR_DUMPER_SERVER` env var.

When the server is running, all dumps are collected by the server and previous dumpers ones are "swallowed" ~~by default. If you want both to collect dumps on the server AND keep previous dumpers on regular outputs, you can disable swallowing:~~

<!--
```yml
debug:
    server_dump:
        swallow: false
```
-->

When the server isn't running or in case of failure to send the data clones to the server, the server dumper will delegates to the configured wrapped dumper, so dumps are displayed and collected as usual.

### Running the server

```bash
bin/console server:dump [--format=cli|html]
```

#### Options

- ~~The `output` option defaults to `null` which will display dumps on CLI. It accepts a file path in which dumps will be collected in HTML format.~~
- The `format` option allows to switch format to use. For instance, use the `html` format and redirect the output to a file in order to open it in your browser and inspect dumps in HTML format.
- ~~The default `host` value is the same as the one configured under the `debug.server_dump.host` config option, so you don't have to deal with it in most cases.~~
    Since b002175, in case you want to change the default host value used, simply use the `VAR_DUMPER_SERVER` env var:

    ```bash
    VAR_DUMPER_SERVER=0.0.0.0:9204 bin/console server:dump
    ```

## Manual wiring

If you want to wire it yourself in your own project or using it to inspect dumps as html before the kernel is even boot for instance:

```php
$host = 'tcp://0.0.0.0:9912'; // use null to read from the VAR_DUMPER_SERVER env var
$cloner = new VarCloner();
$dumper = new ServerDumper($host, new CliDumper());

VarDumper::setHandler(function ($var) use ($dumper, $cloner) {
    $dumper->dump($cloner->cloneVar($var));
});
```

## Create your own server app

The component already provides a default server app by means of the `ServerDumpCommand`, but
 you could also build your own by using the `DumpServer`:

```php
$host = 'tcp://0.0.0.0:9912'; // use null to read from the VAR_DUMPER_SERVER env var

$server = new DumpServer($host);

$server->start();

$server->listen(function (Data $data, array $context, $clientId) {
    // do something
});
```

Commits
-------

138dad6440 [VarDumper] Some tweaks after Nicolas' commit & ServerDumperPlaceholderCommand
088c52ed70 [VarDumper] Review config to use debug.dump_destination & tweak data collector
3db14045d4 [VarDumper] Introduce a new way to collect dumps through a server dumper
2018-03-23 10:18:50 +01:00
Maxime Steinhausser
138dad6440 [VarDumper] Some tweaks after Nicolas' commit & ServerDumperPlaceholderCommand 2018-03-23 10:12:13 +01:00
Nicolas Grekas
088c52ed70 [VarDumper] Review config to use debug.dump_destination & tweak data collector
(cherry picked from commit 602b9a8)
2018-03-23 10:11:10 +01:00
Maxime Steinhausser
3db14045d4 [VarDumper] Introduce a new way to collect dumps through a server dumper 2018-03-23 10:11:09 +01:00
Fabien Potencier
e157dedc6a feature #24411 [Messenger] Add a new Messenger component (sroze)
This PR was squashed before being merged into the 4.1-dev branch (closes #24411).

Discussion
----------

[Messenger] Add a new Messenger component

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

As discussed in #24326. This PR is to help going forward with the discussions of having a Message component.

# Resources

| What | Where
| --- | ---
| Documentation | [In the PR](https://github.com/sroze/symfony/blob/add-message-component/src/Symfony/Component/Message/README.md)
| Demo | [In `sroze/symfony-demo:message-component-demo`](https://github.com/sroze/symfony-demo/compare/message-component-demo)
| [php-enqueue](https://github.com/php-enqueue/enqueue-dev) adapter | 1. Source: [In `sroze/enqueue-bridge`](https://github.com/sroze/enqueue-bridge) _(to be moved as `symfony/enqueue-bridge` I guess)_<br/>2. Demo: [In `sroze/symfony-demo:message-component-demo-with-enqueue`](https://github.com/sroze/symfony-demo/compare/message-component-demo...sroze:message-component-demo-with-enqueue)
| [Swarrot](https://github.com/swarrot/swarrot) adapter | **Outdated adapter, waiting for stabilization** 1. Source: [In `sroze/swarrot-bridge`](https://github.com/sroze/swarrot-bridge) _(to be moved as `symfony/swarrot-bridge` I guess)_<br/>2. Demo: [In `sroze/symfony-demo:message-component-demo-with-swarrot`](https://github.com/sroze/symfony-demo/compare/message-component-demo...sroze:message-component-demo-with-swarrot)
| [HTTP](https://github.com/sroze/message-http-adapter) adapter | **Outdated adapter, waiting for stabilization** 1. Source: [In `sroze/message-http-adapter`](https://github.com/sroze/message-http-adapter) <br/>2. Demo: [In `sroze/symfony-demo:message-component-demo-with-http-adapter`](https://github.com/sroze/symfony-demo/compare/message-component-demo...sroze:message-component-demo-with-http-adapter)
| Web profiler integration | _In the pull-request_

# Important points

1. **Tests are not in the PR as they were written in PhpSpec & Behat.** If we decide to go forward with this approach, I'll translate them to PHPUnit.
2. The aim is not to solve all the message/queuing problems but provide a good, simple and extensible message bus for developers.
3. The communication with the actual AMQP/API brokers is down to the adapters for now. Not sure if we need to ship some by default or not 🤔

I guess that this would replace #23842 & #23315.

# Changes from the proposals

Based on the comments, a few changes have been made from the proposal.

1. `MessageProducer`s have been renamed to `MessageSender`s
2. `MessageConsumer`s have been renamed to `MessageReceiver`s

Commits
-------

c9cfda990b [Messenger] Add a new Messenger component
2018-03-23 09:01:57 +01:00
Samuel ROZE
c9cfda990b [Messenger] Add a new Messenger component 2018-03-23 09:01:52 +01:00
Fabien Potencier
acf49e9d85 feature #22150 [Serializer] Added a ConstraintViolationListNormalizer (lyrixx)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Serializer] Added a ConstraintViolationListNormalizer

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

---

It seems logical to me that Symfony is able to serialise natively some very common Symfony data structure. (and requested by @nicolas-grekas & @javiereguiluz )

Usage example (from symfony/symfony-demo):

```php
    /**
     * @Route("", name="api_blog_new")
     * @Method("POST")
     * @Security("is_granted('ROLE_ADMIN')")
     */
    public function newAction(Request $request)
    {
        $data = $request->getContent();

        $post = $this->get('serializer')->deserialize($data, Post::class, 'json', ['groups' => ['post_write']]);

        $post->setAuthor($this->getUser());

        $violations = $this->get('validator')->validate($post);

        $post->setSlug($this->get('slugger')->slugify($post->getTitle()));

        if (count($violations) > 0) {
            $repr = $this->get('serializer')->serialize($violations, 'json');

            return JsonResponse::fromJsonString($repr, 400);
        }

        $this->getDoctrine()->getManager()->persist($post);
        $this->getDoctrine()->getManager()->flush();

        $repr = $this->get('serializer')->serialize($post, 'json', ['groups' => ['post_read']]);

        return JsonResponse::fromJsonString($repr);
    }
```

Commits
-------

2a35d09f53 [Serializer] Added a ConstraintViolationListNormalizer
2018-03-23 08:59:18 +01:00
Grégoire Pineau
886b8a6e29 [SecurityBundle] Added an alias from RoleHierarchyInterface to security.role_hierarchy 2018-03-22 17:50:26 +01:00
Grégoire Pineau
2a35d09f53 [Serializer] Added a ConstraintViolationListNormalizer 2018-03-22 10:57:52 +01:00
Nicolas Grekas
2cfc57315e [WebProfilerBundle] use the router to resolve file links 2018-03-21 20:24:29 +01:00
Fabien Potencier
07a2f6cef4 feature #26092 [Workflow] Add a MetadataStore to fetch some metadata (lyrixx)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Workflow] Add a MetadataStore to fetch some metadata

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

---

This is an attempt to fix #23257. I first started to implement
`Ẁorkflow::getMetadata()`, `Transition::getMetadata()` and
`Place::getMetadata()`. **BUT**, there are no `Place` class. For now it's just a
`string`. So dealing with BC is a nightmare.

So I tried to find another way to fix the issue. [This
comment](https://github.com/symfony/symfony/issues/23257#issuecomment-315551397)
summary well the two options. But this PR is (will be) a mix of theses 2
options.

First it will be possible to configure the workflow/metadata like this:

```yaml
blog_publishing:
    supports:
        - AppBundle\Entity\BlogPost
    metada:
         label: Blog publishing
         description: Manages blog publishing
    places:
        draft:
            metadata:
                 description: Blog has just been created
                 color: grey
        review:
            metadata:
                 description: Blog is waiting for review
                 color: blue
    transitions:
        to_review:
            from: draft
            to: review
            metadata:
                label: Submit for review
                route: admin.blog.review
```

I think is very good for the DX. Simple to understand.

All metadata will live in a `MetadataStoreInterface`. If metadata are set via
the configuration (workflows.yaml), then we will use the
`InMemoryMetadataStore`.

Having a MetadataStoreInterface allow user to get dynamic value for a place /
transitions. It's really flexible. (But is it a valid use case ?)

Then, to retrieve these data, the end user will have to write this code:

```php
public function onReview(Event $event) {
    $metadataStore = $event->getWorkflow()->getMetadataStore();
    foreach ($event->getTransition()->getTos() as $place) {
        $this->flashbag->add('info', $metadataStore->getPlaceMetadata($place)->get('description'));
    }
}
```

Note: I might add some shortcut to the Event class

or in twig:

```jinja
{% for transition in workflow_transitions(post) %}
    <a href="{{ workflow_metadata_transition(post, route) }}">
         {{ workflow_metadata_transition(post, transition) }}
   </a>
{% endfor %}
```

---

WDYT ?

Should I continue this way, or should I introduce a `Place` class (there will be
so many deprecation ...)

Commits
-------

bd1f2c8583 [Workflow] Add a MetadataStore
2018-03-21 11:17:02 +01:00
Grégoire Pineau
bd1f2c8583 [Workflow] Add a MetadataStore 2018-03-21 11:06:23 +01:00
Fabien Potencier
14ab56e6fc feature #26121 [FrameworkBundle] feature: add the ability to search a route (Simperfit)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[FrameworkBundle] feature: add the ability to search a route

| Q             | A
| ------------- | ---
| Branch?       | 4.1
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #26033
| License       | MIT
| Doc PR        | symfony/symfony-docs#9236

This add the ability to search a route in the debug:router command.
![img_3271](https://user-images.githubusercontent.com/3451634/36034017-e60cbfda-0db2-11e8-841a-60bc75b0b631.jpeg)

Commits
-------

ef0df02afc [FrameworkBundle] feature: add the ability to search a route
2018-03-21 10:59:31 +01:00
Grégoire Pineau
60730666ab [FrameworkBundle] Partially revert HttpCache is not longer abstract (4d075da) 2018-03-21 10:56:17 +01:00
Amrouche Hamza
ef0df02afc
[FrameworkBundle] feature: add the ability to search a route 2018-03-21 10:40:34 +01:00
Fabien Potencier
a1b1a44a7b feature #25197 [FrameworkBundle][TwigBridge] make csrf_token() usable without forms (xabbuh)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[FrameworkBundle][TwigBridge] make csrf_token() usable without forms

| 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 Twig function `csrf_token()` is currently only registered when the
Form component is installed. However, this function is also useful, for
example, when creating simple login forms for which you do not need the
full Form component.

Commits
-------

709efa30fc make csrf_token() usable without forms
2018-03-21 10:10:25 +01:00
Nicolas Grekas
2ca8657547 Merge branch '4.0'
* 4.0: (32 commits)
  [Form] fix tests and deps
  [Cache] Rely on mock for Doctrine ArrayCache
  [FrameworkBundle] Respect debug mode when warm up annotations
  [Console] Fix docblock of DescriptorInterface::describe
  [Config] Handle nullable node name + fix inheritdocs
  [Security] added userChecker to SimpleAuthenticationProvider
  [Debug] fix test
  Fix typo in test method name
  Fixes #26563 (open_basedir restriction in effect)
  [Debug] Reset previous exception handler ealier to prevent infinite loop
  add hint in Github pull request template
  [Validator] Fix docblock of ClassMetadata#members
  [BrowserKit] Fix cookie path handling when $domain is null
  [DoctrineBridge] Don't rely on ClassMetadataInfo->hasField in DoctrineOrmTypeGuesser anymore
  [BrowserKit] Improves CookieJar::get
  [BrowserKit] Fix Cookie's PHPDoc
  [DomCrawler] Change bad wording in ChoiceFormField::untick
  [DomCrawler] Fix the PHPDoc of ChoiceFormField::setValue
  [DomCrawler] Avoid a useless call to strtolower
  [FrameworkBundle] HttpCache is not longer abstract
  ...
2018-03-19 23:38:22 +01:00
Nicolas Grekas
1f119cc16c Merge branch '3.4' into 4.0
* 3.4: (32 commits)
  [Form] fix tests and deps
  [Cache] Rely on mock for Doctrine ArrayCache
  [FrameworkBundle] Respect debug mode when warm up annotations
  [Console] Fix docblock of DescriptorInterface::describe
  [Config] Handle nullable node name + fix inheritdocs
  [Security] added userChecker to SimpleAuthenticationProvider
  [Debug] fix test
  Fix typo in test method name
  Fixes #26563 (open_basedir restriction in effect)
  [Debug] Reset previous exception handler ealier to prevent infinite loop
  add hint in Github pull request template
  [Validator] Fix docblock of ClassMetadata#members
  [BrowserKit] Fix cookie path handling when $domain is null
  [DoctrineBridge] Don't rely on ClassMetadataInfo->hasField in DoctrineOrmTypeGuesser anymore
  [BrowserKit] Improves CookieJar::get
  [BrowserKit] Fix Cookie's PHPDoc
  [DomCrawler] Change bad wording in ChoiceFormField::untick
  [DomCrawler] Fix the PHPDoc of ChoiceFormField::setValue
  [DomCrawler] Avoid a useless call to strtolower
  [FrameworkBundle] HttpCache is not longer abstract
  ...
2018-03-19 23:35:49 +01:00
Nicolas Grekas
34d5b5eb99 Merge branch '2.8' into 3.4
* 2.8: (29 commits)
  [Console] Fix docblock of DescriptorInterface::describe
  [Config] Handle nullable node name + fix inheritdocs
  [Security] added userChecker to SimpleAuthenticationProvider
  [Debug] fix test
  Fix typo in test method name
  Fixes #26563 (open_basedir restriction in effect)
  [Debug] Reset previous exception handler ealier to prevent infinite loop
  add hint in Github pull request template
  [Validator] Fix docblock of ClassMetadata#members
  [BrowserKit] Fix cookie path handling when $domain is null
  [DoctrineBridge] Don't rely on ClassMetadataInfo->hasField in DoctrineOrmTypeGuesser anymore
  [BrowserKit] Improves CookieJar::get
  [BrowserKit] Fix Cookie's PHPDoc
  [DomCrawler] Change bad wording in ChoiceFormField::untick
  [DomCrawler] Fix the PHPDoc of ChoiceFormField::setValue
  [DomCrawler] Avoid a useless call to strtolower
  [FrameworkBundle] HttpCache is not longer abstract
  Php Inspections (EA Ultimate): address some of one-time used local variables
  [Intl] Load locale aliases to support alias fallbacks
  [CssSelector] Fix CSS identifiers parsing - they can start with dash
  ...
2018-03-19 23:32:39 +01:00
Fabien Potencier
28f4662935 bug #26513 [FrameworkBundle] Respect debug mode when warm up annotations (Strate)
This PR was squashed before being merged into the 3.4 branch (closes #26513).

Discussion
----------

[FrameworkBundle] Respect debug mode when warm up annotations

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

Propagate current debug mode to the annotations reader. Without thi, warmup is useless with debug mode, because timetsamps are not written to cache.

Commits
-------

f3ec39616c [FrameworkBundle] Respect debug mode when warm up annotations
2018-03-19 22:13:45 +01:00
Artur Eshenbrener
f3ec39616c [FrameworkBundle] Respect debug mode when warm up annotations 2018-03-19 22:13:45 +01:00
Nicolas Grekas
af6be350e6 Merge branch '2.7' into 2.8
* 2.7:
  [Config] Handle nullable node name + fix inheritdocs
  [Security] added userChecker to SimpleAuthenticationProvider
  [Debug] fix test
  Fix typo in test method name
  Fixes #26563 (open_basedir restriction in effect)
  [Debug] Reset previous exception handler ealier to prevent infinite loop
  add hint in Github pull request template
  [Validator] Fix docblock of ClassMetadata#members
  [BrowserKit] Fix cookie path handling when $domain is null
  [DoctrineBridge] Don't rely on ClassMetadataInfo->hasField in DoctrineOrmTypeGuesser anymore
  [BrowserKit] Improves CookieJar::get
  [BrowserKit] Fix Cookie's PHPDoc
  [DomCrawler] Change bad wording in ChoiceFormField::untick
  [DomCrawler] Fix the PHPDoc of ChoiceFormField::setValue
  [DomCrawler] Avoid a useless call to strtolower
  [FrameworkBundle] HttpCache is not longer abstract
  [DomCrawler] extract(): fix a bug when the attribute list is empty
  [Config] Backport string|null api for node names
2018-03-19 22:11:56 +01:00
Boris Vujicic
cb9c92d065 [Security] added userChecker to SimpleAuthenticationProvider 2018-03-19 21:02:10 +01:00
Nicolas Grekas
5e5216017a Merge branch '4.0'
* 4.0: (28 commits)
  [DI] Add tests for EnvVarProcessor
  typo
  [Bridge\PhpUnit] Fix #26430 Cannot autoload listeners
  Make sure we always render errors. Eventhough labels are disabled
  Make sure form errors is valid HTML
  [HttpKernel] Allow generators in registerBundle
  [TwigBundle] document TwigRenderer BC break in UPGRADE-3.4
  Extra line to bootstrap 3 horizontal layout
  [Serializer] Remove const override
  Update Client.php
  [PhpUnitBridge] Ability to use different composer.json file
  [DomCrawler] FormField: remove an useless return statement
  [Config] ReflectionClassResource check abstract ServiceSubscriberInterface and EventSubscriberInterface
  Display the Welcome Page when there is no homepage defined
  [DI] Remove dead dumper check
  Make KernelInterface docblock more fit for bundle-less environment
  fix regression when extending the Container class without a constructor
  fix the updating of timestamp in the MemcachedSessionHandler
  [SecurityBundle] Make extra character non mandatory in regex
  [Config] Add characters to the regex
  ...
2018-03-19 18:34:12 +01:00
Nicolas Grekas
72041c8821 Merge branch '3.4' into 4.0
* 3.4: (22 commits)
  [DI] Add tests for EnvVarProcessor
  [Bridge\PhpUnit] Fix #26430 Cannot autoload listeners
  Make sure we always render errors. Eventhough labels are disabled
  Make sure form errors is valid HTML
  [HttpKernel] Allow generators in registerBundle
  [TwigBundle] document TwigRenderer BC break in UPGRADE-3.4
  Extra line to bootstrap 3 horizontal layout
  [Serializer] Remove const override
  Update Client.php
  [PhpUnitBridge] Ability to use different composer.json file
  [DomCrawler] FormField: remove an useless return statement
  [Config] ReflectionClassResource check abstract ServiceSubscriberInterface and EventSubscriberInterface
  Display the Welcome Page when there is no homepage defined
  fix regression when extending the Container class without a constructor
  fix the updating of timestamp in the MemcachedSessionHandler
  [SecurityBundle] Make extra character non mandatory in regex
  [Config] Add characters to the regex
  bumped Symfony version to 3.4.7
  updated VERSION for 3.4.6
  updated CHANGELOG for 3.4.6
  ...
2018-03-19 18:30:36 +01:00
Nicolas Grekas
7ae529291f bug #26273 [Security][Profiler] Display the original expression in 'Access decision log' (lyrixx)
This PR was merged into the 3.4 branch.

Discussion
----------

[Security][Profiler] Display the original expression in 'Access decision log'

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

---

before:

![screenshot at 2018-02-22 18-22-28](https://user-images.githubusercontent.com/408368/36553752-798001ba-17fd-11e8-9539-254a25a01e60.png)

after:

![after](https://user-images.githubusercontent.com/408368/36553856-b7449fe2-17fd-11e8-94cb-ddaf4f033511.png)

Commits
-------

8f16c2e [Security][Profiler] Display the original expression in 'Access decision log'
2018-03-19 18:03:08 +01:00
Nicolas Grekas
9446fa01c4 minor #26592 [FrameworkBundle] Use a::b notation in ControllerTrait docblock (hacfi)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[FrameworkBundle] Use `a::b` notation in ControllerTrait docblock

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

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - 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.
-->

Replaced the deprecated the bundle notation with the new `a::b` notation in the docblock of `ControllerTrait::forward`

Commits
-------

973c5ec [FrameworkBundle] Use `a::b` notation in ControllerTrait docblock
2018-03-19 13:53:48 +01:00
Philipp Wahala
973c5ec995 [FrameworkBundle] Use a::b notation in ControllerTrait docblock 2018-03-18 18:57:30 +01:00
Florent Mata
4110d57da1 [HttpFoundation] deprecate call to Request::getSession() when Request::hasSession() returns false 2018-03-17 16:02:11 +01:00
Nicolas Grekas
5cf0a2ea8f feature #26499 [FrameworkBundle] Allow fetching private services from test clients (nicolas-grekas)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[FrameworkBundle] Allow fetching private services from test clients

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

With this PR, `$client->getContainer()` returns a special container that gives access to private services as if they were public.

Tests derived from `WebTestCase` and `KernelTestCase` can access this special container by using the new `static::$container` property.

Commits
-------

a840809 [FrameworkBundle] Allow fetching private services from test clients
2018-03-16 10:51:38 +01:00
Fabien Potencier
bf120d042b feature #26288 [FrameworkBundle] show the unregistered command warning at the end of the list command (Simperfit)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[FrameworkBundle] show the unregistered command warning at the end of the list command

| Q             | A
| ------------- | ---
| Branch?       | 4.1
| Bug fix?      | no
| New feature?  | yes   <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no   <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #26203  <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | I don't think we need one.

This PR modify the warning error when you have unregistered command on the list command, it shows it at the end.

Commits
-------

99b104ab5c [FrameworkBundle] show the unregistered command warning at the end of the list command
2018-03-15 09:35:44 -07:00
Grégoire Pineau
4d075da934 [FrameworkBundle] HttpCache is not longer abstract 2018-03-15 10:35:06 +01:00
Amrouche Hamza
99b104ab5c
[FrameworkBundle] show the unregistered command warning at the end of the list command 2018-03-14 12:19:56 +01:00
Javier Eguiluz
547076e3ea Added some HTML5 features to the Symfony Profiler 2018-03-14 10:51:38 +01:00
Nicolas Grekas
a840809e5d [FrameworkBundle] Allow fetching private services from test clients 2018-03-13 12:50:01 +01:00
Fabien Potencier
009b4d216e feature #26398 [WebProfilerBundle] Display the missing translation panel by default (javiereguiluz)
This PR was squashed before being merged into the 4.1-dev branch (closes #26398).

Discussion
----------

[WebProfilerBundle] Display the missing translation panel by default

| 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#... <!-- required for new features -->

Display the "Missing Translations" panel by default ... except if there are no missing translations.

Commits
-------

15fe686a58 [WebProfilerBundle] Display the missing translation panel by default
2018-03-10 15:12:02 -06:00
Javier Eguiluz
15fe686a58 [WebProfilerBundle] Display the missing translation panel by default 2018-03-10 15:12:00 -06:00
David Prévot
44b4fc8db5 [SecurityBundle] Make extra character non mandatory in regex
The extra character was introduced in 5f9471e, and breaks the testsuite
in native php 7.2.
2018-03-05 22:53:32 -10:00
Javier Eguiluz
21ee76c0ad Made the translation profiler panel more compact 2018-03-05 16:26:36 +01:00
Nicolas Grekas
710a189e83 Merge branch '2.7' into 2.8
* 2.7:
  [WebProfilerBundle] fix wrong variable for profiler counting ajax requests
2018-03-02 16:25:13 +01:00
Marin Nicolae
0fb83af015 [WebProfilerBundle] fix wrong variable for profiler counting ajax requests 2018-03-02 16:24:40 +01:00
Nicolas Grekas
1f7b9f0fc5 feature #26223 [FrameworkBundle] Add command to delete an item from a cache pool (pierredup)
This PR was squashed before being merged into the 4.1-dev branch (closes #26223).

Discussion
----------

[FrameworkBundle] Add command to delete an item from a cache pool

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

Currently there is no way to clear a specific item from a cache pool (except programatically), the entire pool needs to be cleared.
Especially during development, when implementing caching, it is useful to delete a specific key to test functionality. Clearing the entire pool, means that everything will need to be cached again, adding unnecessary execution time.

I propose adding a new command, `cache:pool:delete` to delete a specific item from a cache pool

Commits
-------

fd43e81 [FrameworkBundle] Add command to delete an item from a cache pool
2018-03-02 13:13:05 +01:00
Pierre du Plessis
fd43e81fd7 [FrameworkBundle] Add command to delete an item from a cache pool 2018-03-02 13:13:00 +01:00
Nicolas Grekas
acb5d9f9a1 Merge branch '4.0'
* 4.0:
  [WebProfilerBundle] Fix Debug toolbar breaks app
  Use fill instead of style for svg colors
  bumped Symfony version to 4.0.6
  updated VERSION for 4.0.5
  updated CHANGELOG for 4.0.5
  bumped Symfony version to 3.4.6
  updated VERSION for 3.4.5
  updated CHANGELOG for 3.4.5
  bumped Symfony version to 2.8.36
  updated VERSION for 2.8.35
  updated CHANGELOG for 2.8.35
  [FrameworkBundle] Silence "Failed to remove directory" on cache:clear
  bumped Symfony version to 2.7.43
  updated VERSION for 2.7.42
  update CONTRIBUTORS for 2.7.42
  updated CHANGELOG for 2.7.42
2018-03-02 09:29:06 +01:00
Nicolas Grekas
1c826ca0f3 Merge branch '3.4' into 4.0
* 3.4:
  [WebProfilerBundle] Fix Debug toolbar breaks app
  Use fill instead of style for svg colors
  bumped Symfony version to 3.4.6
  updated VERSION for 3.4.5
  updated CHANGELOG for 3.4.5
  bumped Symfony version to 2.8.36
  updated VERSION for 2.8.35
  updated CHANGELOG for 2.8.35
  [FrameworkBundle] Silence "Failed to remove directory" on cache:clear
  bumped Symfony version to 2.7.43
  updated VERSION for 2.7.42
  update CONTRIBUTORS for 2.7.42
  updated CHANGELOG for 2.7.42
2018-03-02 09:28:17 +01:00
Nicolas Grekas
fe4d055bd7 Merge branch '2.8' into 3.4
* 2.8:
  [WebProfilerBundle] Fix Debug toolbar breaks app
  bumped Symfony version to 2.8.36
  updated VERSION for 2.8.35
  updated CHANGELOG for 2.8.35
  bumped Symfony version to 2.7.43
  updated VERSION for 2.7.42
  update CONTRIBUTORS for 2.7.42
  updated CHANGELOG for 2.7.42
2018-03-02 09:27:00 +01:00
Nicolas Grekas
aa8254ce2f Merge branch '2.7' into 2.8
* 2.7:
  [WebProfilerBundle] Fix Debug toolbar breaks app
  bumped Symfony version to 2.7.43
  updated VERSION for 2.7.42
  update CONTRIBUTORS for 2.7.42
  updated CHANGELOG for 2.7.42
2018-03-02 09:25:37 +01:00
Nicolas Grekas
b2df671912 feature #26341 Autoconfigure service locator tag (apfelbox)
This PR was squashed before being merged into the 4.1-dev branch (closes #26341).

Discussion
----------

Autoconfigure service locator tag

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

We will now also autoconfigure the (required) tag `container.service_locator` for all `ServiceLocator`s.

I couldn't find any integration tests for the whole list of autoconfigured core services, so I didn't add any new tests.

Commits
-------

c4b9b42 Autoconfigure service locator tag
2018-03-02 09:24:43 +01:00
Jannik Zschiesche
c4b9b4252b Autoconfigure service locator tag 2018-03-02 09:24:40 +01:00
Xavier HAUSHERR
52f187e86a [WebProfilerBundle] Fix Debug toolbar breaks app 2018-03-02 09:20:32 +01:00
Remon van de Kamp
e29677858f
Use fill instead of style for svg colors
Using style does not work when a Content Security Policy is in place,
resulting in non-styles (black) images instead of grey.
2018-03-02 09:07:37 +01:00
Nicolas Grekas
3ba624af9f [FrameworkBundle] Silence "Failed to remove directory" on cache:clear 2018-03-01 15:51:10 +01:00
Nicolas Grekas
d1b67a561c fix test 2018-03-01 11:49:02 +01:00
Fabien Potencier
97cee3a157 Merge branch '4.0'
* 4.0:
  [Form][WCAG] Add hidden labels on date and time fields
  Pass on previous exception in FatalThrowableError
  [Routing] remove dead code
  [Routing] fix typo
  [Form][WCAG] Fixed HTML errors
  fix merge
  [FrameworkBundle] [Console] add a warning when command is not found
  [WebProfilerBundle] limit ajax request to 100 and remove the last one
2018-02-28 13:50:15 -08:00
Fabien Potencier
96aac17c0d Merge branch '3.4' into 4.0
* 3.4:
  [Form][WCAG] Add hidden labels on date and time fields
  Pass on previous exception in FatalThrowableError
  [Routing] remove dead code
  [Routing] fix typo
  [Form][WCAG] Fixed HTML errors
  fix merge
  [FrameworkBundle] [Console] add a warning when command is not found
  [WebProfilerBundle] limit ajax request to 100 and remove the last one
2018-02-28 13:50:02 -08:00
Grégoire Pineau
8f16c2e39e [Security][Profiler] Display the original expression in 'Access decision log' 2018-02-28 09:32:47 +01:00
Nicolas Grekas
4a9e5c7099 minor #26270 [WebProfilerBundle] limit ajax request to 100 and remove the last one (Simperfit)
This PR was merged into the 3.4 branch.

Discussion
----------

[WebProfilerBundle] limit ajax request to 100 and remove the last one

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | none fix merge
| License       | MIT

Merging back the bugfix to 3.4.

Commits
-------

33bace4 [WebProfilerBundle] limit ajax request to 100 and remove the last one
2018-02-27 19:18:46 +01:00
Robin Chalas
5781b8f1a1 [SecurityBundle] Deprecate switch_user.stateless config node 2018-02-27 15:11:07 +01:00
Fabien Potencier
4261b19e75 bug #26290 [FrameworkBundle] [Console][DX] add a warning when command is not found (Simperfit)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] [Console][DX] add a warning when command is not found

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | none
| License       | MIT
| Doc PR        |

This PR add DX on the the console `find()` and `get()` methods when a command is not found because it has not been registered properly.

Commits
-------

efd8f7fa3a [FrameworkBundle] [Console] add a warning when command is not found
2018-02-27 08:02:49 +01:00
Nicolas Grekas
d419fd4cc8 fix merge 2018-02-26 19:35:35 +01:00
Nicolas Grekas
f06fa04ff1 Merge branch '4.0'
* 4.0:
  Fix typos
  [Routing] remove useless failing mocks
  [appveyor] Workaround GitHub disabling of low versions of TLS
  Use long array syntax
  [Routing] Fix GC control of PHP-DSL
  [Routing] Don't throw 405 when scheme requirement doesn't match
  [Routing] Revert throwing 405 on missed slash/scheme redirections
  [WebProfilerBundle] fix test after ajax path updated
  Fix ArrayInput::toString() for InputArgument::IS_ARRAY args
  Update excluded_ajax_paths for sf4
  Add missing use for RoleInterface
  Add missing use of Role
  [Routing] fix CS
  add container.autowiring.strict_mode to 3.4 docs
  Set controller without __invoke method from invokable class
  [VarDumper] Fixed PHPDoc
2018-02-26 18:04:28 +01:00
Nicolas Grekas
b56674720c Merge branch '3.4' into 4.0
* 3.4:
  [Routing] remove useless failing mocks
  [appveyor] Workaround GitHub disabling of low versions of TLS
  Use long array syntax
  [Routing] Fix GC control of PHP-DSL
  [Routing] Don't throw 405 when scheme requirement doesn't match
  [Routing] Revert throwing 405 on missed slash/scheme redirections
  [WebProfilerBundle] fix test after ajax path updated
  Fix ArrayInput::toString() for InputArgument::IS_ARRAY args
  Update excluded_ajax_paths for sf4
  Add missing use for RoleInterface
  [Routing] fix CS
  add container.autowiring.strict_mode to 3.4 docs
  Set controller without __invoke method from invokable class
  [VarDumper] Fixed PHPDoc
2018-02-26 16:55:47 +01:00
Fabien Potencier
52af59fd48 bug #26275 Set controller without __invoke method from invokable class (Tobion)
This PR was merged into the 3.4 branch.

Discussion
----------

Set controller without __invoke method from invokable class

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets |
| License       | MIT
| Doc PR        |

Fixes one part of #25103

Commits
-------

cc68c5074e Set controller without __invoke method from invokable class
2018-02-26 05:28:34 +01:00
Tobias Schultze
cd5f4105a4 minor #26280 [FrameworkBundle] clarify changelog and upgrade instructions (xabbuh)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[FrameworkBundle] clarify changelog and upgrade instructions

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

Commits
-------

a8df0aee92 clarify changelog and upgrade instructions
2018-02-25 16:08:35 +01:00
Amrouche Hamza
efd8f7fa3a
[FrameworkBundle] [Console] add a warning when command is not found 2018-02-25 09:26:30 +01:00
Amrouche Hamza
77dfc90846
[WebProfilerBundle] fix test after ajax path updated 2018-02-24 20:41:23 +01:00
Houziaux mike
ce01097935 Update excluded_ajax_paths for sf4 2018-02-24 12:14:39 +01:00
Christian Flothmann
3b092a08ea fix lowest supported Serializer version
The `AbstractObjectNormalizer::setMaxDepthHandler()` method does not
exist before `symfony/serializer` 4.1.
2018-02-23 14:04:00 +01:00
Christian Flothmann
a8df0aee92 clarify changelog and upgrade instructions 2018-02-23 09:21:43 +01:00
Tobias Schultze
cc68c5074e Set controller without __invoke method from invokable class 2018-02-23 00:30:18 +01:00
Amrouche Hamza
33bace44d4
[WebProfilerBundle] limit ajax request to 100 and remove the last one 2018-02-22 15:11:08 +01:00
Nicolas Grekas
3609744ab8 Merge branch '4.0'
* 4.0:
  [Translation] Process multiple segments within a single unit.
  Document the container.autowiring.strict_mode option
  fix custom radios/inputs for checkbox/radio type
  Another PR template tweak
  [FrameworkBundle] Add missing XML config for circular_reference_handler. Add tests.
  fix CS
  [PropertyInfo] ReflectionExtractor: give a chance to other extractors if no properties
  Clean calls to http_build_query()
  [WebProfilerBundle] limit ajax request to 100 and remove the last one
  Add support for URL-like DSNs for the PdoSessionHandler
  removed version in @final @internal for version < 4.0
  [HttpFoundation] Fix missing "throw" in JsonResponse
  Improve the documentation of
  Suppress warning from sapi_windows_vt100_support on stream other than STDIO
  removed extra-verbose comments
  Fixes #26136: Avoid emitting warning in hasParameterOption()
  Added a README entry to the PR template
  [HttpFoundation] Add x-zip-compressed to MimeTypeExtensionGuesser.
  [DI] Add null check for removeChild
2018-02-22 12:40:25 +01:00
Nicolas Grekas
0dc6acb123 Merge branch '3.4' into 4.0
* 3.4:
  [Translation] Process multiple segments within a single unit.
  Document the container.autowiring.strict_mode option
  fix custom radios/inputs for checkbox/radio type
  Another PR template tweak
  [FrameworkBundle] Add missing XML config for circular_reference_handler. Add tests.
  fix CS
  [PropertyInfo] ReflectionExtractor: give a chance to other extractors if no properties
  Clean calls to http_build_query()
  [WebProfilerBundle] limit ajax request to 100 and remove the last one
  Add support for URL-like DSNs for the PdoSessionHandler
  [HttpFoundation] Fix missing "throw" in JsonResponse
  Improve the documentation of
  Suppress warning from sapi_windows_vt100_support on stream other than STDIO
  removed extra-verbose comments
  Fixes #26136: Avoid emitting warning in hasParameterOption()
  Added a README entry to the PR template
  [HttpFoundation] Add x-zip-compressed to MimeTypeExtensionGuesser.
  [DI] Add null check for removeChild
2018-02-22 11:50:29 +01:00
Nicolas Grekas
124d338446 Merge branch '2.7' into 2.8
* 2.7:
  Another PR template tweak
  [WebProfilerBundle] limit ajax request to 100 and remove the last one
2018-02-22 11:35:54 +01:00
Nicolas Grekas
716adf8641 [HttpKernel] Fix BC of the test suite 2018-02-22 11:30:42 +01:00
Fabien Potencier
6651087a98 feature #26085 Deprecate bundle:controller:action and service:method notation (Tobion)
This PR was squashed before being merged into the 4.1-dev branch (closes #26085).

Discussion
----------

Deprecate bundle:controller:action and service:method notation

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

The `a::b` notation had some awkward limitations. It supported `MyControllerClass::method` where `MyControllerClass` is either plain class or a service with the same name but the class must exists. This meant it did NOT support `my_service_controller_id::method` because the `class_exists` check would fail at the wrong point in time. But it did support services where class name == id, i.e. the new auto registration based psr naming. This made it very confusing.

I enhanced the `a::b` notation to be very straight forward:
- if `a` exists as a service then use `a` as a service
- otherwise try to use `a` as a class, i.e. `new $a()`
- otherwise check if a::b is a static method (only relevant when the class is abstract or has private contructor). this was potentially supported when using array controller syntax. it now works the same when using the `::` string syntax, like in php itself. since it only happens when nothing else works, it does not have any performance impact.

The old `a:b` syntax is deprecated and just forwards to `a::b` now internally, just as bundle:controller:action.
In general I was able to refactor the logic quite a bit because it always goes through `instantiateController` now.
Spotting deprecated usages is very easy as all outdated routing configs will trigger a deprecation with the DelegatingLoader and it will be normalized in the dumped routes. So you don't get a deprecation again in the ControllerResolver. But if the controller does not come from routing, e.g. twigs render controller function, then it will still be triggered there.

- [x] deprecate `a🅱️c`
- [x] deprecate `a:b`
- [x] update existing references to `a::b`
- [x] fix tests
- [x] fix/add support for static controllers
- [x] add support for closures as controllers
- [x] update Symfony\Component\Routing\Loader\ObjectRouteLoader
- [x] deprecate \Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser but we still need to use it in several places for BC.
- [x] add changelog/upgrade
- [x] update controller.service_arguments logic for double colon controller syntax

Commits
-------

f8a609cdbd Deprecate bundle:controller:action and service:method notation
2018-02-21 06:14:06 +01:00
Tobias Schultze
f8a609cdbd Deprecate bundle:controller:action and service:method notation 2018-02-21 06:14:04 +01:00
Fabien Potencier
2711d144b1 feature #26175 [Security] Add configuration for Argon2i encryption (CoalaJoe)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Security] Add configuration for Argon2i encryption

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

Feedback?

Current situation: Configuration only applies if argon2i is natively supported.

Commits
-------

1300fece5f [Security] Add configuration for Argon2i encryption
2018-02-20 21:36:26 +01:00
Ashura
1300fece5f [Security] Add configuration for Argon2i encryption 2018-02-20 13:01:36 +01:00
Fabien Potencier
3cb5619216 feature #26108 [Serializer] Add a MaxDepth handler (dunglas)
This PR was squashed before being merged into the 4.1-dev branch (closes #26108).

Discussion
----------

[Serializer] Add a MaxDepth handler

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | api-platform/core#1130, api-platform/core#1528, api-platform/core#1528 <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | todo <!--highly recommended for new features-->

Sometimes, instead of just stopping the serialization process when the configured max depth is reached, it can be interesting to let the user return something (like returning the identifier of the entity to stop manually the serialization process).

This PR also makes the max depth handling more similar to circular references handling (that already has the possibility to set a handler).

Commits
-------

ed975c764b [Serializer] Add a MaxDepth handler
2018-02-19 21:26:23 +01:00
Kévin Dunglas
ed975c764b [Serializer] Add a MaxDepth handler 2018-02-19 21:26:22 +01:00
Fabien Potencier
43f8081d60 minor #26225 Make deprecation notices less verbose (fabpot)
This PR was merged into the 4.1-dev branch.

Discussion
----------

Make deprecation notices less verbose

| 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

I think there is no need to say that deprecated features will be removed in the next major version. That makes messages more verbose for no real reasons.

Commits
-------

0c6ec3fec0 made deprecation notices less verbose
2018-02-19 21:13:12 +01:00
Fabien Potencier
389efc0af3 minor #26229 removed version in @final @internal for version < 4.0 (fabpot)
This PR was merged into the 4.0 branch.

Discussion
----------

removed version in @final @internal for version < 4.0

| 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

On 4.0+, I think we can removed the "since version 3.x" from `@final` and `@internal` annotations. I've kept them for things that reference version 4.x.

Commits
-------

ed27b12d2c removed version in @final @internal for version < 4.0
2018-02-19 21:08:53 +01:00
Kévin Dunglas
611ff59c3e
[FrameworkBundle] Add missing XML config for circular_reference_handler. Add tests. 2018-02-19 19:14:07 +01:00
Nicolas Grekas
49759e3138 Merge branch '4.0'
* 4.0:
  [Bridge/Twig] fix composer.json
  bug #26086 [FrameworkBundle] Fix using annotation_reader in compiler pass to inject configured cache provider
  [WebProfilerBundle] Fix anchor CSS
  [HttpKernel] Send new session cookie from AbstractTestSessionListener after session invalidation
  [WebProfilerBundle] Tweak default route name
  updated StopwatchEvent phpdoc due to the additional of optional float precision introduced in 0db8d7fb6a
  Retro-fit proxy code to make it deterministic for older proxy manager implementations
  [Serializer] remove unneeded php doc line
  Yaml parser regression with comments and non-strings
  Fixed broken tests
  [TwigBridge] Apply some changes to support Bootstrap4-stable
2018-02-19 17:51:42 +01:00
Nicolas Grekas
2871a96fa7 Merge branch '3.4' into 4.0
* 3.4:
  [Bridge/Twig] fix composer.json
  bug #26086 [FrameworkBundle] Fix using annotation_reader in compiler pass to inject configured cache provider
  [WebProfilerBundle] Fix anchor CSS
  [HttpKernel] Send new session cookie from AbstractTestSessionListener after session invalidation
  [WebProfilerBundle] Tweak default route name
  updated StopwatchEvent phpdoc due to the additional of optional float precision introduced in 0db8d7fb6a
  Retro-fit proxy code to make it deterministic for older proxy manager implementations
  Yaml parser regression with comments and non-strings
  Fix undiscoverablility of SymfonyTestsListenerForV7
  Fixed broken tests
  [TwigBridge] Apply some changes to support Bootstrap4-stable
2018-02-19 17:50:22 +01:00
Nicolas Grekas
0aedb03af6 bug #26088 [FrameworkBundle] Fix using annotation_reader in compiler pass to inject configured cache provider (Laizerox)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Fix using annotation_reader in compiler pass to inject configured cache provider

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

The compilation pass of AddAnnotationsCachedReaderPass relies on already removed definition `annotations.cached_reader` due to an alias to `annotation_reader`.

Since the definition is being removed because of alias, configured annotation cache provider is not injected and will default back to ArrayCache.

This PR replaces the use of `annotations.cached_reader` to `annotation_reader` to complete the injection of configured cache provider.

Commits
-------

dfd93da bug #26086 [FrameworkBundle] Fix using annotation_reader in compiler pass to inject configured cache provider
2018-02-19 17:40:19 +01:00
Dmitri Petmanson
dfd93da236 bug #26086 [FrameworkBundle] Fix using annotation_reader in compiler pass to inject configured cache provider 2018-02-19 17:36:43 +01:00
Roland Franssen
ee4599284f [WebProfilerBundle] Fix anchor CSS 2018-02-19 17:27:36 +01:00
Amrouche Hamza
9ff86d6181
[WebProfilerBundle] limit ajax request to 100 and remove the last one 2018-02-19 15:17:52 +01:00
Fabien Potencier
ed27b12d2c removed version in @final @internal for version < 4.0 2018-02-19 13:18:43 +01:00
Fabien Potencier
0c6ec3fec0 made deprecation notices less verbose 2018-02-19 13:10:10 +01:00
Pawel Smolinski
64fb5a5663 [FrameworkBundle] Add support to 307/308 HTTP status codes in RedirectController 2018-02-19 08:01:54 +01:00
Roland Franssen
5c4566ca73 [WebProfilerBundle] Tweak default route name 2018-02-18 16:35:26 +01:00
Nicolas Grekas
5cf0181991 Merge branch '4.0'
* 4.0:
  [Serializer] optims and cleanup
  do not mock the container builder in tests
  [PhpUnitBridge] Added support for PHPUnit 7 in Coverage Listener
  fix accessing request values
  Avoid running the remove command without any packages
  [Form] Add translations for Tagalog
2018-02-14 15:11:22 +01:00
Nicolas Grekas
8faf29f54e Merge branch '3.4' into 4.0
* 3.4:
  [Serializer] optims and cleanup
  do not mock the container builder in tests
  [PhpUnitBridge] Added support for PHPUnit 7 in Coverage Listener
  fix accessing request values
  Avoid running the remove command without any packages
  [Form] Add translations for Tagalog
2018-02-14 15:11:10 +01:00
Nicolas Grekas
6b51addbd2 minor #26165 do not mock the container builder in tests (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

do not mock the container builder in tests

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

Commits
-------

777acfb do not mock the container builder in tests
2018-02-14 13:23:44 +01:00
Christian Flothmann
777acfbac9 do not mock the container builder in tests 2018-02-14 11:03:57 +01:00
Nicolas Grekas
aed5991834 Merge branch '4.0'
* 4.0:
  [Routing] Throw 405 instead of 404 when redirect is not possible
  [Process] fix test case
  Add security.tl.xlf to legacy directory
  [Security][Validator] Add translations for Tagalog
  fixed typo
  Typo fix in security component lithuanian translation.
  [TwigBundle][WebProfilerBundle] Fix JS collision
  [Process] Check PHP_BINDIR before $PATH in PhpExecutableFinder
2018-02-12 18:55:29 +01:00
Nicolas Grekas
f32a50d369 Merge branch '3.4' into 4.0
* 3.4:
  [Routing] Throw 405 instead of 404 when redirect is not possible
  [Process] fix test case
  Add security.tl.xlf to legacy directory
  [Security][Validator] Add translations for Tagalog
  fixed typo
  Typo fix in security component lithuanian translation.
  [TwigBundle][WebProfilerBundle] Fix JS collision
  [Process] Check PHP_BINDIR before $PATH in PhpExecutableFinder
2018-02-12 18:55:14 +01:00
Roland Franssen
07dd09db59 [WebProfilerBundle] Imply forward request by a new X-Previous-Debug-Token header 2018-02-12 18:43:33 +01:00
Fabien Potencier
267bf4c118 bug #26119 [TwigBundle][WebProfilerBundle] Fix JS collision (ro0NL)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBundle][WebProfilerBundle] Fix JS collision

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes/no
| Fixed tickets | #25894
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

<!--
- 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.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

da39e01eb9 [TwigBundle][WebProfilerBundle] Fix JS collision
2018-02-12 08:07:49 +01:00
Nicolas Grekas
e81aa7694c Merge branch '4.0'
* 4.0:
  [YAML] Issue #26065: leading spaces in YAML multi-line string literals
  [Bridge\PhpUnit] Exit as late as possible
  [Bridge\PhpUnit] Cleanup BC layer
  [PhpBridge] add PHPUnit 7 support to SymfonyTestsListener
  [Lock] Log already-locked errors as "notice" instead of "warning"
  add context to serialize and deserialize
  Update Repository Symlink Helper
  isCsrfTokenValid() replace string  by ?string
  Document explicitly that dotfiles and vcs files are ignored by default
  [HttpKernel] don't try to wire Request argument with controller.service_arguments
  Make kernel build time optionally deterministic
  Use 0 for unlimited expiry
  [Routing] fix typo
  Bump default PHPUnit version from 6.3 to 6.5
  do not mock the container builder in tests
  [Cache][WebProfiler] fix collecting cache stats with sub-requests + allow clearing calls
2018-02-11 18:18:00 +01:00
Nicolas Grekas
6e34963b3d Merge branch '3.4' into 4.0
* 3.4:
  [YAML] Issue #26065: leading spaces in YAML multi-line string literals
  [Bridge\PhpUnit] Exit as late as possible
  [Bridge\PhpUnit] Cleanup BC layer
  [PhpBridge] add PHPUnit 7 support to SymfonyTestsListener
  [Lock] Log already-locked errors as "notice" instead of "warning"
  add context to serialize and deserialize
  Update Repository Symlink Helper
  Document explicitly that dotfiles and vcs files are ignored by default
  [HttpKernel] don't try to wire Request argument with controller.service_arguments
  Make kernel build time optionally deterministic
  Use 0 for unlimited expiry
  [Routing] fix typo
  Bump default PHPUnit version from 6.3 to 6.5
  do not mock the container builder in tests
  [Cache][WebProfiler] fix collecting cache stats with sub-requests + allow clearing calls
2018-02-11 18:17:44 +01:00
Nicolas Grekas
8ed107d09c Merge branch '2.8' into 3.4
* 2.8:
  [Bridge\PhpUnit] Exit as late as possible
  Update Repository Symlink Helper
  Document explicitly that dotfiles and vcs files are ignored by default
  do not mock the container builder in tests
2018-02-11 18:15:12 +01:00
Nicolas Grekas
e490d663d6 Merge branch '2.7' into 2.8
* 2.7:
  [Bridge\PhpUnit] Exit as late as possible
  Update Repository Symlink Helper
  Document explicitly that dotfiles and vcs files are ignored by default
  do not mock the container builder in tests
2018-02-11 17:53:59 +01:00
Gaylord Poillon
37fbbca086 isCsrfTokenValid() replace string by ?string 2018-02-11 11:55:53 +01:00
Christian Flothmann
347438ee36 Merge branch '4.0'
* 4.0:
  fix merge
  Env var maps to undefined constant.
  [SecurityBundle] Backport test
  [Security] fix merge of 2.7 into 2.8 + add test case
  backport regression test from 3.4
  do not mock the container builder or definitions
  fixed CS
  [TwigBundle] Register TwigBridge extensions first
  [WebProfilerBundle] Fix sub request link
  PhpDocExtractor::getTypes() throws fatal error when type omitted
  Fix misspelling variable
  use libsodium to run Argon2i related tests
  [DI] minor: use a strict comparision in setDecoratedService
  [HttpKernel] fix FC
  Follow-on to #25825: Fix edge case in getParameterOption.
  keep the context when validating forms
2018-02-09 16:48:09 +01:00
Roland Franssen
da39e01eb9 [TwigBundle][WebProfilerBundle] Fix JS collision 2018-02-09 15:48:30 +01:00
Christian Flothmann
064acb6ac3 Merge branch '3.4' into 4.0
* 3.4:
  Env var maps to undefined constant.
  [SecurityBundle] Backport test
  [Security] fix merge of 2.7 into 2.8 + add test case
  backport regression test from 3.4
  do not mock the container builder or definitions
  fixed CS
  [TwigBundle] Register TwigBridge extensions first
  [WebProfilerBundle] Fix sub request link
  PhpDocExtractor::getTypes() throws fatal error when type omitted
  Fix misspelling variable
  use libsodium to run Argon2i related tests
  [DI] minor: use a strict comparision in setDecoratedService
  [HttpKernel] fix FC
  Follow-on to #25825: Fix edge case in getParameterOption.
  keep the context when validating forms
2018-02-09 15:25:12 +01:00
Christian Flothmann
dab422287f do not mock the container builder in tests 2018-02-08 09:15:30 +01:00
Christian Flothmann
8bba882512 do not mock the container builder or definitions 2018-02-07 19:04:46 +01:00
Grégoire Pineau
3d01404da0 [Workflow] Fixed the dump command
* The 'label' option had a wrong mode
* Simplified the code
2018-02-07 11:09:07 +01:00
Fabien Potencier
0c128f8d3c feature #24705 [Workflow] Add PlantUML dumper to workflow:dump command (Plopix)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Workflow] Add PlantUML dumper to workflow:dump command

| Q             | A
| ------------- | ---
| Branch        | 4.1
| Bug fix       | no
| New feature   | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT
| Doc PR        | Will do depending on the comments about that PR

Hello,

`workflow:dump` exports workflows in `dot` format. To me, this format is not the easiest and not the simplest to use. Styles and logic are mixed together which makes it hard to read.

[PlantUML](http://plantuml.com/) is a tool based on Graphviz like Dot but that
generates nicer diagrams, more readable and most of all easier to adapt to your
documentation. Just copy and paste the PUML on the website you will see the rendering live.

Also, there is a [PHPStorm Plugin](https://plugins.jetbrains.com/plugin/7017-plantuml-integration) and [plenty of integration](http://plantuml.com/running) of this format.

This PR adds 2 options

* a `--dump-format=puml` option to the `workflow:dump` command to generate the workflows in PlantUML.

* a `--puml-transition-format=square|arrow` option to the `workflow:dump` command to generate the workflows in PlantUML using a square shape or arrow for the transition. (see below)

The conversion requires the PlantUML JAR, and can be used like that:
```bash
php bin/console workflow:dump pull_request --dump-format=puml | java -jar plantuml.jar -p  > workflow.png
```
> don't forget the `-p` to enable the "piping"

Here is an example with `pull_request` workflow of the documentation (with no style and no marking):
```
@startuml
title pull_request
state start <<initial>>
state coding
state travis
state review
state merged
state closed
start --> travis: submit
coding --> travis: update
travis --> travis: update
review --> travis: update
travis --> review: wait_for_review
review --> coding: request_change
review --> merged: accept
review --> closed: reject
closed --> review: reopen
@enduml
```

As PlantUML let us define styles, I have provided some by default that the user can override.
Adding some marking:
```bash
php bin/console workflow:dump pull_request travis review --dump-format=puml
```
will give us:

```
@startuml
sprite $sf_logo [81x20/16z] {
hPNRaYiX24K1xwBo_tyx6-qaCtDEJ-KXLYMTLbp0HWcHZr3KRDJ8z94HG3jZn4_mijbQ2ryJoFePtXLWA_qxyGy19DpdY_10z11ZAbGjFHRwcEbcKx5-wqsV
yIMo8StMCHKh8ZUxnEwrZiwRAUOvy1lLcPQF4lEFAjhzMd5WOAqvKflS0Enx8PbihiSYXM8ClGVAseIWTAjCgVSAcnYbQG79xKFsZ0VnDCNc7AVBoPSMcTsX
UnrujbYjjz0NnsObkTgnmolqJD4QgGUYTQiNe8eIjtx4b6Vv8nPGpncn3NJ8Geo9W9VW2wGACm_JzgIO8A8KXr2jUBCVGEAAJSZ6JUlsNnmOzmIYti9G7bjL
8InaHM9G40NkwTG7OxrggvNIejA8AZuqyWjOzTIKi-wwYvjeHYesSWuPiTGDN5THzkYLU4MD5r2_0PDhG7LIUG33z5HtM6CP3icyWEVOS61sD_2ZsBfJdbVA
qM53XHDUwhY0TAwPug3OG9NonRFhO8ynF3I4unuAMDHmSrXH57V1RGvl9jafuZF9ZhqjWOEh98y0tUYGsUxkBSllIyBdT2oM5Fn2-ut-fzsq_cQNuL6Uvwqr
knh4RrvOKzxZfLV3s0rs_R_1SdYt3VxeQ1_y2_W2
}
title pull_request
skinparam titleBorderRoundCorner 15
skinparam titleBorderThickness 2
skinparam state {
    BackgroundColor<<initial>> #87b741
    BackgroundColor<<marked>> #3887C6
    BorderColor #3887C6
    BorderColor<<marked>> Black
    FontColor<<marked>> White
}
state start <<initial>>
state coding
state travis <<marked>>
state review <<marked>>
state merged
state closed
start --> travis: submit
coding --> travis: update
travis --> travis: update
review --> travis: update
travis --> review: wait_for_review
review --> coding: request_change
review --> merged: accept
review --> closed: reject
closed --> review: reopen
footer \nGenerated by <$sf_logo> **Workflow Component** and **PlantUML**
@enduml
```

Which gives you that:
![workflow](https://user-images.githubusercontent.com/313532/32086584-253e39c0-ba8b-11e7-82c7-fa24309dbcd6.png)

With `square` as transition, it gives you that:
![workflow](https://user-images.githubusercontent.com/313532/32533123-a8ea4530-c403-11e7-8f88-4f18d5e23a28.png)

Hope you will find that interesting!

Commits
-------

1497d36cab Add option to the workflow:dump command to allow PlantUML format dump
2018-02-07 06:48:48 +01:00
Fabien Potencier
39e88ed312 fixed CS 2018-02-07 06:34:13 +01:00
Fabien Potencier
abb913283e bug #25756 [TwigBundle] Register TwigBridge extensions first (fancyweb)
This PR was squashed before being merged into the 3.4 branch (closes #25756).

Discussion
----------

[TwigBundle] Register TwigBridge extensions first

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

The only extension that is really needed to display the current exception page is the `CodeExtension` so we could only prepend this one. However, prepending all of them seems safer to me in the long term.

Also I deeply looked into why this problem only appeared in 3.4 and found the reason. Before 3.4 it actually never reaches the `ExceptionController` for this kind of error because it cannot be resolved because it needs a twig instance in its constructor. This instance is directly taken from the container. Before 3.4 when an exception is thrown when you try to get a service from the container, the instance stored in the `$services` array is unset which is not the case in further versions. So in 3.4+, the `ExceptionController` can be resolved because the instance of twig is still in the container even after the initial exception.

It also means these kind of exceptions are displayed with bugs on all versions before 3.4 I guess. Actually it shows the message 2 times : one for the initial exception and the other one when it tries to resolve the `ExceptionController`.

Maybe another solution might be to use a dedicated twig instance with the right settings just for the exception page ?

Commits
-------

c8465ed97f [TwigBundle] Register TwigBridge extensions first
2018-02-07 06:32:49 +01:00
Thomas Calvet
c8465ed97f [TwigBundle] Register TwigBridge extensions first 2018-02-07 06:32:47 +01:00
Roland Franssen
8f0e47f636 [WebProfilerBundle] Fix sub request link 2018-02-07 06:25:55 +01:00
Fabien Potencier
731690f726 feature #25164 [WebProfilerBundle] Improve controller linking (ro0NL)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[WebProfilerBundle] Improve controller linking

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

I propose to remove the `Controller class` entry from the request toolbar panel, IMHO it's confusing/useless compared to the linked `Controller` entry above. They represent the same.

To preserve its value it's now used as title attribute instead, favored over controller file currently being used here. We can read that from the statusbar anyway :-)

Before: (hovering ontroller link)

![image](https://user-images.githubusercontent.com/1047696/35796142-ce6cdff4-0a5b-11e8-9fa3-91897516c9fc.png)

After: (hovering ontroller link)

![image](https://user-images.githubusercontent.com/1047696/35796237-2855e556-0a5c-11e8-8dca-853c3eabd2e9.png)

Commits
-------

f6c0dc64e6 [WebProfilerBundle] Improve controller linking
2018-02-07 06:05:22 +01:00
Christian Flothmann
5f9471ef47 use libsodium to run Argon2i related tests 2018-02-06 09:09:00 +01:00
Yonel Ceruto
922878ee53 Deprecating "false" as default value of "strict_variable" under Twig configuration 2018-02-05 09:53:02 -05:00
Roland Franssen
f6c0dc64e6 [WebProfilerBundle] Improve controller linking 2018-02-05 09:58:18 +01:00
Nicolas Grekas
2ef0d600aa Merge branch '4.0'
* 4.0:
  Use the PCRE_DOLLAR_ENDONLY modifier in route regexes
  [Form] Make sure errors are a part of the label on bootstrap 4 - this is a requirement for WCAG2
  [Config] Only using filemtime to check file freshness
2018-02-04 17:44:20 +01:00
Nicolas Grekas
767b028439 Merge branch '3.4' into 4.0
* 3.4:
  Use the PCRE_DOLLAR_ENDONLY modifier in route regexes
  [Form] Make sure errors are a part of the label on bootstrap 4 - this is a requirement for WCAG2
  [Config] Only using filemtime to check file freshness
2018-02-04 17:43:51 +01:00
Nicolas Grekas
5e094e8752 Merge branch '2.8' into 3.4
* 2.8:
  Use the PCRE_DOLLAR_ENDONLY modifier in route regexes
2018-02-04 17:43:40 +01:00
Nicolas Grekas
c337bf6810 Merge branch '2.7' into 2.8
* 2.7:
  Use the PCRE_DOLLAR_ENDONLY modifier in route regexes
2018-02-04 17:41:06 +01:00
Matthias Pigulla
f713a3e879 Use the PCRE_DOLLAR_ENDONLY modifier in route regexes 2018-02-04 16:50:24 +01:00
Robin Chalas
068b43a11b [SecurityBundle] Fix merge 2018-02-04 15:08:19 +01:00
Nicolas Grekas
302f33702d Merge branch '4.0'
* 4.0:
  fix merge
  Fix lock strategy tests
  [travis] cache compiled php extensions
  fix merge
  Allow remember-me factory creation when multiple user providers are configured.
  Add tests for glob loaders
  Improve assertions
  [DI][Routing] Fix tracking of globbed resources
  [Config] Handle Service/EventSubscriberInterface in ReflectionClassResource
  always call the parent class' constructor
2018-02-04 14:10:55 +01:00
Nicolas Grekas
f2d54fe694 fix merge 2018-02-04 14:10:03 +01:00
Nicolas Grekas
752c7cbbbe Merge branch '3.4' into 4.0
* 3.4:
  Fix lock strategy tests
  [travis] cache compiled php extensions
  fix merge
  Allow remember-me factory creation when multiple user providers are configured.
  Add tests for glob loaders
  Improve assertions
  [DI][Routing] Fix tracking of globbed resources
  [Config] Handle Service/EventSubscriberInterface in ReflectionClassResource
  always call the parent class' constructor
2018-02-04 14:08:26 +01:00
Nicolas Grekas
c57258b308 bug #25989 [DI][Routing] Fix tracking of globbed resources (nicolas-grekas, sroze)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI][Routing] Fix tracking of globbed resources

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

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

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

Commits
-------

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

Discussion
----------

Improve assertions

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

Following #25420 in `3.4` branch.

Commits
-------

829f59d Improve assertions
2018-02-04 11:29:43 +01:00
Robin Chalas
1e90ddd00d Merge branch '4.0'
* 4.0:
  [Intl] Fixed the broken link
  Fix typo
  Fix typo
  Fixed issue #25985
  Don't show wanna-be-private services as public in debug:container
  [Routing] Fix trailing slash redirection for non-safe verbs
  [DI] Fix tracking of source class changes for lazy-proxies
  Proxy class names should be deterministic and independent of spl_object_hash() which is somewhat random
  [Debug] Fix bad registration of exception handler, leading to mem leak
  [Form] Fixed empty data on expanded ChoiceType and FileType
  collect extension information as late as possible
2018-02-03 01:58:16 +01:00
Robin Chalas
c7ab3a9555 Merge branch '3.4' into 4.0
* 3.4:
  [Intl] Fixed the broken link
  Fix typo
  Fix typo
  Fixed issue #25985
  Don't show wanna-be-private services as public in debug:container
  [Routing] Fix trailing slash redirection for non-safe verbs
  [DI] Fix tracking of source class changes for lazy-proxies
  Proxy class names should be deterministic and independent of spl_object_hash() which is somewhat random
  [Debug] Fix bad registration of exception handler, leading to mem leak
  [Form] Fixed empty data on expanded ChoiceType and FileType
  collect extension information as late as possible
2018-02-03 01:57:23 +01:00
Israel J. Carberry
6ab8dd92e9 Allow remember-me factory creation when multiple user providers are configured. 2018-02-01 09:00:52 -06:00
Gabriel Caruso
829f59da7f Improve assertions 2018-02-01 04:11:27 -02:00
Nicolas Grekas
7f8e215d91 feature #25892 Adding an array adapter (weaverryan)
This PR was merged into the 4.1-dev branch.

Discussion
----------

Adding an array adapter

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

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

Commits
-------

f92e03d adding an array adapter
2018-01-31 21:13:43 +01:00
Robin Chalas
31f43e5226 Don't show wanna-be-private services as public in debug:container 2018-01-31 18:08:05 +01:00
Nicolas Grekas
ad98c1fa90 [DI][Routing] Fix tracking of globbed resources 2018-01-31 16:05:11 +01:00
Nicolas Grekas
f74bda51eb Merge branch '4.0'
* 4.0:
  update test for Twig performance optimizations
  [WebProfilerBundle] Increase retry delays between toolbarAction ajax calls
  support sapi_windows_vt100_support for php 7.2+
  bumped Symfony version to 4.0.5
  updated VERSION for 4.0.4
  updated CHANGELOG for 4.0.4
  bumped Symfony version to 3.4.5
  updated VERSION for 3.4.4
  updated CHANGELOG for 3.4.4
  bumped Symfony version to 2.8.35
  updated VERSION for 2.8.34
  updated CHANGELOG for 2.8.34
  bumped Symfony version to 2.7.42
  updated VERSION for 2.7.41
  update CONTRIBUTORS for 2.7.41
  updated CHANGELOG for 2.7.41
  [HttpFoundation] Added "null" type on Request::create docblock
  Don't stop PSR-4 service discovery if a parent class is missing.
  Allow trans filter to be safe
2018-01-31 11:41:42 +01:00
Nicolas Grekas
e341b27559 Merge branch '3.4' into 4.0
* 3.4:
  update test for Twig performance optimizations
  [WebProfilerBundle] Increase retry delays between toolbarAction ajax calls
  support sapi_windows_vt100_support for php 7.2+
  bumped Symfony version to 3.4.5
  updated VERSION for 3.4.4
  updated CHANGELOG for 3.4.4
  bumped Symfony version to 2.8.35
  updated VERSION for 2.8.34
  updated CHANGELOG for 2.8.34
  bumped Symfony version to 2.7.42
  updated VERSION for 2.7.41
  update CONTRIBUTORS for 2.7.41
  updated CHANGELOG for 2.7.41
  [HttpFoundation] Added "null" type on Request::create docblock
  Don't stop PSR-4 service discovery if a parent class is missing.
  Allow trans filter to be safe
2018-01-31 11:41:17 +01:00
Nicolas Grekas
855be6a104 Merge branch '2.8' into 3.4
* 2.8:
  update test for Twig performance optimizations
  [WebProfilerBundle] Increase retry delays between toolbarAction ajax calls
  support sapi_windows_vt100_support for php 7.2+
  bumped Symfony version to 2.8.35
  updated VERSION for 2.8.34
  updated CHANGELOG for 2.8.34
  bumped Symfony version to 2.7.42
  updated VERSION for 2.7.41
  update CONTRIBUTORS for 2.7.41
  updated CHANGELOG for 2.7.41
  [HttpFoundation] Added "null" type on Request::create docblock
  Allow trans filter to be safe
2018-01-31 11:38:55 +01:00
Nicolas Grekas
49b94cc995 Merge branch '2.7' into 2.8
* 2.7:
  update test for Twig performance optimizations
  [WebProfilerBundle] Increase retry delays between toolbarAction ajax calls
  support sapi_windows_vt100_support for php 7.2+
  bumped Symfony version to 2.7.42
  updated VERSION for 2.7.41
  update CONTRIBUTORS for 2.7.41
  updated CHANGELOG for 2.7.41
  [HttpFoundation] Added "null" type on Request::create docblock
  Allow trans filter to be safe
2018-01-31 11:36:06 +01:00
Joachim Krempel
3288fb0d17 [WebProfilerBundle] Increase retry delays between toolbarAction ajax calls 2018-01-30 17:18:42 +01:00
Fabien Potencier
374f6e2353 Merge branch '4.0'
* 4.0:
  [HttpFoundation] Use the correct syntax for session gc based on Pdo driver
  Removed assertDateTimeEquals() methods.
  Revert "bug #24987 [Console] Fix global console flag when used in chain (Simperfit)"
  Revert "bug #25487 [Console] Fix a bug when passing a letter that could be an alias (Simperfit)"
  Disable CSP header on exception pages only in debug
  Fixed submitting disabled buttons
  Fixed Button::setParent() when already submitted
  Improve assertions
  Restore RoleInterface import
  [Console] Provide a bugfix where an array could be passed
  Improve assertions
  SCA: get rid of repetitive calls
  allow null values for root nodes in YAML configs
  revert useless tests fixtures changes
  [VarDumper] Fix docblock
  Improve phpdoc to make it more explicit
  [DI] Fix initialization of legacy containers by delaying include_once
2018-01-29 10:06:44 +01:00
Fabien Potencier
50d86e87a0 Merge branch '3.4' into 4.0
* 3.4:
  [HttpFoundation] Use the correct syntax for session gc based on Pdo driver
  Removed assertDateTimeEquals() methods.
  Revert "bug #24987 [Console] Fix global console flag when used in chain (Simperfit)"
  Revert "bug #25487 [Console] Fix a bug when passing a letter that could be an alias (Simperfit)"
  Disable CSP header on exception pages only in debug
  Fixed submitting disabled buttons
  Fixed Button::setParent() when already submitted
  Improve assertions
  Restore RoleInterface import
  [Console] Provide a bugfix where an array could be passed
  Improve assertions
  SCA: get rid of repetitive calls
  allow null values for root nodes in YAML configs
  revert useless tests fixtures changes
  [VarDumper] Fix docblock
  Improve phpdoc to make it more explicit
  [DI] Fix initialization of legacy containers by delaying include_once
2018-01-29 10:06:29 +01:00
Fabien Potencier
d5ff094258 Merge branch '3.3' into 3.4
* 3.3:
  [HttpFoundation] Use the correct syntax for session gc based on Pdo driver
  Removed assertDateTimeEquals() methods.
  Revert "bug #24987 [Console] Fix global console flag when used in chain (Simperfit)"
  Revert "bug #25487 [Console] Fix a bug when passing a letter that could be an alias (Simperfit)"
  Disable CSP header on exception pages only in debug
  Fixed submitting disabled buttons
  Fixed Button::setParent() when already submitted
  Improve assertions
  Restore RoleInterface import
  Improve assertions
  SCA: get rid of repetitive calls
  allow null values for root nodes in YAML configs
  revert useless tests fixtures changes
  [VarDumper] Fix docblock
  Improve phpdoc to make it more explicit
2018-01-29 10:03:43 +01:00
Fabien Potencier
57e5075645 Merge branch '2.8' into 3.3
* 2.8:
  [HttpFoundation] Use the correct syntax for session gc based on Pdo driver
  Removed assertDateTimeEquals() methods.
  Revert "bug #24987 [Console] Fix global console flag when used in chain (Simperfit)"
  Revert "bug #25487 [Console] Fix a bug when passing a letter that could be an alias (Simperfit)"
  Disable CSP header on exception pages only in debug
  Fixed submitting disabled buttons
  Fixed Button::setParent() when already submitted
  Improve assertions
  Improve assertions
  SCA: get rid of repetitive calls
  allow null values for root nodes in YAML configs
  [VarDumper] Fix docblock
  Improve phpdoc to make it more explicit
2018-01-29 10:02:23 +01:00
Fabien Potencier
b99ca76e4b minor #25908 Improve assertions (carusogabriel)
This PR was merged into the 2.8 branch.

Discussion
----------

Improve assertions

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

Following #25420 in `2.8` branch.

Commits
-------

4683f6d454 Improve assertions
2018-01-29 09:55:23 +01:00
Fabien Potencier
6f2a31b851 Merge branch '2.7' into 2.8
* 2.7:
  [HttpFoundation] Use the correct syntax for session gc based on Pdo driver
  Revert "bug #24987 [Console] Fix global console flag when used in chain (Simperfit)"
  Revert "bug #25487 [Console] Fix a bug when passing a letter that could be an alias (Simperfit)"
  Disable CSP header on exception pages only in debug
  Fixed submitting disabled buttons
  Fixed Button::setParent() when already submitted
  Improve assertions
  SCA: get rid of repetitive calls
  allow null values for root nodes in YAML configs
  [VarDumper] Fix docblock
  Improve phpdoc to make it more explicit
2018-01-29 09:54:45 +01:00
Gabriel Ostrolucký
b77538c2fe Disable CSP header on exception pages only in debug
Same condition is used by default TwigBridge ExceptionController
to evaluate if styled exception page is supposed to be shown.
2018-01-26 02:39:48 +01:00
Morel Sébastien
1497d36cab Add option to the workflow:dump command to allow PlantUML format dump 2018-01-25 00:07:42 -08:00
Amrouche Hamza
daa7f02221
[FrameworkBundle] add a notice when passing a routerInterface with warmupInterface in RouterCacheWarmer 2018-01-24 17:07:17 +01:00
Gabriel Caruso
4683f6d454 Improve assertions 2018-01-23 18:17:18 -02:00
Fabien Potencier
1b92f0685d minor #25898 [minor] SCA: reduce repetitive method calls (sequential and in loop) (kalessil)
This PR was merged into the 2.7 branch.

Discussion
----------

[minor] SCA: reduce repetitive method calls (sequential and in loop)

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

609372252f SCA: get rid of repetitive calls
2018-01-23 20:05:41 +01:00
Vladimir Reznichenko
609372252f SCA: get rid of repetitive calls 2018-01-23 12:06:14 +01:00
Fabien Potencier
3cbd01acaf feature #25836 [HttpKernel] Make session-related services extra-lazy (nicolas-grekas)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[HttpKernel] Make session-related services extra-lazy

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

Commits
-------

5f535581b9 [HttpKernel] Make session-related services extra-lazy
2018-01-23 08:05:01 +01:00
Ryan Weaver
f92e03de97 adding an array adapter 2018-01-22 15:22:54 -05:00
Christian Flothmann
fb1be51a5c revert useless tests fixtures changes
This will revert #25847. Basically, the changes done in #25847 were not
wrong per se. However, those changes were not necessary as the tests
were not failing because of the missing "assets" config, but due to an
issue introduced in the Config component. Furthermore, removing this
part of the config fixtures gives us the benefit that our before
normalization logic that enables assets support when the templating
integration is enabled is properly tested.
2018-01-22 21:13:54 +01:00
Robin Chalas
75a4117b66 [SecurityBundle] Deprecate in_memory.user abstract service 2018-01-19 12:36:48 +01:00
Robin Chalas
9b0e73715b Merge branch '4.0'
* 4.0:
  [Serializer] fix undefined class
  [FrameworkBundle] fix DI extension tests
2018-01-19 12:32:05 +01:00
Robin Chalas
3d011e0e37 Merge branch '3.4' into 4.0
* 3.4:
  [Serializer] fix undefined class
  [FrameworkBundle] fix DI extension tests
2018-01-19 12:28:59 +01:00
Robin Chalas
f5d2d67508 Merge branch '3.3' into 3.4
* 3.3:
  [FrameworkBundle] fix DI extension tests
2018-01-19 12:19:01 +01:00
Robin Chalas
38abc7bb8f minor #25847 [FrameworkBundle] fix DI extension tests (xabbuh)
This PR was merged into the 3.3 branch.

Discussion
----------

[FrameworkBundle] fix DI extension tests

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

The failing tests relied on the assets integration being enabled. Since
we never did enable this explicitly, the assets related definitions are
removed now that #25789 was merged which fixed #25760.

Commits
-------

1cb8f69 [FrameworkBundle] fix DI extension tests
2018-01-19 12:17:11 +01:00
Christian Flothmann
1cb8f6918f [FrameworkBundle] fix DI extension tests
The failing tests relied on the assets integration being enabled. Since
we never did enable this explicitly, the assets related definitions are
removed now that #25789 was merged which fixed #25760.
2018-01-19 12:05:40 +01:00
Robin Chalas
39557e25c4 fix merge 2018-01-19 11:06:48 +01:00
Robin Chalas
1b1ed670a6 Merge branch '3.3' into 3.4
* 3.3:
  [SecurityBundle] Don't register in memory users as services
2018-01-19 11:03:45 +01:00
Robin Chalas
2c6e23cb3e Merge branch '4.0'
* 4.0:
  Fix translation test
  [SecurityBundle] Don't register in memory users as services
2018-01-19 10:39:33 +01:00
Robin Chalas
34a3e25c1f Merge branch '3.3' into 4.0
* 3.3:
  [SecurityBundle] Don't register in memory users as services
2018-01-19 10:33:46 +01:00
Robin Chalas
00621d4840 Merge branch '2.8' into 3.3
* 2.8:
  [SecurityBundle] Don't register in memory users as services
2018-01-19 10:28:48 +01:00
Robin Chalas
e64cb185cb Merge branch '2.7' into 2.8
* 2.7:
  [SecurityBundle] Don't register in memory users as services
2018-01-19 10:21:47 +01:00
Fabien Potencier
0a56a37953 feature #24392 Display orphaned events in profiler (kejwmen)
This PR was squashed before being merged into the 4.1-dev branch (closes #24392).

Discussion
----------

Display orphaned events in profiler

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

Implements #24347.

Deprecating `TraceableEventDispatcherInterface`.

Commits
-------

509f9a9233 Display orphaned events in profiler
2018-01-19 08:23:48 +01:00
Mateusz Sip
509f9a9233 Display orphaned events in profiler 2018-01-19 08:23:12 +01:00
Nicolas Grekas
32cd453196 Merge branch '4.0'
* 4.0:
  [HttpKernel] DebugHandlersListener should always replace the existing exception handler
  fix the Composer API being used
  [Security] Notify that symfony/expression-language is not installed if ExpressionLanguage and ExpressionLanguagePrivider are used
  [Debug] Always decorate existing exception handlers to deal with fatal errors
  Enableable ArrayNodeDefinition is disabled for empty configuration
  Fixing a bug where the dump() function depended on bundle ordering
  [Cache] Fix handling of apcu_fetch() edgy behavior
  Add nn (Norwegian Nynorsk) translation files, and improve existing file
  Problem in phar see mergerequest #25579
  [Form] Disallow transform dates beyond the year 9999
  Avoid button label translation when it's set to false
  Copied NO language files to the new NB locale.
  [Serializer] DateTimeNormalizer handling of null and empty values (returning null or empty instead of new object)
  Fix options resolver with array allowed types
  [Console] Improve phpdoc on StyleInterface::ask()
  [TwigBridge][WIP] Pass the form-check-inline in parent
2018-01-18 23:19:50 +01:00
Nicolas Grekas
dd32dabd19 Merge branch '3.4' into 4.0
* 3.4:
  [HttpKernel] DebugHandlersListener should always replace the existing exception handler
  fix the Composer API being used
  [Security] Notify that symfony/expression-language is not installed if ExpressionLanguage and ExpressionLanguagePrivider are used
  [Debug] Always decorate existing exception handlers to deal with fatal errors
  Enableable ArrayNodeDefinition is disabled for empty configuration
  Fixing a bug where the dump() function depended on bundle ordering
  [Cache] Fix handling of apcu_fetch() edgy behavior
  Add nn (Norwegian Nynorsk) translation files, and improve existing file
  Problem in phar see mergerequest #25579
  [Form] Disallow transform dates beyond the year 9999
  Avoid button label translation when it's set to false
  Copied NO language files to the new NB locale.
  [Serializer] DateTimeNormalizer handling of null and empty values (returning null or empty instead of new object)
  Fix options resolver with array allowed types
  [Console] Improve phpdoc on StyleInterface::ask()
  [TwigBridge][WIP] Pass the form-check-inline in parent
2018-01-18 23:19:33 +01:00
Nicolas Grekas
5f75d43e42 Merge branch '3.3' into 3.4
* 3.3:
  [HttpKernel] DebugHandlersListener should always replace the existing exception handler
  fix the Composer API being used
  [Debug] Always decorate existing exception handlers to deal with fatal errors
  Enableable ArrayNodeDefinition is disabled for empty configuration
  Fixing a bug where the dump() function depended on bundle ordering
  [Cache] Fix handling of apcu_fetch() edgy behavior
  Add nn (Norwegian Nynorsk) translation files, and improve existing file
  Problem in phar see mergerequest #25579
  [Form] Disallow transform dates beyond the year 9999
  Copied NO language files to the new NB locale.
  [Serializer] DateTimeNormalizer handling of null and empty values (returning null or empty instead of new object)
  [Console] Improve phpdoc on StyleInterface::ask()
2018-01-18 23:16:57 +01:00
Nicolas Grekas
5f535581b9 [HttpKernel] Make session-related services extra-lazy 2018-01-18 18:12:09 +01:00
Robin Chalas
13fa0454e4 [SecurityBundle] Don't register in memory users as services 2018-01-18 15:57:23 +01:00
Christian Flothmann
753197f09e Merge branch '2.8' into 3.3
* 2.8:
  fix the Composer API being used
  [Debug] Always decorate existing exception handlers to deal with fatal errors
  Enableable ArrayNodeDefinition is disabled for empty configuration
  Fixing a bug where the dump() function depended on bundle ordering
  Add nn (Norwegian Nynorsk) translation files, and improve existing file
  Problem in phar see mergerequest #25579
  [Form] Disallow transform dates beyond the year 9999
  Copied NO language files to the new NB locale.
  [Console] Improve phpdoc on StyleInterface::ask()
2018-01-18 15:19:00 +01:00
Christian Flothmann
48872f3aed Merge branch '2.7' into 2.8
* 2.7:
  fix the Composer API being used
  [Debug] Always decorate existing exception handlers to deal with fatal errors
  Enableable ArrayNodeDefinition is disabled for empty configuration
  Fixing a bug where the dump() function depended on bundle ordering
  Add nn (Norwegian Nynorsk) translation files, and improve existing file
  Problem in phar see mergerequest #25579
  [Form] Disallow transform dates beyond the year 9999
  Copied NO language files to the new NB locale.
  [Console] Improve phpdoc on StyleInterface::ask()
2018-01-18 14:56:23 +01:00
Matt Brunt
d87af719fd [TwigBundle] Added priority to twig extensions 2018-01-17 22:17:29 +01:00
Ryan Weaver
717663aac1
Fixing a bug where the dump() function depended on bundle ordering 2018-01-17 09:58:59 -08:00
Nicolas Grekas
9e73cc73e2 Merge branch '4.0'
* 4.0:
  [appveyor] set memory_limit=-1
  [Console] Keep the modified exception handler
  [Console] Fix restoring exception handler
  [Router] Skip anonymous classes when loading annotated routes
  allow dashes in cwd pathname when running the tests
  Fixed Request::__toString ignoring cookies
  Make sure we only build once and have one time the prefix when importing routes
  [Security] Fix fatal error on non string username
  [FrameworkBundle] Automatically enable the CSRF if component *+ session* are loaded
2018-01-16 19:04:31 +01:00
Nicolas Grekas
e6157aa1f7 Merge branch '3.4' into 4.0
* 3.4:
  [appveyor] set memory_limit=-1
  [Console] Keep the modified exception handler
  [Console] Fix restoring exception handler
  [Router] Skip anonymous classes when loading annotated routes
  allow dashes in cwd pathname when running the tests
  Fixed Request::__toString ignoring cookies
  Make sure we only build once and have one time the prefix when importing routes
  [Security] Fix fatal error on non string username
  [FrameworkBundle] Automatically enable the CSRF if component *+ session* are loaded
2018-01-16 19:04:12 +01:00
Nicolas Grekas
f3ac9f51ef bug #25508 [FrameworkBundle] Auto-enable CSRF if the component *+ session* are loaded (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Auto-enable CSRF if the component *+ session* are loaded

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

By binding CSRF and session default state, we provide better DX, but we also provide a way for bundles to enable session on its own: they just need to require "symfony/security-csrf".
Yes, that's a side effect, but I think that's a nice one for 3.4/4.0.
Of course, we might do better in 4.1, but for bug fix only releases, LGTM.

Commits
-------

9e8231f [FrameworkBundle] Automatically enable the CSRF if component *+ session* are loaded
2018-01-16 15:44:24 +01:00
Nicolas Grekas
ddb602b36b Merge branch '4.0'
* 4.0:
  fix merge
  fixed wrong description in a phpdoc
  19 digits VISA card numbers are valid
  Add missing @ in phpdoc return statement
  Don't right trim the deprecation message
  [HttpKernel] Fixed test name
  [Debug] prevent infinite loop with faulty exception handlers
  [FrameworkBundle] fix tests
  Prefer composer install instead for using Symfony Installer
  Add the missing `enabled` session attribute
  [HttpKernel] Turn bad hosts into 400 instead of 500
2018-01-13 15:06:00 +01:00
Nicolas Grekas
c8d5deed8d Merge branch '3.4' into 4.0
* 3.4:
  fix merge
  fixed wrong description in a phpdoc
  19 digits VISA card numbers are valid
  Add missing @ in phpdoc return statement
  Don't right trim the deprecation message
  [HttpKernel] Fixed test name
  [Debug] prevent infinite loop with faulty exception handlers
  [FrameworkBundle] fix tests
  Prefer composer install instead for using Symfony Installer
  Add the missing `enabled` session attribute
  [HttpKernel] Turn bad hosts into 400 instead of 500
2018-01-13 15:05:32 +01:00
Nicolas Grekas
3316e42797 Merge branch '3.3' into 3.4
* 3.3:
  fix merge
  fixed wrong description in a phpdoc
  19 digits VISA card numbers are valid
  Add missing @ in phpdoc return statement
  Don't right trim the deprecation message
  [HttpKernel] Fixed test name
  [Debug] prevent infinite loop with faulty exception handlers
  Add the missing `enabled` session attribute
  [HttpKernel] Turn bad hosts into 400 instead of 500
2018-01-13 15:04:53 +01:00
Nicolas Grekas
07b5304268 Merge branch '2.8' into 3.3
* 2.8:
  fixed wrong description in a phpdoc
  19 digits VISA card numbers are valid
  [HttpKernel] Fixed test name
  [Debug] prevent infinite loop with faulty exception handlers
  Add the missing `enabled` session attribute
  [HttpKernel] Turn bad hosts into 400 instead of 500
2018-01-13 15:02:56 +01:00
Nicolas Grekas
4a211d8332 Merge branch '2.7' into 2.8
* 2.7:
  fixed wrong description in a phpdoc
  19 digits VISA card numbers are valid
  [HttpKernel] Fixed test name
  [Debug] prevent infinite loop with faulty exception handlers
  Add the missing `enabled` session attribute
  [HttpKernel] Turn bad hosts into 400 instead of 500
2018-01-13 14:56:42 +01:00
Christian Flothmann
6088dd328d [FrameworkBundle] fix tests
Add a public alias so that we can retrieve the private aliased
annotation_reader service in an after removing compiler pass.
2018-01-10 20:10:52 +01:00
Christian Flothmann
1df45e4356 Merge branch '4.0'
* 4.0: (30 commits)
  [FrameworkBundle] fix tests
  [Serializer] Fixed throwing exception with option JSON_PARTIAL_OUTPUT_ON_ERROR
  [HttpKernel] Fix session handling: decouple "save" from setting response "private"
  swap filter/function and package names
  [HttpFoundation] Always call proxied handler::destroy() in StrictSessionHandler
  [HttpKernel] Fix compile error when a legacy container is fresh again
  Add tests for the HttpKernel request collector and redirection via cookies
  Uses cookies to track the requests redirection
  Tweaked some styles in the profiler tables
  Add type string to docblock for Process::setInput()
  [Security] Fail gracefully if the security token cannot be unserialized from the session
  [Form] AbstractLayoutTest - fix DOMDocument casing
  Run simple-phpunit with --no-suggest option
  [FrameworkBundle] Fix using "annotations.cached_reader" in after-removing passes
  bumped Symfony version to 4.0.4
  updated VERSION for 4.0.3
  updated CHANGELOG for 4.0.3
  bumped Symfony version to 3.4.4
  updated VERSION for 3.4.3
  updated CHANGELOG for 3.4.3
  ...
2018-01-10 20:03:03 +01:00
Samuel ROZE
a3149310ac
Add the missing enabled session attribute 2018-01-10 17:16:33 +00:00
Christian Flothmann
821ca52868 [FrameworkBundle] fix tests
Add a public alias so that we can retrieve the private aliased
annotation_reader service in an after removing compiler pass.
2018-01-10 14:30:03 +01:00
Christian Flothmann
25473724b1 Merge branch '3.4' into 4.0
* 3.4: (26 commits)
  [Serializer] Fixed throwing exception with option JSON_PARTIAL_OUTPUT_ON_ERROR
  [HttpKernel] Fix session handling: decouple "save" from setting response "private"
  swap filter/function and package names
  [HttpFoundation] Always call proxied handler::destroy() in StrictSessionHandler
  [HttpKernel] Fix compile error when a legacy container is fresh again
  Add tests for the HttpKernel request collector and redirection via cookies
  Uses cookies to track the requests redirection
  Tweaked some styles in the profiler tables
  Add type string to docblock for Process::setInput()
  [Security] Fail gracefully if the security token cannot be unserialized from the session
  [Form] AbstractLayoutTest - fix DOMDocument casing
  Run simple-phpunit with --no-suggest option
  [FrameworkBundle] Fix using "annotations.cached_reader" in after-removing passes
  bumped Symfony version to 3.4.4
  updated VERSION for 3.4.3
  updated CHANGELOG for 3.4.3
  bumped Symfony version to 3.3.16
  updated VERSION for 3.3.15
  updated CHANGELOG for 3.3.15
  bumped Symfony version to 2.8.34
  ...
2018-01-10 12:36:17 +01:00
Christian Flothmann
7625c771c6 Merge branch '3.3' into 3.4
* 3.3:
  [Serializer] Fixed throwing exception with option JSON_PARTIAL_OUTPUT_ON_ERROR
  Tweaked some styles in the profiler tables
  Add type string to docblock for Process::setInput()
  [Security] Fail gracefully if the security token cannot be unserialized from the session
  [Form] AbstractLayoutTest - fix DOMDocument casing
  Run simple-phpunit with --no-suggest option
  [FrameworkBundle] Fix using "annotations.cached_reader" in after-removing passes
  bumped Symfony version to 3.3.16
  updated VERSION for 3.3.15
  updated CHANGELOG for 3.3.15
  bumped Symfony version to 2.8.34
  updated VERSION for 2.8.33
  updated CHANGELOG for 2.8.33
  bumped Symfony version to 2.7.41
  updated VERSION for 2.7.40
  update CONTRIBUTORS for 2.7.40
  updated CHANGELOG for 2.7.40
2018-01-10 12:30:01 +01:00
Christian Flothmann
fc9236dfb1 Merge branch '2.8' into 3.3
* 2.8:
  [Serializer] Fixed throwing exception with option JSON_PARTIAL_OUTPUT_ON_ERROR
  Tweaked some styles in the profiler tables
  [Security] Fail gracefully if the security token cannot be unserialized from the session
  [Form] AbstractLayoutTest - fix DOMDocument casing
  bumped Symfony version to 2.8.34
  updated VERSION for 2.8.33
  updated CHANGELOG for 2.8.33
  bumped Symfony version to 2.7.41
  updated VERSION for 2.7.40
  update CONTRIBUTORS for 2.7.40
  updated CHANGELOG for 2.7.40
2018-01-10 12:21:25 +01:00
Nicolas Grekas
9e8231ff0b [FrameworkBundle] Automatically enable the CSRF if component *+ session* are loaded 2018-01-09 14:58:36 +01:00
Fabien Potencier
a97f8b7954 feature #25710 [FrameworkBundle] add cache.app.simple psr simple cache (dmaicher)
This PR was squashed before being merged into the 4.1-dev branch (closes #25710).

Discussion
----------

[FrameworkBundle] add cache.app.simple psr simple cache

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

This adds a PSR SimpleCache version of the `cache.app` service.

Should I also update the documentation somewhere? 😊

Commits
-------

1b6ec8b0ae [FrameworkBundle] add cache.app.simple psr simple cache
2018-01-08 14:16:52 +01:00
David Maicher
1b6ec8b0ae [FrameworkBundle] add cache.app.simple psr simple cache 2018-01-08 14:16:50 +01:00
Javier Eguiluz
bc80258a1e Tweaked some styles in the profiler tables 2018-01-07 18:01:19 +01:00
Dennis Langen
e2ddc17b79 adding interface alias for reader, writer and extractor 2018-01-06 17:10:26 +01:00
Nicolas Grekas
f66f9a7b37 [FrameworkBundle] Fix using "annotations.cached_reader" in after-removing passes 2018-01-05 13:12:39 +01:00
Nicolas Grekas
34dd512092 Merge branch '4.0'
* 4.0:
  [DI] fix param name cast
  Remove randomness from dumped containers
  fixed messages to be explicit about the package needed to be installed
  [FrameworkBundle] Fix recommended composer command (add vendor)
  [WebProfilerBundle] set the var in the right scope
  [TwigBundle] fix lowest dep
  [HttpKernel] Disable CSP header on exception pages
  Use the default host even if context is empty and fallback to relative URL if empty host
  Proposing Flex-specific error messages in the controller shortcuts
2018-01-04 17:09:16 +01:00
Nicolas Grekas
1ff918258c Merge branch '3.4' into 4.0
* 3.4:
  Remove randomness from dumped containers
  fixed messages to be explicit about the package needed to be installed
  [FrameworkBundle] Fix recommended composer command (add vendor)
  [WebProfilerBundle] set the var in the right scope
  [TwigBundle] fix lowest dep
  [HttpKernel] Disable CSP header on exception pages
  Use the default host even if context is empty and fallback to relative URL if empty host
  Proposing Flex-specific error messages in the controller shortcuts
2018-01-04 16:52:56 +01:00
Fabien Potencier
730841527a bug #25671 Remove randomness from dumped containers (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Remove randomness from dumped containers

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

With this PR, the generated container is immutable by cache clearing: it doesn't contain any random string anymore (well, third party bundles can add random things back, but at least core doesn't).

Since the class+file name of the container is based on a hash of its content, it means that they are now stable also. This should help fix some edge cases/race conditions during cache clears/rebuilds.

(fabbot failure is false positive)

Commits
-------

14dd5d1dbd Remove randomness from dumped containers
2018-01-04 16:42:01 +01:00
Nicolas Grekas
14dd5d1dbd Remove randomness from dumped containers 2018-01-04 16:07:28 +01:00
Fabien Potencier
e8bc099641 fixed messages to be explicit about the package needed to be installed 2018-01-04 14:13:45 +01:00
Tomas Kmieliauskas
f6d38b3770 [FrameworkBundle] Fix recommended composer command (add vendor)
Since running composer commands is time heavy, having a wrong one recommended to you just burns your time.
2018-01-04 14:08:31 +01:00
Javier Eguiluz
85240f2247 bug #25678 [WebProfilerBundle] set the var in the right scope (Jochen Mandl)
This PR was squashed before being merged into the 3.4 branch (closes #25678).

Discussion
----------

[WebProfilerBundle] set the var in the right scope

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

![2018-01-04 um 09 29 54](https://user-images.githubusercontent.com/1322118/34555989-de6fd11c-f134-11e7-81f7-9b840a946073.png)

This PR fixes the bug when displaying the toolbar. The variable "has_time_events" was not created in the scope of the toolbar.

Commits
-------

3e9780df59 [WebProfilerBundle] set the var in the right scope
2018-01-04 12:52:27 +01:00
Jochen Mandl
3e9780df59 [WebProfilerBundle] set the var in the right scope 2018-01-04 12:52:24 +01:00
Nicolas Grekas
837ec4df44 [TwigBundle] fix lowest dep 2018-01-04 11:29:03 +01:00
Fabien Potencier
abfa3eeca5 minor #25636 Backport Flex-specific error messages in controller shortcuts to 3.4 (weaverryan)
This PR was merged into the 3.4 branch.

Discussion
----------

Backport Flex-specific error messages in controller shortcuts to 3.4

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

Commits
-------

419e93465f Proposing Flex-specific error messages in the controller shortcuts
2018-01-03 18:28:45 +01:00
Nicolas Grekas
96e53f8837 Merge branch '4.0'
* 4.0:
  PHP CS Fixer: clean up repo and adjust config
  use interface_exists instead of class_exists
  [DX] [DI] Improve exception for invalid setter injection arguments
  Dumper shouldn't use html format for phpdbg
  [Validator] Fix access to root object when using composite constraint
2018-01-03 18:15:33 +01:00
Nicolas Grekas
dde7381c03 Merge branch '3.4' into 4.0
* 3.4:
  PHP CS Fixer: clean up repo and adjust config
  use interface_exists instead of class_exists
  [DX] [DI] Improve exception for invalid setter injection arguments
  Dumper shouldn't use html format for phpdbg
  [Validator] Fix access to root object when using composite constraint
2018-01-03 18:15:19 +01:00
Nicolas Grekas
682bf5b2ae Merge branch '3.3' into 3.4
* 3.3:
  PHP CS Fixer: clean up repo and adjust config
  use interface_exists instead of class_exists
  Dumper shouldn't use html format for phpdbg
  [Validator] Fix access to root object when using composite constraint
2018-01-03 18:14:19 +01:00
Nicolas Grekas
00e8908375 Merge branch '2.8' into 3.3
* 2.8:
  PHP CS Fixer: clean up repo and adjust config
  Dumper shouldn't use html format for phpdbg
  [Validator] Fix access to root object when using composite constraint
2018-01-03 18:13:53 +01:00
Nicolas Grekas
5150086d08 Merge branch '2.7' into 2.8
* 2.7:
  PHP CS Fixer: clean up repo and adjust config
  Dumper shouldn't use html format for phpdbg
  [Validator] Fix access to root object when using composite constraint
2018-01-03 18:12:09 +01:00
Nicolas Grekas
0f884e0ae4 minor #25653 PHP CS Fixer: clean up repo and adjust config (keradus)
This PR was squashed before being merged into the 2.7 branch (closes #25653).

Discussion
----------

PHP CS Fixer: clean up repo and adjust config

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

Reason for this PR is that one want to have `php-cs-fixer fix -v` command executed without changes that shall not be applied for this repo. To achieve that, we need to groom config to exclude files that violate CS willingly, fix files that are violating CS unwillingly, and deliver missing case handling at PHP CS Fixer itself (https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/3359) (already merged!).

Commits
-------

b14cbc1 PHP CS Fixer: clean up repo and adjust config
2018-01-03 18:10:39 +01:00
Dariusz
b14cbc1845 PHP CS Fixer: clean up repo and adjust config 2018-01-03 18:10:15 +01:00
Kevin Bond
dc3a94e83a
use interface_exists instead of class_exists 2018-01-03 11:18:08 -05:00
Ryan Weaver
419e93465f Proposing Flex-specific error messages in the controller shortcuts 2018-01-03 15:34:56 +01:00
Fabien Potencier
3a7579d4b1 Merge branch '4.0'
* 4.0:
  fixed years in copyright
  fix typo
2018-01-03 08:38:11 +01:00
Fabien Potencier
bccb8b6524 Merge branch '3.4' into 4.0
* 3.4:
  fixed years in copyright
  fix typo
2018-01-03 08:38:00 +01:00
Fabien Potencier
a483d37eaf Merge branch '3.3' into 3.4
* 3.3:
  fixed years in copyright
2018-01-03 08:37:34 +01:00
Fabien Potencier
9918a66309 Merge branch '2.8' into 3.3
* 2.8:
  fixed years in copyright
2018-01-03 08:37:11 +01:00
Fabien Potencier
967066569a Merge branch '2.7' into 2.8
* 2.7:
  fixed years in copyright
2018-01-03 08:36:31 +01:00
Fabien Potencier
07a7f560cd fixed years in copyright 2018-01-03 08:23:28 +01:00
Nicolas Grekas
95dfa9343c Merge branch '4.0'
* 4.0: (23 commits)
  Clean up
  Update return type in docblock.
  PHP CS Fixer: no need to exclude xml and yml files
  PHP CS Fixer: no need to exclude json file
  [#22749] fix version in changelog
  Update LICENSE year... forever
  fixed some deprecation messages
  fixed CS
  Fixes for Oracle in PdoSessionHandler
  fixed some deprecation messages
  fixed some deprecation messages
  fixed some deprecation messages
  fixed some deprecation messages
  Remove dead code
  [TwigBundle/Brige] catch missing requirements to throw meaningful exceptions
  [DI] fix CS
  [HttpKernel] Call Response->setPrivate() instead of sending raw header() when session is started
  [FrameworkBundle] Make cache:clear "atomic" and consistent with cache:warmup
  Suggest to write an implementation if the interface cannot be autowired
  [Debug] Skip DebugClassLoader checks for already parsed files
  ...
2018-01-02 17:38:14 +01:00
Nicolas Grekas
f9fdb228ce Merge branch '3.4' into 4.0
* 3.4:
  Clean up
  Update return type in docblock.
  PHP CS Fixer: no need to exclude xml and yml files
  PHP CS Fixer: no need to exclude json file
  Update LICENSE year... forever
  fixed some deprecation messages
  fixed CS
  Fixes for Oracle in PdoSessionHandler
  fixed some deprecation messages
  fixed some deprecation messages
  fixed some deprecation messages
  fixed some deprecation messages
  [TwigBundle/Brige] catch missing requirements to throw meaningful exceptions
  [HttpKernel] Call Response->setPrivate() instead of sending raw header() when session is started
  [FrameworkBundle] Make cache:clear "atomic" and consistent with cache:warmup
  Suggest to write an implementation if the interface cannot be autowired
  [Debug] Skip DebugClassLoader checks for already parsed files
  [2.7][DX] Use constant message contextualisation for deprecations
  Remove group options without data and fix normalization
  Remove redundant translation path
2018-01-02 17:33:53 +01:00
Nicolas Grekas
dd66512734 Merge branch '3.3' into 3.4
* 3.3:
  Clean up
  Update return type in docblock.
  PHP CS Fixer: no need to exclude xml and yml files
  PHP CS Fixer: no need to exclude json file
  Update LICENSE year... forever
2018-01-02 16:47:46 +01:00
Nicolas Grekas
096cbbd3cd Merge branch '2.8' into 3.3
* 2.8:
  Clean up
  Update return type in docblock.
  PHP CS Fixer: no need to exclude xml and yml files
  Update LICENSE year... forever
2018-01-02 16:47:19 +01:00
Nicolas Grekas
ae985d851a Merge branch '2.7' into 2.8
* 2.7:
  Clean up
  Update return type in docblock.
  PHP CS Fixer: no need to exclude xml and yml files
  Update LICENSE year... forever
2018-01-02 16:45:49 +01:00
Nicolas Grekas
28478374f7 minor #25646 Update LICENSE year... forever (dunglas)
This PR was merged into the 2.7 branch.

Discussion
----------

Update LICENSE year... forever

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | no
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | n/a

By using the same trick than Facebook: https://github.com/facebook/react/blob/master/LICENSE

Commits
-------

8ce8bd5 Update LICENSE year... forever
2018-01-02 16:40:42 +01:00
Gabriel Caruso
acd0d7c93f Clean up 2018-01-02 16:37:23 +01:00
Christian Flothmann
546ca41926 [#22749] fix version in changelog 2018-01-01 13:55:57 +01:00
Kévin Dunglas
8ce8bd5901
Update LICENSE year... forever 2017-12-31 13:13:41 +01:00
Fabien Potencier
3a5c8a424e fixed some deprecation messages 2017-12-31 07:59:27 +01:00
Fabien Potencier
22c0e81d79 Merge branch '3.3' into 3.4
* 3.3:
  fixed some deprecation messages
  fixed some deprecation messages
  fixed some deprecation messages
  fixed some deprecation messages
  [2.7][DX] Use constant message contextualisation for deprecations
2017-12-31 07:07:31 +01:00
Fabien Potencier
8ce9569d8a minor #25476 [FrameworkBundle] Remove redundant translation path (yceruto)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Remove redundant translation path

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

This is only dead code, nothing change because all files are loaded from the `translations/` directory recursively and they override the ones from the bundle.

> http://symfony.com/doc/3.4/bundles/override.html#translations
> Translations are not related to bundles, but to domains. That means that you can override the translations from any translation file, as long as it is in the correct domain.

Commits
-------

16af89045a Remove redundant translation path
2017-12-31 06:54:09 +01:00
Fabien Potencier
74383b6e59 fixed some deprecation messages 2017-12-31 06:50:45 +01:00
Fabien Potencier
315180cd3b bug #25117 [FrameworkBundle] Make cache:clear "atomic" and consistent with cache:warmup (hkdobrev)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Make cache:clear "atomic" and consistent with cache:warmup

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

Here's what happens before/after this PR on `cache:clear` and `cache:clear --no-warmup`.

### Before PR

**`cache:clear`**

1. `rm var/cache_old`
1. Clearing cache in `var/cache`    &nbsp;<i>&lt;--- This is not in line and not atomic</i>
1. `rm var/cache_warmup`
1. Warming up cache in `var/cache_warmup`
1. `mv var/cache var/cache_old`
1. `mv var/cache_warmup var/cache`
1. `rm var/cache_old`

**`cache:clear --no-warmup`**

1. `rm var/cache_old`
1. Clearing cache in `var/cache`    &nbsp;<i>&lt;--- This is not in line and not atomic</i>
1. `mv var/cache var/cache_old`    <i>&lt;--- The old cache dir is completely obsolete in this workflow</i>
1. `rm var/cache_old`

---

### After PR

**`cache:clear`**

1. `rm var/cache_old`
1. `rm var/cache_new`
1. Clearing cache in `var/cache_new`
1. Warming up cache in `var/cache_new`
1. `mv var/cache var/cache_old`
1. `mv var/cache_new var/cache`
1. `rm var/cache_old`

**`cache:clear --no-warmup`**

1. `rm var/cache_old`
1. `rm var/cache_new`
1. Clearing cache in `var/cache_new`
1. `mv var/cache var/cache_old`
1. `mv var/cache_new var/cache`
1. `rm var/cache_old`

---

The main differences:
- Unify the flows and have each distinct operation only once in the code
- Clear the cache in the new cache directory and then switch to it atomically instead of clearing in the current one.
- Always have the cache directory present in the end. It was missing after `cache:clear --no-warmup` before.

I think this brings more consistency and is aligned with the present goals of the command as well.

However, I'm not really familiar with the Symfony framework and I might have wrong assumptions.

Commits
-------

8b88d9fc36 [FrameworkBundle] Make cache:clear "atomic" and consistent with cache:warmup
2017-12-31 06:48:57 +01:00
Fabien Potencier
351b234f07 fixed some deprecation messages 2017-12-31 06:12:25 +01:00
Fabien Potencier
2dd70c8a65 Merge branch '2.7' into 2.8
* 2.7:
  fixed some deprecation messages
2017-12-31 06:04:01 +01:00
Fabien Potencier
b316e11836 fixed some deprecation messages 2017-12-31 05:55:05 +01:00
Fabien Potencier
e78ca822c4 Merge branch '2.7' into 2.8
* 2.7:
  fixed some deprecation messages
2017-12-31 05:47:31 +01:00
Fabien Potencier
dc554562c8 fixed some deprecation messages 2017-12-31 05:27:30 +01:00
Fabien Potencier
be411de4d0 Merge branch '2.7' into 2.8
* 2.7:
  [2.7][DX] Use constant message contextualisation for deprecations
2017-12-31 05:16:51 +01:00
Fabien Potencier
8c33cd45cb feature #25588 Move SecurityUserValueResolver to security-http (chalasr)
This PR was merged into the 4.1-dev branch.

Discussion
----------

Move SecurityUserValueResolver to security-http

| 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

Commits
-------

30a07e7753 Move SecurityUserValueResolver to security-http
2017-12-31 04:41:12 +01:00
Fabien Potencier
f0b1dc2f7e bug #25583 [HttpKernel] Call Response->setPrivate() instead of sending raw header() when session is started (Toflar)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Call Response->setPrivate() instead of sending raw header() when session is started

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

As described in #24988 I think the current handling of the `Cache-Control` header set by the `NativeSessionStorage` causes inconsistent behaviour.

In #24988 @nicolas-grekas states that if you start a session a response should be considered to be private. I do agree with this but up until now, nobody takes care of this on `kernel.response`.

I think we must always suppress the `NativeSessionStorage` from generating any headers by default. Otherwise the `Cache-Control` header never makes it to the `Response` instance and is thus missed by `kernel.response` listeners and for example the Symfony HttpCache. So depending on whether you use Symfony's HttpCache  or Varnish as a reverse proxy, caching would be handled differently.  Varnish would consider the response to be private if you set the php.ini setting `session.cache_limiter` to `nocache` (which is default) because it will receive the header. HttpCache would not because the `Cache-Control` header is not present on the `Response`.  That's inconsistent and may cause confusion or problems when switching proxies.

Commits
-------

dbc1c1c4b6 [HttpKernel] Call Response->setPrivate() instead of sending raw header() when session is started
2017-12-31 04:28:37 +01:00
Fabien Potencier
bbe23a79d4 bug #25601 [TwigBundle/Brige] catch missing requirements to throw meaningful exceptions (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[TwigBundle/Brige] catch missing requirements to throw meaningful exceptions

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #25256, https://github.com/symfony/webpack-encore/issues/173
| License       | MIT
| Doc PR        | -

It is possible to register a handler for undefined twig functions/filters.
IMHO, this is the hook point we should leverage to throw meaningful exception messages.

This works well on its own. We now just need to list the functions/filters with appropriate messages.

There is one case we could enhance: at warmup time, Twig exceptions are swallowed, thus not visible.
Shouldn't we make these visible instead?

ping @weaverryan since this is related to two issues of yours.

Commits
-------

ac891ac881 [TwigBundle/Brige] catch missing requirements to throw meaningful exceptions
2017-12-30 12:42:46 +01:00
Nicolas Grekas
ac891ac881 [TwigBundle/Brige] catch missing requirements to throw meaningful exceptions 2017-12-30 11:01:46 +01:00
Nicolas Grekas
cf898572a0 Merge branch '4.0'
* 4.0: (23 commits)
  Add application/ld+json format associated to json
  [HttpFoundation] Fix false-positive ConflictingHeadersException
  remove flex-specific suggestion on 3.4
  Add check for SecurityBundle in createAccessDeniedException
  [WebServerBundle] Fix escaping of php binary with arguments
  Error handlers' $context should be optional as it's deprecated
  [Serializer] Correct typing mistake in DocBlock
  [HttpKernel] fix cleaning legacy containers
  Display n/a for sub-requests time when Stopwatch component is not installed
  Updating message to inform the user how to install the component
  [Config] Fix closure CS
  [Console] Simplify parameters in DI
  PHP CS Fixer: use PHPUnit Migration ruleset
  [Process] Skip false-positive test on Windows/appveyor
  Update MemcachedTrait.php
  [Bridge/PhpUnit] thank phpunit/phpunit
  allow auto_wire for SessionAuthenticationStrategy class
  [Process] Fix setting empty env vars
  Fixed 'RouterInteface' typo
  [Process] Dont use getenv(), it returns arrays and can introduce subtle breaks accros PHP versions
  ...
2017-12-29 22:01:22 +01:00
Nicolas Grekas
6a69c7f0d8 Merge branch '3.4' into 4.0
* 3.4: (22 commits)
  Add application/ld+json format associated to json
  [HttpFoundation] Fix false-positive ConflictingHeadersException
  remove flex-specific suggestion on 3.4
  Add check for SecurityBundle in createAccessDeniedException
  [WebServerBundle] Fix escaping of php binary with arguments
  Error handlers' $context should be optional as it's deprecated
  [Serializer] Correct typing mistake in DocBlock
  [HttpKernel] fix cleaning legacy containers
  Display n/a for sub-requests time when Stopwatch component is not installed
  Updating message to inform the user how to install the component
  [Config] Fix closure CS
  PHP CS Fixer: use PHPUnit Migration ruleset
  [Process] Skip false-positive test on Windows/appveyor
  Update MemcachedTrait.php
  [Bridge/PhpUnit] thank phpunit/phpunit
  allow auto_wire for SessionAuthenticationStrategy class
  [Process] Fix setting empty env vars
  Fixed 'RouterInteface' typo
  [Process] Dont use getenv(), it returns arrays and can introduce subtle breaks accros PHP versions
  [WebServerBundle] fix a bug where require would not require the good file because of env
  ...
2017-12-29 22:00:20 +01:00
Nicolas Grekas
cc027a261f Merge branch '3.3' into 3.4
* 3.3:
  Add application/ld+json format associated to json
  [HttpFoundation] Fix false-positive ConflictingHeadersException
  [WebServerBundle] Fix escaping of php binary with arguments
  Error handlers' $context should be optional as it's deprecated
  [Serializer] Correct typing mistake in DocBlock
  [Config] Fix closure CS
  PHP CS Fixer: use PHPUnit Migration ruleset
  Update MemcachedTrait.php
  [Bridge/PhpUnit] thank phpunit/phpunit
  [Process] Fix setting empty env vars
  [Process] Dont use getenv(), it returns arrays and can introduce subtle breaks accros PHP versions
  [WebServerBundle] fix a bug where require would not require the good file because of env
  [Console] Commands with an alias should not be recognized as ambiguous
2017-12-29 21:55:26 +01:00
Robin Chalas
61fc5f7671 remove flex-specific suggestion on 3.4 2017-12-29 16:39:13 +01:00
Frederic G. MARAND
a013c019a7 Add check for SecurityBundle in createAccessDeniedException 2017-12-29 14:30:56 +01:00
Nicolas Grekas
6629ae535d [WebServerBundle] Fix escaping of php binary with arguments 2017-12-29 12:04:53 +01:00
Yanick Witschi
dbc1c1c4b6 [HttpKernel] Call Response->setPrivate() instead of sending raw header() when session is started 2017-12-29 11:28:36 +01:00
Javier Eguiluz
ae6f66821f bug #25526 [WebProfilerBundle] Fix panel break when stopwatch component is not installed. (umulmrum, javiereguiluz)
This PR was merged into the 3.4 branch.

Discussion
----------

[WebProfilerBundle] Fix panel break when stopwatch component is not installed.

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

Fixes a crash in the time profiler panel when the stopwatch is not installed. This avoids a hard dependency like the ticket author requested, as the rest of the component can already deal with that case.

I think this is an issue in 3.4+, but I only tested against 4.0.2 locally (code in the affected file only differs in whitespace between 3.4 and 4.0).

Commits
-------

e9577cb207 Display n/a for sub-requests time when Stopwatch component is not installed
410b597393 Fix panel break when stopwatch component is not installed.
2017-12-28 12:09:31 +01:00
Javier Eguiluz
e9577cb207
Display n/a for sub-requests time when Stopwatch component is not installed 2017-12-28 12:08:28 +01:00
Haralan Dobrev
8b88d9fc36 [FrameworkBundle] Make cache:clear "atomic" and consistent with cache:warmup 2017-12-27 10:35:49 +01:00
Robin Chalas
30a07e7753 Move SecurityUserValueResolver to security-http 2017-12-23 01:50:31 +01:00
Nicolas Grekas
cd6690dacd bug #25571 [SecurityBundle] allow auto_wire for SessionAuthenticationStrategy class (xavren)
This PR was merged into the 3.4 branch.

Discussion
----------

[SecurityBundle] allow auto_wire for SessionAuthenticationStrategy class

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

Commits
-------

b36154e allow auto_wire for SessionAuthenticationStrategy class
2017-12-22 23:39:48 +01:00
xavren
b36154eb6c allow auto_wire for SessionAuthenticationStrategy class 2017-12-21 09:56:34 +01:00
Ion Bazan
680f85478c
Fixed 'RouterInteface' typo 2017-12-20 16:01:44 +01:00
Romain Neutron
c2338cbd7a
[2.7][DX] Use constant message contextualisation for deprecations 2017-12-20 15:36:51 +01:00
Nicolas Grekas
743be09e3d bug #25523 [WebServerBundle] fix a bug where require would not require the good file because of env (Simperfit)
This PR was merged into the 3.3 branch.

Discussion
----------

[WebServerBundle] fix a bug where require would not require the good file because of env

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #25515
| License       | MIT
| Doc PR        |

This fixes a bug with putenv that could be not working on certain version of php. (>=7.0.0).

Commits
-------

bfeee1f [WebServerBundle] fix a bug where require would not require the good file because of env
2017-12-20 15:28:41 +01:00
DSeemiller
b1030d70f7 allow autowire for http_utils class 2017-12-20 13:37:21 +01:00
Nicolas Grekas
12a269a4e0 Merge branch '4.0'
* 4.0:
  [2.7] Fix issues found by PHPStan
  [Command] Fix upgrade guide example
  Add php_unit_dedicate_assert to PHPCS
  [WebProfilerBundle] Let fetch() cast URL to string
  improve FormType::getType exception message details
  [Intl] Update ICU data to 60.2
  [Console] fix a bug when you are passing a default value and passing -n would ouput the index
  [FrameworkBundle] fix merge of 3.3 into 3.4
  bumped Symfony version to 4.0.3
  updated VERSION for 4.0.2
  updated CHANGELOG for 4.0.2
  bumped Symfony version to 3.4.3
  updated VERSION for 3.4.2
  updated CHANGELOG for 3.4.2
2017-12-20 12:11:10 +01:00
Nicolas Grekas
1a6cdfec91 Merge branch '3.4' into 4.0
* 3.4:
  [2.7] Fix issues found by PHPStan
  [Command] Fix upgrade guide example
  Add php_unit_dedicate_assert to PHPCS
  [WebProfilerBundle] Let fetch() cast URL to string
  improve FormType::getType exception message details
  [Intl] Update ICU data to 60.2
  [Console] fix a bug when you are passing a default value and passing -n would ouput the index
  [FrameworkBundle] fix merge of 3.3 into 3.4
  bumped Symfony version to 3.4.3
  updated VERSION for 3.4.2
  updated CHANGELOG for 3.4.2
2017-12-20 12:09:53 +01:00
Nicolas Grekas
a8755cc7d7 Merge branch '3.3' into 3.4
* 3.3:
  [2.7] Fix issues found by PHPStan
  Add php_unit_dedicate_assert to PHPCS
  [WebProfilerBundle] Let fetch() cast URL to string
  improve FormType::getType exception message details
  [Intl] Update ICU data to 60.2
  [Console] fix a bug when you are passing a default value and passing -n would ouput the index
2017-12-20 12:08:06 +01:00
Nicolas Grekas
d731a2748f Merge branch '2.8' into 3.3
* 2.8:
  [2.7] Fix issues found by PHPStan
  Add php_unit_dedicate_assert to PHPCS
  improve FormType::getType exception message details
  [Intl] Update ICU data to 60.2
  [Console] fix a bug when you are passing a default value and passing -n would ouput the index
2017-12-20 12:04:02 +01:00
Nicolas Grekas
44db4d1170 Merge branch '2.7' into 2.8
* 2.7:
  [2.7] Fix issues found by PHPStan
  Add php_unit_dedicate_assert to PHPCS
  [Intl] Update ICU data to 60.2
  [Console] fix a bug when you are passing a default value and passing -n would ouput the index
2017-12-20 11:59:01 +01:00
Dalibor Karlović
afa1f149a3 [2.7] Fix issues found by PHPStan 2017-12-20 10:28:52 +01:00
Amrouche Hamza
bfeee1f011
[WebServerBundle] fix a bug where require would not require the good file because of env 2017-12-19 14:09:34 +01:00
Roland Franssen
1a75e8568f [WebProfilerBundle] Let fetch() cast URL to string 2017-12-19 13:12:38 +01:00
Stefan
410b597393 Fix panel break when stopwatch component is not installed. 2017-12-17 16:53:26 +01:00
Christian Flothmann
4a623502d7 remove an unneeded failing legacy test
The removed test is not needed anymore as it is already covered by the
`testEnabledStrictEmailOptionIsMappedToStrictEmailValidationMode` and
`testDisabledStrictEmailOptionIsMappedToLooseEmailValidationMode` tests.
2017-12-15 12:22:07 +01:00
David Maicher
76e16ff4ef [FrameworkBundle] fix merge of 3.3 into 3.4 2017-12-15 10:06:19 +01:00
Fabien Potencier
b9d731564f Merge branch '4.0'
* 4.0:
  Revert "bug #25151 [FrameworkBundle] Automatically enable the CSRF protection if CSRF manager exists (sroze)"
  Revert "bug #25502 Fixing wrong class_exists on interface (weaverryan)"
2017-12-14 17:44:48 -08:00
Fabien Potencier
a91b5a56b7 Merge branch '3.4' into 4.0
* 3.4:
  Revert "bug #25151 [FrameworkBundle] Automatically enable the CSRF protection if CSRF manager exists (sroze)"
  Revert "bug #25502 Fixing wrong class_exists on interface (weaverryan)"
2017-12-14 17:44:28 -08:00
Fabien Potencier
903f120816 Revert "bug #25151 [FrameworkBundle] Automatically enable the CSRF protection if CSRF manager exists (sroze)"
This reverts commit d5f04284f9, reversing
changes made to e52825e253.
2017-12-14 17:44:04 -08:00
Fabien Potencier
8013b4b2d3 Revert "bug #25502 Fixing wrong class_exists on interface (weaverryan)"
This reverts commit 5fd5f19eaf, reversing
changes made to 826d545ba0.
2017-12-14 17:44:00 -08:00
Nicolas Grekas
b286950cc4 Merge branch '4.0'
* 4.0:
  [Routing] Fix tests
  [SecurityBundle] fix test by always disabling CSRF
  [FrameworkBundle] remove esi/ssi renderers if inactive
2017-12-14 23:39:41 +01:00
Nicolas Grekas
a6fa4a3f63 Merge branch '3.4' into 4.0
* 3.4:
  [Routing] Fix tests
  [SecurityBundle] fix test by always disabling CSRF
  [FrameworkBundle] remove esi/ssi renderers if inactive
2017-12-14 23:39:22 +01:00
Nicolas Grekas
1e1b85c99c Merge branch '3.3' into 3.4
* 3.3:
  [SecurityBundle] fix test by always disabling CSRF
  [FrameworkBundle] remove esi/ssi renderers if inactive
2017-12-14 23:31:23 +01:00
Nicolas Grekas
e273d8107e [SecurityBundle] fix test by always disabling CSRF 2017-12-14 23:23:34 +01:00
Nicolas Grekas
e5d178e55a Merge branch '2.8' into 3.3
* 2.8:
  [FrameworkBundle] remove esi/ssi renderers if inactive
2017-12-14 21:27:16 +01:00
Nicolas Grekas
39bcfd4702 Merge branch '2.7' into 2.8
* 2.7:
  [FrameworkBundle] remove esi/ssi renderers if inactive
2017-12-14 21:21:22 +01:00
Fabien Potencier
76b7cacdd3 bug #25489 [FrameworkBundle] remove esi/ssi renderers if inactive (dmaicher)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] remove esi/ssi renderers if inactive

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

As found out within #25246 the esi/ssi fragment renderer services were registered for < 3.4 even when the framework config for it was disabled.

On 3.4+ this has been fixed already and the service definitions are removed.

With this fix the usual exception message appears when `framework.esi` or `framework.ssi` are disabled and using `render_esi(...)` or `render_ssi(...)`:

```
An exception has been thrown during the rendering of a template ("The "esi" renderer does not exist.").
```

**Note: Some people may see this exception when updating to this patch but this just means they are using esi/ssi without enabling it.**

Commits
-------

e1c36525fd [FrameworkBundle] remove esi/ssi renderers if inactive
2017-12-14 11:54:21 -08:00
Fabien Potencier
0b1b8959d3 Merge branch '4.0'
* 4.0:
  fixed wrong merge
  Tweak message to be Flex friendly
  [Routing] fixed tests
  Fixing wrong class_exists on interface
  Preserve percent-encoding in URLs when performing redirects in the UrlMatcher
  removed FIXME
  [Console] Fix a bug when passing a letter that could be an alias
  add missing validation options to XSD file
  Take advantage of AnnotationRegistry::registerUniqueLoader
  [DI] Optimize Container::get() for perf
  fix merge
  Fix tests
  Refactoring tests.
2017-12-14 11:50:39 -08:00
Fabien Potencier
0116c32c71 Merge branch '3.4' into 4.0
* 3.4:
  fixed wrong merge
  Tweak message to be Flex friendly
  [Routing] fixed tests
  Fixing wrong class_exists on interface
  Preserve percent-encoding in URLs when performing redirects in the UrlMatcher
  [Console] Fix a bug when passing a letter that could be an alias
  add missing validation options to XSD file
  Take advantage of AnnotationRegistry::registerUniqueLoader
  [DI] Optimize Container::get() for perf
  fix merge
  Fix tests
  Refactoring tests.
2017-12-14 11:48:22 -08:00
Fabien Potencier
032de3abf4 Merge branch '3.3' into 3.4
* 3.3:
  Tweak message to be Flex friendly
2017-12-14 11:45:05 -08:00
Fabien Potencier
5fd5f19eaf bug #25502 Fixing wrong class_exists on interface (weaverryan)
This PR was merged into the 3.4 branch.

Discussion
----------

Fixing wrong class_exists on interface

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | none
| License       | MIT
| Doc PR        | symfony/symfony-docs#8873 already does not mention changing anything in the config

This was a bug introduced in #25151 on the 3.4 branch. It's... pretty self-explanatory I hope :).

Cheers!

Commits
-------

be75bd994b Fixing wrong class_exists on interface
2017-12-14 11:42:48 -08:00
Fabien Potencier
826d545ba0 fixed wrong merge 2017-12-14 11:41:37 -08:00
Fabien Potencier
e7cccb0575 fixed tests 2017-12-14 11:40:10 -08:00
Ryan Weaver
eaf5642b95
Tweak message to be Flex friendly 2017-12-14 11:37:45 -08:00
Fabien Potencier
13f58b403c Merge branch '2.8' into 3.3
* 2.8:
  Preserve percent-encoding in URLs when performing redirects in the UrlMatcher
  [Console] Fix a bug when passing a letter that could be an alias
  add missing validation options to XSD file
2017-12-14 11:31:56 -08:00
Ryan Weaver
be75bd994b
Fixing wrong class_exists on interface 2017-12-14 11:30:58 -08:00
Fabien Potencier
bdbdf73bdd Merge branch '2.7' into 2.8
* 2.7:
  Preserve percent-encoding in URLs when performing redirects in the UrlMatcher
  [Console] Fix a bug when passing a letter that could be an alias
  add missing validation options to XSD file
2017-12-14 11:27:36 -08:00
Fabien Potencier
56537bf7aa feature #25478 [FrameworkBundle] add email_validation_mode option (xabbuh)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[FrameworkBundle] add email_validation_mode option

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

cda582595c add email_validation_mode option
2017-12-14 10:51:57 -08:00
Fabien Potencier
9ff3776b78 bug #25480 [FrameworkBundle] add missing validation options to XSD file (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

[FrameworkBundle] add missing validation options to XSD file

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

Commits
-------

e7d8e1783b add missing validation options to XSD file
2017-12-14 10:38:41 -08:00
David Maicher
e1c36525fd [FrameworkBundle] remove esi/ssi renderers if inactive 2017-12-13 20:39:50 +01:00
Christian Flothmann
cda582595c add email_validation_mode option 2017-12-13 12:39:39 +01:00
Christian Flothmann
e7d8e1783b add missing validation options to XSD file 2017-12-13 08:51:34 +01:00
Yonel Ceruto
16af89045a Remove redundant translation path 2017-12-12 23:37:05 -05:00
Jonathan Johnson
97c3f429eb
Take advantage of AnnotationRegistry::registerUniqueLoader
This method will only add 'class_exists' as an autoloader if it has not
already been added. This helps alleviate a performance issue when the
same loader is added many times in tests.
2017-12-12 15:38:57 -08:00
Robin Chalas
bf61b7b969 Merge branch '3.4' into 4.0
* 3.4:
  add missing logout_on_user_change options
  [HttpFoundation] Add immutable to setCache's PHPDoc
2017-12-12 12:44:17 +01:00
Christian Flothmann
fde1f48874 add missing logout_on_user_change options 2017-12-12 12:26:50 +01:00
Nicolas Grekas
05ab1cd00d Merge branch '2.8' into 3.3
* 2.8:
  Refactoring tests.
2017-12-12 12:20:26 +01:00
Nicolas Grekas
263eda3dd6 Merge branch '2.7' into 2.8
* 2.7:
  Refactoring tests.
2017-12-12 12:12:43 +01:00
Nicolas Grekas
3051289791 [FrameworkBundle] Move AbstractController::getParameter() from the trait to the class & use PSR-11 2017-12-12 11:27:48 +01:00
Nicolas Grekas
7ecfc7fedc Merge branch '4.0'
* 4.0: (25 commits)
  [Form] fix how form type is referenced in test
  fix merge
  [Console] Fix console tests by adding the missing condition
  [Translation] Fix InvalidArgumentException when using untranslated plural forms from .po files
  Fixed exit code with non-integer throwable code
  [HttpFoundation] Support 0 bit netmask in IPv6 ()
  [DI] Impossible to set an environment variable and then an array as container parameter
  [Process] remove false-positive BC breaking exception on Windows
  Tweaking class not found autowiring error
  [LDAP] added missing dots at the end of some exception messages.
  [TwigBridge] Add missing dev requirement for workflow
  fixed #25440
  empty lines don't count for indent detection
  Set `width: auto` on WebProfiler toolbar's reset.
  [Lock] Fix incorrect phpdoc
  [Process] Dont rely on putenv(), it fails on ZTS PHP
  [HttpKernel] detect deprecations thrown by container initialization during tests
  [HttpKernel] Fix logging of post-terminate errors/exceptions
  [DI] Add context to service-not-found exceptions thrown by service locators
  [Debug] Fix catching fatal errors in case of nested error handlers
  ...
2017-12-12 09:59:50 +01:00
Nicolas Grekas
15915fddf1 Merge branch '3.4' into 4.0
* 3.4: (22 commits)
  fix merge
  [Translation] Fix InvalidArgumentException when using untranslated plural forms from .po files
  Fixed exit code with non-integer throwable code
  [HttpFoundation] Support 0 bit netmask in IPv6 ()
  [DI] Impossible to set an environment variable and then an array as container parameter
  [Process] remove false-positive BC breaking exception on Windows
  Tweaking class not found autowiring error
  [LDAP] added missing dots at the end of some exception messages.
  [TwigBridge] Add missing dev requirement for workflow
  fixed #25440
  empty lines don't count for indent detection
  Set `width: auto` on WebProfiler toolbar's reset.
  [Lock] Fix incorrect phpdoc
  [Process] Dont rely on putenv(), it fails on ZTS PHP
  [HttpKernel] detect deprecations thrown by container initialization during tests
  [HttpKernel] Fix logging of post-terminate errors/exceptions
  [DI] Add context to service-not-found exceptions thrown by service locators
  [Debug] Fix catching fatal errors in case of nested error handlers
  [VarDumper] Fixed file links leave blank pages when ide is configured
  Fix hidden currency element with Bootstrap 3 theme
  ...
2017-12-12 09:41:51 +01:00
Nicolas Grekas
6aa18bf6a8 Merge branch '3.3' into 3.4
* 3.3:
  fix merge
  [Translation] Fix InvalidArgumentException when using untranslated plural forms from .po files
  Fixed exit code with non-integer throwable code
  Add suggestions
  Added instructions to upgrade Symfony applications to 4.x
2017-12-12 09:27:14 +01:00
Nicolas Grekas
6e29f187b7 minor #25026 [MonologBridge][WebServerBundle] Add suggestions for using the log server (maidmaid)
This PR was merged into the 3.3 branch.

Discussion
----------

[MonologBridge][WebServerBundle] Add suggestions for using the log server

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

If you want launch `server:log`, you need the monolog bridge and the VarDumper. Optionally, you need EL if you want use `server:log --filter`.

Commits
-------

aca0ddd Add suggestions
2017-12-12 09:03:31 +01:00
Gabriel Caruso
567e0ab7e6 Refactoring tests. 2017-12-12 05:05:30 -02:00
shdev
0afce8db58 Pr/workflow name as graph label 2017-12-11 15:18:49 -08:00
Fabien Potencier
9ddf500a7a Merge branch '3.3' into 3.4
* 3.3:
  [HttpFoundation] Support 0 bit netmask in IPv6 ()
  [DI] Impossible to set an environment variable and then an array as container parameter
  [LDAP] added missing dots at the end of some exception messages.
  Set `width: auto` on WebProfiler toolbar's reset.
  [Process] Dont rely on putenv(), it fails on ZTS PHP
  [HttpKernel] detect deprecations thrown by container initialization during tests
  [HttpKernel] Fix logging of post-terminate errors/exceptions
  [Debug] Fix catching fatal errors in case of nested error handlers
  [VarDumper] Fixed file links leave blank pages when ide is configured
  Fix hidden currency element with Bootstrap 3 theme
2017-12-11 14:06:16 -08:00
Fabien Potencier
0a95168cd8 Merge branch '2.8' into 3.3
* 2.8:
  [HttpFoundation] Support 0 bit netmask in IPv6 ()
  Set `width: auto` on WebProfiler toolbar's reset.
  [HttpKernel] Fix logging of post-terminate errors/exceptions
  [Debug] Fix catching fatal errors in case of nested error handlers
  Fix hidden currency element with Bootstrap 3 theme
2017-12-11 14:02:38 -08:00
Fabien Potencier
eddd273351 Merge branch '2.7' into 2.8
* 2.7:
  [HttpFoundation] Support 0 bit netmask in IPv6 ()
  Set `width: auto` on WebProfiler toolbar's reset.
  [HttpKernel] Fix logging of post-terminate errors/exceptions
  [Debug] Fix catching fatal errors in case of nested error handlers
  Fix hidden currency element with Bootstrap 3 theme
2017-12-11 14:01:48 -08:00
Fabien Potencier
74106c25bc feature #24738 [FrameworkBundle][Routing] Use a PSR-11 container in FrameworkBundle Router (ogizanagi)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[FrameworkBundle][Routing] Use a PSR-11 container in FrameworkBundle Router

| Q             | A
| ------------- | ---
| Branch?       | 4.1 <!-- see comment below -->
| Bug fix?      | no
| New feature?  | yes <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | not yet <!-- don't forget to update UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

~3.4 because~ it allows to make the `routing.loader` service private and add sense into implementing the `ServiceSubscriberInterface` in the `Router` by injecting a ServiceLocator instead of the DI container.

Should we deprecate passing a DI `ContainerInterface` instance without providing the `$paramFetcher` argument?
Move the whole `Router::resolve()` method into a dedicated `callable $paramResolver` ?

Commits
-------

5a2f2954ae [FrameworkBundle][Routing] Use a PSR-11 container & parameter bag in FrameworkBundle Router
2017-12-11 14:00:38 -08:00
Fabien Potencier
26771099b1 fixed comment 2017-12-11 13:50:58 -08:00
Fabien Potencier
2c976f7467 feature #25439 Add ControllerTrait::getParameter() (chalasr)
This PR was merged into the 4.1-dev branch.

Discussion
----------

Add ControllerTrait::getParameter()

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

Commits
-------

28397e5b2c Add ControllerTrait::getParameter()
2017-12-11 13:49:45 -08:00
Robin Chalas
28397e5b2c Add ControllerTrait::getParameter() 2017-12-11 17:27:48 +01:00
Bob den Otter
62f5eaef11
Set width: auto on WebProfiler toolbar's reset. 2017-12-11 12:11:10 +01:00
Daniel Alejandro Cast
191b837e22 [FrameworkBundle] Add atom editor to ide config 2017-12-10 01:05:02 -08:00
Maxime Steinhausser
5a2f2954ae [FrameworkBundle][Routing] Use a PSR-11 container & parameter bag in FrameworkBundle Router 2017-12-09 16:16:33 +01:00
Nicolas Grekas
4ebea4e429 Merge branch '4.0'
* 4.0: (42 commits)
  fix merge
  Remove some unused variables and properties
  [appveyor] disable memory limit on composer up
  [HttpFoundation] don't prefix cookies with "Set-Cookie:"
  Remove some unused variables and properties
  [HttpFoundation] Fixed default user-agent (3.X -> 4.X)
  Fix debug:form definition
  Remove some unused variables, properties and methods
  fix some edge cases with indented blocks
  [ExpressionLanguage] Fix parse error on 5.3
  [HttpKernel] remove noisy frame in controller stack traces
  [DI] Force root-namespace for function calls in the dumper container
  [DI] Fix circular-aliases message
  register system cache clearer only if it's used
  doc : Namespace prefix must end with a "\"
  [ExpressionLanguage] throw an SyntaxError instead of letting a undefined index notice
  Prevent a loop in aliases within the `findDefinition` method
  [HttpKernel] Disable inlining on PHP 5
  Ensure that inlined services with parameterized class name can be dumped
  [DI] Fix non-string class handling in PhpDumper
  ...
2017-12-08 16:58:51 +01:00
Nicolas Grekas
0002c9b76d Merge branch '3.4' into 4.0
* 3.4: (37 commits)
  Remove some unused variables and properties
  [appveyor] disable memory limit on composer up
  [HttpFoundation] don't prefix cookies with "Set-Cookie:"
  Remove some unused variables and properties
  Fix debug:form definition
  Remove some unused variables, properties and methods
  fix some edge cases with indented blocks
  [ExpressionLanguage] Fix parse error on 5.3
  [HttpKernel] remove noisy frame in controller stack traces
  [DI] Force root-namespace for function calls in the dumper container
  [DI] Fix circular-aliases message
  register system cache clearer only if it's used
  doc : Namespace prefix must end with a "\"
  [ExpressionLanguage] throw an SyntaxError instead of letting a undefined index notice
  Prevent a loop in aliases within the `findDefinition` method
  [HttpKernel] Disable inlining on PHP 5
  Ensure that inlined services with parameterized class name can be dumped
  [DI] Fix non-string class handling in PhpDumper
  Throw a sensible exception when controller has been removed
  Remove LOCK_EX That Breaks Cache Usage on NFS
  ...
2017-12-08 16:46:13 +01:00
Titouan Galopin
ec92d9b12e Remove some unused variables and properties 2017-12-08 16:14:47 +01:00
Nicolas Grekas
b56ab7b46e feature #25288 [DI][FrameworkBundle] Add PSR-11 "ContainerBag" to access parameters as-a-service (nicolas-grekas, sroze)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[DI][FrameworkBundle] Add PSR-11 "ContainerBag" to access parameters as-a-service

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

There is one thing that prevents us from not injecting the container: access to the parameter bag.
This PR fixes this limitation by providing a PSR-11 `ContainerBagInterface` + related implementation, and wiring it as a service that ppl can then also autowire using the new interface as a type hint, or `ParameterBagInterface`.

Needed to complete e.g. #24738

Commits
-------

561cd7e Add tests on the ContainerBag
0e18d3e [DI][FrameworkBundle] Add PSR-11 "ContainerBag" to access parameters as-a-service
2017-12-08 13:39:00 +01:00
Nicolas Grekas
af81bb5e24 Merge branch '2.7' into 2.8
* 2.7:
  Remove some unused variables, properties and methods
  [ExpressionLanguage] Fix parse error on 5.3
  [HttpKernel] remove noisy frame in controller stack traces
  [ExpressionLanguage] throw an SyntaxError instead of letting a undefined index notice
  Fix php doc in Table class
  bumped Symfony version to 2.7.40
  updated VERSION for 2.7.39
  update CONTRIBUTORS for 2.7.39
  updated CHANGELOG for 2.7.39
2017-12-08 13:32:59 +01:00
Titouan Galopin
30e227392a Remove some unused variables, properties and methods 2017-12-08 13:09:58 +01:00
Fabien Potencier
7744e8f802 feature #25290 [FrameworkBundle] debug:autowiring: don't list FQCN when they are aliased (nicolas-grekas)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[FrameworkBundle] debug:autowiring: don't list FQCN when they are aliased

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

In order to favor type-hinting for interfaces, I propose to not list the class as explicitly autowireable when an alias exists for it.

Which means displaying only
```
  App\FooInterface
      alias to App\Foo
```

instead of
```
  App\Foo
  App\FooInterface
      alias to App\Foo
```

ping @weaverryan

Commits
-------

8cbfa1eaf3 [FrameworkBundle] debug:autowiring: don't list FQCN when they are aliased
2017-12-07 18:46:54 -08:00
Fabien Potencier
279dc46756 feature #24375 [Serializer] Serialize and deserialize from abstract classes (sroze)
This PR was squashed before being merged into the 4.1-dev branch (closes #24375).

Discussion
----------

[Serializer] Serialize and deserialize from abstract classes

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

This PR adds a feature in the Serializer: allow to serialize and de-serialize abstract classes. Such feature is especially useful when dealing with domain objects.

# Example

Let's take the example of the following objects:
- `CodeRepository` defines a set of properties like `name` and `url`
- `GitHubCodeRepository` and `BitBucketCodeRepository` extends from the abstract `CodeRepository` class and adds a few properties.
- `Project` has a relation with a `codeRepository`, which has a type `CodeRepository`.

At the moment, the serializer can't serialize/deserialize correctly this `Project` object has it doesn't know how to deal with this `CodeRepository` abstract object.

This feature allows the serializer to deal with such situation. The `ObjectNormalizer` has now access to a `ClassDiscriminatorResolver` that knows, for a given abstract class:
- Is the "type" property it needs to read/write to uniquely identify each sub-class
- What's the name of the "type" for each sub-class mapping

# Usage without Framework Bundle

```php
$discriminatorResolver = new ClassDiscriminatorResolver();
$discriminatorResolver->addClassMapping(CodeRepository::class, new ClassDiscriminatorMapping('type', [
    'github' => GitHubCodeRepository::class,
    'bitbucket' => BitBucketCodeRepository::class,
]));

$serializer = new Serializer(array(new ObjectNormalizer(null, null, null, null, $discriminatorResolver)), array('json' => new JsonEncoder()));

$serialized = $serializer->serialize(new GitHubCodeRepository());
// {"type": "github"}

$repository = $serializer->unserialize($serialized, CodeRepository::class, 'json');
// GitHubCodeRepository

```

# Usage with the Framework Bundle

```yaml
framework:
    serializer:
        discriminator_class_mapping:
            App\CodeRepository:
                 type_property: type
                 mapping:
                    github: App\GitHubCodeRepository
                    bitbucket: App\BitBucketCodeRepository
```

# Usage with Annotations/XML/YAML

```php
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;

/**
 * @DiscriminatorMap(typeProperty="type", mapping={
 *    "first"="Symfony\Component\Serializer\Tests\Fixtures\AbstractDummyFirstChild",
 *    "second"="Symfony\Component\Serializer\Tests\Fixtures\AbstractDummySecondChild"
 * })
 */
abstract class AbstractDummy
{
    public $foo;

    public function __construct($foo = null)
    {
        $this->foo = $foo;
    }
}
```

# TODO

- [x] Working as standalone
- [x] Working with the framework bundle
- [x] Tests on mapping classes

Commits
-------

4c6e05b7ee [Serializer] Serialize and deserialize from abstract classes
2017-12-07 10:34:02 -08:00
Samuel ROZE
4c6e05b7ee [Serializer] Serialize and deserialize from abstract classes 2017-12-07 10:34:01 -08:00
Fabien Potencier
d220e28a99 feature #24216 added clean option to assets install command (robinlehrmann)
This PR was merged into the 4.1-dev branch.

Discussion
----------

added clean option to assets install command

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

Commits
-------

771f11b994 added clean option to assets install command
2017-12-07 08:16:48 -08:00
Christian Flothmann
093eb3d40d register system cache clearer only if it's used 2017-12-07 17:10:25 +01:00
Grégoire Pineau
7c0b1cd299 feature #24751 [Workflow] Introduce a Workflow interface (Simperfit)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Workflow] Introduce a Workflow interface

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

@chalasr I think all the points you made in 23910 has been done. Needs to update the docs too.

Commits
-------

e8351d8 [Workflow] Introduce a Workflow interface
2017-12-07 13:53:16 +01:00
Fabien Potencier
3ce9c29ae4 Merge branch '4.0'
* 4.0:
  [Bridge/PhpUnit] Prefer ['argv'] over
  [SecurityBundle] fix setLogoutOnUserChange calls for context listeners
  [SecurityBundle] add note to info text of no-op config option logout_on_user_change
  [DI] Register singly-implemented interfaces when doing PSR-4 discovery
  Fix for missing whitespace control modifier in form layout
2017-12-04 12:24:15 -08:00