Commit Graph

30506 Commits

Author SHA1 Message Date
Fabien Potencier
24b1b0d908 fixed wording 2017-04-04 12:45:53 -07:00
Fabien Potencier
ab624f1c38 feature #21437 [Security] Use IteratorArgument for voters (jvasseur)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Security] Use IteratorArgument for voters

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

Use an IteratorArgument for injecting voters into the AccessDecisionManager.

Commits
-------

4ec80b1ae8 Use IteratorArgument for voters
2017-04-04 12:44:44 -07:00
Nicolas Grekas
7aee0aeaf5 Merge branch '3.2'
* 3.2:
  fix merge
2017-04-04 21:00:44 +02:00
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
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
Fabien Potencier
247e797550 bug #22265 Allow Upper Case property names (insekticid)
This PR was submitted for the master branch but it was merged into the 2.8 branch instead (closes #22265).

Discussion
----------

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;
    }
}
```

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

https://github.com/api-platform/core/issues/1026

Commits
-------

2fe1631be8 Allow Upper Case property names
2017-04-04 08:07:48 -07: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
Fabien Potencier
b0b9bed805 minor #22272 [WebProfilerBundle] Tweaked the Cache profiler panel (javiereguiluz)
This PR was squashed before being merged into the 3.3-dev branch (closes #22272).

Discussion
----------

[WebProfilerBundle] Tweaked the Cache profiler panel

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

Main changes:

---

1) When there are no calls in a cache pool, now we display less information:

| Before / After
| ---
| ![before-empty-pool](https://cloud.githubusercontent.com/assets/73419/24652670/fdaa22f6-1932-11e7-8075-1fbcb8f333e2.png)
| ![after-empty-pool](https://cloud.githubusercontent.com/assets/73419/24652672/ffbe3816-1932-11e7-920f-5e0fdd880953.png)

---

2) The "call list" is now displayed in a more compact way:

![after-compact-call-list](https://cloud.githubusercontent.com/assets/73419/24652706/1dfed9fc-1933-11e7-9b56-b453bf87a2ea.png)

Comparison:

| Before | After
| --- | ---
| ![before-call-list](https://cloud.githubusercontent.com/assets/73419/24652721/2935a3d2-1933-11e7-96a5-3bffb93807a1.png) | ![after-call-list](https://cloud.githubusercontent.com/assets/73419/24652723/2aa77466-1933-11e7-9e41-70656b42f086.png)

---

@ro0NL I know that you had a discussion about showing 0% or n/a for the ratio when there are no calls. You settled for `n/a` ... but as you can see, using `0%` allows to simplify templates ... and is still technically correct. I hope you understand it.

Commits
-------

f9087c72c8 [WebProfilerBundle] Tweaked the Cache profiler panel
2017-04-04 07:31:24 -07: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
4a5f22bc1e feature #22256 [DI] Reduce complexity of autowiring (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Reduce complexity of autowiring

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

- optional args are autowired
- methods with only optional args are autowired
- default values of required args when possible

Both first changes remove the behavior delta between constructors and setters, and is expected to me now that things are more explicit. This reduces the "know-how" requirements for using autowiring and is easier to get correct intuitively. The 3rd change plays nice with named args.

Commits
-------

146f074 [DI] Reduce complexity of autowiring
2017-04-04 10:31:31 +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
103414623c Merge pull request #22263 from fabpot/release-2.7.26
released v2.7.26
2017-04-03 21:32:30 -07:00
Fabien Potencier
4cc567782e updated VERSION for 2.7.26 2017-04-03 21:31:58 -07:00
Fabien Potencier
c06f35e4eb update CONTRIBUTORS for 2.7.26 2017-04-03 21:31:39 -07:00
Fabien Potencier
8cf344b2af updated CHANGELOG for 2.7.26 2017-04-03 21:27:56 -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