Commit Graph

39080 Commits

Author SHA1 Message Date
Nicolas Grekas
36e2983445 minor #29023 [Console] Remove duplicate condition (xuanquynh)
This PR was merged into the 2.8 branch.

Discussion
----------

[Console] Remove duplicate condition

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

Inside the Command::mergeApplicationDefinition() method, the condition of $mergeArgs is checked twice now. Let's remove the second duplicate one.

See the capture below to review quickly!

```php
public function mergeApplicationDefinition($mergeArgs = true)
{
    if (null === $this->application || (true === $this->applicationDefinitionMerged && ($this->applicationDefinitionMergedWithArgs || !$mergeArgs))) {
        return;
    }

    $this->definition->addOptions($this->application->getDefinition()->getOptions());

    if ($mergeArgs) {
        $currentArguments = $this->definition->getArguments();
        $this->definition->setArguments($this->application->getDefinition()->getArguments());
        $this->definition->addArguments($currentArguments);
    }

    $this->applicationDefinitionMerged = true;
    if ($mergeArgs) {
        $this->applicationDefinitionMergedWithArgs = true;
    }
}
```

Commits
-------

925842af60 Remove duplicate condition
2018-10-30 15:34:03 +01:00
Nguyen Xuan Quynh
925842af60 Remove duplicate condition 2018-10-30 15:26:34 +01:00
Nicolas Grekas
2cd1e11847 feature #29006 [Messenger] make TraceableMiddleware decorate a StackInterface instead of each middleware to free the callstack from noisy frames (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Messenger] make TraceableMiddleware decorate a StackInterface instead of each middleware to free the callstack from noisy frames

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

Right now, `TraceableMiddleware` works as a middleware decorator for the "handle" method. It means that *each middleware* frame in the call stack is wrapped between two noisy extra frames.
This is something we can remove by decorating the StackInterface instead: let's just stop/start events when the next middleware is fetched.
Thanks to this, only one frame *per bus* is added to measure middleware timings.

Commits
-------

73c8c23c79 [Messenger] make TraceableMiddleware decorate a StackInterface instead of each middleware to free the callstack from noisy frames
2018-10-30 15:13:15 +01:00
vladimir.reznichenko
636a872389 SCA: reverted code style changes 2018-10-30 14:18:25 +01:00
vladimir.reznichenko
c926b1abd3 SCA: reverted code style changes 2018-10-30 14:12:48 +01:00
Nicolas Grekas
73c8c23c79 [Messenger] make TraceableMiddleware decorate a StackInterface instead of each middleware to free the callstack from noisy frames 2018-10-29 21:18:59 +01:00
Nicolas Grekas
c2e55ff3f4 [DI] minor fix 2018-10-29 18:21:05 +01:00
Nicolas Grekas
9075d2e64e minor #29013 [HTTP Foundtation] Fix useless space in docblock (ismail1432)
This PR was merged into the 2.8 branch.

Discussion
----------

[HTTP Foundtation] Fix useless space in docblock

I Just removed a useless space in PHP Doc, I don't know if target the 2.8 branch is enough to others SF versions

Commits
-------

6ba75734d6 fix useless space in docblock
2018-10-29 12:11:57 +01:00
Nicolas Grekas
41f57edf97 minor #29015 [Process] fix transient test (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Process] fix transient test

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

Commits
-------

2f736a07fc [Process] fix transient test
2018-10-29 12:09:57 +01:00
Nicolas Grekas
f5d390800b minor #29016 [VarExporter] Cleanup unused var (ro0NL)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[VarExporter] Cleanup unused var

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

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

d254004c26 [VarExporter] Cleanup unused var
2018-10-29 12:06:16 +01:00
Roland Franssen
d254004c26 [VarExporter] Cleanup unused var 2018-10-29 11:58:48 +01:00
Nicolas Grekas
2f736a07fc [Process] fix transient test 2018-10-29 10:58:56 +01:00
Nicolas Grekas
3263175b9e feature #28970 [FrameworkBundle] make debug:autowiring list useful services and their description (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[FrameworkBundle] make debug:autowiring list useful services and their description

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

This PR closes #27207: we don't need "semantics" anymore. 4.2 has everything already to allow us to separate useful services from the other ones: any autowireable *alias* **is** a useful service!
Add autowiring by type + parameter name (#28234) and the story is done: we can easily hint people about which features their bundles provide, without being polluted by for-wiring-only services.

Here is a screenshot running this command(before I excluded the aliases for $cacheApp and $cacheSystem):
![image 3](https://user-images.githubusercontent.com/243674/47437006-f41f4380-d7a7-11e8-9f76-7f23e9193ce8.png)

ping @weaverryan as we drafted that together.
Fixes a few issues found meanwhile.
That should definitely go in 4.2.

Commits
-------

56aab09b01 [FrameworkBundle] make debug:autowiring list useful services and their description
2018-10-29 10:47:30 +01:00
Fabien Potencier
5dae669343 minor #29012 [DotEnv] Fix loadForEnv PHPDoc (dunglas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[DotEnv] Fix loadForEnv PHPDoc

| 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 | https://github.com/symfony/symfony/pull/28533#pullrequestreview-169122291
| 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
-------

c10710c01e [DotEnv] Fix loadForEnv PHPDoc
2018-10-29 10:25:57 +01:00
Smaine Milianni
6ba75734d6 fix useless space in docblock 2018-10-29 08:56:04 +01:00
Kévin Dunglas
c10710c01e
[DotEnv] Fix loadForEnv PHPDoc 2018-10-29 08:11:34 +01:00
Nicolas Grekas
56aab09b01 [FrameworkBundle] make debug:autowiring list useful services and their description 2018-10-28 22:46:57 +01:00
Vladimir Reznichenko
300b31fa75 SCA: applied requested code style changes 2018-10-28 19:42:32 +01:00
Vladimir Reznichenko
0180cb936f SCA: simplify some ifs in favour of null coalescing operator 2018-10-28 19:38:52 +01:00
Fabien Potencier
084fa5433b feature #28952 [Translation] allow using the ICU message format using domains with the "+intl-icu" suffix (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Translation] allow using the ICU message format using domains with the "+intl-icu" suffix

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

This PR replaces the `FallbackFormatter` logic by explicit opt-in.
This allows triggering accurate exceptions when one wants to use the ICU message format but the extension (or the polyfill) is missing.
The way to opt-in is to put messages in a domain with the `+intl-icu` suffix *at loading/declaration time*.
E.g. translations in `messages+intl-icu.en.yaml` will be read as part of the `messages` domain , but will be parsed by intl's `MessageFormatter` instead of the default Symfony one.
To make it seamless to adopt the ICU format, `%`s are trimmed from parameter keys (idea borrowed from https://github.com/webfactory/WebfactoryIcuTranslationBundle)

This is for 4.2 as it changes a feature that is not released yet.
ping @Nyholm - we drafted this together.

Commits
-------

d95cc4d4c6 [Translation] allow using the ICU message format using domains with the "+intl-icu" suffix
2018-10-28 19:21:04 +01:00
Fabien Potencier
2a30a694a3 feature #27914 [Security][SecurityBundle] Add voter individual decisions to profiler (l-vo)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Security][SecurityBundle] Add voter individual decisions to profiler

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

On the profiler (security tab), the decisions made by the AccessDecisionManager are displayed with the voters registered in the application. But there is no information about which voter was really used for each AccessDecisionManager choice and which result the voters returned.

This PR allows to display for each AccessDecisionManager choice, the voters implicated and the vote they returned.

Screenshot profiler before PR:
![capture d ecran 2018-07-10 a 13 26 46](https://user-images.githubusercontent.com/15314293/42507425-7320156c-8445-11e8-9f73-a91bdae2eca5.png)
Screenshot profiler after PR:
<img width="1093" alt="capture d ecran 2018-10-10 a 21 35 30" src="https://user-images.githubusercontent.com/15314293/46761807-c16c4a00-ccd5-11e8-85b1-8cc0ea3eb9b8.png">

Commits
-------

8abb05607b [Security][SecurityBundle] Add voter individual decisions to profiler
2018-10-28 19:09:41 +01:00
Laurent VOULLEMIER
8abb05607b [Security][SecurityBundle] Add voter individual decisions to profiler 2018-10-28 18:49:26 +01:00
Fabien Potencier
edcd627230 bug #29004 [BrowserKit] Remove undefined variable $str (samnela)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[BrowserKit] Remove undefined variable $str

| Q             | A
| ------------- | ---
| Branch?       | master  <!-- 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 | no   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | no <!-- required for new features -->

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

4b3fdd60d1 [BrowserKit] Remove undefined variable
2018-10-28 16:36:26 +01:00
Fabien Potencier
b15b17100b minor #29002 [FrameworkBundle] Display a proper warning for deprecated --env and --no-debug options (chalasr)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[FrameworkBundle] Display a proper warning for deprecated --env and --no-debug options

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

Currently hidden (remember https://github.com/symfony/symfony/pull/23328)

Commits
-------

a40048e740 [FrameworkBundle] Display a proper warning for deprecated --env and --no-debug options
2018-10-28 16:32:03 +01:00
Robin Chalas
a40048e740 [FrameworkBundle] Display a proper warning for deprecated --env and --no-debug options 2018-10-28 16:28:09 +01:00
Samuel NELA
4b3fdd60d1 [BrowserKit] Remove undefined variable 2018-10-28 13:36:14 +01:00
Robin Chalas
5b4d7e20f9 minor #29003 Remove unneeded tearDown method (darrylhein)
This PR was merged into the 2.8 branch.

Discussion
----------

Remove unneeded tearDown method

| Q             | A
| ------------- | ---
| Branch?       | 2.8 (be careful when merging)
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | n/a

Revamped version of #28998

Commits
-------

feba381 remove unneeded tearDown method
2018-10-27 23:46:19 +02:00
Darryl Hein
feba3816dc
remove unneeded tearDown method 2018-10-27 15:32:49 -06:00
Fabien Potencier
b6758e9614 feature #28985 [Messenger] Move MiddlewareTestCase in Test ns (ogizanagi)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Messenger] Move MiddlewareTestCase in Test ns

| 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 (AppVeyor failure unrelated)    <!-- please add some, will be required by reviewers -->
| Fixed tickets | N/A   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

Just a quick suggestion after #28943 being merged. Wouldn't it make sense to move this in `Test` namespace to be used by anyone wanting to unit test their middleware?

Commits
-------

215c895a55 [Messenger] Move MiddlewareTestCase in Test ns
2018-10-27 20:08:52 +02:00
Maxime Steinhausser
215c895a55 [Messenger] Move MiddlewareTestCase in Test ns 2018-10-27 18:09:57 +02:00
Fabien Potencier
a33725f6ef feature #28892 [FrameworkBundle] Deprecate support for legacy directories in Translation comands (chalasr)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[FrameworkBundle] Deprecate support for legacy directories in Translation comands

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

Commits
-------

a7a8aad46f [FrameworkBundle] Deprecate support for legacy translations and views directories
2018-10-27 18:04:48 +02:00
Fabien Potencier
9bb60c9642 feature #28854 [VarDumper] Scroll into view when searching (ro0NL)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[VarDumper] Scroll into view when searching

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

This jumps to the found element when using the javascript widget for searching HTML dumps. Inspired by Ctrl+F in Chrome :)

It's super convenient with long dumps, however i wasnt able to position the search input on the right in a fixed manner... because CSS 😓 i was hoping @ogizanagi could add a patch for it.

Also see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollIntoView

Commits
-------

647a937abc [VarDumper] Scroll into view when searching
2018-10-27 18:01:10 +02:00
Fabien Potencier
c2478d4500 minor #28977 [Intl] Update the ICU data to 63.1 (jakzal)
This PR was squashed before being merged into the 3.4 branch (closes #28977).

Discussion
----------

[Intl] Update the ICU data to 63.1

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| 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
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

http://site.icu-project.org/download/63

All tests are passing on the CI. I additionally run intl related tests (Form,Intl,Translation,Validator components) with ICU `63.1` on PHP `5.5`, `5.6`, `7.1`, `7.2`, `7.3-rc`.

Confirmed `@group intl-data` tests are passing with ICU `63.1` on PHP `5.5` and `7.2`.

Commits
-------

76bc6f0f28 [Intl] Update the ICU data to 63.1
2018-10-27 17:56:31 +02:00
Jakub Zalas
76bc6f0f28 [Intl] Update the ICU data to 63.1 2018-10-27 17:56:20 +02:00
Robin Chalas
a7a8aad46f [FrameworkBundle] Deprecate support for legacy translations and views directories 2018-10-27 16:37:38 +02:00
Fabien Potencier
c11fe350a8 bug #28999 [Messenger] Fix DoctrineTransactionMiddleware after MiddlewareInterface bc-break (skalpa)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Messenger] Fix DoctrineTransactionMiddleware after MiddlewareInterface bc-break

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

Fixes `DoctrineTransactionMiddleware` that got broken by #28983, and adds tests.

Commits
-------

378ca065d6 Fix DoctrineTransactionMiddleware after MiddlewareInterface bc-break
2018-10-27 08:55:40 +02:00
Fabien Potencier
c333d8569e feature #28997 [FrameworkBundle] Deprecating support for legacy translations directory (yceruto)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[FrameworkBundle] Deprecating support for legacy translations directory

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/28810#issuecomment-430245394
| License       | MIT
| Doc PR        | TODO

Commits
-------

acdece7005 Deprecating support for legacy translations directory
2018-10-27 06:16:49 +02:00
Fabien Potencier
5c3d826e9b minor #28996 [FrameworkBundle] Fix broken exception message (chalasr)
This PR was merged into the 2.8 branch.

Discussion
----------

[FrameworkBundle] Fix broken exception message

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

![](https://i.imgur.com/GmBhlqv.png)

Commits
-------

8e9860ca8b [FrameworkBundle] Fix broken exception message
2018-10-27 06:07:42 +02:00
Pascal Luna
378ca065d6 Fix DoctrineTransactionMiddleware after MiddlewareInterface bc-break 2018-10-27 04:46:27 +01:00
Yonel Ceruto
acdece7005 Deprecating support for legacy translations directory 2018-10-26 17:45:01 -04:00
Robin Chalas
8e9860ca8b [FrameworkBundle] Fix broken exception message 2018-10-26 23:18:28 +02:00
Vladimir Reznichenko
b12c89d481 SCA: fixed broken tests 2018-10-26 17:01:50 +02:00
vladimir.reznichenko
42e96ff7a2 SCA: applied code style as per guidelines 2018-10-26 15:43:57 +02:00
vladimir.reznichenko
8dbd927a33 SCA: minor code tweaks 2018-10-26 15:40:38 +02:00
Fabien Potencier
031762e191 minor #28988 Remove reference to http digest authentication (SamFleming)
This PR was merged into the 4.2-dev branch.

Discussion
----------

Remove reference to http digest authentication

| 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 |    <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | <!-- required for new features -->

<!--
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.
-->
Seeing as HTTP Digest has been deprecated / removed, the README shouldn't be advertising it as a feature.

This is especially important seeing as sites such as packagist display the README to advertise the features/usage of a package. See https://packagist.org/packages/symfony/security

Commits
-------

9702a212e2 Remove reference to http digest authentication
2018-10-26 10:51:06 +02:00
Samuel ROZE
d5771cc55e feature #28983 [Messenger] make dispatch(), handle() and send() methods return Envelope (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Messenger] make dispatch(), handle() and send() methods return Envelope

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

Follow up of #28909. We can do better than return `void`: let's return `Envelope`!
This means middleware and senders should also return `Envelope`, so that we can typically read back the stamps that were added during the sending process (eg to get the Kafka queue id).

ping @dunglas as we discussed that first on Slack, and @sroze as we confirmed interest IRL today.

(User handlers don't know anything about envelopes so they still should return `void` - use senders or middleware if you need to populate/read envelopes.)

Commits
-------

4b0e015402 [Messenger] make dispatch(), handle() and send() methods return Envelope
2018-10-26 10:30:00 +02:00
Sam Fleming
9702a212e2
Remove reference to http digest authentication
Seeing as HTTP Digest has been deprecated / removed, the README shouldn't be advertising it as a feature.
2018-10-26 09:20:42 +01:00
Nicolas Grekas
4b0e015402 [Messenger] make dispatch(), handle() and send() methods return Envelope 2018-10-26 10:10:48 +02:00
Fabien Potencier
08eaf18d99 feature #28533 [DotEnv] Add a new loadForEnv() method mimicking Ruby's dotenv behavior (dunglas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[DotEnv] Add a new loadForEnv() method mimicking Ruby's dotenv behavior

| 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 | helps for symfony/recipes#465, symfony/recipes#408
| License       | MIT
| Doc PR        | todo

This PR adds a new `loadForEnv()` method that mimics the behavior of [Create React App](https://github.com/facebook/create-react-app/blob/master/packages/react-scripts/template/README.md#what-other-env-files-can-be-used), [Rails' DotEnv](https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use) and probably some other libs:

`DotEnv::loadForEnv()` will load the following files, starting from the bottom. The first value set (or those already defined in the environment) take precedence:

- `.env` - The Original®
- `.env.dev`, `.env.test`, `.env.prod`... - Environment-specific settings.
- `.env.local` - Local overrides. This file is loaded for all environments _except_ `test`.
- `.env.dev.local`, `.env.test.local`, `.env.prod.local`... - Local overrides of environment-specific settings.

The plan is to use this method in the default SF installation (symfony/recipes#466).

Commits
-------

774a78c8de [DotEnv] Add a new loadForEnv() method mimicking Ruby's dotenv behavior
2018-10-26 08:39:44 +02:00
Samuel ROZE
61ec2814f3 feature #28943 [Messenger] Add StackInterface, allowing to unstack the call stack (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Messenger] Add `StackInterface`, allowing to unstack the call stack

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

At the moment, debugging an exception coming from a middleware is not as friendly as it could: each middleware is preceded by a noisy frame added by the `$next` callable indirection.

This PR allows removing this frame by using `$next()->handle($envelope, $next);` instead of `$next($envelope);` in a middleware. Note that this is optional so that the later continues to work. But if one wants to opt-in for the former, then the stack trace of exceptions will be freed from `$next`.

All core middleware should do this, so here they are, updated.

Commits
-------

2bc7d11ad3 [Messenger] Add `StackInterface`, allowing to unstack the call stack
2018-10-25 18:53:20 +02:00