Commit Graph

35637 Commits

Author SHA1 Message Date
Valentin Udaltsov
6104c28c08 [Framework][Workflow] Added support for interfaces 2018-06-15 15:02:31 +02:00
Nicolas Grekas
be700aed1d Merge branch '2.8' into 3.4
* 2.8:
  [VarDumper] Fix dumping ArrayObject and ArrayIterator instances
  Fix bad method call with guard authentication + session migration
2018-06-15 09:47:49 +02:00
Nicolas Grekas
56f5d83f82 bug #27593 [ProxyManagerBridge] Fixed support of private services (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[ProxyManagerBridge] Fixed support of private services

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

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - 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.
-->

Fixed lazy loading of private services, that was broken since Symfony 4.0 release because of renaming
addObjectResource
fa022f05be/src/Symfony/Component/DependencyInjection/CHANGELOG.md (L114)

Commits
-------

198bee0916 [ProxyManagerBridge] Fixed support of private services
2018-06-15 09:10:17 +02:00
Nicolas Grekas
2627c16d0b bug #27591 [VarDumper] Fix dumping ArrayObject and ArrayIterator instances (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

[VarDumper] Fix dumping ArrayObject and ArrayIterator instances

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

Properties added on child classes of `ArrayObject` and `ArrayIterator`, or dynamic properties added on instances of them were now properly dumped. This fixes it.

![image](https://user-images.githubusercontent.com/243674/41349429-2660cbc6-6f10-11e8-8015-a3d6ad8b0c9c.png)

Commits
-------

3ecabfc36e [VarDumper] Fix dumping ArrayObject and ArrayIterator instances
2018-06-15 08:50:57 +02:00
Nicolas Grekas
3ecabfc36e [VarDumper] Fix dumping ArrayObject and ArrayIterator instances 2018-06-15 08:44:46 +02:00
Nicolas Grekas
198bee0916 [ProxyManagerBridge] Fixed support of private services 2018-06-14 12:06:05 +02:00
Nicolas Grekas
eeb53ee2ed minor #27598 [Cache] Fix typo in comment. (sepehr)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #27598).

Discussion
----------

[Cache] Fix typo in comment.

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

It's just a typo fix.

Commits
-------

39dd9b2f97 [Cache] Fix typo in comment.
2018-06-14 10:53:11 +02:00
Sepehr Lajevardi
39dd9b2f97 [Cache] Fix typo in comment. 2018-06-14 10:53:02 +02:00
Robin Chalas
2643ec87d5 bug #27581 Fix bad method call with guard authentication + session migration (weaverryan)
This PR was squashed before being merged into the 2.8 branch (closes #27581).

Discussion
----------

Fix bad method call with guard authentication + session migration

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no (but there needs to be on master)
| Tests pass?   | yes
| Fixed tickets | #27577
| License       | MIT
| Doc PR        | n/a

I messed up #27452 :/. Guard is the one class where the session migration is not on the listener, it's on the handler. The tricky part is that there is only ONE handler (unlike listeners where there is 1 listener per firewall). That means that implementing a session migration strategy that avoids stateless firewalls was a bit more tricky: I could only think to inject a map into `GuardAuthenticationHandler`. On the bright side, this also fixes session migration (not happening) when people call the `authenticateUserAndHandleSuccess()` method directly.

On master, we'll need to add a deprecation to make the 3rd argument of `authenticateWithToken()` required - it's optional now for BC. We may also need to re-order the constructor args.

I DID test this in a real 2.8 project, to make sure that things were properly wired up. Apologies for not doing that for the other PR.

Cheers!

Commits
-------

2c0ac93 Fix bad method call with guard authentication + session migration
2018-06-12 15:18:03 +02:00
Ryan Weaver
2c0ac93e25 Fix bad method call with guard authentication + session migration 2018-06-12 15:17:58 +02:00
Nicolas Grekas
e564c70772 bug #27576 [Cache] Fix expiry comparisons in array-based pools (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Cache] Fix expiry comparisons in array-based pools

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

Commits
-------

68729cc68a [Cache] Fix expiry comparisons in array-based pools
2018-06-11 16:08:45 +02:00
Nicolas Grekas
24b6848ea7 [Serializer] fix CS 2018-06-11 15:57:31 +02:00
Nicolas Grekas
14bbcdb496 fix deps 2018-06-11 15:18:57 +02:00
Nicolas Grekas
68729cc68a [Cache] Fix expiry comparisons in array-based pools 2018-06-11 15:10:52 +02:00
Nicolas Grekas
873abdad12 Merge branch '2.8' into 3.4
* 2.8:
  fixed CS
  Avoid migration on stateless firewalls
2018-06-11 14:53:53 +02:00
Fabien Potencier
697a6a0ae4 fixed CS 2018-06-10 12:33:24 +02:00
Fabien Potencier
f96f4c5ab5 bug #27556 Avoiding session migration for stateless firewall UsernamePasswordJsonAuthenticationListener (weaverryan)
This PR was squashed before being merged into the 3.4 branch (closes #27556).

Discussion
----------

Avoiding session migration for stateless firewall UsernamePasswordJsonAuthenticationListener

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | Related to #27395
| License       | MIT
| Doc PR        | symfony/symfony-docs#9860

This is the sister PR to #27452, which covered all the other authentication listeners.

Commits
-------

c06f3229de Avoiding session migration for stateless firewall UsernamePasswordJsonAuthenticationListener
2018-06-10 12:32:37 +02:00
Ryan Weaver
c06f3229de Avoiding session migration for stateless firewall UsernamePasswordJsonAuthenticationListener 2018-06-10 12:32:26 +02:00
Fabien Potencier
5c2b2bb2ce fixed CS 2018-06-10 12:30:11 +02:00
Fabien Potencier
d2757de3b9 bug #27452 Avoid migration on stateless firewalls (weaverryan)
This PR was squashed before being merged into the 2.8 branch (closes #27452).

Discussion
----------

Avoid migration on stateless firewalls

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | Related to #27395
| License       | MIT
| Doc PR        | symfony/symfony-docs#9860

This is a proof-of-concept. Once we agree / are happy, I need to add this to all of the other authentication mechanisms that recently got the session migration code & add tests.

Basically, this avoids migrating the session if the firewall is stateless. There were 2 options to do this:

A) Make the `SessionAuthenticationStrategy` aware of all stateless firewalls. **This is the current approach**
or
B) Make each individual authentication listener aware whether or not *its* firewall is stateless.

Commits
-------

cca73bb564 Avoid migration on stateless firewalls
2018-06-10 12:27:47 +02:00
Ryan Weaver
cca73bb564 Avoid migration on stateless firewalls 2018-06-10 12:27:33 +02:00
Fabien Potencier
f36930f21e bug #27568 [DI] Deduplicate generated proxy classes (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[DI] Deduplicate generated proxy classes

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

Commits
-------

322f58b334 [DI] Deduplicate generated proxy classes
2018-06-10 12:04:52 +02:00
Fabien Potencier
ac70edf8cd bug #27326 [Serializer] deserialize from xml: Fix a collection that contains the only one element (webnet-fr)
This PR was squashed before being merged into the 3.4 branch (closes #27326).

Discussion
----------

[Serializer] deserialize from xml: Fix a collection that contains the only one element

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

In xml when parent node (`restaurants`) contains several children nodes with the same tag (`restaurant`) it is clear that the children form a collection:

```
restaurants = {array} [1]
 restaurant = {array} [2]
  0 = {array} [2]
   name = "Some restaurant name"
   type = "Chinese"
  1 = {array} [2]
   name = "Another restaurant name"
   type = "Italian"
```

Afterwards the object denormalizer has no problem to create a collection of restaurants.

But when there is only one child (`restaurant`) the decoded normalized array will not contain a collection:

```
restaurants = {array} [1]
 restaurant = {array} [2]
  name = "Some restaurant name"
  type = "Chinese"
```

In this situation the object denormalizer threw unexpected exception. This PR modifies `AbstractObjectNormalizer` that is it will fill a collection containing the sole element properly.

Commits
-------

1f346f446d [Serializer] deserialize from xml: Fix a collection that contains the only one element
2018-06-10 11:53:47 +02:00
Webnet team
1f346f446d [Serializer] deserialize from xml: Fix a collection that contains the only one element 2018-06-10 11:53:40 +02:00
Fabien Potencier
d9d6ed58cd bug #27567 [PhpUnitBridge] Fix error on some Windows OS (Nsbx)
This PR was submitted for the master branch but it was merged into the 3.4 branch instead (closes #27567).

Discussion
----------

[PhpUnitBridge] Fix error on some Windows OS

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

Bug Fix on PHPUnit Bridge

Commits
-------

50979b5ea4 [PhpUnitBridge] Fix error on some Windows OS
2018-06-10 09:25:11 +02:00
nsbx
50979b5ea4 [PhpUnitBridge] Fix error on some Windows OS 2018-06-10 09:25:02 +02:00
Nicolas Grekas
322f58b334 [DI] Deduplicate generated proxy classes 2018-06-09 21:22:19 +02:00
Nicolas Grekas
7f2cb7361a bug #27357 [Lock] Remove released semaphore (jderusse)
This PR was merged into the 3.4 branch.

Discussion
----------

[Lock] Remove released semaphore

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

This PR remove the semaphore with `sem_remove`. By removing without releasing the semaphore, all pending blocking acquiring will fail that's why the acquire method has also been update to handle such case

Commits
-------

77b9f90a32 Remove released semaphore
2018-06-09 00:46:17 +02:00
Nicolas Grekas
88098f3cba bug #27416 TagAwareAdapter over non-binary memcached connections corrupts memcache (Aleksey Prilipko)
This PR was merged into the 3.4 branch.

Discussion
----------

TagAwareAdapter over non-binary memcached connections corrupts memcache

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

TagAwareAdapter uses non-ascii symbols in key names. It breaks memcached connections in non-binary mode.

Commits
-------

67d4e6dd29 bug #27405 [Cache] TagAwareAdapter should not corrupt memcached connection in ascii mode
2018-06-09 00:45:16 +02:00
Nicolas Grekas
151c4067dd minor #27561 [FrameworkBundle] decouple some cache-warmer's test from internal details (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] decouple some cache-warmer's test from internal details

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

Commits
-------

847abd3ec9 [FrameworkBundle] decouple some cache-warmer's test from internal details
2018-06-09 00:42:14 +02:00
Nicolas Grekas
847abd3ec9 [FrameworkBundle] decouple some cache-warmer's test from internal details 2018-06-09 00:30:30 +02:00
Nicolas Grekas
9586c4334e Merge branch '2.8' into 3.4
* 2.8:
  revert #27545
  Update Finder.php
  Fix security-core cross-dependencies, fixes #27507
  Pass previous exception to FatalErrorException
2018-06-08 11:38:38 +02:00
Nicolas Grekas
637963d224 minor #27553 [Finder] revert #27545 (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[Finder] revert #27545

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

The SplFileInfo class indeed [does exist](https://github.com/symfony/symfony/blob/2.8/src/Symfony/Component/Finder/SplFileInfo.php) in the Symfony\Component\Finder namespace.

Commits
-------

8fd4b441c4 revert #27545
2018-06-08 10:34:53 +02:00
Christian Flothmann
8fd4b441c4 revert #27545
The SplFileInfo class indeed does exist in the Symfony\Component\Finder
namespace.
2018-06-08 09:55:24 +02:00
Fabien Potencier
e2effa3141 minor #27532 Fix security-core cross-dependencies, fixes #27507 (stephank)
This PR was merged into the 2.8 branch.

Discussion
----------

Fix security-core cross-dependencies, fixes #27507

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

Based on earlier changes in #27295

Commits
-------

725d774a16 Fix security-core cross-dependencies, fixes #27507
2018-06-08 08:37:32 +02:00
Fabien Potencier
0a242428a7 minor #27548 [FrameworkBundle] remove dead code in CachePoolClearerPass (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] remove dead code in CachePoolClearerPass

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

This code had been removed in #21381, I don't know why it's still there but this is dead code, as the `cache.annotations` service inherits a logger from the parent `cache.system` service.

Commits
-------

974991f8c6 [FrameworkBundle] remove dead code in CachePoolClearerPass
2018-06-08 08:21:56 +02:00
Nicolas Grekas
39bd755d29 minor #27545 Update Finder.php (tarlepp)
This PR was submitted for the master branch but it was merged into the 2.8 branch instead (closes #27545).

Discussion
----------

Update Finder.php

Corrected return type which causes following error with [psalm](https://getpsalm.org/)
```
ERROR: PossiblyInvalidArgument - src/Command/Utils/CheckVendorDependencies.php:170:62 - Argument 1 of iterator_to_array expects Traversable, possibly different type array<mixed, Symfony\Component\Finder\SplFileInfo>|Iterator provided $directories = array_map($closure, iterator_to_array($finder->getIterator()));
```

| Q             | A
| ------------- | ---
| Branch?       | 4.1 <!-- see below -->
| Bug fix?      | yes (just docblock bug - nothing serious)
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | -  <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | - <!-- required for new features -->

<!--
Write a short README entry for your feature/bugfix here (replace this comment block.)
This will help people understand your PR and can be used as a start of the Doc PR.
Additionally:
 - 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.
-->

Commits
-------

a74ee8d594 Update Finder.php
2018-06-07 23:32:35 +02:00
Tarmo Leppänen
a74ee8d594 Update Finder.php
Corrected return type which causes following error with (psalm)[https://getpsalm.org/]
```
ERROR: PossiblyInvalidArgument - src/Command/Utils/CheckVendorDependencies.php:170:62 - Argument 1 of iterator_to_array expects Traversable, possibly different type array<mixed, Symfony\Component\Finder\SplFileInfo>|Iterator provided $directories = array_map($closure, iterator_to_array($finder->getIterator()));
```
2018-06-07 23:32:28 +02:00
Nicolas Grekas
974991f8c6 [FrameworkBundle] remove dead code in CachePoolClearerPass 2018-06-07 23:05:52 +02:00
Stéphan Kochen
725d774a16 Fix security-core cross-dependencies, fixes #27507 2018-06-07 10:54:04 +02:00
Fabien Potencier
ae30a80f77 bug #27514 [Debug] Pass previous exception to FatalErrorException (pmontoya)
This PR was merged into the 2.8 branch.

Discussion
----------

[Debug] Pass previous exception to FatalErrorException

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

Add a previous parameter to FatalErrorException.
Call \ErrorException with this parameter.
Update parent::__constructor for inherited classes with default parameters and the new one

Commits
-------

7f9780b5df Pass previous exception to FatalErrorException
2018-06-06 15:30:44 +02:00
Nicolas Grekas
4435144a24 bug #27516 Revert "bug #26138 [HttpKernel] Catch HttpExceptions when templating is not installed (cilefen)" (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

Revert "bug #26138 [HttpKernel] Catch HttpExceptions when templating is not installed (cilefen)"

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

This reverts commit b213c5a758, reversing
changes made to 61af0e3a25.

This breaks BC and is more like a new feature, let's move this on master.

Commits
-------

c6acad719d Revert "bug #26138 [HttpKernel] Catch HttpExceptions when templating is not installed (cilefen)"
2018-06-06 12:47:46 +02:00
Nicolas Grekas
51f36e73a0 Merge branch '2.8' into 3.4
* 2.8:
  Remove mentions of "beta" in composer.json files
2018-06-06 11:56:41 +02:00
Nicolas Grekas
c6acad719d Revert "bug #26138 [HttpKernel] Catch HttpExceptions when templating is not installed (cilefen)"
This reverts commit b213c5a758, reversing
changes made to 61af0e3a25.
2018-06-06 11:42:07 +02:00
Pascal Montoya
7f9780b5df
Pass previous exception to FatalErrorException 2018-06-06 10:34:52 +02:00
Fabien Potencier
7d2d60ffc3 minor #27502 Remove mentions of "beta" in composer.json files (nicolas-grekas)
This PR was merged into the 2.8 branch.

Discussion
----------

Remove mentions of "beta" in composer.json files

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

There are more to clean up when merging up to master.

Commits
-------

6a0b75fb9b Remove mentions of "beta" in composer.json files
2018-06-06 10:12:31 +02:00
Nicolas Grekas
6a0b75fb9b Remove mentions of "beta" in composer.json files 2018-06-05 10:24:18 +02:00
Aleksey Prilipko
67d4e6dd29 bug #27405 [Cache] TagAwareAdapter should not corrupt memcached connection in ascii mode 2018-06-05 17:08:01 +10:00
Jérémy Derussé
77b9f90a32
Remove released semaphore 2018-06-05 07:35:41 +02:00
Nicolas Grekas
9a077ca604 bug #27318 [Cache] memcache connect should not add duplicate entries on sequential calls (Aleksey Prilipko)
This PR was submitted for the 3.3 branch but it was merged into the 3.4 branch instead (closes #27318).

Discussion
----------

[Cache] memcache connect should not add duplicate entries on sequential calls

| Q             | A
| ------------- | ---
| Branch?       | 3.4 (be careful when merging)
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | no
| Fixed tickets | #27299
| License       | MIT

MemcachedCache::createConnection adds server to list of servers on every call. But resets this list only when it is not empty and does not match configured list.
This leads to follow: after first call list contains correct entry. After second it has server entry twice. After third it clears list and set it with correct value.

With combination of libmemcached bug (segfault on adding server after reset nonempty list) it makes impossible to use MemcachedCache::createConnection to create persistent connections.

Commits
-------

af0699012a bug #27299 [Cache] memcache connect should not add duplicate entries on sequential calls
2018-06-04 22:06:51 +02:00