Commit Graph

32238 Commits

Author SHA1 Message Date
Harold Iedema
cadbed301f [Console] Log exit codes as debug messages instead of errors 2017-08-08 12:48:54 +02:00
Nicolas Grekas
91332a0997 minor #23821 Fixed UPGRADE-4.0 about Container::set (lyrixx)
This PR was merged into the 3.3 branch.

Discussion
----------

Fixed UPGRADE-4.0 about Container::set

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

Commits
-------

0a61279 Fixed UPGRADE-4.0 about Container::set
2017-08-08 08:06:57 +02:00
Nicolas Grekas
fea348c7c4 fix typo 2017-08-07 21:17:34 +02:00
Nicolas Grekas
09272ff0f7 fix bad merge 2017-08-07 20:31:05 +02:00
Grégoire Pineau
0a612799d7 Fixed UPGRADE-4.0 about Container::set 2017-08-07 19:05:52 +02:00
Fabien Potencier
100fe4e97e feature #23741 [DI] Generate one file per service factory (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Generate one file per service factory

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

See #23678 for background on this proposal.

Commits
-------

4037009490 [DI] Generate one file per service factory
2017-08-07 18:48:44 +02:00
Nicolas Grekas
0effd2738b feature #23807 [Debug] Trigger a deprecation when using an internal class/trait/interface (GuilhemN)
This PR was squashed before being merged into the 3.4 branch (closes #23807).

Discussion
----------

[Debug] Trigger a deprecation when using an internal class/trait/interface

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | yes <!-- don't forget updating src/**/CHANGELOG.md files -->
| BC breaks?    | no
| Deprecations? | not truly <!-- don't forget updating UPGRADE-*.md files -->
| Tests pass?   | yes
| Fixed tickets | https://github.com/symfony/symfony/issues/23800
| License       | MIT
| Doc PR        |

Trigger a deprecation when the user uses an internal class/trait/interface.
The deprecation is not triggered when an `@internal` is used in the same vendor.

Commits
-------

b89ba29 [Debug] Trigger a deprecation when using an internal class/trait/interface
2017-08-07 14:30:55 +02:00
Guilhem Niot
b89ba293dd [Debug] Trigger a deprecation when using an internal class/trait/interface 2017-08-07 14:30:49 +02:00
Nicolas Grekas
df78a7304b Merge branch '3.3' into 3.4
* 3.3:
  Hash cache keys on save
  [HttpKernel] Remove isset call used for legacy
2017-08-07 13:18:35 +02:00
Grégoire Pineau
6c0e48d702 feature #22587 [Workflow] Add transition completed event (izzyp)
This PR was merged into the 3.4 branch.

Discussion
----------

[Workflow] Add transition completed event

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

---

Because the "entered" event is the only event dispatched after the new marking is applied, and publish's an event upon entering into a "Place" (as opposed to completing a transition), it is not sufficient for a lot of use cases and is causing bugs.

Example:
Enabled Transitions:
1. A -> B
2. B -> C
3. C -> B

Transition 1 and transition 3, will dispatch an "entered" event on Place B, forcing post transition behaviour to be the same for both transition 1 and 3.

A user might need different behaviour depending on the transition, rather the the destination.
A concrete use case would be when applying an "undo" transition to a subject. One may or may not want to re-trigger all the events associated with the original transition to that Place.

I propose adding a "completed" event (ie. Transition completed) in addition to the entered event.

Commits
-------

c254cac [Workflow] Added an transition completed event
2017-08-07 12:16:44 +02:00
izzyp
c254cacdc5 [Workflow] Added an transition completed event 2017-08-07 10:31:57 +02:00
Jérémy Derussé
29538b621c
Ignore memcached missing key error on dession destroy 2017-08-07 09:30:13 +02:00
Nicolas Grekas
267b016415 bug #23763 [Cache] Hash cache key on save (lstrojny)
This PR was merged into the 3.3 branch.

Discussion
----------

[Cache] Hash cache key on save

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

Cache keys are not hashed right now in adapters extending from `AbstractAdapter`. This PR fixes this. I am not familiar enough with the cache test suite so I don't know where to add an regression test.

Commits
-------

94b1b12 Hash cache keys on save
2017-08-07 09:04:14 +02:00
Lars Strojny
94b1b12b55 Hash cache keys on save 2017-08-07 09:02:07 +02:00
Nicolas Grekas
99806c5da3 minor #23803 [HttpKernel] Remove isset call used for legacy (ogizanagi)
This PR was merged into the 3.3 branch.

Discussion
----------

[HttpKernel] Remove isset call used for legacy

| Q             | A
| ------------- | ---
| Branch?       | 3.3 <!-- 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
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

Added in #9628 in which the request stack dependency was nullable. Forgotten to be removed in #14634.

Commits
-------

e0a6010 [HttpKernel] Remove isset call used for legacy
2017-08-07 08:27:12 +02:00
Nicolas Grekas
4037009490 [DI] Generate one file per service factory 2017-08-06 20:25:40 +02:00
Nicolas Grekas
266d9d375e minor #23801 Continuation of #23624 (ro0NL)
This PR was squashed before being merged into the 3.4 branch (closes #23801).

Discussion
----------

Continuation of #23624

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

See https://github.com/symfony/symfony/pull/23624#discussion_r131539736

cc @chalasr

Also included service injection for init:acl + set:acl and simplification of lint:xliff + lintt:yaml.

Btw, i think init:acl needs to be renamed to acl:init :)

Commits
-------

5f637c1 Continuation of #23624
2017-08-06 20:13:25 +02:00
Roland Franssen
5f637c1629 Continuation of #23624 2017-08-06 20:13:14 +02:00
Maxime Steinhausser
b31542eb22 [FrameworkBundle] Allow micro kernel to subscribe events easily 2017-08-06 20:06:06 +02:00
Nicolas Grekas
8be06c45f9 Merge branch '3.3' into 3.4
* 3.3:
  [Profiler] Fix request_collector check in main layout
  Github template: Remove EOM 3.2 from branch suggestion
  [Security] Fix security.interactive_login event const doc block
  Update Container.php: Deprecated -> @deprecated
  allow phpdocumentor/reflection-docblock >=3.2.1
  Avoid infinite loops when profiler data is malformed
  [FrameworkBundle] Warmup annotations for bundle-less controllers and entities
  [HttpFoundation] Generate safe fallback filename for wrongly encoded filename
2017-08-06 15:42:33 +02:00
Nicolas Grekas
049785b11b Merge branch '2.8' into 3.3
* 2.8:
  Github template: Remove EOM 3.2 from branch suggestion
  [Security] Fix security.interactive_login event const doc block
  Avoid infinite loops when profiler data is malformed
  [HttpFoundation] Generate safe fallback filename for wrongly encoded filename
2017-08-06 15:42:17 +02:00
Nicolas Grekas
684975ddf3 Merge branch '2.7' into 2.8
* 2.7:
  Github template: Remove EOM 3.2 from branch suggestion
  [Security] Fix security.interactive_login event const doc block
  Avoid infinite loops when profiler data is malformed
  [HttpFoundation] Generate safe fallback filename for wrongly encoded filename
2017-08-06 15:41:54 +02:00
Nicolas Grekas
695266fd0e minor #23804 Github template: Remove EOM 3.2 from branch suggestion (ogizanagi)
This PR was merged into the 2.7 branch.

Discussion
----------

Github template: Remove EOM 3.2 from branch suggestion

| Q             | A
| ------------- | ---
| Branch?       | 2.7 <!-- 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
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

As 3.2 is EOM since the 31 July (appart for security fixes of course)

Commits
-------

30eed99 Github template: Remove EOM 3.2 from branch suggestion
2017-08-06 15:41:33 +02:00
Nicolas Grekas
a9c01dd437 bug #23806 [Profiler] Fix request_collector check in main layout (ogizanagi)
This PR was merged into the 3.3 branch.

Discussion
----------

[Profiler] Fix request_collector check in main layout

| Q             | A
| ------------- | ---
| Branch?       | 3.3 <!-- see comment below -->
| Bug fix?      | yes
| 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 | N/A <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

I minor issue I hit when debugging and disabling some collectors some time ago.

Commits
-------

c35cdba [Profiler] Fix request_collector check in main layout
2017-08-06 15:40:25 +02:00
Maxime Steinhausser
c35cdba6d2 [Profiler] Fix request_collector check in main layout 2017-08-06 15:12:58 +02:00
Robin Chalas
2ccafaf372 minor #23802 [Security] Fix security.interactive_login event const doc block (ogizanagi)
This PR was merged into the 2.7 branch.

Discussion
----------

[Security] Fix security.interactive_login event const doc block

| Q             | A
| ------------- | ---
| Branch?       | 2.7 <!-- 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
| Fixed tickets | N/A <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

I'd suggest to reuse the explanation we give about this event [on the docs](http://symfony.com/doc/2.7/components/security/authentication.html#security-events) because the current one in the code is misleading: this event is not triggered for http basic/digest authentication for instance.

Commits
-------

f6c83cf [Security] Fix security.interactive_login event const doc block
2017-08-06 14:09:04 +02:00
Maxime Steinhausser
30eed995b4 Github template: Remove EOM 3.2 from branch suggestion 2017-08-06 14:05:07 +02:00
Maxime Steinhausser
e0a601092b [HttpKernel] Remove isset call used for legacy 2017-08-06 14:00:34 +02:00
Maxime Steinhausser
f6c83cf518 [Security] Fix security.interactive_login event const doc block 2017-08-06 13:40:38 +02:00
Nicolas Grekas
736f0d0d93 feature #23624 [FrameworkBundle] Commands as a service (ro0NL)
This PR was squashed before being merged into the 3.4 branch (closes #23624).

Discussion
----------

[FrameworkBundle] Commands as a service

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

Next step towards #23488

It's a work in progress if we want to do all commands at once (im fine :)). But i think we should review `assets:install` first.

Also im assuming framework commands can rely on `getApplication()->getKernel()` from the framework application (we already do that in some commands). That saves a dep on `@kernel`.

And filesystem as a service; perhaps drop that as well :)

Commits
-------

de1dc0b [FrameworkBundle] Commands as a service
2017-08-06 12:29:14 +02:00
Roland Franssen
de1dc0b469 [FrameworkBundle] Commands as a service 2017-08-06 12:29:12 +02:00
Robin Chalas
9269ee1afd minor #23798 Update Container.php: Deprecated -> @deprecated (yurii-github)
This PR was merged into the 3.3 branch.

Discussion
----------

Update Container.php: Deprecated -> @deprecated

small typo fix
Deprecated -> @deprecated

Commits
-------

259f9cc Update Container.php: Deprecated -> @deprecated
2017-08-06 12:15:16 +02:00
Yurii K
259f9cc4ad Update Container.php: Deprecated -> @deprecated
Deprecated -> @deprecated
2017-08-06 02:56:19 +03:00
Fabien Potencier
84b6593cd1 minor #23794 [PropertyInfo] allow phpdocumentor/reflection-docblock >=3.2.1 (xabbuh)
This PR was merged into the 3.3 branch.

Discussion
----------

[PropertyInfo] allow phpdocumentor/reflection-docblock >=3.2.1

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

Commits
-------

2f3ac8f53e allow phpdocumentor/reflection-docblock >=3.2.1
2017-08-05 19:50:41 +02:00
Fabien Potencier
457d57b767 minor #23781 [Workflow] do not emit not needed guard events (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Workflow] do not emit not needed guard events

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

Commits
-------

47c68e12ea [Workflow] do not emit not needed guard events
2017-08-05 19:44:04 +02:00
Fabien Potencier
a12ebf72ba feature #21111 [Validator] add groups support to the Valid constraint (xabbuh)
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] add groups support to the Valid constraint

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #3622, #17622
| License       | MIT
| Doc PR        | TODO

Commits
-------

0ca27ccfde add groups support to the Valid constraint
2017-08-05 19:39:51 +02:00
Fabien Potencier
73d3d5a91f feature #20361 [Config] Enable cannotBeEmpty along with requiresAtLeastOneElement (ro0NL)
This PR was squashed before being merged into the 3.4 branch (closes #20361).

Discussion
----------

[Config] Enable cannotBeEmpty along with requiresAtLeastOneElement

| Q | A |
| --- | --- |
| Branch? | "master" |
| Bug fix? | no |
| New feature? | yes |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes
| Fixed tickets | #20356 |
| License | MIT |
| Doc PR | reference to the documentation PR, if any |

As @vudaltsov mentioned, we ignore any calls to `ArrayNodeDefinition::cannotBeEmpty`, which can lead to unexpected behavior. Imo. all subclasses should follow the base API.

Commits
-------

d40e7e4c2d [Config] Enable cannotBeEmpty along with requiresAtLeastOneElement
2017-08-05 19:34:46 +02:00
Roland Franssen
d40e7e4c2d [Config] Enable cannotBeEmpty along with requiresAtLeastOneElement 2017-08-05 19:34:44 +02:00
Fabien Potencier
3b54ce8d7e minor #23700 [Workflow] add getter for workflow (Simperfit)
This PR was merged into the 3.4 branch.

Discussion
----------

[Workflow] add getter for workflow

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

Commits
-------

9910ba1ad4 [Workflow] feature: add getter in workflow
2017-08-05 19:32:15 +02:00
Fabien Potencier
9d66ee403e minor #23786 [VarDumper] Remove leading 0 in microseconds of date caster (maidmaid)
This PR was merged into the 3.4 branch.

Discussion
----------

[VarDumper] Remove leading 0 in microseconds of date caster

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

It looks more like a [engineering notation](https://en.wikipedia.org/wiki/Engineering_notation). We can now better discern **milli**seconds and **micro**seconds.

```php
// before -> after
1.000000 -> 1.0
1.100000 -> 1.100
1.120000 -> 1.120
1.123000 -> 1.123
1.123400 -> 1.123400
1.123450 -> 1.123450
1.123456 -> 1.123456
```

Commits
-------

94956ebae4 Remove leading 0 in ms of date caster
2017-08-05 19:30:36 +02:00
Dany Maillard
94956ebae4 Remove leading 0 in ms of date caster 2017-08-05 16:55:51 +02:00
Nicolas Grekas
ffa005c036 bug #23658 [HttpFoundation] Generate safe fallback filename for wrongly encoded filename (xelaris)
This PR was merged into the 2.7 branch.

Discussion
----------

[HttpFoundation] Generate safe fallback filename for wrongly encoded filename

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

This handles the case where the encoding of a random string cannot be detected. Until now this causes a PHP Warning `mb_strlen(): Unknown encoding ""`.

Commits
-------

8fd5569 [HttpFoundation] Generate safe fallback filename for wrongly encoded filename
2017-08-05 16:30:39 +02:00
Nicolas Grekas
c099f582fc bug #23776 [FrameworkBundle] Warmup annotations for bundle-less controllers and entities (nicolas-grekas)
This PR was merged into the 3.3 branch.

Discussion
----------

[FrameworkBundle] Warmup annotations for bundle-less controllers and entities

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

Commits
-------

feb5e62 [FrameworkBundle] Warmup annotations for bundle-less controllers and entities
2017-08-05 16:29:53 +02:00
Nicolas Grekas
00a8c94d39 bug #23783 Avoid infinite loops when profiler data is malformed (javiereguiluz)
This PR was merged into the 2.7 branch.

Discussion
----------

Avoid infinite loops when profiler data is malformed

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

Thanks to the bug reproducer provided by @Kyoushu, I could reproduce this error:

```
PHP 7.1.4 Development Server started at Thu Aug  3 22:13:26 2017
Listening on http://127.0.0.1:8000
Document root is projects/symfony-fileprofilerstorage-bug/web
Press Ctrl-C to quit.

[Thu Aug  3 22:13:26 2017] PHP Fatal error:
Allowed memory size of 2147483648 bytes exhausted (tried to allocate 282624 bytes) in
projects/symfony-fileprofilerstorage-bug/vendor/symfony/symfony/src/Symfony/Component/
HttpKernel/Profiler/FileProfilerStorage.php on line 124
```

After the changes proposed in this PR, the browser no longer exhausts the memory and you can see the exception page explaining the error. The web debug toolbar doesn't load, but it doesn't crash anything:

![error-profiler](https://user-images.githubusercontent.com/73419/28941732-3c7eb29c-7899-11e7-88e8-a16517d5bcf7.png)

Commits
-------

e5ef9fb Avoid infinite loops when profiler data is malformed
2017-08-05 16:25:58 +02:00
Nicolas Grekas
4d808644b8 Merge branch '3.3' into 3.4
* 3.3:
  [Serializer] fix tests for Yaml component 3.4
2017-08-05 15:26:16 +02:00
Nicolas Grekas
2b58357c29 minor #23795 [Serializer] fix tests for Yaml component 3.4 (xabbuh)
This PR was merged into the 3.3 branch.

Discussion
----------

[Serializer] fix tests for Yaml component 3.4

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

Commits
-------

6443c96 [Serializer] fix tests for Yaml component 3.4
2017-08-05 13:00:43 +02:00
Christian Flothmann
6443c963a6 [Serializer] fix tests for Yaml component 3.4 2017-08-05 09:02:17 +02:00
Christian Flothmann
2f3ac8f53e allow phpdocumentor/reflection-docblock >=3.2.1 2017-08-05 08:05:00 +02:00
Christian Flothmann
978eca9fe4 Merge branch '3.3' into 3.4
* 3.3:
  better errors when security deps are missing
2017-08-04 16:18:17 +02:00
Christian Flothmann
baa1e7f677 minor #22913 [Yaml] Deprecate tags using colon (GuilhemN)
This PR was squashed before being merged into the 3.4 branch (closes #22913).

Discussion
----------

[Yaml] Deprecate tags using colon

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

Using a colon in a tag doesn't look like yaml and causes trouble (see https://github.com/symfony/symfony/pull/22878), so I propose to just deprecate these tags in favor of more consistent tags.

```yml
- !php/const:PHP_INT_MAX
- !php/object:O:30:"Symfony\Component\Yaml\Tests\A":1:{s:1:"a";s:3:"foo";}
```
would become
```yml
- !php/const PHP_INT_MAX
- !php/object O:30:"Symfony\Component\Yaml\Tests\A":1:{s:1:"a";s:3:"foo";}
```

Commits
-------

9815af3 [Yaml] Deprecate tags using colon
2017-08-04 15:29:48 +02:00