Commit Graph

30221 Commits

Author SHA1 Message Date
Nicolas Grekas
866420e2eb [Cache] serialize objects using native arrays when possible 2018-06-18 10:20:36 +02:00
Nicolas Grekas
3ccbec3497 Merge branch '4.1'
* 4.1:
  fix merge
2018-06-15 10:20:40 +02:00
Nicolas Grekas
6e0818db16 fix merge 2018-06-15 10:15:34 +02:00
Nicolas Grekas
719b429655 fix merge 2018-06-15 10:13:37 +02:00
Nicolas Grekas
a687119e10 Merge branch '4.1'
* 4.1:
  remove HHVM code
  [VarDumper] Fix dumping ArrayObject and ArrayIterator instances
  [ProxyManagerBridge] Fixed support of private services
  [Cache] Fix typo in comment.
  [FrameworkBundle] give access to non-shared services when using test.service_container
  Fix bad method call with guard authentication + session migration
  Avoid calling eval when there is no script embedded in the toolbar
2018-06-15 09:52:48 +02:00
Nicolas Grekas
f658ed6d17 Merge branch '4.0' into 4.1
* 4.0:
  remove HHVM code
  [VarDumper] Fix dumping ArrayObject and ArrayIterator instances
  [ProxyManagerBridge] Fixed support of private services
  [Cache] Fix typo in comment.
  Fix bad method call with guard authentication + session migration
2018-06-15 09:52:42 +02:00
Nicolas Grekas
aa432743f5 remove HHVM code 2018-06-15 09:52:13 +02:00
Nicolas Grekas
79b804fdb7 Merge branch '3.4' into 4.0
* 3.4:
  [VarDumper] Fix dumping ArrayObject and ArrayIterator instances
  [ProxyManagerBridge] Fixed support of private services
  [Cache] Fix typo in comment.
  Fix bad method call with guard authentication + session migration
2018-06-15 09:50:28 +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
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
ffa79bacc1 bug #27528 [FrameworkBundle] give access to non-shared services when using test.service_container (nicolas-grekas)
This PR was merged into the 4.1 branch.

Discussion
----------

[FrameworkBundle] give access to non-shared services when using test.service_container

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

Commits
-------

516ff5a985 [FrameworkBundle] give access to non-shared services when using test.service_container
2018-06-15 08:49:43 +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
Sepehr Lajevardi
39dd9b2f97 [Cache] Fix typo in comment. 2018-06-14 10:53:02 +02:00
Nicolas Grekas
516ff5a985 [FrameworkBundle] give access to non-shared services when using test.service_container 2018-06-14 10:43:49 +02:00
Fabien Potencier
b560883ffe feature #27315 [TwigBundle] add exception chain breadcrumbs navigation (kiler129)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[TwigBundle] add exception chain breadcrumbs navigation

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

Small DX improvement allowing to jump to exception in chain:
![preview](https://media.giphy.com/media/23chfZo9oFzdOrZzYl/giphy.gif)

Commits
-------

5551e0c091 feature #26824 add exception chain breadcrumbs navigation
2018-06-14 07:06:08 +02:00
Ryan Weaver
2c0ac93e25 Fix bad method call with guard authentication + session migration 2018-06-12 15:17:58 +02:00
Christophe Coevoet
a0f78a5e0b Avoid calling eval when there is no script embedded in the toolbar 2018-06-12 14:15:08 +02:00
Nicolas Grekas
5c338cc7ab Merge branch '4.1'
* 4.1:
  fix typo
2018-06-11 16:42:15 +02:00
Nicolas Grekas
413af69e1d fix typo 2018-06-11 16:41:45 +02:00
Nicolas Grekas
c997026c91 Merge branch '4.1'
* 4.1:
  fix typo
2018-06-11 16:29:18 +02:00
Nicolas Grekas
fc666f0d80 fix typo 2018-06-11 16:29:01 +02:00
Nicolas Grekas
dca80ff177 Merge branch '4.1'
* 4.1:
  [Serializer] fix CS
  [Cache] Fix expiry comparisons in array-based pools
2018-06-11 16:10:14 +02:00
Nicolas Grekas
c1ba38ed47 Merge branch '4.0' into 4.1
* 4.0:
  [Serializer] fix CS
  [Cache] Fix expiry comparisons in array-based pools
2018-06-11 16:09:24 +02:00
Nicolas Grekas
b7d04a8f59 Merge branch '3.4' into 4.0
* 3.4:
  [Cache] Fix expiry comparisons in array-based pools
2018-06-11 16:09:09 +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
f470afacd8 Merge branch '3.4' into 4.0
* 3.4:
  [Serializer] fix CS
2018-06-11 15:58:06 +02:00
Nicolas Grekas
24b6848ea7 [Serializer] fix CS 2018-06-11 15:57:31 +02:00
Nicolas Grekas
90afbf73ac Merge branch '4.1'
* 4.1:
  fix deps
  fixed CS
  [FrameworkBundle] fix for allowing single colon controller notation
2018-06-11 15:22:42 +02:00
Nicolas Grekas
66601613b2 Merge branch '4.0' into 4.1
* 4.0:
  fix deps
2018-06-11 15:22:23 +02:00
Nicolas Grekas
9dc1875780 Merge branch '3.4' into 4.0
* 3.4:
  fix deps
2018-06-11 15:21:24 +02:00
Nicolas Grekas
14bbcdb496 fix deps 2018-06-11 15:18:57 +02:00
Fabien Potencier
205d161c00 feature #27031 [Cache] Use sub-second accuracy for internal expiry calculations (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Cache] Use sub-second accuracy for internal expiry calculations

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

Embeds #26929, #27009 and #27028, let's focus on the 4th commit for now.

This is my last significant PR in the Cache series :)

By using integer expiries internally, our current implementations are sensitive to abrupt transitions when time() goes to next second: `$s = time(); sleep(1); echo time() - $s;` *can* display 2 from time to time.
This means that we do expire items earlier than required by the expiration settings on items.
This also means that there is no way to have a sub-second expiry. For remote backends, that's fine, but for ArrayAdapter, that's a limitation we can remove.

This PR replaces calls to `time()` by `microtime(true)`, providing more accurate timing measurements internally.

Commits
-------

08554ea18c [Cache] Use sub-second accuracy for internal expiry calculations
2018-06-11 15:14:37 +02:00
Fabien Potencier
8b72a6cb20 fixed CS 2018-06-11 15:11:40 +02:00
Fabien Potencier
cfb1ffb869 bug #27566 [FrameworkBundle] fix for allowing single colon controller notation (dmaicher)
This PR was merged into the 4.1 branch.

Discussion
----------

[FrameworkBundle] fix for allowing single colon controller notation

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

This fixes a BC break introduced in https://github.com/symfony/symfony/pull/26085#pullrequestreview-126370222.

ping @Tobion

Commits
-------

1680674174 [FrameworkBundle] fix for allowing single colon controller notation
2018-06-11 15:11:00 +02:00
Nicolas Grekas
68729cc68a [Cache] Fix expiry comparisons in array-based pools 2018-06-11 15:10:52 +02:00
Nicolas Grekas
169b13c348 Merge branch '4.1'
* 4.1:
  fixed CS
  Avoiding session migration for stateless firewall UsernamePasswordJsonAuthenticationListener
  fixed CS
  Avoid migration on stateless firewalls
  [Serializer] deserialize from xml: Fix a collection that contains the only one element
  [HttpKernel] Log/Collect exceptions at prio 0
  [PhpUnitBridge] Fix error on some Windows OS
  [DI] Deduplicate generated proxy classes
  [Routing] fix matching host patterns, utf8 prefixes and non-capturing groups
2018-06-11 14:56:48 +02:00
Nicolas Grekas
8bbda2c82b Merge branch '4.0' into 4.1
* 4.0:
  fixed CS
  Avoiding session migration for stateless firewall UsernamePasswordJsonAuthenticationListener
  fixed CS
  Avoid migration on stateless firewalls
  [Serializer] deserialize from xml: Fix a collection that contains the only one element
  [PhpUnitBridge] Fix error on some Windows OS
  [DI] Deduplicate generated proxy classes
2018-06-11 14:56:28 +02:00
Nicolas Grekas
e540a16f24 Merge branch '3.4' into 4.0
* 3.4:
  fixed CS
  Avoiding session migration for stateless firewall UsernamePasswordJsonAuthenticationListener
  fixed CS
  Avoid migration on stateless firewalls
  [Serializer] deserialize from xml: Fix a collection that contains the only one element
  [PhpUnitBridge] Fix error on some Windows OS
  [DI] Deduplicate generated proxy classes
2018-06-11 14:55:40 +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
Nicolas Grekas
08554ea18c [Cache] Use sub-second accuracy for internal expiry calculations 2018-06-11 14:32:29 +02:00
Nicolas Grekas
51381e530a [Cache] Unconditionally use PhpFilesAdapter for system pools 2018-06-11 09:57:54 +02:00
Fabien Potencier
7e3b7b0b50 feature #27009 [Cache] Add stampede protection via probabilistic early expiration (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Cache] Add stampede protection via probabilistic early expiration

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

This PR implements [probabilistic early expiration](https://en.wikipedia.org/wiki/Cache_stampede#Probabilistic_early_expiration) on top of `$cache->get($key, $callback);`

It adds a 3rd arg to `CacheInterface::get`:
> float $beta A float that controls the likelyness of triggering early expiration. 0 disables it, INF forces immediate expiration. The default is implementation dependend but should typically be 1.0, which should provide optimal stampede protection.

Commits
-------

13523ad985 [Cache] Add stampede protection via probabilistic early expiration
2018-06-11 09:05:59 +02:00
Nicolas Grekas
13523ad985 [Cache] Add stampede protection via probabilistic early expiration 2018-06-10 18:44:41 +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