Commit Graph

24798 Commits

Author SHA1 Message Date
Nicolas Grekas
761d452162 fix merge 2017-04-04 21:00:33 +02:00
Nicolas Grekas
080cb5b5c2 Merge branch '3.2'
* 3.2:
  [FrameworkBundle] Update console fixtures after #22217
  Allow Upper Case property names
  fix some risky tests
  bumped Symfony version to 2.7.27
  updated VERSION for 2.7.26
  update CONTRIBUTORS for 2.7.26
  updated CHANGELOG for 2.7.26
2017-04-04 20:59:08 +02:00
Nicolas Grekas
aa46df1997 Merge branch '2.8' into 3.2
* 2.8:
  [FrameworkBundle] Update console fixtures after #22217
2017-04-04 20:55:04 +02:00
Nicolas Grekas
200b45eb43 minor #22278 [FrameworkBundle] Update console fixtures after #22217 (ro0NL)
This PR was squashed before being merged into the 2.8 branch (closes #22278).

Discussion
----------

[FrameworkBundle] Update console fixtures after #22217

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | yes (regression from #22217)
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/22217#issuecomment-291497513
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

cc @fabpot

Sorry for the inconvenience :)

Commits
-------

6e1cee6 [FrameworkBundle] Update console fixtures after #22217
2017-04-04 20:51:44 +02:00
Roland Franssen
6e1cee62b9 [FrameworkBundle] Update console fixtures after #22217 2017-04-04 20:50:26 +02:00
Nicolas Grekas
4951d3c962 Dont call sprintf() when no placeholders are used 2017-04-04 20:32:29 +02:00
Guilhem Niot
f2ef1eecef
[DI] Fix the xml schema 2017-04-04 20:13:57 +02:00
Jérôme Vasseur
4ec80b1ae8 Use IteratorArgument for voters 2017-04-04 19:58:27 +02:00
Fabien Potencier
08ef799f60 feature #22277 [DI] Add "factory" support to named args and autowiring (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Add "factory" support to named args and autowiring

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

To me, factories are expected to work named arguments.
Doing so also unlocks supporting them when autowiring, and will benefit #22187 soon.

Commits
-------

27470de62a [DI] Add "factory" support to named args and autowiring
2017-04-04 10:30:46 -07:00
Fabien Potencier
ff286d6da9 Merge branch '2.8' into 3.2
* 2.8:
  Allow Upper Case property names
  fix some risky tests
  bumped Symfony version to 2.7.27
  updated VERSION for 2.7.26
  update CONTRIBUTORS for 2.7.26
  updated CHANGELOG for 2.7.26
2017-04-04 08:30:56 -07:00
Fabien Potencier
945fee14db Merge branch '2.7' into 2.8
* 2.7:
  fix some risky tests
  bumped Symfony version to 2.7.27
  updated VERSION for 2.7.26
  update CONTRIBUTORS for 2.7.26
  updated CHANGELOG for 2.7.26
2017-04-04 08:24:26 -07:00
Fabien Potencier
a2cd63c885 minor #22267 fix some more risky tests (xabbuh)
This PR was merged into the 2.7 branch.

Discussion
----------

fix some more risky tests

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

Continuation of #22066 fixing the tests for the following components:

* Config
* Form
* HttpFoundation
* Security

Commits
-------

fffcd247b2 fix some risky tests
2017-04-04 08:21:03 -07:00
Abdellatif Ait boudad
22425b2692 [Translation] avoid creating cache files for fallback locales. 2017-04-04 16:15:29 +01:00
insekticid
2fe1631be8 Allow Upper Case property names
ReflectionExtractor::getProperties() returns $id instead of $Id. It is bad naming convention, but is possible

```
class Entity {
    protected $Id;

    public function getId()
    {
        return $this->Id;
    }
}
```

# Conflicts:
#	src/Symfony/Component/PropertyInfo/Tests/Extractors/ReflectionExtractorTest.php
#	src/Symfony/Component/PropertyInfo/Tests/Fixtures/Dummy.php
2017-04-04 08:07:48 -07:00
Fabien Potencier
6e54cdf855 bug #22261 [Console] Give errors back to error handler if not handled by console.error listeners (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Console] Give errors back to error handler if not handled by console.error listeners

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

Re-throws errors if `ConsoleErrorEvent::markErrorAsHandled()` hasn't been called so that they can reach the global error handler, fixing the BC break.

Commits
-------

5a5bf54d37 [Console] Give errors back to error handlers if not handled by console.error listeners
2017-04-04 08:00:37 -07:00
Christian Flothmann
fffcd247b2 fix some risky tests 2017-04-04 16:55:33 +02:00
Fabien Potencier
a146e4da1b feature #22276 [FrameworkBundle] Returns the kernel instance in KernelTestCase::bootKernel (lyrixx)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] Returns the kernel instance in KernelTestCase::bootKernel

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

Commits
-------

da333a035d [FrameworkBundle] Returns the kernel instance in KernelTestCase::bootKernel
2017-04-04 07:53:29 -07:00
Fabien Potencier
e47a50b7b2 Merge branch '3.2'
* 3.2:
  [Console] Fix render exception test
  [Workflow] fix risky tests
2017-04-04 07:34:05 -07:00
Fabien Potencier
6c8bdb782d minor #22270 [Console] Fix render exception test (ro0NL)
This PR was squashed before being merged into the 3.2 branch (closes #22270).

Discussion
----------

[Console] Fix render exception test

| Q             | A
| ------------- | ---
| Branch?       | 3.2 and up
| Bug fix?      | yes (regression from #22188 in master)
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/pull/22217#issuecomment-291437500
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

As pointed out by @chalasr tests are mysteriously broken.. not sure what i missed but this is apparently needed now..

cc @fabpot

Commits
-------

6b71722392 [Console] Fix render exception test
2017-04-04 07:33:43 -07:00
Roland Franssen
6b71722392 [Console] Fix render exception test 2017-04-04 07:33:42 -07:00
Nicolas Grekas
27470de62a [DI] Add "factory" support to named args and autowiring 2017-04-04 16:31:36 +02:00
Javier Eguiluz
f9087c72c8 [WebProfilerBundle] Tweaked the Cache profiler panel 2017-04-04 07:31:23 -07:00
Grégoire Pineau
da333a035d [FrameworkBundle] Returns the kernel instance in KernelTestCase::bootKernel 2017-04-04 15:38:28 +02:00
Grégoire Pineau
ada8a2948b minor #22271 [Workflow] fix risky tests (xabbuh)
This PR was merged into the 3.2 branch.

Discussion
----------

[Workflow] fix risky tests

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

Commits
-------

4e661e7a73 [Workflow] fix risky tests
2017-04-04 15:01:55 +02:00
Christian Flothmann
4e661e7a73 [Workflow] fix risky tests 2017-04-04 11:54:46 +02:00
Robin Chalas
5a5bf54d37 [Console] Give errors back to error handlers if not handled by console.error listeners 2017-04-04 10:56:16 +02:00
Nicolas Grekas
146f07471e [DI] Reduce complexity of autowiring 2017-04-04 10:21:54 +02:00
Nicolas Grekas
22bb403c20 Merge branch '3.2'
* 3.2:
  [DI] Autowiring and factories are incompatible with each others
  [DI] Don't use auto-registered services to populate type-candidates
  Lighten tests output by removing composer suggestions
  support nullable array or collection
  Complete the injection of the expression in all syntax errors
  CS: Remove invisible chars
  Disable resource tracking if the config component is missing
  [EventDispatcher] Remove unneded count()
  Fix tests expecting a valid date
  Avoid forcing to define the choices_as_values option when using choice_loader
  add expression text to SyntaxError
  [Console] Fix table cell styling
  [Console] Revised exception rendering
  Fix @param in PHPDoc
  [WebProfilerBundle] Normalize whitespace in exceptions passed in headers
  Disable color support detection for tests
  [Form] Improve the exceptions when trying to get the data in a PRE_SET_DATA listener and the data has not already been set
2017-04-04 09:47:41 +02:00
Nicolas Grekas
ccbbff2328 Merge branch '2.8' into 3.2
* 2.8:
  [DI] Autowiring and factories are incompatible with each others
  [DI] Don't use auto-registered services to populate type-candidates
  Lighten tests output by removing composer suggestions
  support nullable array or collection
  Complete the injection of the expression in all syntax errors
  CS: Remove invisible chars
  Disable resource tracking if the config component is missing
  [EventDispatcher] Remove unneded count()
  Fix tests expecting a valid date
  Avoid forcing to define the choices_as_values option when using choice_loader
  add expression text to SyntaxError
  [Console] Fix table cell styling
  [Console] Revised exception rendering
  [WebProfilerBundle] Normalize whitespace in exceptions passed in headers
  Disable color support detection for tests
  [Form] Improve the exceptions when trying to get the data in a PRE_SET_DATA listener and the data has not already been set
2017-04-04 09:26:27 +02:00
Fabien Potencier
e580c68899 bumped Symfony version to 2.7.27 2017-04-03 21:47:45 -07:00
Fabien Potencier
4cc567782e updated VERSION for 2.7.26 2017-04-03 21:31:58 -07:00
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
6b862e85c2 Merge branch '2.7' into 2.8
* 2.7:
  Complete the injection of the expression in all syntax errors
  add expression text to SyntaxError
2017-04-03 16:11:44 -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
bad24d3935 bug #22258 [DI] Autowiring and factories are incompatible with each others (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[DI] Autowiring and factories are incompatible with each others

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

Commits
-------

9b601633a7 [DI] Autowiring and factories are incompatible with each others
2017-04-03 15:14:48 -07:00
Fabien Potencier
ee10bf2daa bug #22254 [DI] Don't use auto-registered services to populate type-candidates (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[DI] Don't use auto-registered services to populate type-candidates

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no (every bug fix is a bc break, isn't it?)
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #22162, ~~#21658~~
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

Alternative to #22170 and ~~#21665~~.

The core issue fixed here is that auto-registered services should *not* be used as type-candidates.
The culprit is this line:
`$this->populateAvailableType($argumentId, $argumentDefinition);`

Doing so creates a series of wtf-issues (the linked ones), with no simple fixes (the linked PRs are just dealing with the simplest cases, but the real fix would require a reboot of autowiring for every newly discovered types.)

The other changes accommodate for the removal of the population of the `types` property, and fix a few other issues found along the way:
- variadic constructors
- empty strings injection
- tail args removal when they match the existing defaults

Commits
-------

992c677534 [DI] Don't use auto-registered services to populate type-candidates
2017-04-03 15:09:59 -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
Fabien Potencier
a9da8a3858 bug #22229 [ExpressionLanguage] Provide the expression in syntax errors (k0pernikus, stof)
This PR was merged into the 2.7 branch.

Discussion
----------

[ExpressionLanguage] Provide the expression in syntax errors

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

This finishes the PR #19449.

Commits
-------

7cd744133d Complete the injection of the expression in all syntax errors
dc55db2a9d add expression text to SyntaxError
2017-04-03 14:52:00 -07:00
Kévin Dunglas
80cea46ff1
bug #22251 [PropertyInfo] Support nullable array or collection (4rthem)
This PR was merged into the 2.8 branch.

Discussion
----------

[PropertyInfo] Support nullable array or collection

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

`@var array|null` was always considered as not nullable in the `PhpDocExtractor`.

Commits
-------

74ee588924 support nullable array or collection
2017-04-03 22:48:36 +02:00
Nicolas Grekas
d49005a651 Merge branch '2.7' into 2.8
* 2.7:
  Lighten tests output by removing composer suggestions
  CS: Remove invisible chars
  Disable resource tracking if the config component is missing
  [EventDispatcher] Remove unneded count()
  Fix tests expecting a valid date
  [Console] Fix table cell styling
  [Console] Revised exception rendering
  [WebProfilerBundle] Normalize whitespace in exceptions passed in headers
  Disable color support detection for tests
  [Form] Improve the exceptions when trying to get the data in a PRE_SET_DATA listener and the data has not already been set
2017-04-03 22:37:06 +02:00
Nicolas Grekas
9b601633a7 [DI] Autowiring and factories are incompatible with each others 2017-04-03 20:09:33 +02:00
Nicolas Grekas
992c677534 [DI] Don't use auto-registered services to populate type-candidates 2017-04-03 20:02:13 +02: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
Arthur de Moulins
74ee588924 support nullable array or collection 2017-04-03 11:21:18 +02:00
Christophe Coevoet
7cd744133d Complete the injection of the expression in all syntax errors 2017-04-03 10:58:13 +02:00
Nicolas Grekas
d518e42ec9 minor #22232 CS: Remove invisible chars (keradus)
This PR was squashed before being merged into the 2.7 branch (closes #22232).

Discussion
----------

CS: Remove invisible chars

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

I found out that we have 2 non-visible in regular IDE chars in codebase.
One is just inside a comment, it could be safely removed.
But second is inside a real code, I have replaced it with `pack`, so one won't accidentally replace non-breaking space with regular space.

Commits
-------

0f623f4 CS: Remove invisible chars
2017-04-03 10:10:25 +02:00
Dariusz Ruminski
0f623f4220 CS: Remove invisible chars 2017-04-03 10:10:21 +02:00
Nicolas Grekas
03755ee8b3 minor #22237 [EventDispatcher] Remove unneded count() (ostrolucky)
This PR was merged into the 2.7 branch.

Discussion
----------

[EventDispatcher] Remove unneded count()

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

Commits
-------

9a1915f [EventDispatcher] Remove unneded count()
2017-04-03 10:06:44 +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
Robin Chalas
75d5cb1bad Disable resource tracking if the config component is missing 2017-04-02 15:41:57 +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
Gabriel Ostrolucký
9a1915f88b [EventDispatcher] Remove unneded count() 2017-04-01 00:21:40 +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
6008489153 bug #22140 [Form] Improve the exceptions when trying to get the data in a PRE_SET_DATA listener and the data has not already been set (fancyweb)
This PR was merged into the 2.7 branch.

Discussion
----------

[Form] Improve the exceptions when trying to get the data in a PRE_SET_DATA listener and the data has not already been set

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

Commits
-------

ef39b704cc [Form] Improve the exceptions when trying to get the data in a PRE_SET_DATA listener and the data has not already been set
2017-03-31 16:36:01 +02:00
Fabien Potencier
d62b765298 bug #22217 [Console] Fix table cell styling (ro0NL)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] Fix table cell styling

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | tiny one
| BC breaks?    | no
| Deprecations? | no <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | #... <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!--highly recommended for new features-->

Fixes an issue with newlines and table cells. Remembered this little trick from @chalasr as we had it before with style blocks i believe..

```php
$table = new Table($output);
$table->setRows(array(
    array(new TableCell('<error>Dont break'."\n".'here</error>', array('colspan' => 2))),
    new TableSeparator(),
    array('foo', new TableCell('<error>Dont break'."\n".'here</error>', array('rowspan' => 2))),
    array('bar'),
));
$table->render();
```

Before

![image](https://cloud.githubusercontent.com/assets/1047696/24467857/74dacc9e-14b6-11e7-8f62-3831508ac949.png)

After

![image](https://cloud.githubusercontent.com/assets/1047696/24467923/bb578f0e-14b6-11e7-85ed-039cd73b81a0.png)

Commits
-------

53ecf8393e [Console] Fix table cell styling
2017-03-31 16:33:09 +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
fb6de49fd0 bug #22194 [Console] CommandTester: disable color support detection (julienfalque)
This PR was merged into the 2.7 branch.

Discussion
----------

[Console] CommandTester: disable color support detection

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

By default, the command tester relies on [color support guessing](3fe419cf66/src/Symfony/Component/Console/Output/StreamOutput.php (L91)) to enable output decoration.

This is an issue for tests in that guessing is done against the stream instance on Linux and against the actual environment running the test on Windows, so color support can be detected on Windows even when the used stream is a memory stream like here, resulting in non-deterministic tests.

This PR disables output decoration by default. This will only change behavior on Windows with color support, as guessing on Linux always detects color as not supported for memory streams anyway. Tests should enable decoration explicitly when they want to test it.

A better fix would be to actually detect that we are using a memory stream on Windows as well, but I'm not sure it's possible.

Commits
-------

3fe419cf66 Disable color support detection for tests
2017-03-31 14:44:27 +02:00
Christophe Coevoet
071548090b Fix tests expecting a valid date 2017-03-31 14:26:28 +02:00
Christophe Coevoet
fb4d8de5e4 Avoid forcing to define the choices_as_values option when using choice_loader
When using the choice loader, choices are ignored entirely. Forcing the dev
to add the choices_as_values just to avoid the deprecation warning (and then
to remove the option again at some point in 3.x due to deprecation) is a bad
developer experience.
2017-03-31 10:23:48 +02:00
Philipp Kretzschmar
dc55db2a9d add expression text to SyntaxError
fixes #19445
2017-03-31 09:39:36 +02:00
Nicolas Grekas
7cd90f5c97 [HttpKernel] Dont implement ServiceSubscriberInterface on *SessionListener 2017-03-30 14:49:17 +02:00
Roland Franssen
53ecf8393e [Console] Fix table cell styling 2017-03-30 10:19:40 +02:00
Jordan Samouh
ce3d5ab7d1 [Component] [Yaml] [Parser] : can parse with trailing space as 2.8 2017-03-30 09:16:02 +02:00
Robin Chalas
b21ce850e7 [Console] Allow to catch CommandNotFoundException 2017-03-29 21:37:27 +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
Fabien Potencier
11a06ccced bug #22188 [Console] Revised exception rendering (ro0NL)
This PR was squashed before being merged into the 2.7 branch (closes #22188).

Discussion
----------

[Console] Revised exception rendering

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| 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-->

Continuation of #22142, as escaping can break too i just realized.

Before

![image](https://cloud.githubusercontent.com/assets/1047696/24376962/fc85a15c-133d-11e7-90fe-a8c754cbf592.png)

After

![image](https://cloud.githubusercontent.com/assets/1047696/24377289/340a8f2e-133f-11e7-83b3-54e1ea6f46bd.png)

cc @chalasr

Commits
-------

17f1f079b2 [Console] Revised exception rendering
2017-03-29 07:27:06 +02:00
Roland Franssen
17f1f079b2 [Console] Revised exception rendering 2017-03-29 07:27:03 +02:00
Fabien Potencier
9466237db0 bug #22154 [WebProfilerBundle] Normalize whitespace in exceptions passed in headers (curry684)
This PR was merged into the 2.7 branch.

Discussion
----------

[WebProfilerBundle] Normalize whitespace in exceptions passed in headers

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

If an exception was thrown with line separators in its message the WebProfiler would cause an exception by passing it through unsanitized into the X-Debug-Error HTTP header. This commit fixes that by replacing all whitespace sequences with a single space in the header.

Commits
-------

d64679014b [WebProfilerBundle] Normalize whitespace in exceptions passed in headers
2017-03-29 07:19:30 +02:00
Jérôme Tamarelle
6ed9d0e4c1 Fix @param in PHPDoc
Errors reported by Sami API Doc generator on branch 3.2

ERROR: The "factory" @param tag variable name is wrong (should be "objectLoader") on "Symfony\Bridge\Doctrine\Form\ChoiceList\DoctrineChoiceLoader::__construct" in src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php:68
ERROR: The "objectLoader" @param tag variable name is wrong (should be "factory") on "Symfony\Bridge\Doctrine\Form\ChoiceList\DoctrineChoiceLoader::__construct" in src/Symfony/Bridge/Doctrine/Form/ChoiceList/DoctrineChoiceLoader.php:68
ERROR: "7" @param tags are expected but only "6" found on "Symfony\Bundle\WebProfilerBundle\Controller\ProfilerController::__construct" in src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php:50
ERROR: "3" @param tags are expected but only "2" found on "Symfony\Component\Asset\PathPackage::__construct" in src/Symfony/Component/Asset/PathPackage.php:35
ERROR: "2" @param tags are expected but only "1" found on "Symfony\Component\Cache\Adapter\PhpArrayAdapter::create" in src/Symfony/Component/Cache/Adapter/PhpArrayAdapter.php:64
ERROR: "3" @param tags are expected but only "1" found on "Symfony\Component\Cache\Adapter\RedisAdapter::__construct" in src/Symfony/Component/Cache/Adapter/RedisAdapter.php:39
ERROR: The "format" @param tag variable name is wrong (should be "fileLinkFormat") on "Symfony\Component\Debug\ExceptionHandler::setFileLinkFormat" in src/Symfony/Component/Debug/ExceptionHandler.php:90
ERROR: "2" @param tags are expected but only "3" found on "Symfony\Component\DependencyInjection\Compiler\Compiler::addPass" in src/Symfony/Component/DependencyInjection/Compiler/Compiler.php:73
ERROR: "2" @param tags are expected but only "3" found on "Symfony\Component\DependencyInjection\Compiler\PassConfig::addPass" in src/Symfony/Component/DependencyInjection/Compiler/PassConfig.php:97
ERROR: "2" @param tags are expected but only "3" found on "Symfony\Component\DependencyInjection\ContainerBuilder::addCompilerPass" in src/Symfony/Component/DependencyInjection/ContainerBuilder.php:311
ERROR: "2" @param tags are expected but only "3" found on "Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\DumperInterface::getProxyFactoryCode" in src/Symfony/Component/DependencyInjection/LazyProxy/PhpDumper/DumperInterface.php:41
ERROR: "0" @param tags are expected but only "1" found on "Symfony\Component\HttpFoundation\Request::isMethodSafe" in src/Symfony/Component/HttpFoundation/Request.php:1458
ERROR: "5" @param tags are expected but only "6" found on "Symfony\Component\Serializer\Normalizer\AbstractNormalizer::instantiateObject" in src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php:291
2017-03-28 23:38:24 +02:00
Niels Keurentjes
d64679014b [WebProfilerBundle] Normalize whitespace in exceptions passed in headers
If an exception was thrown with line separators in its message the
WebProfiler would cause an exception by passing it through unsanitized
into the X-Debug-Error HTTP header. This commit fixes that by replacing
all whitespace sequences with a single space in the header.
2017-03-28 22:44:31 +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
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
Julien Falque
3fe419cf66
Disable color support detection for tests 2017-03-28 08:19:43 +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
Patrick Dawkins
9439237c81 [Process] Fix bug which wiped or mangled env vars 2017-03-27 11:07:02 -07:00
HeahDude
b5b56fcbac [Form] Deprecated usage of "choices" option in sub types 2017-03-27 18:52:54 +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
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