Commit Graph

9975 Commits

Author SHA1 Message Date
Niels Keurentjes
a8f41289c4 [DX] Improve exception message when AbstractController::getParameter fails 2018-06-04 11:10:01 +02:00
Titouan Galopin
68994a662e [FrameworkBundle][TwigBridge] Fix BC break from strong dependency on CSRF token storage 2018-05-31 18:59:04 +02:00
Nicolas Grekas
8bbd7389a3 Merge branch '4.0' into 4.1
* 4.0:
  [HttpKernel] Fix restoring trusted proxies in tests
  Update UPGRADE-4.0.md
  CODEOWNERS: some more rules
  removed unneeded comments in tests
  removed unneeded comments in tests
  Change PHPDoc in ResponseHeaderBag::getCookies() to help IDEs
  [HttpKernel] fix registering IDE links
  [HttpKernel] Set first trusted proxy as REMOTE_ADDR in InlineFragmentRenderer.
  [Process] Consider \"executable\" suffixes first on Windows
  Triggering RememberMe's loginFail() when token cannot be created
  [Serializer] Fix serializer tries to denormalize null values on nullable properties
  [FrameworkBundle] Change priority of AddConsoleCommandPass to TYPE_BEFORE_REMOVING
2018-05-31 12:17:53 +02:00
Nicolas Grekas
b2e93cfb8a Merge branch '3.4' into 4.0
* 3.4:
  [HttpKernel] Fix restoring trusted proxies in tests
  Update UPGRADE-4.0.md
  CODEOWNERS: some more rules
  removed unneeded comments in tests
  removed unneeded comments in tests
  Change PHPDoc in ResponseHeaderBag::getCookies() to help IDEs
  [HttpKernel] fix registering IDE links
  [HttpKernel] Set first trusted proxy as REMOTE_ADDR in InlineFragmentRenderer.
  [Process] Consider \"executable\" suffixes first on Windows
  Triggering RememberMe's loginFail() when token cannot be created
  [Serializer] Fix serializer tries to denormalize null values on nullable properties
  [FrameworkBundle] Change priority of AddConsoleCommandPass to TYPE_BEFORE_REMOVING
2018-05-31 12:16:04 +02:00
Niels Keurentjes
37270d79a2 Insert correct parameter_bag service in AbstractController 2018-05-30 11:26:42 +02:00
Fabien Potencier
3114ffb0ae bug #27272 [FrameworkBundle] Change priority of AddConsoleCommandPass to TYPE_BEFORE_REMOVING (upyx)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Change priority of AddConsoleCommandPass to TYPE_BEFORE_REMOVING

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

Hello!
There is fix for #27259 issue. It changes priority of `AddConsoleCommandPass` to `TYPE_BEFORE_REMOVING` as @chalasr advised. I'm not sure about side effects by that.

Commits
-------

e36099503f [FrameworkBundle] Change priority of AddConsoleCommandPass to TYPE_BEFORE_REMOVING
2018-05-30 05:54:26 +02:00
Nicolas Grekas
92e3023195 [HttpKernel] fix registering IDE links 2018-05-28 17:16:05 +02:00
Nicolas Grekas
3e65a1c326 bug #27352 Remove reference to the test container after kernel shutdown (stof)
This PR was merged into the 4.1 branch.

Discussion
----------

Remove reference to the test container after kernel shutdown

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

This reference is not working anymore, as the main container was reset and cleaned. Keeping a reference to the test container will prevent collecting the object graph.

Commits
-------

d8fb1b97c9 Remove reference to the test container after kernel shutdown
2018-05-25 16:32:25 +02:00
Nicolas Grekas
af62eac5c2 bug #27367 [FrameworkBundle] cleanup generated test container (nicolas-grekas)
This PR was merged into the 4.1 branch.

Discussion
----------

[FrameworkBundle] cleanup generated test container

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

Cleans up removed and hidden services, fixes an issue when the private container locator is inlined.

Commits
-------

d8cbec00ad [FrameworkBundle] cleanup generated test container
2018-05-25 16:30:13 +02:00
Nicolas Grekas
169a3b1688 [FrameworkBundle] Fix using test.service_container when Client is rebooted 2018-05-25 15:53:35 +02:00
Nicolas Grekas
c0894b1a21 Merge branch '3.4' into 4.0
* 3.4:
  [SecurityBundle] fix test
2018-05-25 13:23:22 +02:00
Nicolas Grekas
ec30366209 [SecurityBundle] fix test 2018-05-25 13:23:15 +02:00
Nicolas Grekas
3dd22cb4c8 Merge branch '4.0' into 4.1
* 4.0:
  [DI] Fix bad exception on uninitialized references to non-shared services
  [HttpFoundation] Fix perf issue during MimeTypeGuesser intialization
2018-05-25 13:09:16 +02:00
Nicolas Grekas
2b8932f1cd Merge branch '3.4' into 4.0
* 3.4:
  [DI] Fix bad exception on uninitialized references to non-shared services
  [HttpFoundation] Fix perf issue during MimeTypeGuesser intialization
2018-05-25 13:08:56 +02:00
Nicolas Grekas
993c028185 Merge branch '2.8' into 3.4
* 2.8:
  [HttpFoundation] Fix perf issue during MimeTypeGuesser intialization
2018-05-25 13:07:31 +02:00
Nicolas Grekas
26f3318dd4 [SecurityBundle] fix test 2018-05-25 12:58:40 +02:00
Nicolas Grekas
bdf2ecb3f3 Merge branch '4.0' into 4.1
* 4.0:
  [SecurityBundle] update conflict rule
  fix class existence
  fix tests
  fixed constraints
  fixed constraints
  bumped dep
  bumped dep
2018-05-25 11:05:54 +02:00
Nicolas Grekas
34bb84be98 Merge branch '3.4' into 4.0
* 3.4:
  [SecurityBundle] update conflict rule
2018-05-25 11:05:43 +02:00
Nicolas Grekas
531fcacd5f [SecurityBundle] update conflict rule 2018-05-25 11:04:35 +02:00
Fabien Potencier
a313a8f8be Merge branch '3.4' into 4.0
* 3.4:
  fix class existence
  fix tests
  fixed constraints
  fixed constraints
  bumped dep
  bumped dep
2018-05-25 10:44:26 +02:00
Christian Flothmann
a1166b5527 fix class existence 2018-05-25 10:40:41 +02:00
Christian Flothmann
e65a122d17 fix tests 2018-05-25 09:52:36 +02:00
Fabien Potencier
27954581e5 Merge branch '4.0' into 4.1
* 4.0:
  fix tests
2018-05-25 09:48:58 +02:00
Christian Flothmann
ffd72c8dee fix tests 2018-05-25 09:48:49 +02:00
Fabien Potencier
2ed0cedb19 fixed constraints 2018-05-25 09:32:23 +02:00
Fabien Potencier
ea5fd1c5aa Merge branch '4.0' into 4.1
* 4.0:
  fixtures config fix
2018-05-24 21:00:42 +02:00
Fabien Potencier
aafd35d862 Merge branch '3.4' into 4.0
* 3.4:
  fixtures config fix
2018-05-24 21:00:32 +02:00
Fabien Potencier
87622765e5 Merge branch '2.8' into 3.4
* 2.8:
  fixtures config fix
2018-05-24 21:00:05 +02:00
Christian Flothmann
32c73a71a7 fixtures config fix 2018-05-24 20:59:44 +02:00
Nicolas Grekas
d8cbec00ad [FrameworkBundle] cleanup generated test container 2018-05-24 17:31:00 +02:00
Fabien Potencier
37003ec730 Merge branch '4.0' into 4.1
* 4.0:
  [SecurityBundle] Fail if security.http_utils cannot be configured
2018-05-24 15:24:47 +02:00
Fabien Potencier
f11c24e148 Merge branch '3.4' into 4.0
* 3.4:
  [SecurityBundle] Fail if security.http_utils cannot be configured
2018-05-24 15:24:39 +02:00
Fabien Potencier
500bede9c8 Merge branch '2.8' into 3.4
* 2.8:
  [SecurityBundle] Fail if security.http_utils cannot be configured
2018-05-24 15:24:30 +02:00
Fabien Potencier
6d455f224b Merge branch '2.7' into 2.8
* 2.7:
  [SecurityBundle] Fail if security.http_utils cannot be configured
2018-05-24 15:22:57 +02:00
Nicolas Grekas
c003b7a247 [SecurityBundle] Fail if security.http_utils cannot be configured 2018-05-24 15:22:37 +02:00
Fabien Potencier
3626bd1214 Merge branch '4.0' into 4.1
* 4.0:
  clear CSRF tokens when the user is logged out
2018-05-24 15:20:06 +02:00
Fabien Potencier
99c9b2d4c0 Merge branch '3.4' into 4.0
* 3.4:
  clear CSRF tokens when the user is logged out
2018-05-24 15:19:09 +02:00
Fabien Potencier
2111742676 Merge branch '2.7' into 2.8
* 2.7:
  clear CSRF tokens when the user is logged out
2018-05-24 14:58:29 +02:00
Fabien Potencier
ebc2819d1d Merge branch '2.8' into 3.4
* 2.8:
  clear CSRF tokens when the user is logged out
2018-05-24 14:51:10 +02:00
Fabien Potencier
a5d0b571fa Merge branch '2.7' into 2.8
* 2.7:
  clear CSRF tokens when the user is logged out
2018-05-24 14:44:24 +02:00
Christian Flothmann
4b91c171af clear CSRF tokens when the user is logged out 2018-05-24 14:39:52 +02:00
Nicolas Grekas
755815993d Merge branch '4.0' into 4.1
* 4.0:
  Fixed content trace CSS in profiler
  [Form] fix tests on old phpunit versions
  [FrameworkBundle] fix typo in CacheClearCommand
  bumped Symfony version to 4.0.11
  updated VERSION for 4.0.10
  updated CHANGELOG for 4.0.10
  bumped Symfony version to 3.4.11
  updated VERSION for 3.4.10
  updated CHANGELOG for 3.4.10
  bumped Symfony version to 2.8.41
  updated VERSION for 2.8.40
  updated CHANGELOG for 2.8.40
  bumped Symfony version to 2.7.48
  updated VERSION for 2.7.47
  update CONTRIBUTORS for 2.7.47
  updated CHANGELOG for 2.7.47
  fixed test
2018-05-23 15:33:23 +02:00
Fabien Potencier
4db96f5418 Merge branch '3.4' into 4.0
* 3.4:
  Fixed content trace CSS in profiler
  bumped Symfony version to 2.8.41
  updated VERSION for 2.8.40
  updated CHANGELOG for 2.8.40
  bumped Symfony version to 2.7.48
  updated VERSION for 2.7.47
  update CONTRIBUTORS for 2.7.47
  updated CHANGELOG for 2.7.47
2018-05-23 15:27:22 +02:00
Christophe Coevoet
d8fb1b97c9 Remove reference to the test container after kernel shutdown
This reference is not working anymore, as the main container was reset and
cleaned. Keeping a reference to the test container will prevent collecting
the object graph.
2018-05-23 12:38:43 +02:00
Sergey Rabochiy
e36099503f [FrameworkBundle] Change priority of AddConsoleCommandPass to TYPE_BEFORE_REMOVING 2018-05-23 12:02:55 +07:00
Maxime Steinhausser
c2f15afdc2 bug #27341 [WebProfilerBundle] Fixed validator/dump trace CSS (yceruto)
This PR was merged into the 3.4 branch.

Discussion
----------

[WebProfilerBundle] Fixed validator/dump trace CSS

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

**Before**
![validator_profiler_before](https://user-images.githubusercontent.com/2028198/40375748-77184ba0-5dba-11e8-8cb6-9a9acdadf34a.png)

**After**
![validator_after](https://user-images.githubusercontent.com/2028198/40375759-803f2046-5dba-11e8-9434-c3e4c6842d3a.png)

Commits
-------

607529202d Fixed content trace CSS in profiler
2018-05-22 19:17:49 +02:00
Yonel Ceruto
607529202d Fixed content trace CSS in profiler 2018-05-22 13:11:26 -04:00
Nicolas Grekas
388737232b Merge branch '3.4' into 4.0
* 3.4:
  [Form] fix tests on old phpunit versions
  [FrameworkBundle] fix typo in CacheClearCommand
  bumped Symfony version to 3.4.11
  updated VERSION for 3.4.10
  updated CHANGELOG for 3.4.10
  fixed test
2018-05-22 15:00:37 +02:00
Emilie Lorenzo
b1ec831cce
[FrameworkBundle] fix typo in CacheClearCommand 2018-05-22 12:57:49 +02:00
Fabien Potencier
440bd7ea50 fixed test 2018-05-21 13:44:24 +02:00
Fabien Potencier
389092a6a9 Merge branch '4.0' into 4.1
* 4.0:
  removed obsolete tests
2018-05-21 12:59:05 +02:00
Fabien Potencier
2ce15f9179 removed obsolete tests 2018-05-21 12:58:57 +02:00
Fabien Potencier
f9183db863 Merge branch '4.0' into 4.1
* 4.0:
  fixed bad merge
2018-05-21 12:48:43 +02:00
Fabien Potencier
f2419ddda6 fixed bad merge 2018-05-21 12:48:24 +02:00
Fabien Potencier
af4372220c Merge branch '4.0' into 4.1
* 4.0:
  do not mock the session in token storage tests
  [DependencyInjection] resolve array env vars
  Add Occitan plural rule
  Fix security/* cross-dependencies
  [Lock] Skip test if posix extension is not installed
  [DI] Allow defining bindings on ChildDefinition
  use strict compare in url validator
  Disallow illegal characters like "." in session.name
  [HttpKernel] do file_exists() check instead of silent notice
  fix rounding from string
2018-05-21 12:10:11 +02:00
Fabien Potencier
4d8a71d321 Merge branch '3.4' into 4.0
* 3.4:
  do not mock the session in token storage tests
  [DependencyInjection] resolve array env vars
  Add Occitan plural rule
  Fix security/* cross-dependencies
  [Lock] Skip test if posix extension is not installed
  [DI] Allow defining bindings on ChildDefinition
  use strict compare in url validator
  Disallow illegal characters like "." in session.name
  [HttpKernel] do file_exists() check instead of silent notice
  fix rounding from string
2018-05-21 12:09:47 +02:00
Fabien Potencier
793d1fe71a Merge branch '2.8' into 3.4
* 2.8:
  do not mock the session in token storage tests
  Add Occitan plural rule
  Fix security/* cross-dependencies
  Disallow illegal characters like "." in session.name
  fix rounding from string
2018-05-21 12:06:52 +02:00
Fabien Potencier
e336711cd9 Merge branch '2.7' into 2.8
* 2.7:
  do not mock the session in token storage tests
  Add Occitan plural rule
  Disallow illegal characters like "." in session.name
  fix rounding from string
2018-05-21 11:59:10 +02:00
Maxime Steinhausser
9d658e915e [Messenger] Allow to scope handlers per bus 2018-05-19 12:07:07 +02:00
Fabien Potencier
e98ce72e26 bug #27246 Disallow invalid characters in session.name (ostrolucky)
This PR was merged into the 2.7 branch.

Discussion
----------

Disallow invalid characters in session.name

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

PHP saves cookie with correct name, but upon deserialization to
`$_COOKIE`, it replaces "." characters with "_".

This is probably also reason why \SessionHandler is not able to find
a session.

https://harrybailey.com/2009/04/dots-arent-allowed-in-php-cookie-names/
https://bugs.php.net/bug.php?id=75883

Commits
-------

16ebb43bd4 Disallow illegal characters like "." in session.name
2018-05-17 12:20:37 +02:00
Nicolas Grekas
44cef5a69d Fix security/* cross-dependencies 2018-05-17 12:20:34 +02:00
Samuel ROZE
f1967aa37d minor #27002 [Messenger] implement several senders using a ChainSender (Tobion)
This PR was merged into the 4.1 branch.

Discussion
----------

[Messenger] implement several senders using a ChainSender

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| 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 |
| License       | MIT
| Doc PR        |

Commits
-------

198925ee4e [Messenger] implement several senders using a ChainSender
2018-05-17 08:12:54 +01:00
Nicolas Grekas
87a29f76a5 Merge branch '4.0' into 4.1
* 4.0:
  Fix dep
2018-05-16 17:17:48 +02:00
Nicolas Grekas
2f07052c25 Merge branch '3.4' into 4.0
* 3.4:
  Fix dep
2018-05-16 17:17:42 +02:00
Nicolas Grekas
c18813d13d Fix dep 2018-05-16 17:16:55 +02:00
Nicolas Grekas
71a1e29c82 Fix CS 2018-05-16 16:41:07 +02:00
Nicolas Grekas
205b097802 Merge branch '4.0' into 4.1
* 4.0: (21 commits)
  [PropertyInfo] fix resolving parent|self type hints
  fixed CS
  fix merge
  [Security] Fix logout
  Cleanup 2 tests for the HttpException classes
  #27250 limiting GET_LOCK key up to 64 char due to changes in MySQL 5.7.5 and later
  [Config] Fix tests when path contains UTF chars
  [DI] Shared services should not be inlined in non-shared ones
  [Profiler] Remove propel & event_listener_loading category identifiers
  [Filesystem] Fix usages of error_get_last()
  [Cache][Lock] Fix usages of error_get_last()
  [Debug] Fix populating error_get_last() for handled silent errors
  fixed CS
  fixed CS
  fixed CS
  [FrameworkBundle] Fix cache:clear on vagrant
  [HttpKernel] Handle NoConfigurationException "onKernelException()"
  Fix misses calculation when calling getItems
  [DI] Display previous error messages when throwing unused bindings
  Fixed return type
  ...
2018-05-16 16:33:22 +02:00
Nicolas Grekas
2a10cc6047 bug #27281 [HttpKernel] Fix dealing with self/parent in ArgumentMetadataFactory (fabpot)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Fix dealing with self/parent in ArgumentMetadataFactory

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

Applies CS fixes that where merged on 4.0 to 3.4, embeds a fix in ArgumentMetadataFactory, which couldn't deal with self/parent type hints.

Commits
-------

ba5cb1a245 fixed CS
2018-05-16 16:03:39 +02:00
Tobias Schultze
198925ee4e [Messenger] implement several senders using a ChainSender 2018-05-16 15:12:01 +02:00
Fabien Potencier
ba5cb1a245 fixed CS 2018-05-16 14:49:49 +02:00
Nicolas Grekas
8c430fbeb2 Merge branch '3.4' into 4.0
* 3.4:
  fix merge
  [Security] Fix logout
  Cleanup 2 tests for the HttpException classes
  #27250 limiting GET_LOCK key up to 64 char due to changes in MySQL 5.7.5 and later
  [Config] Fix tests when path contains UTF chars
  [DI] Shared services should not be inlined in non-shared ones
  [Profiler] Remove propel & event_listener_loading category identifiers
  [Filesystem] Fix usages of error_get_last()
  [Cache][Lock] Fix usages of error_get_last()
  [Debug] Fix populating error_get_last() for handled silent errors
  [DI] Display previous error messages when throwing unused bindings
  Suppress warnings when open_basedir is non-empty
2018-05-16 11:05:32 +02:00
Nicolas Grekas
f49310b54c fix merge 2018-05-16 10:49:48 +02:00
Nicolas Grekas
86a9c73026 Merge branch '2.8' into 3.4
* 2.8:
  [Security] Fix logout
  #27250 limiting GET_LOCK key up to 64 char due to changes in MySQL 5.7.5 and later
  [Profiler] Remove propel & event_listener_loading category identifiers
  [Filesystem] Fix usages of error_get_last()
  [Debug] Fix populating error_get_last() for handled silent errors
  Suppress warnings when open_basedir is non-empty
2018-05-16 10:49:21 +02:00
Nicolas Grekas
a8122f8271 Merge branch '2.7' into 2.8
* 2.7:
  [Security] Fix logout
  #27250 limiting GET_LOCK key up to 64 char due to changes in MySQL 5.7.5 and later
  [Profiler] Remove propel & event_listener_loading category identifiers
  [Filesystem] Fix usages of error_get_last()
  [Debug] Fix populating error_get_last() for handled silent errors
  Suppress warnings when open_basedir is non-empty
2018-05-15 23:17:45 +02:00
MatTheCat
9e88eb5aa9 [Security] Fix logout 2018-05-15 17:39:41 +02:00
Samuel ROZE
f59ce97eff feature #27128 [Messenger] Middleware factories support in config (ogizanagi)
This PR was squashed before being merged into the 4.1 branch (closes #27128).

Discussion
----------

[Messenger] Middleware factories support in config

| Q             | A
| ------------- | ---
| Branch?       | master <!-- see below -->
| 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 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        | todo

Following https://github.com/symfony/symfony/pull/26864, this would allow to configure easily the middlewares by using an abstract factory definition to which are provided simple arguments (just scalars, no services references).

For instance, here is how the DoctrineBundle would benefit from such a feature (also solving the wiring of the `DoctrineTransactionMiddleware` reverted in https://github.com/symfony/symfony/pull/26684):

```yaml
framework:
    messenger:
      buses:
        default:
          middleware:
            - logger
            - doctrine_transaction_middleware: ['entity_manager_name']
```

where `doctrine_transaction_middleware` would be an abstract factory definition provided by the doctrine bundle:

```yml
services:

    doctrine.orm.messenger.middleware_factory.transaction:
      class: Symfony\Bridge\Doctrine\Messenger\DoctrineTransactionMiddlewareFactory
      arguments: ['@doctrine']

    doctrine_transaction_middleware:
      class: Symfony\Bridge\Doctrine\Messenger\DoctrineTransactionMiddleware
      factory: ['@doctrine.orm.messenger.middleware_factory.transaction', 'createMiddleware']
      abstract: true
      # the default arguments to use when none provided from config.
      # i.e:
      #   middlewares:
      #     - doctrine_transaction_middleware: ~
      arguments: ['default']
```

and is interpreted as:

```yml
buses:
    default:
        middleware:
            -
                id: logger
                arguments: {  }
            -
                id: doctrine_transaction_middleware
                arguments:
                    - entity_manager_name
        default_middleware: true
```

---

<details>

<summary>Here is the whole config reference with these changes: </summary>

```yaml
# Messenger configuration
messenger:
    enabled:              true
    routing:

        # Prototype
        message_class:
            senders:              []
    serializer:
        enabled:              true
        format:               json
        context:

            # Prototype
            name:                 ~
    encoder:              messenger.transport.serializer
    decoder:              messenger.transport.serializer
    adapters:

        # Prototype
        name:
            dsn:                  ~
            options:              []
    default_bus:          null
    buses:

        # Prototype
        name:
            default_middleware:  true
            middleware:

                # Prototype
                -
                    id:                   ~ # Required
                    arguments:            []
```

</details>

Commits
-------

f5ef421474 [Messenger] Middleware factories support in config
2018-05-14 20:17:15 +01:00
Maxime Steinhausser
f5ef421474 [Messenger] Middleware factories support in config 2018-05-14 20:17:01 +01:00
Maxime Steinhausser
d52f491bfa [Profiler] Remove propel & event_listener_loading category identifiers 2018-05-14 18:07:30 +02:00
Gabriel Ostrolucký
16ebb43bd4 Disallow illegal characters like "." in session.name
PHP saves cookie with correct name, but upon deserialization to
$_COOKIE, it replaces some characters, e.g. "." becomes "_".

This is probably also reason why \SessionHandler is not able to find
a session.

https://harrybailey.com/2009/04/dots-arent-allowed-in-php-cookie-names/
https://bugs.php.net/bug.php?id=75883
2018-05-13 23:57:04 +02:00
Fabien Potencier
8335537446 feature #27202 [Messenger] Improve the profiler panel (ogizanagi)
This PR was squashed before being merged into the 4.1 branch (closes #27202).

Discussion
----------

[Messenger] Improve the profiler panel

| Q             | A
| ------------- | ---
| Branch?       | 4.1 <!-- see below -->
| 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 and src/**/CHANGELOG.md files -->
| Tests pass?   | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | N/A   <!-- #26597  issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

This is an attempt to enhance the profiler panel a bit.

**with the following messages dispatched:**

```php
$queryBus->dispatch(Envelope::wrap(new GetGreetingsQuery('Hello you'))
    ->with(new JustAFriendOfMine())
    ->with(new AndHisPlusO̶n̶e̶Eleven())
);
$commandBus->dispatch(new SendGiftCommand());
$queryBus->dispatch(new GetGreetingsQuery('Exterminate!'));
```

## Before

<img width="1084" alt="screenshot 2018-05-12 a 13 57 57" src="https://user-images.githubusercontent.com/2211145/39957055-8a0f009e-55ec-11e8-9d8e-bf79aad4b420.PNG">

🐛calls order are wrong here, fixed in this PR

## After

### collapsed

<!-- <img width="1083" alt="screenshot 2018-05-10 a 23 51 07" src="https://user-images.githubusercontent.com/2211145/39896093-19a8c7ee-54ad-11e8-8dcb-4e165ffd2eae.PNG">-->

<img width="1085" alt="screenshot 2018-05-12 a 13 18 35" src="https://user-images.githubusercontent.com/2211145/39956802-9d4c38a2-55e7-11e8-8425-ad090c0871b6.PNG">
<img width="1085" alt="screenshot 2018-05-12 a 13 26 44" src="https://user-images.githubusercontent.com/2211145/39956827-25d9e426-55e8-11e8-9116-160603649f33.PNG">

📝 _When loading the page, all messages details are collapsed by default but the first one per tab._

### expanded

<!-- <img width="1083" alt="screenshot 2018-05-10 a 23 13 39" src="https://user-images.githubusercontent.com/2211145/39894779-42c9cc9a-54a8-11e8-9529-6292481536d4.PNG"> -->

<img width="1086" alt="screenshot 2018-05-12 a 13 49 42" src="https://user-images.githubusercontent.com/2211145/39956981-639fc3d6-55eb-11e8-9224-a48f591db3da.PNG">

### live

<!-- ![mai-10-2018 23-16-17](https://user-images.githubusercontent.com/2211145/39894789-4b8fa138-54a8-11e8-986c-fccf6cd0234f.gif) -->

![mai-12-2018 13-55-40](https://user-images.githubusercontent.com/2211145/39957041-37f17b34-55ec-11e8-8569-a733a104bf82.gif)

### toolbar (with exceptions)

<img width="284" alt="screenshot 2018-05-10 a 23 18 32" src="https://user-images.githubusercontent.com/2211145/39895011-0467f2a0-54a9-11e8-9d78-25461cf71c41.PNG">

## Notes

- Table headers are clickable, so you can jump directly to the message class in the code
- Reversing headers/rows allows to have a wider space for dumps and allows to add more entries in the future. This is an issue we already have with the Validator panel (when there is both an invalid value as object and a constraint violation dumped) which I'd like to revamp soon.
- ~~I wonder if we should keep the dispatched messages in call order, or if we can segregate by bus (using tabs?).~~
- ~~we could add a left container listing messages classes only, allowing to show details of a single message dispatched on a right container (similar to what the Form panel does). I'll probably suggest the same for the Validator panel.~~

Commits
-------

3d19578297 [Messenger] Improve the profiler panel
2018-05-13 08:14:37 +02:00
Maxime Steinhausser
3d19578297 [Messenger] Improve the profiler panel 2018-05-13 08:14:09 +02:00
Fabien Potencier
4f3afd53a8 fixed CS 2018-05-11 17:58:37 +02:00
Fabien Potencier
f5e6a61a82 Merge branch '3.4' into 4.0
* 3.4:
  fixed CS
  fixed CS
  [FrameworkBundle] Fix cache:clear on vagrant
  [HttpKernel] Handle NoConfigurationException "onKernelException()"
  Fix misses calculation when calling getItems
  Fixed return type
2018-05-11 17:53:11 +02:00
Fabien Potencier
df43c1e99d fixed CS 2018-05-11 17:51:28 +02:00
Nicolas Grekas
3381611d86 [FrameworkBundle] Fix cache:clear on vagrant 2018-05-11 08:27:29 -07:00
Kevin Bond
fa4ce7bbc4
[Messenger] remove autoconfiguration for Sender/ReceiverInterface 2018-05-11 08:48:51 -04:00
Tobias Schultze
497ce74f9e bug #27229 [Messenger] Rename tag attribute "name" by "alias" (yceruto)
This PR was merged into the 4.1 branch.

Discussion
----------

[Messenger] Rename tag attribute "name" by "alias"

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

As "name" is a reserved attribute in YAML and XML schema it makes impossible to register manually a custom Sender or Receiver with another "name" attribute.

> The file ".../demos/messenger-flex/config/services.yaml" does not contain valid YAML.
Duplicate key "name" detected at line 30 (near "- { name: 'messenger.receiver', name: 'mail' }").

Commits
-------

1ef27a7e6a Rename tag attribute "name" by "alias"
2018-05-11 11:17:32 +02:00
Yonel Ceruto
1ef27a7e6a Rename tag attribute "name" by "alias" 2018-05-10 17:13:07 -04:00
Yonel Ceruto
6295879a30 Autoconfiguring TransportFactoryInterface classes 2018-05-10 13:03:14 -04:00
Samuel ROZE
ebbe1adebc minor #27206 [Messenger] Add more tests around the AMQP transport (sroze)
This PR was merged into the 4.1 branch.

Discussion
----------

[Messenger] Add more tests around the AMQP transport

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

Adding more tests to the AMQP transport/factory. These should have captured the following 3 bugs: #27198, #27197, #27196.

Commits
-------

faf9382223 Add more tests around the AMQP transport
2018-05-10 08:14:28 +01:00
Fabien Potencier
1403112de1 bug #27209 [Workflow] add is deprecated since Symfony 4.1. Use addWorkflow() instead (xkobal)
This PR was squashed before being merged into the 4.1 branch (closes #27209).

Discussion
----------

[Workflow] add is deprecated since Symfony 4.1. Use addWorkflow() instead

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

Commits
-------

ffa5d1ca94 [Workflow] add is deprecated since Symfony 4.1. Use addWorkflow() instead
2018-05-09 17:27:38 +02:00
Xavier HAUSHERR
ffa5d1ca94 [Workflow] add is deprecated since Symfony 4.1. Use addWorkflow() instead 2018-05-09 17:27:28 +02:00
Samuel ROZE
e0f225bd85 minor #27203 [Messenger][DX] Uses a default receiver when only one is defined (sroze)
This PR was squashed before being merged into the 4.1 branch (closes #27203).

Discussion
----------

[Messenger][DX] Uses a default receiver when only one is defined

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

When using only one receiver, as a developer, it makes no sense for me to have to precise the receiver name when using the `messenger:consume-messages` command. This is the change:

```patch
- bin/console messenger:consume-messages default
+ bin/console messenger:consume-messages
```

If I have more than one transport configured, I'll get the following message:

>
>  You have 0 or more than one receiver (no default have been found). You need to specify the receiver name with an argument.
>

Commits
-------

8315b868d5 [Messenger][DX] Uses a default receiver when only one is defined
2018-05-09 15:41:23 +01:00
Samuel ROZE
8315b868d5 [Messenger][DX] Uses a default receiver when only one is defined 2018-05-09 15:41:15 +01:00
Samuel ROZE
6207d70964 feature #26803 [Messenger] Add debug:messenger CLI command (ro0NL, sroze)
This PR was merged into the 4.1 branch.

Discussion
----------

[Messenger] Add debug:messenger CLI command

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

Adds a `debug:messenger` CLI command to expose message classes that can be dispatched. Heavily inspired by `debug:autowiring`.

Commits
-------

7f87309c10 fix deps
290c7eb1bc Rename the command `DebugCommand`
9847b83723 [Messenger] Add debug:messenger CLI command
2018-05-09 15:39:20 +01:00
Roland Franssen
7f87309c10 fix deps 2018-05-09 13:47:01 +02:00
Maxime Steinhausser
09987102a8 [Profiler] Join using ';\n' 2018-05-09 13:16:14 +02:00
Samuel ROZE
290c7eb1bc Rename the command DebugCommand 2018-05-09 09:31:45 +01:00
Roland Franssen
9847b83723 [Messenger] Add debug:messenger CLI command 2018-05-09 09:27:25 +01:00
Samuel ROZE
faf9382223 Add more tests around the AMQP transport 2018-05-09 09:02:39 +01:00
Fabien Potencier
9b841d969c bug #27189 [Profiler] Fix dump makes toolbar disappear (ogizanagi)
This PR was merged into the 4.1 branch.

Discussion
----------

[Profiler] Fix dump makes toolbar disappear

| Q             | A
| ------------- | ---
| Branch?       | 4.1 <!-- see below -->
| Bug fix?      | yes
| 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 | #27180   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

Don't know if there is a better solution than executing eval on the global scope.

For ref: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval
> If you use the eval function indirectly, by invoking it via a reference other than eval, as of ECMAScript 5 it works in the global scope rather than the local scope. This means, for instance, that function declarations create global functions, and that the code being evaluated doesn't have access to local variables within the scope where it's being called.

Commits
-------

0cd51ae267 [Profiler] Fix dump makes toolbar disappear
2018-05-09 08:02:10 +02:00
Fabien Potencier
796c8fed1e bug #27199 [Messenger] Fix default bus name (ogizanagi)
This PR was merged into the 4.1 branch.

Discussion
----------

[Messenger] Fix default bus name

| Q             | A
| ------------- | ---
| Branch?       | 4.1 <!-- see below -->
| Bug fix?      | yesish
| 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 | #27162   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

After #27162, the default bus name configured automatically should use a full service id too, otherwise we currently get a `default` service id, no namespace identifier, which is the default bus.

Commits
-------

fa9b9849b1 [Messenger] Fix default bus name
2018-05-09 08:01:16 +02:00
Maxime Steinhausser
fa9b9849b1 [Messenger] Fix default bus name 2018-05-08 18:02:52 +02:00
Samuel ROZE
7a091d9d61 Fix the transport factory after moving it 2018-05-08 16:44:19 +01:00
Maxime Steinhausser
0cd51ae267 [Profiler] Fix dump makes toolbar disappear 2018-05-08 14:38:48 +02:00
Nicolas Grekas
379b8eb56b [Messenger] Add TransportInterface as first class citizen sender+receiver 2018-05-07 07:49:40 -07:00
Samuel ROZE
9ae7c11805 Do not fix the middleware XML name anymore 2018-05-07 13:39:55 +01:00
Fabien Potencier
52e7500edb removed usage of middlewares 2018-05-07 13:37:49 +02:00
Maxime Steinhausser
e7cfb59480 [Messenger] Fix missing s/tolerate_no_handler/allow_no_handler/g 2018-05-07 11:41:32 +02:00
Fabien Potencier
9d5f50d7b6 bug #27162 [FrameworkBundle][Messenger] Remove convention-based service id generation for buses (nicolas-grekas)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[FrameworkBundle][Messenger] Remove convention-based service id generation for buses

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

Service ids for buses are user facing ids: ppl *will* have to deal with them when wiring their services.
Like for cache pools, we should ask ppl to declare them using full identifiers, instead of having a convention-based way to turn a name into and id (which is something nobody will be able to remember at some point.)

Commits
-------

c7a0045cbd [FrameworkBundle][Messenger] Remove convention-based service id generation for buses
2018-05-07 10:35:29 +02:00
Fabien Potencier
07ea1bb6f3 Merge branch '4.0'
* 4.0:
  fixed bad merge
2018-05-07 10:32:19 +02:00
Fabien Potencier
cb06e2a6fb fixed bad merge 2018-05-07 10:32:11 +02:00
Fabien Potencier
c53541f0ef bug #27084 [Messenger] Relax messenger config and fix some bugs (yceruto)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Messenger] Relax messenger config and fix some bugs

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

After playing a little with the config of this component I found some bugs around.

Reproducer:

 1. Install a fresh Symfony flex project with `^4.0@dev` dependencies
 2. Add the `symfony/messenger` requirement
 3. Add the following configuration separately:

Note that `symfony/serializer` has not been installed yet. ATM it's not required.

----------------------

Configuring my custom transport (not amqp):
```yaml
framework:
    messenger:
        transports:
            custom: 'my_transport://localhost/msgs'
        routing:
            '*': custom
```

**Before**  (Current behaviour):
Threw a logic exception, IMO unrelated at this point:
> Using the default encoder/decoder, Symfony Messenger requires the Serializer. Enable it or install it by running "composer require symfony/serializer-pack".

**After** (Proposal):
Pass! The Messenger's serializer config is disabled by definition because the Serializer component is not installed yet, then the related (default) encoder/decoder aliases are invalid, so the amqp transport factory service is removed altogether.

----------------------

According to the previous exception I configured my custom encoder/decoder services:
```yaml
framework:
    messenger:
        encoder: App\Serializer\Serializer
        decoder: App\Serializer\Serializer
        transports:
            custom: 'my_transport://localhost/msgs'
        routing:
            '*': custom
```

**Before**:
The same exception has been thrown, now a bit vague according to the config:
> Using the default encoder/decoder, Symfony Messenger requires the Serializer. Enable it or install it by running "composer require symfony/serializer-pack".

**After**:
Pass! the serializer is disabled by definition but there is custom encoder/decoder services, so let's keep the amqp transport factory with their custom encoder/decoder deps.

----------------------

Just enabling the serializer option:
```yaml
framework:
    messenger:
        serializer: true
```

**Before**:
Pass! Unexpected, as there is no transport configuration the exception wasn't thrown and still keeps the amqp transport factory service with invalid encoder/decoder (Serializer) dependencies.

**After**:
The Serializer config & support is verified if it's enabled regardless of the transport configuration and this exception is thrown for this case:
> The default Messenger serializer cannot be enabled as the Serializer support is not enabled.

I've removed the "install" part because at this point only we're checking whether the `framework.serializer` is enabled or not, so the next step after that should be enable the Serializer support in `framework.serializer`, which already verify whether the Serializer component is installed or not. IMO "composer require symfony/serializer-pack" should be there and not here. Also because `symfony/serializer` is not a hard dependency of this component.

----------------------

By last, I disabled the serializer option manually:
```yaml
framework:
    messenger:
        serializer: false
        transports:
            custom: 'my_transport://localhost/msgs'
        routing:
            '*': custom
```

**Before**:
I received this DI exception:
> The service "messenger.transport.amqp.factory" has a dependency on a non-existent service "messenger.transport.serializer".

**After**:
Pass! (same behaviour that the first example)

----------------------

As I explained earlier, this PR enables or disables the Messenger's serializer config based on the current Symfony platform and whether the Serializer component is installed or not, like other config with similar behaviour.

Tests included :)

Cheers!

Commits
-------

a05e2e2c3b Relax Messenger config and fix some bugs
2018-05-07 10:11:33 +02:00
Fabien Potencier
8123bb102b Merge branch '4.0'
* 4.0:
  use brace-style regex delimiters
  Fixed typo RecursiveIterator -> RecursiveIteratorIterator
  [Cache] fix logic for fetching tag versions on TagAwareAdapter
  [FrameworkBundle] Remove dead code
  [FrameworkBundle] Use the correct service id for CachePoolPruneCommand in its compiler pass
  Hide short exception trace by default
  [Doctrine Bridge] fix priority for doctrine event listeners
  [Validator] make phpdoc of ObjectInitializerInterface interface more accurate
  [Validator] fixes phpdoc reference to an interface that was removed in Symfony 3.0
2018-05-07 09:14:12 +02:00
Fabien Potencier
956c2f8091 Merge branch '3.4' into 4.0
* 3.4:
  use brace-style regex delimiters
  Fixed typo RecursiveIterator -> RecursiveIteratorIterator
  [Cache] fix logic for fetching tag versions on TagAwareAdapter
  [FrameworkBundle] Use the correct service id for CachePoolPruneCommand in its compiler pass
  Hide short exception trace by default
  [Doctrine Bridge] fix priority for doctrine event listeners
  [Validator] make phpdoc of ObjectInitializerInterface interface more accurate
  [Validator] fixes phpdoc reference to an interface that was removed in Symfony 3.0
2018-05-07 09:12:24 +02:00
Nicolas Grekas
c7a0045cbd [FrameworkBundle][Messenger] Remove convention-based service id generation for buses 2018-05-06 08:37:23 -07:00
Yonel Ceruto
a05e2e2c3b Relax Messenger config and fix some bugs 2018-05-06 10:57:10 -04:00
Javier Eguiluz
d27b158e4f Show the deprecations tab by default in the logger panel 2018-05-06 12:05:18 +02:00
Nicolas Grekas
278f40f48d bug #27143 [Console] By default hide the short exception trace line from exception messages in Symfony's commands (yceruto)
This PR was merged into the 3.4 branch.

Discussion
----------

[Console] By default hide the short exception trace line from exception messages in Symfony's commands

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

After https://github.com/symfony/symfony/pull/24131 this was in my contribution list since then.

Maybe it should be taken as a good practice when we build console commands, **use the exception classes of the Console component as much as possible to show a better message style to the end user**.

(See the before/after effect in the referenced PR)

Commits
-------

11f3c455d4 Hide short exception trace by default
2018-05-04 10:44:42 -07:00
Nicolas Grekas
cada38f520 minor #27144 [FrameworkBundle] Hide some lock-related services (nicolas-grekas)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[FrameworkBundle] Hide some lock-related services

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

I don't know why, but I missed these in #26921

Commits
-------

d06d8b2573 [FrameworkBundle] Hide some lock-related services
2018-05-04 10:30:57 -07:00
Robin Chalas
29b3e31382 [FrameworkBundle] Remove dead code 2018-05-04 16:54:39 +02:00
Christian Flothmann
ffb19e9518 replace remaining adapters with transports 2018-05-04 11:13:11 +02:00
Nicolas Grekas
d06d8b2573 [FrameworkBundle] Hide some lock-related services 2018-05-03 18:14:10 -07:00
Nicolas Grekas
47da23c7cb minor #27129 [Messenger] Rename Adapters to Transports (sroze)
This PR was squashed before being merged into the 4.1-dev branch (closes #27129).

Discussion
----------

[Messenger] Rename Adapters to Transports

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

Last of our tasks on the "plan to beta", renaming "adapters" to "transports". This is a term that makes more sense and is commonly used within the "queue community".

Commits
-------

13b747565f [Messenger] Rename Adapters to Transports
2018-05-03 17:10:25 -07:00
Samuel ROZE
13b747565f [Messenger] Rename Adapters to Transports 2018-05-03 17:09:35 -07:00
Nicolas Grekas
ce7f9bccdf minor #27123 [DebugBundle][HttpKernel] Update var-dumper requirement for components using SourceContextProvider (jvasseur)
This PR was squashed before being merged into the 4.1-dev branch (closes #27123).

Discussion
----------

[DebugBundle][HttpKernel] Update var-dumper requirement for components using SourceContextProvider

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

The DebugBundle is using the SourceContextProvider class that was introduced in v4.1

Commits
-------

b0b9060237 [DebugBundle][HttpKernel] Update var-dumper requirement for components using SourceContextProvider
2018-05-03 17:01:38 -07:00
Jérôme
b0b9060237 [DebugBundle][HttpKernel] Update var-dumper requirement for components using SourceContextProvider 2018-05-03 17:01:20 -07:00
Bert Hekman
32c7ee35be [FrameworkBundle] Use the correct service id for CachePoolPruneCommand in its compiler pass 2018-05-03 16:57:56 -07:00
Yonel Ceruto
11f3c455d4 Hide short exception trace by default 2018-05-03 19:18:14 -04:00
Fabien Potencier
6cb90daa76 feature #27104 [DX] Redirect to proper Symfony version documentation (noniagriconomie)
This PR was squashed before being merged into the 4.1-dev branch (closes #27104).

Discussion
----------

[DX] Redirect to proper Symfony version documentation

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

Just a small improvement
I think this can make some dev target the right documentation instead of reading an other version that the one they are developing on

EDIT: I do not know if including the constant directly is the good choice, or it is better to add a global symfony version collector?

Commits
-------

d611160ec6 [DX] Redirect to proper Symfony version documentation
2018-05-03 08:29:40 +02:00
Antoine M
d611160ec6 [DX] Redirect to proper Symfony version documentation 2018-05-03 08:29:31 +02:00
Nicolas Grekas
e6f99da5ca bug #26955 [DebugBundle][VarDumper] Fix server dumper placeholder command (ogizanagi)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[DebugBundle][VarDumper] Fix server dumper placeholder command

| Q             | A
| ------------- | ---
| Branch?       | master <!-- see below -->
| Bug fix?      | no, fixes a deprecation warning
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no, fixes ones <!-- 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 | #26944 <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

This placeholder command was addressed in quite an unorthodox fashion and the following fix isn't really better, but I guess that's fine for an internal class.

_As a reminder: this command aims to favor discoverability of the `ServerDumpCommand` when listing available commands and by exposing its definition so you can read about it by using `--help`. Execution hints about the `debug.dump_destination` config option required to wire the actual command._

That's the only command for which we're doing this, though. So better keep this placeholder or drop it?

Commits
-------

60af39b161 [DebugBundle][VarDumper] Fix server dumper placeholder command
2018-05-01 16:13:51 -07:00
Nicolas Grekas
7183c59c20 Merge branch '4.0'
* 4.0:
  Remove symfony/polyfill-ctype where not needed
  Use symfony/polyfill-ctype
  [Form] fixes instance variable phpdoc in FormRegistry class
  bumped Symfony version to 4.0.10
  updated VERSION for 4.0.9
  updated CHANGELOG for 4.0.9
  bumped Symfony version to 3.4.10
  updated VERSION for 3.4.9
  updated CHANGELOG for 3.4.9
2018-05-01 16:02:13 -07:00
Nicolas Grekas
a488d555ff Merge branch '3.4' into 4.0
* 3.4:
  Remove symfony/polyfill-ctype where not needed
  Use symfony/polyfill-ctype
  [Form] fixes instance variable phpdoc in FormRegistry class
  bumped Symfony version to 3.4.10
  updated VERSION for 3.4.9
  updated CHANGELOG for 3.4.9
  Add CODE_OF_CONDUCT.md
  Added .github/CODEOWNERS
  bumped Symfony version to 2.8.40
  updated VERSION for 2.8.39
  updated CHANGELOG for 2.8.39
2018-05-01 16:00:51 -07:00
Nicolas Grekas
e525248f66 Merge branch '2.8' into 3.4
* 2.8:
  Remove symfony/polyfill-ctype where not needed
  Use symfony/polyfill-ctype
  [Form] fixes instance variable phpdoc in FormRegistry class
2018-05-01 15:53:27 -07:00
Nicolas Grekas
087c667b83 Merge branch '2.7' into 2.8
* 2.7:
  Remove symfony/polyfill-ctype where not needed
  Use symfony/polyfill-ctype
  [Form] fixes instance variable phpdoc in FormRegistry class
2018-05-01 15:52:40 -07:00
Gert de Pagter
afc09cc8a7 Use symfony/polyfill-ctype
Use the polyfill for every package that uses cytpe functions.
2018-05-01 15:30:49 -07:00
Nicolas Grekas
e548b28b81 Merge branch '4.0'
* 4.0:
  [Debug][WebProfilerBundle] Fix setting file link format
  [Debug] Fixed the formatPath when a custom fileLinkFormat is defined
2018-04-30 10:00:18 -07:00
Nicolas Grekas
59298a9271 Merge branch '3.4' into 4.0
* 3.4:
  [Debug][WebProfilerBundle] Fix setting file link format
  [Debug] Fixed the formatPath when a custom fileLinkFormat is defined
2018-04-30 09:59:37 -07:00
Nicolas Grekas
a4a1645d44 [Debug][WebProfilerBundle] Fix setting file link format 2018-04-30 09:54:07 -07:00
Robin Chalas
e224548a0f [SecurityBundle] Fix framework-bundle dev requirement 2018-04-30 18:23:52 +02:00
Robin Chalas
c93c9a5880 [SecurityBundle] Fix test 2018-04-30 18:12:47 +02:00
Nicolas Grekas
8c0199e66b Merge branch '4.0'
* 4.0:
  PhpDoc: There is no attempt to create the directory
  Avoiding an error when an unused service has a missing base class
  Add an implementation just for php 7.0
  bumped Symfony version to 2.7.47
  Fix #27011: Session ini_set bug
  [Cache] TagAwareAdapterInterface::invalidateTags() should commit deferred items
  updated VERSION for 2.7.46
  update CONTRIBUTORS for 2.7.46
  updated CHANGELOG for 2.7.46
  bug #25844 [HttpKernel] Catch HttpExceptions when templating is not installed
2018-04-29 18:07:08 -07:00
Nicolas Grekas
ca0f0cf351 Merge branch '3.4' into 4.0
* 3.4:
  PhpDoc: There is no attempt to create the directory
  Avoiding an error when an unused service has a missing base class
  Add an implementation just for php 7.0
  bumped Symfony version to 2.7.47
  Fix #27011: Session ini_set bug
  [Cache] TagAwareAdapterInterface::invalidateTags() should commit deferred items
  updated VERSION for 2.7.46
  update CONTRIBUTORS for 2.7.46
  updated CHANGELOG for 2.7.46
  bug #25844 [HttpKernel] Catch HttpExceptions when templating is not installed
2018-04-29 18:05:59 -07:00
Nicolas Grekas
50a59c0488 feature #26655 [WebProfilerBundle] Make WDT follow ajax requests if header set (jeffreymb)
This PR was squashed before being merged into the 4.1-dev branch (closes #26655).

Discussion
----------

[WebProfilerBundle] Make WDT follow ajax requests if header set

Replaces #22509. I accidentally closed that PR and couldn't get GitHub to recognize when I added more commits to the branch in my fork.

| Q             | A
| ------------- | ---
| Branch?       | master
| 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 (There are no tests that I could find)
| Fixed tickets | #15456
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

When the header of an ajax response contains the `Symfony-Debug-Toolbar-Replace` header with a value of '1' it will automatically update the toolbar with the toolbar with the debug info from the ajax request.

The bulk of the code in the `loadToolbar` function in the `base_js.html.twig` file is moved from the `toolbar_js.html.twig` file and slightly refactored to use the internal functions instead of making external calls. I take no credit/blame for this code. 😉

If this could make it into 4.1 there are multiple people that would be very happy!

Commits
-------

e4e591b [WebProfilerBundle] Make WDT follow ajax requests if header set
2018-04-29 09:29:55 +02:00
Jeffrey Brubaker
e4e591b46b [WebProfilerBundle] Make WDT follow ajax requests if header set 2018-04-29 09:29:44 +02:00
Nicolas Grekas
d843181bf6 minor #27063 [Translator] Further postpone adding resource files (nicolas-grekas)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Translator] Further postpone adding resource files

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

Commits
-------

2aa62df [Translator] Further postpone adding resource files
2018-04-29 08:06:02 +02:00
Nicolas Grekas
ff19a041ef minor #27083 [Messenger] Restore wildcard support in routing (yceruto)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Messenger] Restore wildcard support in routing

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

Also fixing some CS warnings and code structure.

Commits
-------

35317ac Restore wildcard support in routing
2018-04-29 07:57:19 +02:00
Nicolas Grekas
e902caae2f feature #27062 [SecurityBundle] Register a UserProviderInterface alias if one provider only (sroze)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[SecurityBundle] Register a `UserProviderInterface` alias if one provider only

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

When using only one user provider (as in most of the cases), it will register an alias for the `UserProviderInterface` interface and allow auto-wiring of it.

Commits
-------

4cbddd8 Register a `UserProviderInterface` alias if one provider only
2018-04-29 07:49:46 +02:00
Yonel Ceruto
35317ac987 Restore wildcard support in routing 2018-04-28 08:03:41 -04:00
Tobias Schultze
39c7c90a96 minor #27032 [Messenger][DX] Validate that the message exists to be able to configure its routing (sroze)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Messenger][DX] Validate that the message exists to be able to configure its routing

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

It attempted to me already: mispelling the message name and not understanding why it didn't work... An exception letting me know that the configured message does not exists will be 👌

Commits
-------

04d87ca829 Validate that the message exists to be able to configure its routing Uses an existing class in the tests... :) Only trigger the autoloading once
2018-04-27 01:34:37 +02:00
Tobias Schultze
ee0967f0ea feature #26975 [Messenger] Add a memory limit option for ConsumeMessagesCommand (sdelicata)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Messenger] Add a memory limit option for `ConsumeMessagesCommand`

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

New feature to add a memory limit option to the ConsumeMessagesCommand.
```
bin/console messenger:consume-messages <receiver-name> -m 128
```

Commits
-------

08f98cfaf1 [Messenger] Add a memory limit option for `ConsumeMessagesCommand`
2018-04-27 01:14:06 +02:00
Nicolas Grekas
2aa62df029 [Translator] Further postpone adding resource files 2018-04-26 14:20:27 +02:00
Samuel ROZE
4cbddd866f Register a UserProviderInterface alias if one provider only 2018-04-26 14:01:44 +02:00
Simon DELICATA
08f98cfaf1 [Messenger] Add a memory limit option for ConsumeMessagesCommand 2018-04-26 10:28:37 +02:00
Samuel ROZE
04d87ca829 Validate that the message exists to be able to configure its routing
Uses an existing class in the tests... :)
Only trigger the autoloading once
2018-04-25 22:18:22 +02:00
Robin Chalas
26482d78ac [Messenger] Add existing tags to unused whitelist 2018-04-25 20:44:19 +02:00
Kevin Bond
edddc73467
[WebProfilerBundle][Messenger] show bus name in profiler panel 2018-04-25 13:14:10 -04:00
Samuel ROZE
da4fccd37c feature #26864 [Messenger] Define multiple buses from the framework.messenger.buses configuration (sroze)
This PR was squashed before being merged into the 4.1-dev branch (closes #26864).

Discussion
----------

[Messenger] Define multiple buses from the `framework.messenger.buses` configuration

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

Not everybody will benefit from having only one bus, especially with the CQRS-like usages. While keeping the extremely use of use of the single bus, this PR has the following:

- Create multiple buses from the YAML configuration
- Tag middleware only a specific buses
- Register middlewares from the YAML configuration

Even if it's visible in the PR's tests, here's how it will look like, for a completely full-customised version:
```yaml
framework:
    messenger:
        default_bus: commands
        buses:
            commands: ~
            events:
                middlewares:
                    - validation
                    - route_messages
                    - "Your\\Middleware\\Service"
                    - call_message_handler
```

A few things to note:
1. The YAML configuration creates `messenger.bus.[name]` services for the buses.
2. The YAML configuration for middleware just adds tags to the corresponding middlewares.
3. If the middleware definition does not exists, it creates it. (without any magic on the arguments though, if it isn't auto-wirable, well... "your problem")
4. In the PR, there is this "TolerateNoHandler" middleware that is a great example for event buses

Commits
-------

e5deb8499b [Messenger] Define multiple buses from the `framework.messenger.buses` configuration
2018-04-25 18:39:19 +02:00
Samuel ROZE
e5deb8499b [Messenger] Define multiple buses from the framework.messenger.buses configuration 2018-04-25 18:39:05 +02:00
Chris McCafferty
4e527aa790 bug #25844 [HttpKernel] Catch HttpExceptions when templating is not installed 2018-04-25 18:12:14 +02:00
Jakub Zalas
66773935eb
[FrameworkBundle] Register all private services on the test service container
Before this fix, only services explicitly configured with public=false were exposed via the test service container:

```
$container->register(PrivateService::class, PrivateService::class)->setPublic(false);
```

but not those explicitly configured as private:

```
$container->register(PrivateService::class, PrivateService::class)->setPrivate(true);
```

nor those implicitly configured as private:

```
$container->register(PrivateService::class, PrivateService::class);
```
2018-04-25 16:27:01 +01:00
Fabien Potencier
833909bd68 feature #26921 [DI][FrameworkBundle] Hide service ids that start with a dot (nicolas-grekas)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[DI][FrameworkBundle] Hide service ids that start with a dot

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

Now that services are private by default, `debug:container` should display them by default.
In fact, the public/private concept should not trigger a difference in visibility for this command.

Instead, I propose to handle service ids that start with a dot as hidden services.

PR should be ready.

(For reference, I tried using a tag instead in #26891, but that doesn't work in practice when working on the implementation.)

Commits
-------

cea051ee5e [DI][FrameworkBundle] Hide service ids that start with a dot
2018-04-20 15:23:35 +02:00
Nicolas Grekas
cea051ee5e [DI][FrameworkBundle] Hide service ids that start with a dot 2018-04-20 15:14:43 +02:00
Nicolas Grekas
1b1c03af83 Merge branch '4.0'
* 4.0:
  Fix tests
  PropertyInfo\DoctrineExtractor - There is bug when indexBy is meta key
  Fix PercentType error rendering.
  [minor] SCA
  [Cache] Inline some hot function calls
  fixed Silex project's URL
  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 13:04:56 +02:00
Nicolas Grekas
6d9d329deb Merge branch '3.4' into 4.0
* 3.4:
  Fix tests
  PropertyInfo\DoctrineExtractor - There is bug when indexBy is meta key
  Fix PercentType error rendering.
  [minor] SCA
  [Cache] Inline some hot function calls
2018-04-20 12:04:09 +02:00
Nicolas Grekas
9a0422ce45 Merge branch '2.8' into 3.4
* 2.8:
  PropertyInfo\DoctrineExtractor - There is bug when indexBy is meta key
  [minor] SCA
2018-04-20 12:02:27 +02:00
Nicolas Grekas
8c5fe4461b Merge branch '2.7' into 2.8
* 2.7:
  [minor] SCA
2018-04-20 11:59:25 +02:00
Vladimir Tsykun
d0cb1de9a5 [HttpKernel] LoggerDataCollector: splitting logs on different sub-requests 2018-04-20 11:44:17 +02:00
Christian Flothmann
468533e18f [TwigBundle] fix tests 2018-04-20 11:14:37 +02:00
Vladimir Reznichenko
877e67883c [minor] SCA 2018-04-20 10:39:18 +02:00
Fabien Potencier
dcbfd00b02 Merge branch '3.4' into 4.0
* 3.4:
  fixed Silex project's URL
2018-04-20 08:21:32 +02:00
Fabien Potencier
d0928fc14f Merge branch '2.8' into 3.4
* 2.8:
  fixed Silex project's URL
2018-04-20 08:21:16 +02:00
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