Commit Graph

36370 Commits

Author SHA1 Message Date
Yonel Ceruto
eedad4c061 Make logger arg a hard dependency, remove dead code and add tests 2018-04-14 13:36:02 -04:00
Nicolas Grekas
782ffe2fd2 Merge branch '4.0'
* 4.0:
  [HttpKernel] Make ServiceValueResolver work if controller namespace starts with a backslash in routing
  Add d-block to bootstrap 4 alerts
  [Console] Don't go past exact matches when autocompleting
  [DI] Improve error message for non-autowirable scalar argument
  Disable autoloader call on interface_exists check
  [Validator] Fix LazyLoadingMetadataFactory with PSR6Cache for non classname if tested values isn't an existing class
  [HttpKernel] Dont create mock cookie for new sessions in tests
2018-04-14 11:36:26 -05:00
Nicolas Grekas
594925a934 Merge branch '3.4' into 4.0
* 3.4:
  [HttpKernel] Make ServiceValueResolver work if controller namespace starts with a backslash in routing
  Add d-block to bootstrap 4 alerts
  [Console] Don't go past exact matches when autocompleting
  [DI] Improve error message for non-autowirable scalar argument
  Disable autoloader call on interface_exists check
  [Validator] Fix LazyLoadingMetadataFactory with PSR6Cache for non classname if tested values isn't an existing class
  [HttpKernel] Dont create mock cookie for new sessions in tests
2018-04-14 11:34:42 -05:00
Nicolas Grekas
0a02fb1bdd Merge branch '2.8' into 3.4
* 2.8:
  [Console] Don't go past exact matches when autocompleting
  Disable autoloader call on interface_exists check
  [Validator] Fix LazyLoadingMetadataFactory with PSR6Cache for non classname if tested values isn't an existing class
2018-04-14 11:33:56 -05:00
Nicolas Grekas
32c04bdcbb Merge branch '2.7' into 2.8
* 2.7:
  [Console] Don't go past exact matches when autocompleting
  Disable autoloader call on interface_exists check
  [Validator] Fix LazyLoadingMetadataFactory with PSR6Cache for non classname if tested values isn't an existing class
2018-04-14 11:27:29 -05:00
Nicolas Grekas
811c4dd7cd bug #26773 [HttpKernel] Make ServiceValueResolver work if controller namespace starts with a backslash in routing (mathieutu)
This PR was submitted for the 4.0 branch but it was squashed and merged into the 3.4 branch instead (closes #26773).

Discussion
----------

[HttpKernel] Make ServiceValueResolver work if controller namespace starts with a backslash in routing

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

Hi folks,

This PR fixes https://github.com/symfony/symfony/issues/26772:
>Controller "App\Controllers\Foo" requires that you provide a value for the "$foo" argument. Either the argument is nullable and no null value has been provided, no default value has been provided or because there is a non optional argument after this one.

Thank you for your work!

PS: This is my first (of many planned!) PR to Symfony, so please let me know if I did something wrong.

Commits
-------

3b47441 [HttpKernel] Make ServiceValueResolver work if controller namespace starts with a backslash in routing
2018-04-14 10:06:58 -05:00
Mathieu TUDISCO
3b47441fd5 [HttpKernel] Make ServiceValueResolver work if controller namespace starts with a backslash in routing 2018-04-14 10:06:52 -05:00
Nicolas Grekas
6bdaa406d2 bug #26870 Add d-block to bootstrap 4 alerts (Normunds)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #26870).

Discussion
----------

Add d-block to bootstrap 4 alerts

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

Commits
-------

40bd8bd Add d-block to bootstrap 4 alerts
2018-04-14 09:57:28 -05:00
Normunds
40bd8bd797 Add d-block to bootstrap 4 alerts 2018-04-14 09:54:06 -05:00
Nicolas Grekas
ce5b3e7ded minor #26913 [Messenger] Add tests for ValidationMiddleware (yceruto)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Messenger] Add tests for ValidationMiddleware

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

Commits
-------

4a3f8f4 Add tests for ValidationMiddleware
2018-04-14 09:04:31 -05:00
Nicolas Grekas
f394b4540b minor #26914 [Messenger] Add tests for ChainHandler class (yceruto)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Messenger] Add tests for ChainHandler class

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

More tests, the last one for now ;)

Commits
-------

2d3ce1d Add tests for ChainHandler class
2018-04-14 08:34:18 -05:00
Nicolas Grekas
3265df040e bug #26920 [PhpUnit Bridge] Fixes a non-initialized variable (romain-pierre)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[PhpUnit Bridge] Fixes a non-initialized variable

| Q             | A
| ------------- | ---
| Branch?       | to be updated
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT

If you are ok with this, I will rebase on the best branch.

Commits
-------

fa5f5b3 Fixes a non-initialized variable in phpunit bridge
2018-04-14 08:31:23 -05:00
Nicolas Grekas
16ae72059e bug #26857 [HttpKernel] Dont create mock cookie for new sessions in tests (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] Dont create mock cookie for new sessions in tests

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

@romainneutron can you please check if this fixes your issue?

Commits
-------

86b850e [HttpKernel] Dont create mock cookie for new sessions in tests
2018-04-14 08:14:37 -05:00
Yonel Ceruto
2d3ce1dc58 Add tests for ChainHandler class 2018-04-14 08:58:06 -04:00
Romain Pierre
fa5f5b3797 Fixes a non-initialized variable in phpunit bridge 2018-04-13 16:57:55 +02:00
Yonel Ceruto
4a3f8f4775 Add tests for ValidationMiddleware 2018-04-13 08:28:05 -04:00
Samuel ROZE
6bbb5bcc52 minor #26907 [Messenger] Minor improvements and cleanup (yceruto)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Messenger] Minor improvements and cleanup

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

- enable some of opcode optimizations
- add missing typehints
- cleanup

Commits
-------

d8cc7a4715 Minor improvements and cleanup
2018-04-12 21:15:39 +01:00
Samuel ROZE
86887ef3f9 bug #26896 Messenger: fix for interface_exists (weaverryan, sroze)
This PR was merged into the 4.1-dev branch.

Discussion
----------

Messenger: fix for interface_exists

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

2 unrelated bugs! But, very minor :).

Commits
-------

d60425c868 Allow the logger to be null (as per every other bits in the FrameworkBundle)
3c4be3cdda Update the tests to also use `interface_exists`
2405eae500 Fixing bad class_exists vs interface_exists
2018-04-12 19:52:54 +01: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
Yonel Ceruto
d8cc7a4715 Minor improvements and cleanup
- enable some of opcode optimizations
- add missing typehints
- cleanup
2018-04-12 11:42:15 -04: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
Tobias Schultze
11bdd807ab minor #26856 [DI] Improve error message for non-autowirable scalar argument (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Improve error message for non-autowirable scalar argument

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

Commits
-------

7f398117f4 [DI] Improve error message for non-autowirable scalar argument
2018-04-10 19:23:09 +02:00
Robin Chalas
10674688da bug #26875 [Console] Don't go past exact matches when autocompleting (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Don't go past exact matches when autocompleting

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

Commits
-------

adba79a [Console] Don't go past exact matches when autocompleting
2018-04-10 11:58:27 +02:00
Nicolas Grekas
adba79a6b0 [Console] Don't go past exact matches when autocompleting 2018-04-09 15:41:45 -05:00
Nicolas Grekas
7f398117f4 [DI] Improve error message for non-autowirable scalar argument 2018-04-09 15:40:31 -05:00
Nicolas Grekas
9a999553a5 bug #26874 [FrameworkBundle] Fixed configuration of php_errors.log (lyrixx)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[FrameworkBundle] Fixed configuration of php_errors.log

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #26504 and #26740 (wrong implementation)
| License       | MIT
| Doc PR        |

Commits
-------

8e0fcf9 [FrameworkBundle] Fixed configuration of php_errors.log
2018-04-09 13:39:40 -05:00
Nicolas Grekas
0f9c45e145 bug #26823 [Validator] Fix LazyLoadingMetadataFactory with PSR6Cache for non classname if tested values isn't existing class (Pascal Montoya, pmontoya)
This PR was merged into the 2.7 branch.

Discussion
----------

[Validator] Fix LazyLoadingMetadataFactory with PSR6Cache for non classname if tested values isn't existing class

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

If @Assert\Valid is applied to a string value, the value is searched in metadata cache and some characters aren't allowed in this cache. This create an unexpected exception.

Class existence is now tested before cache read.

Commits
-------

5198f43 Disable autoloader call on interface_exists check
cd91420 [Validator] Fix LazyLoadingMetadataFactory with PSR6Cache for non classname if tested values isn't an existing class
2018-04-09 13:33:44 -05:00
Grégoire Pineau
8e0fcf933c [FrameworkBundle] Fixed configuration of php_errors.log 2018-04-09 18:19:45 +02:00
Pascal Montoya
5198f435a0
Disable autoloader call on interface_exists check 2018-04-09 10:32:24 +02:00
Pascal Montoya
cd914209bd
[Validator] Fix LazyLoadingMetadataFactory with PSR6Cache for non classname if tested values isn't an existing class 2018-04-09 10:32:24 +02:00
Samuel ROZE
a726f05f81 minor #26862 [Messenger] Rename the middleware tag (sroze)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Messenger] Rename the middleware tag

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

After a using it for a bit of time, it's weird to have the `messenger.message_handler` tag while using the `message_bus_middleware` tag for the middlewares.

I propose to rename the tag from `message_bus_middleware` to `messenger.bus_middleware` to keep some consistency.

Commits
-------

dd18445482 Rename the middleware tag from `message_bus_middleware` to `messenger.bus_middleware`
2018-04-09 09:13:48 +01:00
Robin Chalas
5736321ea7 feature #26863 [Console] Support iterable in SymfonyStyle::write/writeln (ogizanagi)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Console] Support iterable in SymfonyStyle::write/writeln

| 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

Relates to https://github.com/symfony/symfony/pull/26847.

This would enable iterables benefits even when using `SymfonyStyle` output.

Commits
-------

d66827e [Console] Support iterable in SymfonyStyle::write/writeln
2018-04-09 09:47:20 +02:00
Maxime Steinhausser
d66827eca4 [Console] Support iterable in SymfonyStyle::write/writeln 2018-04-08 12:38:20 +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
Christian Flothmann
a59ef8f8b6 Merge branch '4.0'
* 4.0:
  [Translation] Use unix-style EOL for xliff-core-1.2-strict.xsd
  bumped Symfony version to 4.0.9
  updated VERSION for 4.0.8
  updated CHANGELOG for 4.0.8
  bumped Symfony version to 3.4.9
  updated VERSION for 3.4.8
  updated CHANGELOG for 3.4.8
  bumped Symfony version to 2.8.39
  updated VERSION for 2.8.38
  updated CHANGELOG for 2.8.38
  bumped Symfony version to 2.7.46
  updated VERSION for 2.7.45
  update CONTRIBUTORS for 2.7.45
  updated CHANGELOG for 2.7.45
  [Yaml] Throw parse error on unfinished inline map
2018-04-08 11:02:26 +02:00
Christian Flothmann
2bec0e1400 Merge branch '3.4' into 4.0
* 3.4:
  [Translation] Use unix-style EOL for xliff-core-1.2-strict.xsd
  bumped Symfony version to 3.4.9
  updated VERSION for 3.4.8
  updated CHANGELOG for 3.4.8
  bumped Symfony version to 2.8.39
  updated VERSION for 2.8.38
  updated CHANGELOG for 2.8.38
  bumped Symfony version to 2.7.46
  updated VERSION for 2.7.45
  update CONTRIBUTORS for 2.7.45
  updated CHANGELOG for 2.7.45
  [Yaml] Throw parse error on unfinished inline map
2018-04-08 10:49:08 +02:00
Christian Flothmann
7cd5e43141 Merge branch '2.8' into 3.4
* 2.8:
  bumped Symfony version to 2.8.39
  updated VERSION for 2.8.38
  updated CHANGELOG for 2.8.38
  bumped Symfony version to 2.7.46
  updated VERSION for 2.7.45
  update CONTRIBUTORS for 2.7.45
  updated CHANGELOG for 2.7.45
  [Yaml] Throw parse error on unfinished inline map
2018-04-08 10:21:29 +02:00
Christian Flothmann
611b84606d Merge branch '2.7' into 2.8
* 2.7:
  bumped Symfony version to 2.7.46
  updated VERSION for 2.7.45
  update CONTRIBUTORS for 2.7.45
  updated CHANGELOG for 2.7.45
  [Yaml] Throw parse error on unfinished inline map
2018-04-08 09:53:13 +02:00
Christian Flothmann
16edba5d99 bug #26834 [Yaml] Throw parse error on unfinished inline map (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Yaml] Throw parse error on unfinished inline map

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

Throws a parse error instead of a PHP notice.

Commits
-------

4359936 [Yaml] Throw parse error on unfinished inline map
2018-04-08 09:51:31 +02:00
Tobias Schultze
629e82dca6 minor #26828 [HttpFoundation] Have MigratingSessionHandler implement SessionUpdateTimestampHandlerInterface (nicolas-grekas)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[HttpFoundation] Have MigratingSessionHandler implement SessionUpdateTimestampHandlerInterface

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

Forgotten in #26096

Commits
-------

5d7117bf0a [HttpFoundation] Have MigratingSessionHandler implement SessionUpdateTimestampHandlerInterface
2018-04-07 21:59:24 +02:00
Tobias Schultze
ec999c791f feature #26847 [Console] add support for iterable in output (Tobion)
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Console] add support for iterable in output

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

Very useful if you just want to print something from a generator. Using array requires everything in memory. Lets make use of the new iterable type.

Commits
-------

5100071caf [Console] add support for iterable in output
2018-04-07 20:27:21 +02:00
Nicolas Grekas
86b850ebd8 [HttpKernel] Dont create mock cookie for new sessions in tests 2018-04-07 16:32:26 +02:00
Nicolas Grekas
5d7117bf0a [HttpFoundation] Have MigratingSessionHandler implement SessionUpdateTimestampHandlerInterface 2018-04-07 15:53:44 +02:00
Nicolas Grekas
c36f6db14b [Translation] Use unix-style EOL for xliff-core-1.2-strict.xsd 2018-04-07 15:20:24 +02:00
Fabien Potencier
02e5fbceea bumped Symfony version to 4.0.9 2018-04-06 18:49:36 +02:00
Tobias Schultze
5100071caf [Console] add support for iterable in output 2018-04-06 18:29:06 +02:00
Fabien Potencier
b0fcabb5d8
Merge pull request #26849 from fabpot/release-4.0.8
released v4.0.8
2018-04-06 18:25:21 +02:00