Commit Graph

30418 Commits

Author SHA1 Message Date
Fabien Potencier
e3d99649aa bug #22207 [HttpKernel] Dont implement ServiceSubscriberInterface on *SessionListener (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[HttpKernel] Dont implement ServiceSubscriberInterface on *SessionListener

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #22171, silexphp/Silex#1496
| License       | MIT
| Doc PR        | -

Implementing `ServiceSubscriberInterface` creates a dep on the DI component, which Silex can't afford. Let's revert that part.

@GromNaN can you please confirm this fixes your issue?

Commits
-------

7cd90f5c97 [HttpKernel] Dont implement ServiceSubscriberInterface on *SessionListener
2017-03-31 16:39:57 +02:00
Fabien Potencier
19a9b2f29b bug #22216 [Component] [Yaml] [Parser] : can parse with trailing space as 2.8 (jordscream)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Component] [Yaml] [Parser] :  can parse with trailing space as 2.8

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #22193
| License       | MIT
| Doc PR        | symfony/symfony-docs

Missing rtrim method in line to parse as the version 2.8 does

Commits
-------

ce3d5ab7d1 [Component] [Yaml] [Parser] :  can parse with trailing space as 2.8
2017-03-31 16:30:03 +02:00
Fabien Potencier
b570db51b5 bug #22220 fix required Twig version (xabbuh)
This PR was merged into the 3.3-dev branch.

Discussion
----------

fix required Twig version

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

In the TwigBundle, the constraint is already correct: https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/TwigBundle/composer.json#L24

Commits
-------

70e638039c fix required Twig version
2017-03-31 16:25:29 +02:00
Nicolas Grekas
7cd90f5c97 [HttpKernel] Dont implement ServiceSubscriberInterface on *SessionListener 2017-03-30 14:49:17 +02:00
Christophe Coevoet
4d6ef9eac7 minor #22219 [FrameworkBundle] fix typo in changelog (xabbuh)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] fix typo in changelog

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

8c81f5eefe [FrameworkBundle] fix typo in changelog
2017-03-30 12:10:18 +02:00
Jordan Samouh
ce3d5ab7d1 [Component] [Yaml] [Parser] : can parse with trailing space as 2.8 2017-03-30 09:16:02 +02:00
Christian Flothmann
70e638039c fix required Twig version 2017-03-29 23:33:32 +02:00
Christian Flothmann
8c81f5eefe [FrameworkBundle] fix typo in changelog 2017-03-29 18:13:28 +02:00
Fabien Potencier
329b1819f1 minor #22186 [DI] Throw on "configured-keys <> getSubscribedServices()" mismatch (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Throw on "configured-keys <> getSubscribedServices()" mismatch

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

As reported on Slack, this creates DX issues, and provides no practical benefit. Let's throw instead of logging.

Commits
-------

4da8884ca4 [DI] Throw on "configured-keys <> getSubscribedServices()" mismatch
2017-03-29 07:30:55 +02:00
Nicolas Grekas
05d15cf4df feature #22185 [DI] Enhance DX by throwing instead of triggering a deprecation notice (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Enhance DX by throwing instead of triggering a deprecation notice

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | yes - at the config file level, for edge cases
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #22143
| License       | MIT
| Doc PR        | -

Looking at the linked issue, I'm reconsidering our decision to trigger a deprecation notice when one uses `_instanceof` or `_defaults` as a service name. While on the BC side, this is strict - on the DX side, it looks like this opens a trap where people fill fall into.

The same occurs to me with named args: instead of silently accepting invalid args as was the case before, let's throw to help DX when people do mistakes.

Last change in this PR: the complex logic required to force strings to be given as `$id` args into `Reference` or `Alias` makes no sense to me, especially considering that a `string` type hint on PHP7 will *do* a string cast.

Commits
-------

b07da3d [DI] Enhance DX by throwing instead of triggering a deprecation notice
2017-03-28 10:56:13 +02:00
Grégoire Pineau
83a0aa3700 Merge branch '3.2'
* origin/3.2:
  [Workflow] Added more PHPDoc
2017-03-28 10:49:05 +02:00
Grégoire Pineau
8f090bca12 [Workflow] Added more PHPDoc 2017-03-28 10:44:09 +02:00
Grégoire Pineau
cbb0c1809b minor #22195 [Workflow] Added more PHPDoc (lyrixx)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Workflow] Added more PHPDoc

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

---

asked by @fabpot / @HeahDude

Commits
-------

97787c6bdc [Workflow] Added more PHPDoc
2017-03-28 10:39:12 +02:00
Grégoire Pineau
97787c6bdc [Workflow] Added more PHPDoc 2017-03-28 10:29:42 +02:00
Nicolas Grekas
b07da3dc1e [DI] Enhance DX by throwing instead of triggering a deprecation notice 2017-03-28 08:18:44 +02:00
Nicolas Grekas
4da8884ca4 [DI] Throw on "configured-keys <> getSubscribedServices()" mismatch 2017-03-28 08:17:58 +02:00
Fabien Potencier
d0e904b0da Merge branch '3.2'
* 3.2:
  [Process] Fix bug which wiped or mangled env vars
2017-03-27 11:09:43 -07:00
Fabien Potencier
da7893a7bf bug #22183 [Process] Fix bug which wiped or mangled env vars (pjcdawkins)
This PR was squashed before being merged into the 3.2 branch (closes #22183).

Discussion
----------

[Process] Fix bug which wiped or mangled env vars

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

Fixing (and testing) a one-character bug introduced in a recent commit 7d21c4a2cf

Commits
-------

9439237c81 [Process] Fix bug which wiped or mangled env vars
2017-03-27 11:07:03 -07:00
Patrick Dawkins
9439237c81 [Process] Fix bug which wiped or mangled env vars 2017-03-27 11:07:02 -07:00
Nicolas Grekas
195e464d98 minor #22179 [HttpFoundation] Fix bad merge (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[HttpFoundation] Fix bad merge

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

Bad merge, code had been removed in #21465

Commits
-------

af1eed9 [HttpFoundation] Fix bad merge
2017-03-27 17:58:47 +02:00
Nicolas Grekas
af1eed92c2 [HttpFoundation] Fix bad merge 2017-03-27 16:57:37 +02:00
Nicolas Grekas
d5af0da0a7 Merge branch '3.2'
* 3.2:
  [Console] Fix test
  [HttpKernel] Fix test
  Remove port from default host in server:status command
  [Console] Escape exception messages
2017-03-27 16:51:00 +02:00
Nicolas Grekas
56d476942c Merge branch '2.8' into 3.2
* 2.8:
  [HttpKernel] Fix test
  Remove port from default host in server:status command
  [Console] Escape exception messages
2017-03-27 16:49:31 +02:00
Nicolas Grekas
a0e654d981 Merge branch '2.7' into 2.8
* 2.7:
  [HttpKernel] Fix test
  Remove port from default host in server:status command
  [Console] Escape exception messages
2017-03-27 16:49:15 +02:00
Fabien Potencier
a0c2d5f760 minor #22178 [Console] Fix test (nicolas-grekas)
This PR was merged into the 3.2 branch.

Discussion
----------

[Console] Fix test

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

To make appveyor green again.

Commits
-------

e9c3df6c94 [Console] Fix test
2017-03-27 07:45:47 -07:00
Fabien Potencier
dd3712601d minor #22177 [HttpKernel] Fix test (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpKernel] Fix test

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

Should make 2.7 green again on Travis.

Commits
-------

ba8f46ad23 [HttpKernel] Fix test
2017-03-27 07:44:58 -07:00
Fabien Potencier
46cf21506c bug #22142 [Console] Escape exception messages in renderException (chalasr)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Escape exception messages in renderException

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

Adding style on exception messages should be prevented, it leads to weird results.

> Allowing formatting in them would be a nightmare, given that Symfony itself applies some formatting when rendering the exception.

Commits
-------

cb1348231a [Console] Escape exception messages
2017-03-27 07:36:47 -07:00
Nicolas Grekas
e9c3df6c94 [Console] Fix test 2017-03-27 16:36:46 +02:00
Fabien Potencier
9ca3f23f72 minor #22174 [Config] Update PHPDoc (Ahmed TAILOULOUTE)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Config] Update PHPDoc

| 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

Commits
-------

d052c563b8 Update PHPDoc
2017-03-27 07:33:53 -07:00
Nicolas Grekas
ba8f46ad23 [HttpKernel] Fix test 2017-03-27 16:31:27 +02:00
Ahmed TAILOULOUTE
d052c563b8 Update PHPDoc 2017-03-27 15:17:59 +01:00
Fabien Potencier
615a2c5ee9 bug #22165 [WebServerBundle] Fix starting second server + port lookup (ro0NL)
This PR was squashed before being merged into the 3.3-dev branch (closes #22165).

Discussion
----------

[WebServerBundle] Fix starting second server + port lookup

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes/no
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

Before

![image](https://cloud.githubusercontent.com/assets/1047696/24333032/5edc45f6-1251-11e7-890d-e02236c1e4f2.png)

After

![image](https://cloud.githubusercontent.com/assets/1047696/24333036/6d35a8a4-1251-11e7-8317-59d1fc0dfe7b.png)

Commits
-------

37e613b459 remove unknown address argument in help text
a4345e59de [WebServerBundle] Fix starting second server + port lookup
2017-03-27 07:15:41 -07:00
Fabien Potencier
7c5e3c09e9 bug #22172 Fix port usage in server:status command (alcaeus)
This PR was merged into the 2.7 branch.

Discussion
----------

Fix port usage in server:status command

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

This fixes a bug where running `console server:status -p 8001` won't work because the port is already contained in the default value for `address`.

Commits
-------

dbcfa5c659 Remove port from default host in server:status command
2017-03-27 07:09:20 -07:00
Fabien Potencier
3cd563ad00 minor #22153 [DX] [DI] Throw more helpful error when shortcutting global classes (curry684)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DX] [DI] Throw more helpful error when shortcutting global classes

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

As discussed in #22146 the error message received when trying to use a class in the global
namespace as a service without defined class is confusing. Helpful information was added
pointing out this current limitation.

Commits
-------

b9e7b4fd61 [DependencyInjection] Throw helpful error when shortcutting global classes
2017-03-27 07:02:28 -07:00
Fabien Potencier
21827a50ed minor #22168 Fixed duplicated Console subtitle in UPGRADE file (HeahDude)
This PR was merged into the 3.3-dev branch.

Discussion
----------

Fixed duplicated Console subtitle in UPGRADE file

| Q             | A
| ------------- | ---
| Branch?       | master <!-- see comment below -->
| Bug fix?      | no
| New feature?  | no <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes (sadly not but unrelated of course)
| Fixed tickets | ~ <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | ~ <!--highly recommended for new features-->

<!--
- 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.
- Please fill in this template according to the PR you're about to submit.
- Replace this comment by a description of what your PR is solving.
-->

Commits
-------

8b850e6074 Fixed duplicated Console subtitle in UPGRADE file
2017-03-27 07:00:29 -07:00
Andreas Braun
dbcfa5c659
Remove port from default host in server:status command 2017-03-27 08:24:12 +02:00
HeahDude
8b850e6074 Fixed duplicated Console subtitle in UPGRADE file 2017-03-26 23:24:36 +02:00
Niels Keurentjes
b9e7b4fd61 [DependencyInjection] Throw helpful error when shortcutting global classes
As discussed in #22146 the error message received when trying to use a class in the global
namespace as a service without defined class is confusing. Helpful information was added
pointing out this current limitation.
2017-03-26 23:09:16 +02:00
Roland Franssen
37e613b459 remove unknown address argument in help text 2017-03-26 19:02:20 +02:00
Roland Franssen
a4345e59de [WebServerBundle] Fix starting second server + port lookup 2017-03-26 18:28:54 +02:00
Fabien Potencier
1b634746ed fixed bad merge 2017-03-26 08:53:54 -07:00
Fabien Potencier
811a6bf5eb Merge branch '3.2'
* 3.2:
  [Bridge\Doctrine] Fix change breaking doctrine-bundle test suite
  [WebProfilerBundle] Include badge status in translation tabs
  [FrameworkBundle] Cache pool clear command requires at least 1 pool
  [HttpFoundation][bugfix]  should always be initialized
  MockArraySessionStorage: updated phpdoc for $bags so that IDE autocompletion would work
  normalize paths before making them relative
  removed test that does not test anything
  fixed tests
  #21809 [SecurityBundle] bugfix: if security provider's name contains upper cases then container didn't compile
  [WebProfilerBundle] Fix for CSS attribute at Profiler Translation Page
  Set Date header in Response constructor already
  [Validator] fix URL validator to detect non supported chars according to RFC 3986
  [Security] Fixed roles serialization on token from user object
2017-03-26 08:50:20 -07:00
Fabien Potencier
dc66960f84 Merge branch '2.8' into 3.2
* 2.8:
  [Bridge\Doctrine] Fix change breaking doctrine-bundle test suite
  [HttpFoundation][bugfix]  should always be initialized
  MockArraySessionStorage: updated phpdoc for $bags so that IDE autocompletion would work
  normalize paths before making them relative
2017-03-26 08:47:15 -07:00
Fabien Potencier
d175340777 Merge branch '2.7' into 2.8
* 2.7:
  [Bridge\Doctrine] Fix change breaking doctrine-bundle test suite
  [HttpFoundation][bugfix]  should always be initialized
  MockArraySessionStorage: updated phpdoc for $bags so that IDE autocompletion would work
  normalize paths before making them relative
2017-03-26 08:40:40 -07:00
Fabien Potencier
359a0638a4 bug #22164 [Bridge\Doctrine] Fix change breaking doctrine-bundle test suite (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[Bridge\Doctrine] Fix change breaking doctrine-bundle test suite

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

Doctrine Bundle's test suite [is currently broken](https://travis-ci.org/doctrine/DoctrineBundle/jobs/215222182) with `2.8@dev` because the tests expect `addEventListener` to be called with an array as first arg, but #22001 optimized them away as string. Since internally strings are turned back into arrays, let's tweak that change and make Doctrine Bundle green again.

Commits
-------

0577c7b089 [Bridge\Doctrine] Fix change breaking doctrine-bundle test suite
2017-03-26 08:40:16 -07:00
Nicolas Grekas
0577c7b089 [Bridge\Doctrine] Fix change breaking doctrine-bundle test suite 2017-03-26 17:09:07 +02:00
Fabien Potencier
3526d23414 minor #22163 [WebProfilerBundle] Include badge status in translation tabs (ro0NL)
This PR was merged into the 3.2 branch.

Discussion
----------

[WebProfilerBundle] Include badge status in translation tabs

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | yes-ish
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

Minor consistency fix for the translation panel. Tab badges should indicate a certain status (at least the logs panel does as of 3.2). But for the missing translations (being the last tab) i think this is a good signal. And we could argue _defined_ fallback messages should really indicate a warning..

Before

![image](https://cloud.githubusercontent.com/assets/1047696/24331093/8d9b1210-122d-11e7-9403-a5a86548b214.png)

After

![image](https://cloud.githubusercontent.com/assets/1047696/24331104/bf2800b8-122d-11e7-92ea-57b2664e869f.png)

Funny sidenote; the log warning is about a missing translation 😅

Commits
-------

543ac435b8 [WebProfilerBundle] Include badge status in translation tabs
2017-03-26 08:02:38 -07:00
Roland Franssen
543ac435b8 [WebProfilerBundle] Include badge status in translation tabs 2017-03-26 14:00:52 +02:00
Fabien Potencier
6cc9dc7586 feature #22060 [DI] Add "by-id" autowiring: a side-effect free variant of it based on the class<>id convention (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Add "by-id" autowiring: a side-effect free variant of it based on the class<>id convention

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

This PR adds a new autowiring mode, based only on the class <> id convention.
This way of autowiring is free from any conflicting behavior, which is what I was looking for to begin with.

The expected DX is a bit more involving than the current way we do autowiring. But it's worth it to me, because it's plain predictable - a lot less "magic" imho.

So in this mode, for each `App\Foo` type hint, a reference to an "App\Foo" service will be created. If no such service exists, an exception will be thrown. To me, this opens a nice DX: when type hinting interfaces (which is the best practice), this will tell you when you need to create the explicit interface <> id mapping that is missing - thus encourage things to be made explicit, but only when required, and gradually, in a way that will favor discoverability by devs.

Of course, this is opt-in, and BC. You'd need to do eg in yaml: `autowire: by_id`.
For consistency, the current mode (`autowire: true`) can be configured using `autowire: by_type`.

Commits
-------

c298f2a90c [DI] Add "by-id" autowiring: a side-effect free variant of it based on the class<>id convention
2017-03-25 13:18:59 -07:00
Fabien Potencier
9896f86743 feature #22158 Revert "feature #20973 [DI] Add getter injection (nicolas-grekas)" (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

Revert "feature #20973 [DI] Add getter injection (nicolas-grekas)"

This reverts commit 2183f98f54, reversing
changes made to b465634a55.

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

Let's remove getter injection, we now have enough alternative mechanisms to achieve almost the same results (e.g. `ServiceSubscriberInterface`, see #21708)., and I'm tired being called by names because of it.

The only use case in core is `ControllerTrait`, but this should be gone if #22157 is merged.

Commits
-------

23fa3a09bf Revert "feature #20973 [DI] Add getter injection (nicolas-grekas)"
2017-03-25 12:45:22 -07:00