Commit Graph

38315 Commits

Author SHA1 Message Date
Robin Chalas
344b8cee42 Merge branch '4.1'
* 4.1:
  [Console] Fix SymfonyQuestionHelper::askQuestion() with choice value as default
2018-09-08 21:04:21 +02:00
Robin Chalas
492eb5fe24 Merge branch '3.4' into 4.1
* 3.4:
  [Console] Fix SymfonyQuestionHelper::askQuestion() with choice value as default
2018-09-08 21:04:07 +02:00
Robin Chalas
49992c5dfb Merge branch '2.8' into 3.4
* 2.8:
  [Console] Fix SymfonyQuestionHelper::askQuestion() with choice value as default
2018-09-08 21:02:09 +02:00
Robin Chalas
d32d7685c2 bug #28401 [Console] Fix SymfonyQuestionHelper::askQuestion() with choice value as default (chalasr)
This PR was merged into the 2.8 branch.

Discussion
----------

[Console] Fix SymfonyQuestionHelper::askQuestion() with choice value as default

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

There is an inconsistency between `SymfonyStyle::askQuestion(new ChoiceQuestion(...))` and `SymfonyStyle::choice(...)`, the former does not support to have a choice value as default instead of a choice key while the latter handles both.
This is causing an `undefined index` notice breaking interactive command testing, fixed here.

Commits
-------

c51dda0 [Console] Fix SymfonyQuestionHelper::askQuestion() with choice value as default
2018-09-08 20:52:26 +02:00
Nicolas Grekas
4cf1ae4e07 [VarExporter] minor CS tweak 2018-09-08 20:19:57 +02:00
Nicolas Grekas
f3c3c0b4d6 bug #28408 [VarExporter] fix exporting instances of final classes that extend internal ones (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[VarExporter] fix exporting instances of final classes that extend internal ones

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

Another PHP oddity found today.

Commits
-------

4a16b6ca65 [VarExporter] fix exporting instances of final classes that extend internal ones
2018-09-08 20:14:47 +02:00
Nicolas Grekas
4a16b6ca65 [VarExporter] fix exporting instances of final classes that extend internal ones 2018-09-08 19:59:25 +02:00
Nicolas Grekas
004c315b0c Merge branch '4.1'
* 4.1:
  [DI] configure inlined services before injecting them when dumping the container
  Consistently throw exceptions on a single line
  fix fopen calls
  Update .editorconfig
2018-09-08 15:42:43 +02:00
Nicolas Grekas
2716e5374d minor #28407 Add missing UPGRADE-4.2 entry for Controller deprecation (chalasr)
This PR was merged into the 4.2-dev branch.

Discussion
----------

Add missing UPGRADE-4.2 entry for Controller deprecation

| 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

Forgot in #28243, removal documented in UPGRADE-5.0

Commits
-------

cc23f5d5fd Add missing UPGRADE-4.2 entry for Controller deprecation
2018-09-08 15:26:25 +02:00
Nicolas Grekas
6fec32c0d0 Merge branch '3.4' into 4.1
* 3.4:
  [DI] configure inlined services before injecting them when dumping the container
  Consistently throw exceptions on a single line
  fix fopen calls
  Update .editorconfig
2018-09-08 15:24:10 +02:00
Robin Chalas
cc23f5d5fd Add missing UPGRADE-4.2 entry for Controller deprecation 2018-09-08 15:15:53 +02:00
Nicolas Grekas
8bc014c211 Merge branch '2.8' into 3.4
* 2.8:
  Consistently throw exceptions on a single line
  fix fopen calls
  Update .editorconfig
2018-09-08 15:15:14 +02:00
Fabien Potencier
1f996f4116 minor #28406 [Messenger] Remove the experimental annotations (sroze)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Messenger] Remove the experimental annotations

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

As part of the plan... Messenger is stable in 4.2: let's commit to this 💃

Commits
-------

d16277b560 Remove the experimental annotations
2018-09-08 15:13:14 +02:00
Samuel ROZE
d16277b560 Remove the experimental annotations 2018-09-08 14:04:14 +01:00
Nicolas Grekas
f408a676c5 minor #28403 Consistently throw exceptions on a single line (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

Consistently throw exceptions on a single line

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

Just to be consistent. Prepared using php-cs-fixer + manual  tweaks.

Commits
-------

721dc8661f Consistently throw exceptions on a single line
2018-09-08 15:00:18 +02:00
Nicolas Grekas
5e237db55e bug #28388 [DI] configure inlined services before injecting them when dumping the container (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] configure inlined services before injecting them 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 | #28304
| License       | MIT
| Doc PR        | -

#28060 introduced a change in the way inline services are dumped: these instances could end up being configured *after* being injected. This breaks e.g. using Doctrine's Configuration instances, which are expected to be fully defined before being injected into their consumers.

Fixing this required a significant refactorization because I was just unable to reason with the heavily scrambled logic in place right now. The new logic is still non-trivial, but at least it's manageable, thus easier to get correct.

(Replaces #28385 which is the same applied to 4.1 - should help with merges.)

Commits
-------

e5c54053c4 [DI] configure inlined services before injecting them when dumping the container
2018-09-08 14:58:42 +02:00
Nicolas Grekas
e5c54053c4 [DI] configure inlined services before injecting them when dumping the container 2018-09-08 14:51:51 +02:00
Nicolas Grekas
721dc8661f Consistently throw exceptions on a single line 2018-09-08 14:44:02 +02:00
Fabien Potencier
e980ce40e2 feature #28399 [Messenger] Add a SenderLocator decoupled from ContainerInterface (fabpot)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Messenger] Add a SenderLocator decoupled from ContainerInterface

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

For handler locators, we have a generic `HandlerLocator` class that takes a simple mapping instead of a service locator. The same did not exist for sender locators. So, this PR adds this possibility as well. That allows for something like this:

```php
new MessageBus([
    new SendMessageMiddleware(new SenderLocator([
        Message::class => new AmqpTransport($encoderDecoder, $encoderDecoder, $connection),
    ])),
    new HandleMessageMiddleware(new HandlerLocator([
        Message::class => new MessageHandler(),
    ])),
]);
```

Commits
-------

e658e155aa [Messenger] added a SenderLocator decoupled from ContainerInterface
2018-09-08 14:31:58 +02:00
Fabien Potencier
7bbe78bc72 minor #28402 [TwigBundle] Using Twig template name syntax in form_theme example (yceruto)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[TwigBundle] Using Twig template name syntax in form_theme example

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

Minor tweak to remove the `symfony/templating` syntax.

Commits
-------

ce653f274b Using Twig template name syntax in form_theme example
2018-09-08 14:27:18 +02:00
Fabien Potencier
e658e155aa [Messenger] added a SenderLocator decoupled from ContainerInterface 2018-09-08 14:26:08 +02:00
Fabien Potencier
cd39b51189 feature #27321 [Messenger][Profiler] Trace middleware execution (ogizanagi)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Messenger][Profiler] Trace middleware execution

| 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 | part of #27262   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

This is a start for #27262 with:
- traceable Messenger middlewares
- ~~a dedicated category for http kernel controller args resolvers~~ => See #28387

<img width="1071" alt="screenshot 2018-05-20 a 12 23 55" src="https://user-images.githubusercontent.com/2211145/40278071-98c04924-5c2a-11e8-9770-d78ac62d2c16.PNG">

Messenger middleware are traced, with bus info (if not shared accros buses):

<img width="1069" alt="screenshot 2018-05-20 a 12 28 15" src="https://user-images.githubusercontent.com/2211145/40278073-9e6979f4-5c2a-11e8-9657-ee3aa057a5be.PNG">

Another possibility is to use the middleware id instead of the class (with or without extra bus info?):

<img width="1074" alt="screenshot 2018-05-20 a 12 32 24" src="https://user-images.githubusercontent.com/2211145/40278074-9e85f43a-5c2a-11e8-9f13-ad41de342079.PNG">

(_of course, collected times are faked here using `usleep` in the traceable middleware_)

Commits
-------

e974f67b1f [Messenger][Profiler] Trace middleware execution
2018-09-08 14:24:37 +02:00
Fabien Potencier
9af885cde4 feature #28400 [Messenger] Add a simple serializer (fabpot)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Messenger] Add a simple serializer

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

When using the Messenger component without Symfony full stack, it helps to use a simple Serializer configured with the bare minimum (this bare minimum is up to the discussion).

Commits
-------

f27c15a493 [Messenger] added a simple serializer
2018-09-08 14:15:33 +02:00
Fabien Potencier
f27c15a493 [Messenger] added a simple serializer 2018-09-08 14:14:59 +02:00
Yonel Ceruto
ce653f274b Using Twig template name syntax in form_theme example 2018-09-08 08:05:32 -04:00
Fabien Potencier
a480dc6a85 feature #28397 [Messenger] Change exceptions to use component's one (fabpot)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Messenger] Change exceptions to use component's one

| 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

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - Bug fixes must be submitted against the lowest branch where they apply
   (lowest branches are regularly merged to upper ones so they get the fixes too).
 - Features and deprecations must be submitted against the master branch.
-->

Commits
-------

4e0e5e5fdb [Messenger] changed exceptions to use component's one
2018-09-08 13:58:28 +02:00
Robin Chalas
c51dda0fe1 [Console] Fix SymfonyQuestionHelper::askQuestion() with choice value as default 2018-09-08 13:31:39 +02:00
Fabien Potencier
f6b4dc94d1 feature #28387 [HttpKernel][Profiler] Add arg value resolver category in performances panel (ogizanagi)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[HttpKernel][Profiler] Add arg value resolver category in performances panel

| 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 | part of #27262   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

Extracted from https://github.com/symfony/symfony/pull/27321

<img width="1071" alt="screenshot 2018-05-20 a 12 23 55" src="https://user-images.githubusercontent.com/2211145/40278071-98c04924-5c2a-11e8-9770-d78ac62d2c16.PNG">

Commits
-------

b24e0543e0 [HttpKernel][Profiler] Add arg value resolver category in performances panel
2018-09-08 09:28:50 +02:00
Fabien Potencier
88a2af54c4 feature #25015 [Validator] Deprecate validating DateTimeInterface in Date|Time|DateTime constraints (ro0NL)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Validator] Deprecate validating DateTimeInterface in Date|Time|DateTime constraints

| Q             | A
| ------------- | ---
| Branch?       | 4.1
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | #11925
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/pull/7583 (old PR but not really needed now)

Easy version of #21905. I think individual naming has value. Also the goal is to move forward to use `Type` really, not to bother with constraint renames.

Commits
-------

5454e6fc1d [Validator] Deprecate validating DateTimeInterface in Date|Time|DateTime constraints
2018-09-08 09:05:36 +02:00
Roland Franssen
5454e6fc1d [Validator] Deprecate validating DateTimeInterface in Date|Time|DateTime constraints 2018-09-08 08:57:33 +02:00
Fabien Potencier
4e0e5e5fdb [Messenger] changed exceptions to use component's one 2018-09-08 08:36:06 +02:00
Fabien Potencier
f2f4cd82c3 feature #28394 [Messenger] Add interfaces to be type-hinted even when not using a Container (fabpot)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Messenger] Add interfaces to be type-hinted even when not using a Container

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| 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

This a follow-up to #28271. This adds #28271 to the non-container handler locator.

Commits
-------

963fde9fb1 [Messenger] added interfaces to be type-hinted even when not using a Container
2018-09-08 08:26:01 +02:00
Maxime Steinhausser
e974f67b1f [Messenger][Profiler] Trace middleware execution 2018-09-08 06:30:21 +02:00
Fabien Potencier
963fde9fb1 [Messenger] added interfaces to be type-hinted even when not using a Container 2018-09-07 22:30:04 +02:00
Nicolas Grekas
373dad371a bug #28371 [VarExporter] fix exporting objects that mutate on __sleep() (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[VarExporter] fix exporting objects that mutate on __sleep()

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

Commits
-------

36e412fdfc [VarExporter] fix exporting objects that mutate on __sleep()
2018-09-07 14:21:30 +02:00
Nicolas Grekas
150e3e1ad9 bug #28384 [VarDumper] First time dump() method call not working issue (me-shaon)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[VarDumper] First time dump() method call not working issue

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

Calling the `dump()` method for the first time is not producing any output. That's because, in the [latest change ](46434a6d67), the first call to the `dump` method is not calling the `$handler` at all. It's just setting the `$handler`.
In this PR, I've tried to fix this issue.

Commits
-------

b9681fe83b Fix #28370: First time dump() method call not working issue
2018-09-07 14:07:56 +02:00
Maxime Steinhausser
b24e0543e0 [HttpKernel][Profiler] Add arg value resolver category in performances panel 2018-09-07 12:37:30 +02:00
Fabien Potencier
40fff43ea9 bug #28377 fix fopen flags (SpacePossum)
This PR was merged into the 2.8 branch.

Discussion
----------

fix fopen flags

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

<!--
Fixes the flags/mode used with `fopen`
-->

Commits
-------

6d155ed059 fix fopen calls
2018-09-07 05:20:27 +02:00
SpacePossum
6d155ed059 fix fopen calls 2018-09-06 19:11:15 +02:00
me_shaon
b9681fe83b Fix #28370: First time dump() method call not working issue 2018-09-06 23:01:56 +06:00
Fabien Potencier
ae599089c3 minor #28380 Update .editorconfig (Saphyel)
This PR was submitted for the master branch but it was squashed and merged into the 2.8 branch instead (closes #28380).

Discussion
----------

Update .editorconfig

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

.editorconfig is already in the project and we can add some options to match with the PSR standard

Commits
-------

a4347a4389 Update .editorconfig
2018-09-06 16:23:05 +02:00
Carlos Jimenez
a4347a4389 Update .editorconfig 2018-09-06 16:22:56 +02:00
Nicolas Grekas
55def78682 [Finder] fix merge 2018-09-05 19:51:25 +02:00
Nicolas Grekas
36e412fdfc [VarExporter] fix exporting objects that mutate on __sleep() 2018-09-05 15:34:16 +02:00
Nicolas Grekas
e4d7c74845 Merge branch '4.1'
* 4.1:
  [appveyor] fix
  [DI] Fix dumping some complex service graphs
  Revert "minor #28321 [Routing] Fixed the interface description of the url generator interface (Toflar)"
  Fixed caching of templates in default path on cache warmup
  added missing LICENSE file
  remove cache warmers when Twig cache is disabled
  [Workflow] Make sure we do not run the next transition on an updated state
  change baseUrl to basePath to fix wrong profiler url
  [HttpKernel][FrameworkBundle] Fix escaping of serialized payloads passed to test clients
  chore: rename Appveyor filename
  Fixed the interface description of the url generator interface
  Format file size in validation message according to binaryFormat option
2018-09-05 14:00:05 +02:00
Nicolas Grekas
432487f577 Merge branch '3.4' into 4.1
* 3.4:
  [appveyor] fix
  Revert "minor #28321 [Routing] Fixed the interface description of the url generator interface (Toflar)"
  Fixed caching of templates in default path on cache warmup
  remove cache warmers when Twig cache is disabled
  [HttpKernel][FrameworkBundle] Fix escaping of serialized payloads passed to test clients
  chore: rename Appveyor filename
  Fixed the interface description of the url generator interface
  Format file size in validation message according to binaryFormat option
2018-09-05 13:58:22 +02:00
Nicolas Grekas
5632dc7c7a Merge branch '2.8' into 3.4
* 2.8:
  [appveyor] fix
  Revert "minor #28321 [Routing] Fixed the interface description of the url generator interface (Toflar)"
  remove cache warmers when Twig cache is disabled
  [HttpKernel][FrameworkBundle] Fix escaping of serialized payloads passed to test clients
  chore: rename Appveyor filename
  Fixed the interface description of the url generator interface
  Format file size in validation message according to binaryFormat option
2018-09-05 13:56:21 +02:00
Nicolas Grekas
992a174470 [appveyor] fix 2018-09-05 13:43:17 +02:00
Nicolas Grekas
545c360453 [FrameworkBundle] fix test when intl is disabled 2018-09-05 11:38:07 +02:00
Nicolas Grekas
5557e38e2d [PropertyInfo] fix BC break in PropertyInfoPass 2018-09-05 11:02:25 +02:00