Commit Graph

39349 Commits

Author SHA1 Message Date
Fabien Potencier
d9f87b6f58 minor #29273 [Contracts] clarify the README (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Contracts] clarify the README

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

Hopefully removing some potential confusions or promises that might be difficult to fulfill.

Commits
-------

07e2cc2858 [Contracts] clarify the README
2018-11-22 11:29:02 +01:00
Fabien Potencier
d713671b80 minor #29278 [Workflow] fix authorization checker variable name (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Workflow] fix authorization checker variable name

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

Commits
-------

9f4032d20f fix authorization checker variable name
2018-11-22 11:26:16 +01:00
Christian Flothmann
9f4032d20f fix authorization checker variable name 2018-11-22 08:01:54 +01:00
Claude Dioudonnat
640ccdf069 [Routing] Remove duplicate schemes and methods for invokable controllers 2018-11-21 20:17:55 +01:00
Nicolas Grekas
07e2cc2858 [Contracts] clarify the README 2018-11-21 19:26:39 +01:00
Nicolas Grekas
0bb91f73a1 minor #29272 [Component/EventDispatcher/Tests/AbstractEventDispatcherTest.php] Fix indentation error (ValentineBoineau)
This PR was merged into the 2.8 branch.

Discussion
----------

[Component/EventDispatcher/Tests/AbstractEventDispatcherTest.php] Fix indentation error

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

Commits
-------

24264facaa Indentation error
2018-11-21 16:13:15 +01:00
ValentineBoineau
24264facaa
Indentation error 2018-11-21 15:20:20 +01:00
Sascha Dens
f4866bc371 [HttpFoundation] Fix trailing space for mime-type with parameters 2018-11-21 13:53:33 +01:00
Nicolas Grekas
227cf2cc22 feature #29167 [Messenger] Add a trait for synchronous query & command buses (ogizanagi)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Messenger] Add a trait for synchronous query & command buses

| Q             | A
| ------------- | ---
| Branch?       | 4.2 <!-- 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        | symfony/symfony-docs/issues/10662

Commits
-------

6ba4e8aad5 [Messenger] Add a trait for synchronous query & command buses
2018-11-20 19:24:21 +01:00
Maxime Steinhausser
6ba4e8aad5 [Messenger] Add a trait for synchronous query & command buses 2018-11-20 19:19:09 +01:00
Thomas Bisignani
cddce2af61 [HttpFoundation] Fixed absolute Request URI with default port 2018-11-20 17:50:57 +01:00
Nicolas Grekas
dbb0f2ad77 [Bridge/PhpUnit] fix the fix 2018-11-20 17:47:12 +01:00
Nicolas Grekas
ce6d918baf fix cs 2018-11-20 17:23:41 +01:00
Nicolas Grekas
b634ed564a Merge branch '4.1'
* 4.1:
  fix cs
  fix cs
  fix cs
  SCA: consolidate non empty array checks across codebase
  [cs] correct invalid @param types
  [Bridge/PhpUnit] Use composer to download phpunit
  [DI] fix taking lazy services into account when dumping the container
  [Form] Fixed empty data for compound date interval
  [Cache] fix optimizing Psr6Cache for AdapterInterface pools
  deal with explicitly enabled workflow nodes
2018-11-20 17:22:05 +01:00
Nicolas Grekas
578f847c02 fix cs 2018-11-20 17:17:28 +01:00
Nicolas Grekas
d30b0814c8 Merge branch '3.4' into 4.1
* 3.4:
  fix cs
2018-11-20 17:14:53 +01:00
Nicolas Grekas
6a1701e574 fix cs 2018-11-20 17:14:23 +01:00
Nicolas Grekas
713b7986fe Merge branch '3.4' into 4.1
* 3.4:
  fix cs
  SCA: consolidate non empty array checks across codebase
  [cs] correct invalid @param types
  [Bridge/PhpUnit] Use composer to download phpunit
  [DI] fix taking lazy services into account when dumping the container
  [Form] Fixed empty data for compound date interval
  [Cache] fix optimizing Psr6Cache for AdapterInterface pools
  deal with explicitly enabled workflow nodes
2018-11-20 17:14:00 +01:00
Nicolas Grekas
f103b6b91d fix cs 2018-11-20 17:10:26 +01:00
Nicolas Grekas
36527634f2 minor #29231 SCA: consolidate non empty array checks across codebase (kalessil)
This PR was squashed before being merged into the 3.4 branch (closes #29231).

Discussion
----------

SCA: consolidate non empty array checks across codebase

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

This PR replaces `is_array(...) && count(...) > 0` with `... && is_array(...)` construct used in the codebase.

Commits
-------

2f1fd54dda SCA: consolidate non empty array checks across codebase
2018-11-20 17:02:07 +01:00
Vladimir Reznichenko
2f1fd54dda SCA: consolidate non empty array checks across codebase 2018-11-20 17:01:59 +01:00
Nicolas Grekas
ab51fa84a5 bug #29243 [Cache] fix optimizing Psr6Cache for AdapterInterface pools (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Cache] fix optimizing Psr6Cache for AdapterInterface pools

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

As described by @Tobion in https://github.com/symfony/symfony/pull/29236/files#r234324045:
> The problem I have experienced is that in dev mode the cache is decorated with a TraceableCache. This means it loses this optimization and introduces https://github.com/symfony/symfony/issues/28918#issuecomment-432399481 again

Commits
-------

b8100a9df0 [Cache] fix optimizing Psr6Cache for AdapterInterface pools
2018-11-20 17:01:33 +01:00
Nicolas Grekas
73d98049fa bug #29247 [DI] fix taking lazy services into account when dumping the container (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] fix taking lazy services into account when dumping the container

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

This PR fixes issues found while working on #29246.
It *does* fix the infinite loop, ~but replaces it by an exception (reopening #29078)~:
> ~It's a requirement to specify a Metadata Driver and pass it to Doctrine\ORM\Configuration::setMetadataDriverImpl()~

The full fix is not immediately accessible as it needs some core changes to the dumping logic. Requiring `symfony/proxy-manager-bridge` works around the issue properly.

See #29251 for 4.2

Commits
-------

67d7623e72 [DI] fix taking lazy services into account when dumping the container
2018-11-20 17:00:44 +01:00
Nicolas Grekas
d0698b2ec3 bug #29249 [Form] Fixed empty data for compound date interval (HeahDude)
This PR was merged into the 3.4 branch.

Discussion
----------

[Form] Fixed empty data for compound date interval

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

Following #29182, since this type has been introduced in Symfony 3 but with the same limitation explained in #4715.
So for consistency this needs to be fixed here as well.

Commits
-------

38a2abc790 [Form] Fixed empty data for compound date interval
2018-11-20 16:59:47 +01:00
Nicolas Grekas
e166d96cf5 bug #29265 [Bridge/PhpUnit] Use composer to download phpunit (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Bridge/PhpUnit] Use composer to download phpunit

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

Commits
-------

e823f1df31 [Bridge/PhpUnit] Use composer to download phpunit
2018-11-20 16:58:54 +01:00
Nicolas Grekas
9e0f8e7804 Merge branch '2.8' into 3.4
* 2.8:
  [cs] correct invalid @param types
2018-11-20 16:57:17 +01:00
Nicolas Grekas
303cae1fec minor #29266 [cs] correct invalid @param types (TomasVotruba)
This PR was merged into the 2.8 branch.

Discussion
----------

[cs] correct invalid @param types

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

That's #29255 on 2.8

Commits
-------

40f26235eb [cs] correct invalid @param types
2018-11-20 16:56:52 +01:00
Tomas Votruba
40f26235eb [cs] correct invalid @param types 2018-11-20 16:55:20 +01:00
Nicolas Grekas
e823f1df31 [Bridge/PhpUnit] Use composer to download phpunit 2018-11-20 16:36:32 +01:00
Nicolas Grekas
67d7623e72 [DI] fix taking lazy services into account when dumping the container 2018-11-20 15:22:20 +01:00
Grégoire Pineau
b74a086ec2 bug #28769 [FrameworkBundle] deal with explicitly enabled workflow nodes (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] deal with explicitly enabled workflow nodes

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

Commits
-------

017fd56bd8 deal with explicitly enabled workflow nodes
2018-11-19 10:38:20 +01:00
Jules Pietri
38a2abc790 [Form] Fixed empty data for compound date interval 2018-11-18 13:25:16 +01:00
Nicolas Grekas
b8100a9df0 [Cache] fix optimizing Psr6Cache for AdapterInterface pools 2018-11-16 22:18:41 +01:00
Christian Flothmann
017fd56bd8 deal with explicitly enabled workflow nodes 2018-11-16 08:38:23 +01:00
Fabien Potencier
737726516e bumped Symfony version to 4.2.0 2018-11-16 06:21:36 +01:00
Fabien Potencier
33bb96aad6
Merge pull request #29237 from fabpot/release-4.2.0-BETA2
released v4.2.0-BETA2
2018-11-16 06:13:09 +01:00
Fabien Potencier
4c44f24f5c updated VERSION for 4.2.0-BETA2 2018-11-16 06:12:50 +01:00
Fabien Potencier
1e6f430774 updated CHANGELOG for 4.2.0-BETA2 2018-11-16 06:10:23 +01:00
Fabien Potencier
429f500cbc bug #29190 [Debug][HttpKernel] remove frames added by DebugClassLoader in stack traces (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Debug][HttpKernel] remove frames added by DebugClassLoader in stack traces

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

![image](https://user-images.githubusercontent.com/243674/48362054-14ee0100-e6a3-11e8-82e1-b185af45fb8b.png)

Commits
-------

76e7944460 [Debug][HttpKernel] remove frames added by DebugClassLoader in stack traces
2018-11-16 06:03:01 +01:00
Fabien Potencier
c1c38f5caa bug #29233 [FrameworkBundle] metadata_update_threshold default value must be an int (dunglas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[FrameworkBundle] metadata_update_threshold default value must be an int

| Q             | A
| ------------- | ---
| Branch?       | master
| 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 | n/a
| License       | MIT
| Doc PR        | n/a

The type of the default config value is not in sync with the typehint added to `MetadataBag::__construct()`, so you get an error by default (at least when using strict types):

```
Type error: Argument 2 passed to Symfony\Component\HttpFoundation\Session\Storage\MetadataBag::__construct() must be of the type integer, string given, called in var/cache/test/ContainerEZ62jzd/getSession_Storage_MockFileService.php on line 23 (Behat\Testwork\Call\Exception\FatalThrowableError)
```

Commits
-------

b7e7c46f43 [FrameworkBundle] metadata_update_threshold default value must be an int
2018-11-16 05:59:42 +01:00
Kévin Dunglas
b7e7c46f43
[FrameworkBundle] metadata_update_threshold default value must be an int 2018-11-15 18:25:12 +01:00
Nicolas Grekas
dbf053bc85 [Messenger] fix deps=low (bis) 2018-11-15 14:18:48 +01:00
Nicolas Grekas
1b96f9d121 [Messenger] fix deps=low 2018-11-15 14:12:21 +01:00
Nicolas Grekas
4efb16b5e0 bug #29226 [Messenger] Improved message when handler class does not exist (neeckeloo)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Messenger] Improved message when handler class does not exist

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

**Problem:**

When defining a non existing messenger handler class in the `services.yml` config file, we encounter this confusing error message:

```
services:
    App\Handler\NonExistentHandler:
        tags: [messenger.message_handler]
```

```
PHP Fatal error:  Uncaught Symfony\Component\Debug\Exception\FatalThrowableError: Argument 1 passed to Symfony\Component\Messenger\DependencyInjection\MessengerPass::guessHandledClasses() must be an instance of ReflectionClass, null given, called in /app/vendor/symfony/messenger/DependencyInjection/MessengerPass.php on line 93 in /app/vendor/symfony/messenger/DependencyInjection/MessengerPass.php:189
Stack trace:
    #0 /app/vendor/symfony/messenger/DependencyInjection/MessengerPass.php(93): Symfony\Component\Messenger\DependencyInjection\MessengerPass->guessHandledClasses(NULL, 'App\\Application...')
    #1 /app/vendor/symfony/messenger/DependencyInjection/MessengerPass.php(74): Symfony\Component\Messenger\DependencyInjection\MessengerPass->registerHandlers(Object(Symfony\Component\DependencyInjection\ContainerBuilder), Array)
    #2 /app/vendor/symfony/dependency-injection/Compiler/Compiler.php(95): Symfony\Component\Messenger\DependencyInjection\MessengerPass->process(Object(Symfony\Component\DependencyInjection\ContainerBuilder))
    #3 / in /app/vendor/symfony/messenger/DependencyInjection/MessengerPass.php on line 189
```

**Proposal:**

We can throw a more relevant exception (RuntimeException) in this case to help the developer to have a better understanding of the issue.

```Invalid service "App\Handler\NonExistentHandler": class "App\Handler\NonExistentHandler" does not exist.```

Commits
-------

6ab9274638 Improve error message when defining messenger handler class that does not exists
2018-11-15 13:54:20 +01:00
Nicolas Grekas
ed9193ccda [Form] fix merge 2018-11-15 13:52:12 +01:00
Nicolas Grekas
d353e4f97b Merge branch '4.1'
* 4.1:
  [DI] dont fail on missing classes when resource tracking is disabled
  [Validator] Added the missing constraints instance checks
2018-11-15 13:42:54 +01:00
Nicolas Grekas
17163ab430 Merge branch '3.4' into 4.1
* 3.4:
  [DI] dont fail on missing classes when resource tracking is disabled
  [Validator] Added the missing constraints instance checks
2018-11-15 13:40:31 +01:00
Nicolas Grekas
236565c87e [DI] dont fail on missing classes when resource tracking is disabled 2018-11-15 13:37:52 +01:00
Nicolas Grekas
654dc2209b Merge branch '2.8' into 3.4
* 2.8:
  [Validator] Added the missing constraints instance checks
2018-11-15 13:34:45 +01:00
Nicolas Grekas
b11ec05282 bug #29223 [Validator] Added the missing constraints instance checks (thomasbisignani)
This PR was merged into the 2.8 branch.

Discussion
----------

[Validator] Added the missing constraints instance checks

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

This PR adds the constraints instance checks missing to limit the validators use.

This behavior is already implemented in all built-in validators, but it was missed in two validators.

Commits
-------

0ecaead015 [Validator] Added the missing constraints instance checks
2018-11-15 13:27:27 +01:00