Commit Graph

36695 Commits

Author SHA1 Message Date
Nicolas Grekas
f07bcb236e minor #27085 [HttpKernel] fix duplicate controller resolver test case (Tobion)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[HttpKernel] fix duplicate controller resolver test case

| Q             | A
| ------------- | ---
| Branch?       | master
| 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 | #26085
| License       | MIT
| Doc PR        |

Commits
-------

fc5afea fix duplicate controller resolver test case
2018-04-29 07:29:46 +02:00
Tobias Schultze
fc5afea76a fix duplicate controller resolver test case 2018-04-28 20:41:18 +02:00
Tobias Schultze
81c9545200 bug #27067 [HttpFoundation] Fix setting session-related ini settings (e-moe)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] Fix setting session-related ini settings

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

Added missed option `cache_expire`
Fixed typo in `upload_progress.min_freq`
Fixed ini_set name prefix of `url_rewriter.tags`

Commits
-------

64a0f23aff Fix #27011: Session ini_set bug
2018-04-28 18:57:47 +02:00
Yonel Ceruto
35317ac987 Restore wildcard support in routing 2018-04-28 08:03:41 -04:00
Nicolas Grekas
16f8a13810 [Serializer] Generalize caching support a bit 2018-04-27 15:08:58 +02:00
Kévin Dunglas
c1e850fe83 [Serializer] Cache the normalizer to use when possible 2018-04-27 13:15:22 +02:00
Fabien Potencier
00ca74ead3 minor #27019 [HttpFoundation] Fixes to new HeaderUtils class (c960657)
This PR was squashed before being merged into the 4.1-dev branch (closes #27019).

Discussion
----------

[HttpFoundation] Fixes to new HeaderUtils class

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

A follow-up to #24699 with a few code and documentation fixes for post-merge review comments by @stof.

Commits
-------

d7c3c79042 [HttpFoundation] Fixes to new HeaderUtils class
2018-04-27 11:35:33 +02:00
Christian Schmidt
d7c3c79042 [HttpFoundation] Fixes to new HeaderUtils class 2018-04-27 11:35:21 +02:00
Fabien Potencier
a9d12d2e5f feature #27065 [DI][Routing] Allow invokable objects to be used as PHP-DSL loaders (aurimasniekis)
This PR was squashed before being merged into the 4.1-dev branch (closes #27065).

Discussion
----------

[DI][Routing] Allow invokable objects to be used as PHP-DSL loaders

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

Changed DI/Router PHPFileLoader to check is_object && is_callable instead of instance of Closure

Commits
-------

662ff7e10b [DI][Routing] Allow invokable objects to be used as PHP-DSL loaders
2018-04-27 11:21:42 +02:00
Aurimas Niekis
662ff7e10b [DI][Routing] Allow invokable objects to be used as PHP-DSL loaders 2018-04-27 11:21:35 +02:00
Fabien Potencier
aa05f05526 bumped Symfony version to 2.7.47 2018-04-27 11:17:42 +02:00
Nikolay Labinskiy
64a0f23aff Fix #27011: Session ini_set bug 2018-04-27 09:20:55 +03:00
Nicolas Grekas
212c469ebf [Cache] TagAwareAdapterInterface::invalidateTags() should commit deferred items 2018-04-27 07:49:57 +02:00
Fabien Potencier
994f06f704
Merge pull request #27070 from fabpot/release-2.7.46
released v2.7.46
2018-04-27 07:41:53 +02:00
Fabien Potencier
436fd79a20 updated VERSION for 2.7.46 2018-04-27 07:41:32 +02:00
Fabien Potencier
029b182a5d update CONTRIBUTORS for 2.7.46 2018-04-27 07:41:29 +02:00
Fabien Potencier
79ffd31af8 updated CHANGELOG for 2.7.46 2018-04-27 07:41:13 +02: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
3b363a8808 minor #27066 [Messenger] unwrap ReceivedMessage in LoggingMiddleware to improve log detail (kbond)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Messenger] unwrap ReceivedMessage in LoggingMiddleware to improve log detail

| 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 change gives better visibility in your logs when consuming messages.

Commits
-------

78bb0252b4 [Messenger] unwrap ReceivedMessage in LoggingMiddleware to improve log detail
2018-04-27 01:19:14 +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
e035f45637 Merge branch '4.0'
* 4.0: (22 commits)
  [appveyor] use PHP 7.1 to run composer
  [HttpKernel] Don't clean legacy containers that are still loaded
  [VarDumper] Fix HtmlDumper classes match
  Make the simple auth provider the same as in Symfony 2.7.
  [PhpUnitBridge] silence wget
  fix merge
  [Security] guardAuthenticationProvider::authenticate cannot return null according to interface specification
  [PhpUnitBridge] Fix #26994
  [VarDumper] Remove decoration from actual output in tests
  [PropertyInfo] Minor cleanup and perf improvement
  [Bridge/Doctrine] fix count() notice on PHP 7.2
  [Security] Skip user checks if not implementing UserInterface
  [DI] Add check of internal type to ContainerBuilder::getReflectionClass
  [HttpFoundation] Add HTTP_EARLY_HINTS const
  [DoctrineBridge] Improve exception message at `IdReader::getIdValue()`
  Add type hints
  fixed CS
  Use new PHP7.2 functions in hasColorSupport
  [VarDumper] Fix dumping of SplObjectStorage
  [HttpFoundation] Add functional tests for Response::sendHeaders()
  ...
2018-04-26 18:12:45 +02:00
Nicolas Grekas
c48eee86c3 Merge branch '3.4' into 4.0
* 3.4: (22 commits)
  [appveyor] use PHP 7.1 to run composer
  [HttpKernel] Don't clean legacy containers that are still loaded
  [VarDumper] Fix HtmlDumper classes match
  Make the simple auth provider the same as in Symfony 2.7.
  [PhpUnitBridge] silence wget
  fix merge
  [Security] guardAuthenticationProvider::authenticate cannot return null according to interface specification
  [PhpUnitBridge] Fix #26994
  [VarDumper] Remove decoration from actual output in tests
  [PropertyInfo] Minor cleanup and perf improvement
  [Bridge/Doctrine] fix count() notice on PHP 7.2
  [Security] Skip user checks if not implementing UserInterface
  [DI] Add check of internal type to ContainerBuilder::getReflectionClass
  [HttpFoundation] Add HTTP_EARLY_HINTS const
  [DoctrineBridge] Improve exception message at `IdReader::getIdValue()`
  Add type hints
  fixed CS
  Use new PHP7.2 functions in hasColorSupport
  [VarDumper] Fix dumping of SplObjectStorage
  [HttpFoundation] Add functional tests for Response::sendHeaders()
  ...
2018-04-26 18:12:06 +02:00
Nicolas Grekas
e1ca89b4bd minor #27068 [appveyor] use PHP 7.1 to run composer (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[appveyor] use PHP 7.1 to run composer

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

Should make appveyor back to green.

Commits
-------

43e733f [appveyor] use PHP 7.1 to run composer
2018-04-26 18:08:05 +02:00
Nicolas Grekas
43e733f8fe [appveyor] use PHP 7.1 to run composer 2018-04-26 17:59:35 +02:00
Nicolas Grekas
b8c15383cf bug #27061 [HttpKernel] Don't clean legacy containers that are still loaded (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Don't clean legacy containers that are still loaded

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

Commits
-------

be8dbc3 [HttpKernel] Don't clean legacy containers that are still loaded
2018-04-26 17:06:18 +02:00
Nicolas Grekas
be8dbc3660 [HttpKernel] Don't clean legacy containers that are still loaded 2018-04-26 16:53:34 +02:00
Kevin Bond
78bb0252b4
[Messenger] unwrap ReceivedMessage in LoggingMiddleware to improve log detail 2018-04-26 10:41:06 -04:00
Nicolas Grekas
df20e804a9 bug #27064 [VarDumper] Fix HtmlDumper classes match (ogizanagi)
This PR was merged into the 3.4 branch.

Discussion
----------

[VarDumper] Fix HtmlDumper classes match

| Q             | A
| ------------- | ---
| Branch?       | 3.4 <!-- 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 | #27045   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

Commits
-------

229430f [VarDumper] Fix HtmlDumper classes match
2018-04-26 16:36:49 +02:00
Maxime Steinhausser
229430fdbd [VarDumper] Fix HtmlDumper classes match 2018-04-26 14:42:15 +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
Nicolas Grekas
c2eeb2929a Merge branch '2.8' into 3.4
* 2.8:
  Make the simple auth provider the same as in Symfony 2.7.
2018-04-26 13:33:17 +02:00
Robin Chalas
a0a1029413 minor #27052 [FrameworkBundle] Add Messenger tags to unused whitelist (chalasr)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[FrameworkBundle] Add Messenger tags to unused whitelist

| 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

Commits
-------

26482d7 [Messenger] Add existing tags to unused whitelist
2018-04-26 13:25:45 +02:00
Nicolas Grekas
306c627d49 minor #27059 Make the simple auth provider the same as in Symfony 2.7 (leofeyer)
This PR was merged into the 2.8 branch.

Discussion
----------

Make the simple auth provider the same as in Symfony 2.7

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

This PR adds the `SimpleAuthenticationProvider` changes made in Symfony 2.7 to Symfony 2.8. See https://github.com/symfony/symfony/pull/27044#issuecomment-384580979

Commits
-------

9afad9d Make the simple auth provider the same as in Symfony 2.7.
2018-04-26 13:02:23 +02:00
Leo Feyer
9afad9decd Make the simple auth provider the same as in Symfony 2.7. 2018-04-26 12:21:35 +02:00
Nicolas Grekas
a8e284f986 [PhpUnitBridge] silence wget 2018-04-26 11:45:48 +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
Samuel ROZE
cef8d2823a minor #27051 [WebProfilerBundle][Messenger] Show bus name in profiler panel (kbond)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[WebProfilerBundle][Messenger] Show bus name in profiler panel

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

Now that multiple buses are possible, it would be useful to see which bus was used in the messenger profiler panel.

Commits
-------

edddc73467 [WebProfilerBundle][Messenger] show bus name in profiler panel
2018-04-25 20:07:00 +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
Nicolas Grekas
36f3849842 fix merge 2018-04-25 18:22:06 +02:00
Chris McCafferty
4e527aa790 bug #25844 [HttpKernel] Catch HttpExceptions when templating is not installed 2018-04-25 18:12:14 +02:00
Nicolas Grekas
2232d99b8e bug #27048 [FrameworkBundle] Register all private services on the test service container (jakzal)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[FrameworkBundle] Register all private services on the test service container

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

Before this fix, only services explicitly configured with public=false were exposed via the test service container:

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

but not those explicitly configured as private:

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

nor those implicitly configured as private:

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

Commits
-------

6677393 [FrameworkBundle] Register all private services on the test service container
2018-04-25 17:54:03 +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
Nicolas Grekas
2abb25e881 Merge branch '2.8' into 3.4
* 2.8:
  [Security] guardAuthenticationProvider::authenticate cannot return null according to interface specification
  [VarDumper] Remove decoration from actual output in tests
  [PropertyInfo] Minor cleanup and perf improvement
  [Bridge/Doctrine] fix count() notice on PHP 7.2
  [Security] Skip user checks if not implementing UserInterface
  [HttpFoundation] Add HTTP_EARLY_HINTS const
  [DoctrineBridge] Improve exception message at `IdReader::getIdValue()`
  fixed CS
  Use new PHP7.2 functions in hasColorSupport
  [VarDumper] Fix dumping of SplObjectStorage
  Fixed being logged out on failed attempt in guard
2018-04-25 17:24:55 +02:00
Nicolas Grekas
fcebc33d39 Merge branch '2.7' into 2.8
* 2.7:
  [VarDumper] Remove decoration from actual output in tests
  [Bridge/Doctrine] fix count() notice on PHP 7.2
  [Security] Skip user checks if not implementing UserInterface
  [HttpFoundation] Add HTTP_EARLY_HINTS const
  [DoctrineBridge] Improve exception message at `IdReader::getIdValue()`
  fixed CS
  Use new PHP7.2 functions in hasColorSupport
  [VarDumper] Fix dumping of SplObjectStorage
2018-04-25 16:40:02 +02:00
Nicolas Grekas
ff962261ae bug #27016 [Security][Guard] GuardAuthenticationProvider::authenticate cannot return null (biomedia-thomas)
This PR was merged into the 2.8 branch.

Discussion
----------

[Security][Guard] GuardAuthenticationProvider::authenticate cannot return null

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

Authenticate method in GuardAuthenticationProvider returned null when the token does not originate from any of the guard authenticators. This check was not done in the supports method. According to the interface authenticate cannot return null. This patch copies theguard authenticator checks to the supports method.

Commits
-------

9dff22c [Security] guardAuthenticationProvider::authenticate cannot return null according to interface specification
2018-04-25 16:30:57 +02:00