Commit Graph

30155 Commits

Author SHA1 Message Date
Fabien Potencier
5eae2c7005 feature #21978 [DoctrineBridge][Routing] Require PSR-11 container instead of Symfony container (enumag)
This PR was squashed before being merged into the 3.3-dev branch (closes #21978).

Discussion
----------

[DoctrineBridge][Routing] Require PSR-11 container instead of Symfony container

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

The changed classes can easily use PSR-11 container instead of normal symfony container.

I didn't change any classes that have the `$container` property as protected (for example `Symfony\Bundle\FrameworkBundle\Translation\Translator`) because I'm unsure whether that would be considered a BC break. Let me know if you want me to change such classes as well.

Commits
-------

0043653ea8 [DoctrineBridge][Routing] Require PSR-11 container instead of Symfony container
2017-03-12 08:32:33 -07:00
Jáchym Toušek
0043653ea8 [DoctrineBridge][Routing] Require PSR-11 container instead of Symfony container 2017-03-12 08:32:31 -07:00
Nicolas Grekas
7062e7408a Merge branch '2.8' into 3.2
* 2.8:
  [VarDumper] Add missing isset() checks in some casters
  [Form] Choice type int values (BC Fix)
2017-03-12 16:26:38 +01:00
Fabien Potencier
3c37037138 Merge branch '2.7' into 2.8
* 2.7:
  [Form] Choice type int values (BC Fix)
2017-03-12 08:18:05 -07:00
Nicolas Grekas
d1cadf0dfa bug #21976 [VarDumper] Add missing isset() checks in some casters (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[VarDumper] Add missing isset() checks in some casters

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

870c26f [VarDumper] Add missing isset() checks in some casters
2017-03-11 09:32:51 +01:00
Nicolas Grekas
7cbbd8fad4 bug #21973 [VarDumper] Add missing isset() checks in some casters (nicolas-grekas)
This PR was merged into the 3.2 branch.

Discussion
----------

[VarDumper] Add missing isset() checks in some casters

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

As spotted by @lyrixx, this is what's causing high mem use on 3.2.
Fix coming to 2.7 (which has very different code base, thus dedicated PR).

Commits
-------

8f0edfb [VarDumper] Add missing isset() checks in some casters
2017-03-11 09:18:47 +01:00
Nicolas Grekas
870c26f39b [VarDumper] Add missing isset() checks in some casters 2017-03-11 09:16:36 +01:00
Nicolas Grekas
8f0edfb10f [VarDumper] Add missing isset() checks in some casters 2017-03-10 23:26:11 +01:00
Fabien Potencier
641092fa16 bug #21957 [Form] Choice type int values (BC Fix) (mcfedr)
This PR was squashed before being merged into the 2.7 branch (closes #21957).

Discussion
----------

[Form] Choice type int values (BC Fix)

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

#21267 unnecessarily forced all choice values to be strings, this was a BC braking change.

Everything can work fine if they are strings or ints. specifically the issue was because `array_flip` is used on the `choices` array, but this function will work fine with ints as well as strings.

Normally, when using HTML forms all data comes as strings, but the `symfony/form` component has use cases beyond this, specifically, I use it with JSON data, where valid values for a `ChoiceType` might not be strings.

Commits
-------

ed211e9c74 [Form] Choice type int values (BC Fix)
2017-03-10 11:10:40 -08:00
Fred Cox
ed211e9c74 [Form] Choice type int values (BC Fix) 2017-03-10 11:10:39 -08:00
Fabien Potencier
dd7c72728a minor #21965 [DependencyInjection Remove duplicated code (GuilhemN)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DependencyInjection Remove duplicated code

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

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

Arrays are already supported by `YamlFileLoader::resolveServices()` so there's no need to duplicate code.

Commits
-------

1bac3d722d [DependencyInjection Remove duplicated code
2017-03-10 11:07:15 -08:00
Fabien Potencier
e57af1d0f9 minor #21964 [PropertyInfo] Move CHANGELOG.md to the root (GuilhemN)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[PropertyInfo] Move CHANGELOG.md to the root

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

Moves the CHANGELOG of the PropertyInfo Component from the DependencyInjection subdirectory to the component's root.

Commits
-------

d5d3f4285b [PropertyInfo] Move CHANGELOG.md to the root
2017-03-10 11:06:28 -08:00
Fabien Potencier
5af9315684 bumped Symfony version to 3.2.7 2017-03-10 10:53:31 -08:00
Fabien Potencier
b0f8a7fa4b Merge pull request #21966 from fabpot/release-3.2.6
released v3.2.6
2017-03-10 10:35:48 -08:00
Fabien Potencier
762dbb13c3 updated VERSION for 3.2.6 2017-03-10 10:35:31 -08:00
Fabien Potencier
f89b9e7894 updated CHANGELOG for 3.2.6 2017-03-10 10:30:45 -08:00
Guilhem Niot
1bac3d722d
[DependencyInjection Remove duplicated code 2017-03-10 18:41:49 +01:00
Guilhem Niot
d5d3f4285b
[PropertyInfo] Move CHANGELOG.md to the root 2017-03-10 18:23:09 +01:00
Grégoire Pineau
ab3b12d6dc [FrameworkBundle][Workflow] Add a way to register a guard expression in the configuration 2017-03-10 11:19:28 +01:00
Grégoire Pineau
aaa1437e3d feature #21950 [Workflow] Added fluent interface to the DefinitionBuilder (lyrixx)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Workflow] Added fluent interface to the DefinitionBuilder

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

---

It seems more logic to me to have this fluent interface.

Commits
-------

4c8963c6ff [Workflow] Added fluent interface to the DefinitionBuilder
2017-03-10 10:57:48 +01:00
Grégoire Pineau
b385ef1625 feature #21933 [FrameworkBundle][Workflow] Add a way to enable the AuditTrail Logger (lyrixx)
This PR was squashed before being merged into the 3.3-dev branch (closes #21933).

Discussion
----------

[FrameworkBundle][Workflow] Add a way to enable the AuditTrail Logger

| 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 will increase the visibility of the Listener. We could encourage people to use at least  `%kernel.debug%` value.

---

Note for the merge: There are two commits, this is done on purpose (2 different things, but easier to do only one PR)

Commits
-------

633c0393b3 [Workflow] Added the workflow name in log generated by AuditTrailListener
b786bccb3a [FrameworkBundle][Workflow] Add a way to enable the AuditTrail Logger
2017-03-10 10:44:46 +01:00
Grégoire Pineau
4c8963c6ff [Workflow] Added fluent interface to the DefinitionBuilder 2017-03-10 10:37:28 +01:00
Nicolas Grekas
b77d97a6a3 bug #21937 [DependencyInjection] Handle void return types in closure-proxy (pierredup)
This PR was squashed before being merged into the 3.3-dev branch (closes #21937).

Discussion
----------

[DependencyInjection] Handle void return types in closure-proxy

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

I recently got an error when registering an event listener that specifies a `void` return type. Dumping the container generates a closure proxy that always returns a value, which then conflicts with the return type hint.

E.G the following code is generated (some class names removed for readability)

```
$instance->addListener('kernel.view', /** @closure-proxy ... */ function (...\GetResponseForControllerResultEvent $event): void {
    return ${($_ = isset($this->services[listener']) ? $this->services['listener'] : $this->get('listener')) && false ?: '_'}->onKernelView($event);
}, 128);
```

This then causes the error `A void function must not return a value in ...`

So void return types should be handled by removing the `return` inside the closure

Commits
-------

a5c5ad1 [DependencyInjection] Handle void return types in closure-proxy
2017-03-10 10:24:40 +01:00
Pierre du Plessis
a5c5ad1db1 [DependencyInjection] Handle void return types in closure-proxy 2017-03-10 10:24:38 +01:00
Fabien Potencier
063c8c347e bug #21930 [Cache] Cached files rely on umask (4rthem)
This PR was merged into the 3.2 branch.

Discussion
----------

[Cache] Cached files rely on umask

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

Commits
-------

865a6af153 cached files rely on umask
2017-03-09 15:58:00 -08:00
Nicolas Grekas
add5793e5f bug #21946 Use PHPUnit 5.4 instead of 5.3 (j0k3r)
This PR was merged into the 3.2 branch.

Discussion
----------

Use PHPUnit 5.4 instead of 5.3

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

PHPUnit 5.3 doesn't have the forward compatibility layer for PHPUnit 6 so that `PHPUnit\Framework\TestCase` can be used instead of `PHPUnit_Framework_TestCase`.

This generates an error when upgrading to Symfony 3.2.5 without forcing the `SYMFONY_PHPUNIT_VERSION` const:

```
Class 'PHPUnit\Framework\TestCase' not found in vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php on line 25
```

This was introduced by c9684ad31f (from https://github.com/symfony/symfony/pull/21564) in 3.2.5

(Discussion started on Slack: https://symfony-devs.slack.com/archives/support/p1489058629011510)

Commits
-------

fca16ba Use PHPUnit 5.4 instead of 5.3
2017-03-09 14:20:22 +01:00
Jeremy Benoist
fca16bab53
Use PHPUnit 5.4 instead of 5.3
PHPUnit 5.3 doesn't have the forward compatibility layer for PHPUnit 6 so that `PHPUnit\Framework\TestCase` can be used instead of `PHPUnit_Framework_TestCase`.
This generates an error when upgrading to Symfony 3.2.5 without forcing the `SYMFONY_PHPUNIT_VERSION` const:

```
Class 'PHPUnit\Framework\TestCase' not found in vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php on line 25
```

This was introduced by c9684ad31f in 3.2.5
2017-03-09 13:58:16 +01:00
Nicolas Grekas
64f9f7b193 bug #21927 [FrameworkBundle] Add missing resource tracking for validation mapping (chalasr)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] Add missing resource tracking for validation mapping

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

https://github.com/symfony/symfony/pull/21927/files?w=1

Commits
-------

0a19cbe Add missing resource tracking for validation mapping
2017-03-09 11:46:22 +01:00
Nicolas Grekas
5b1a96a363 bug #21942 [DI] Fix dumping null ServiceClosureArgument (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[DI] Fix dumping null ServiceClosureArgument

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

Commits
-------

35977fd [DI] Fix dumping null ServiceClosureArgument
2017-03-09 11:23:16 +01:00
Robin Chalas
0a19cbe906 Add missing resource tracking for validation mapping 2017-03-09 11:23:13 +01:00
Nicolas Grekas
24f36b6c44 bug #21936 [PropertyAccess] Use ArrayAdapter in debug mode (chalasr)
This PR was merged into the 3.2 branch.

Discussion
----------

[PropertyAccess] Use ArrayAdapter in debug mode

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

https://github.com/symfony/symfony/pull/21936/files?w=1

Commits
-------

dca3f36 [PropertyAccess] Use ArrayAdapter in debug mode
2017-03-09 11:20:43 +01:00
Robin Chalas
dca3f365d7 [PropertyAccess] Use ArrayAdapter in debug mode 2017-03-09 10:04:18 +01:00
Nicolas Grekas
35977fdf0a [DI] Fix dumping null ServiceClosureArgument 2017-03-09 09:35:59 +01:00
Fabien Potencier
e2965c2d30 bumped Symfony version to 3.2.6 2017-03-08 18:27:39 -08:00
Fabien Potencier
463b6558ce Merge pull request #21939 from fabpot/release-3.2.5
released v3.2.5
2017-03-08 18:03:55 -08:00
Fabien Potencier
7ee31a7b2d updated VERSION for 3.2.5 2017-03-08 18:01:51 -08:00
Fabien Potencier
f8f10c6724 updated CHANGELOG for 3.2.5 2017-03-08 18:01:40 -08:00
Fabien Potencier
7f6f402fad Merge branch '3.2'
* 3.2:
  [Workflow] Delete dead code
  Rename StackOverflow to Stack Overflow
  [travis] Test with hhvm 3.18
  [Workflow] Fixed marking state on leave and enter events
2017-03-08 17:48:13 -08:00
Fabien Potencier
575b7987bf Merge branch '2.8' into 3.2
* 2.8:
  Rename StackOverflow to Stack Overflow
  [travis] Test with hhvm 3.18
2017-03-08 17:47:54 -08:00
Fabien Potencier
25a2ce062b Merge branch '2.7' into 2.8
* 2.7:
  Rename StackOverflow to Stack Overflow
  [travis] Test with hhvm 3.18
2017-03-08 17:47:20 -08:00
Fabien Potencier
fe995a3bc9 bug #21922 [FrameworkBundle] Fix autoloader in insulated clients (nicolas-grekas)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[FrameworkBundle] Fix autoloader in insulated clients

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

Related to the deprecation of the class loader component:
the `Client` already uses this code in `HttpKernel`, but `FrameworkBundle` is missing the same update.
Spotted while debugging the hhvm 3.18 issue (the chain is: `ComposerResource` sees different vendors, thus says the kernel cache is not fresh, thus it is rebuild, thus we hit https://github.com/facebook/hhvm/issues/7722).

Commits
-------

414ac5d976 [FrameworkBundle] Fix autoloader in insulated clients
2017-03-08 11:43:39 -08:00
Fabien Potencier
a0945fc182 bug #21923 [travis] Test with hhvm 3.18 (nicolas-grekas)
This PR was merged into the 2.7 branch.

Discussion
----------

[travis] Test with hhvm 3.18

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

Needs #21922 on master to be green also.
Works around  facebook/hhvm#7722.

Commits
-------

7f1f0cb630 [travis] Test with hhvm 3.18
2017-03-08 11:42:39 -08:00
Grégoire Pineau
633c0393b3 [Workflow] Added the workflow name in log generated by AuditTrailListener 2017-03-08 17:23:28 +01:00
Grégoire Pineau
b786bccb3a [FrameworkBundle][Workflow] Add a way to enable the AuditTrail Logger 2017-03-08 17:21:33 +01:00
Grégoire Pineau
aabed215e0 feature #21925 [Workflow] Added the workflow name to all events dispatched (lyrixx)
This PR was merged into the 3.3-dev branch.

Discussion
----------

[Workflow] Added the workflow name to all events dispatched

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

Commits
-------

b3400c7312 [Workflow] Added the workflow name to all events dispatched
2017-03-08 15:34:54 +01:00
Grégoire Pineau
2fad5affe6 minor #21913 [Workflow] Delete dead code (lyrixx)
This PR was merged into the 3.2 branch.

Discussion
----------

[Workflow] Delete dead code

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

---

Me (and all reviewers ;) ) totally miss this class. It has never been used and there are no reason to use it anyway. It's just a relic from the designing of the Component. Sorry.

I really don't think it deserves a deprecation as the component is quite new, and it is really some dead code.

Commits
-------

28e85cc32a [Workflow] Delete dead code
2017-03-08 15:32:26 +01:00
Grégoire Pineau
b3400c7312 [Workflow] Added the workflow name to all events dispatched 2017-03-08 15:21:36 +01:00
Grégoire Pineau
ce0fda64d7 bug #21793 [Workflow] Fixed marking state on leave and enter events (HeahDude)
This PR was merged into the 3.2 branch.

Discussion
----------

[Workflow] Fixed marking state on leave and enter events

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | ~
| License       | MIT
| Doc PR        | related to https://github.com/symfony/symfony-docs/pull/7528

It seems weird to me to dispatch an event while the marking is not yet marked by the new places.
The event is still "marked" by old places when leaving occurs, my guess is that the symmetry should be mirrored.

Do you agree? Should I add a test?

Commits
-------

175858a67e [Workflow] Fixed marking state on leave and enter events
2017-03-08 15:16:21 +01:00
Arthur de Moulins
865a6af153 cached files rely on umask 2017-03-08 13:16:26 +01:00
Grégoire Pineau
28e85cc32a [Workflow] Delete dead code 2017-03-08 11:36:52 +01:00