Commit Graph

30434 Commits

Author SHA1 Message Date
Fabien Potencier
83fc742b9d feature #22238 [BC BREAK][HttpFoundation] Request::setTrustedProxies() takes a new required $trustedHeaderSet argument (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[BC BREAK][HttpFoundation] Request::setTrustedProxies() takes a new required $trustedHeaderSet argument

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

As discussed in linked issue, and already deprecated by #21830

Commits
-------

72e28957e2 [BC BREAK][HttpFoundation] Request::setTrustedProxies() takes a new required $trustedHeaderSet argument
2017-04-03 16:22:00 -07:00
Fabien Potencier
0d85a99e18 minor #22224 Fix HttpCache test (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

Fix HttpCache test

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | no
| Fixed tickets | https://github.com/symfony/symfony/pull/22043#discussion_r107864054
| License       | MIT
| Doc PR        | n/a

will make appveyor green.

Commits
-------

3178f50594 Fix failing HttpCache test on windows
2017-04-03 15:52:28 -07:00
Fabien Potencier
2450449605 feature #22175 [DI] add ServiceLocatorTagPass::register() to share service locators (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] add ServiceLocatorTagPass::register() to share service locators

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

Right now, one service locator is created per controller / service subscriber. But since service locators are stateless, this is just wasting resources when several controllers have the exact same set of services managed by their locators (as would be the case when registering the new `AbstractController` as a service subscribers).

This PR fixes this issue, and a few related others found along the way.

Commits
-------

8ff764be82 [DI] add ServiceLocatorTagPass::register() to share service locators
2017-04-03 15:47:57 -07:00
Fabien Potencier
88c587df78 bug #22223 [DI] Dont trigger deprecation for event_dispatcher service (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Dont trigger deprecation for event_dispatcher service

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

Mute deprecations for the event_dispatcher service keeping only relevant ones i.e when the api of the deprecated class is used intentionally, ugly but prevent breaking test suites like the [LexikJWTAuthenticationBundle one](https://travis-ci.org/lexik/LexikJWTAuthenticationBundle/jobs/216664013#L278).

Commits
-------

a49fe25fa3 [DI] Dont trigger deprecation for event_dispatcher service
2017-04-03 15:45:37 -07:00
Fabien Potencier
fe71e8d233 minor #22137 [Serializer][XmlEncoder] Added a FORMAT constant (Zarcox)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Serializer][XmlEncoder] Added a FORMAT constant

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

Added a FORMAT constant in the XmlEncoder class to normalize it like other Encoder classes.

Commits
-------

0a0901b8bc [Serializer] Added a FORMAT constant in the XmlEncoder class
2017-04-03 15:04:25 -07:00
Grégoire Pineau
47740ce2d5 feature #22180 [Workflow] Added 'workflow_marked_places' twig function (lyrixx)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Workflow] Added 'workflow_marked_places' twig function

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

---

When someone uses a custom MarkingStore, the value in the
$subject::marking can be really different from the value inside
Marking::getPlaces(). This occurs, for example, when the value stored in
the subject is a bit mask.

So it's always safer to get the places names from the marking, and so
with this new function.

---

usage:
```twig
{{ workflow_marked_places(post)|join(',') }}
```

Commits
-------

ead6f142bb [Workflow] Added 'workflow_marked_places' twig function
2017-04-03 16:20:48 +02:00
Nicolas Grekas
72e28957e2 [BC BREAK][HttpFoundation] Request::setTrustedProxies() takes a new required $trustedHeaderSet argument 2017-04-03 11:58:17 +02:00
Robin Chalas
3178f50594 Fix failing HttpCache test on windows 2017-04-03 11:40:19 +02:00
Robin Chalas
a49fe25fa3 [DI] Dont trigger deprecation for event_dispatcher service 2017-04-03 11:37:23 +02:00
Fabien Potencier
ae7bcaeb96 minor #22121 [Lock] Simplify BlockingTest (jderusse)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Lock] Simplify BlockingTest

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

Commits
-------

7130dd8296 Simplify BlockingTest
2017-04-02 19:33:59 +02:00
Fabien Potencier
365716d9dc minor #22236 [Lock] Add missing message in Exceptions (jderusse)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Lock] Add missing message in Exceptions

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

Commits
-------

d35db5db29 Add message in exception
2017-04-02 19:32:40 +02:00
Jérémy Derussé
7130dd8296
Simplify BlockingTest 2017-04-01 22:15:43 +02:00
Jérémy Derussé
d35db5db29
Add message in exception 2017-04-01 21:40:43 +02:00
Nicolas Grekas
8ff764be82 [DI] add ServiceLocatorTagPass::register() to share service locators 2017-04-01 13:57:21 +02:00
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
Grégoire Pineau
ead6f142bb [Workflow] Added 'workflow_marked_places' twig function
When someone uses a custom MarkingStore, the value in the
$subject::marking can be really different from the value inside
Marking::getPlaces(). This occurs, for example, when the value stored in
the subject is a bit mask.

So it's always safer to get the places names from the marking, and so
with this new function.
2017-03-29 14:29:58 +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