Commit Graph

38507 Commits

Author SHA1 Message Date
Fabien Potencier
3cd411af3e feature #28588 [Cache] add "setCallbackWrapper()" on adapters implementing CacheInterface for more flexibility (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Cache] add "setCallbackWrapper()" on adapters implementing CacheInterface for more flexibility

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

Preparing my talk at SymfonyLive London, see you all there :)

This allows wrapping the callback passed to `->get($item, $callback, $beta)` in a callable that should at least return `$callback($item)`, but can do something around the call.
The default wrapper is locking the key to provide lock-based stampede protection.
That was already the case before this PR, but in a much dirtier way at the design level.
Fixes a few issues found meanwhile.

Commits
-------

8cf3625b11 [Cache] add "setCallbackWrapper()" on adapters implementing CacheInterface for more flexibility
2018-09-26 09:18:20 +02:00
Fabien Potencier
e6deb092fc feature #28598 [Cache] support configuring multiple Memcached servers in one DSN (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Cache] support configuring multiple Memcached servers in one DSN

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #27855
| License       | MIT
| Doc PR        | https://github.com/symfony/symfony-docs/issues/10402

Useful to reconfigure dynamically an array of memcached servers (eg removing a dead one or adding a new one).
DSN format is e.g. `memcached://localhost?host[foo.bar]=3`.
To ease generating the DSN programmatically, it works also with `memcached:?host[localhost]&host[localhost:12345]&host[/some/memcached.sock:]=3`.

The key of the "host" parameter is a "host:port" pair, the value is the weight of the "host:port" pair.
Sockets need to be specified with the trailing `:` (as shown in the last example).

Commits
-------

8e0605ac18 [Cache] support configuring multiple Memcached servers in one DSN
2018-09-26 07:51:01 +02:00
Fabien Potencier
60fac5cefa feature #28447 [HttpFoundation] make cookies auto-secure when passing them $secure=null + plan to make it and samesite=lax the defaults in 5.0 (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[HttpFoundation] make cookies auto-secure when passing them $secure=null + plan to make it and samesite=lax the defaults in 5.0

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

By creating Cookie instances using `null` for the `$secure` argument, this PR allows making cookies inherit their "secure" attribute from the request.

This PR also adds a forward to make $secure=null and samesite=lax the defaults in Symfony 5.0:
- either define all constructor's arguments explicitly
- or use the new `Cookie::create()` factory

Commits
-------

9493cfd5f2 [HttpFoundation] make cookies auto-secure when passing them $secure=null + plan to make it and samesite=lax the defaults in 5.0
2018-09-26 07:44:22 +02:00
Fabien Potencier
10df10ce38 feature #28446 [SecurityBundle] make remember-me cookies auto-secure + inherit their default config from framework.session.cookie_* (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[SecurityBundle] make remember-me cookies auto-secure + inherit their default config from framework.session.cookie_*

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

Let's make it easier to have a good default security level, now for the remember-me cookie.

Commits
-------

6ec223bf6f [SecurityBundle] make remember-me cookies auto-secure + inherit their default config from framework.session.cookie_*
2018-09-26 07:38:44 +02:00
Fabien Potencier
b36172c649 feature #28417 [VarExporter] add Instantiator::instantiate() to create+populate objects without calling their constructor nor any other methods (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[VarExporter] add Instantiator::instantiate() to create+populate objects without calling their constructor nor any other methods

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

A blend of features also provided by https://github.com/doctrine/instantiator and https://github.com/Ocramius/GeneratedHydrator in one simple method. Because it's just a few more lines on top of the existing code infrastructure in the component :)

For example, from the docblock:

```php
// creates an empty instance of Foo
Instantiator::instantiate(Foo::class);

// creates a Foo instance and sets one of its public, protected or private properties
Instantiator::instantiate(Foo::class, ['propertyName' => $propertyValue]);

// creates a Foo instance and sets a private property defined on its parent Bar class
Instantiator::instantiate(Foo::class, [], [
    Bar::class => ['privateBarProperty' => $propertyValue],
]);
```

Instances of ArrayObject, ArrayIterator and SplObjectHash can be created
by using the special `"\0"` property name to define their internal value:

```php
// creates an SplObjectHash where $info1 is attached to $obj1, etc.
Instantiator::instantiate(SplObjectStorage::class, ["\0" => [$obj1, $info1, $obj2, $info2...]]);

// creates an ArrayObject populated with $inputArray
Instantiator::instantiate(ArrayObject::class, ["\0" => [$inputArray, $optionalFlag]]);
```

Misses some tests for now, but reuses the existing code infrastructure used to "unserialize" objects.

Commits
-------

d9bade0385 [VarExporter] add Instantiator::instantiate() to create+populate objects without calling their constructor nor any other methods
2018-09-26 07:34:01 +02:00
Nicolas Grekas
8e0605ac18 [Cache] support configuring multiple Memcached servers in one DSN 2018-09-25 18:08:15 +02:00
Fabien Potencier
9db435ed0c feature #27819 [Serializer] deprecated normalizers and encoders who dont implement the base interfaces (rodnaph)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Serializer] deprecated normalizers and encoders who dont implement the base interfaces

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

Currently the `Serializer` can be constructed with any object regardless of whether or not it implements `NormalizerInterface` or `DenormalizerInterface`. This object will then be ignored when getting a normalizer/denormalizer, so in effect silently ignored for serializer operations.

This change throws an exception on construct if a given normalizer object does not implement one of these interfaces - are there use cases where this would not be true?

Commits
-------

cbc2be8ba8 [Serializer] deprecated normalizers and encoders who dont implement the base interfaces
2018-09-25 11:53:27 +02:00
Nicolas Grekas
8cf3625b11 [Cache] add "setCallbackWrapper()" on adapters implementing CacheInterface for more flexibility 2018-09-24 20:03:00 +02:00
Fabien Potencier
3d2124e128 feature #28572 Make it clear that the profiler is for dev only (fabpot)
This PR was merged into the 4.2-dev branch.

Discussion
----------

Make it clear that the profiler is for dev only

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | kinda yes
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | yes (permanent one)
| Tests pass?   | yes
| Fixed tickets | n/a
| License       | MIT
| Doc PR        | symfony/symfony-docs#10386

Commits
-------

54fda55fd9 made it clear that the profiler is for dev only
2018-09-24 13:27:51 +02:00
Christian Flothmann
5dadd95dea fix upgrade files 2018-09-24 10:22:53 +02:00
Nicolas Grekas
eb607ae4dc feature #28536 Favor LogicException for missing classes & functions (ro0NL)
This PR was merged into the 4.2-dev branch.

Discussion
----------

Favor LogicException for missing classes & functions

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes-ish
| BC breaks?    | no-ish     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | https://github.com/symfony/symfony/pull/28513#issuecomment-423500822
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- 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
-------

c762735075 Favor LogicException for missing classes & functions
2018-09-24 10:16:33 +02:00
Fabien Potencier
54fda55fd9 made it clear that the profiler is for dev only 2018-09-24 10:00:32 +02:00
Roland Franssen
c762735075 Favor LogicException for missing classes & functions 2018-09-24 09:37:12 +02:00
Fabien Potencier
31f8cb9706 feature #28569 [Form] deprecate precision in IntegerToLocalizedStringTransformer (xabbuh)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Form] deprecate precision in IntegerToLocalizedStringTransformer

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

Commits
-------

65362e0ace deprecate precision in IntegerToLocalizedStringTransformer
2018-09-24 07:57:37 +02:00
Fabien Potencier
792ec82c1a feature #28570 [Form] deprecate the unused scale option (xabbuh)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Form] deprecate the unused scale option

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

Commits
-------

40413aad24 deprecate the unused scale option
2018-09-24 07:52:57 +02:00
Christian Flothmann
65362e0ace deprecate precision in IntegerToLocalizedStringTransformer 2018-09-23 21:23:49 +02:00
Christian Flothmann
40413aad24 deprecate the unused scale option 2018-09-23 21:21:47 +02:00
Nicolas Grekas
31836ed2ec feature #28566 [VarDumper] add casters for IntlDateFormatter and IntlCalendar (jschaedl)
This PR was squashed before being merged into the 4.2-dev branch (closes #28566).

Discussion
----------

[VarDumper] add casters for IntlDateFormatter and IntlCalendar

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

Commits
-------

ae76c6824b [VarDumper] add casters for IntlDateFormatter and IntlCalendar
2018-09-23 18:25:33 +02:00
Jan Schädlich
ae76c6824b [VarDumper] add casters for IntlDateFormatter and IntlCalendar 2018-09-23 18:25:21 +02:00
Nicolas Grekas
c53b687f21 feature #28559 [VarDumper] add caster for IntlTimeZone (jschaedl)
This PR was squashed before being merged into the 4.2-dev branch (closes #28559).

Discussion
----------

[VarDumper] add caster for IntlTimeZone

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

Commits
-------

c94217c832 [VarDumper] add caster for IntlTimeZone
2018-09-23 16:56:12 +02:00
Jan Schädlich
c94217c832 [VarDumper] add caster for IntlTimeZone 2018-09-23 16:56:03 +02:00
Fabien Potencier
7c08e43b78 feature #28449 [DependencyInjection] improved message when alias service is not found (xabbuh)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[DependencyInjection] improved message when alias service is not found

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

When using the YAML config format, it can be confusing that you need to
prefix the aliased service id with an `@` character when passing it as
a string, but that you have to omit it when using the `alias` attribute:

```yaml
foo: '@App\Foo'

foo:
    alias: 'App\Foo'
```

This commit will enhance the generated error message in cases where the
aliased service id is prefixed with the `@` character in the `alias`
option like this:

```yaml
foo:
    alias: '@App\Foo'
```

Commits
-------

280ecbc2be improved message when alias service is not found
2018-09-23 14:54:20 +02:00
Robin Chalas
e95ea8132f feature #27434 [Console] Add support for error ouput in the CommandTester (cdekok)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Console] Add support for error ouput in the CommandTester

Move initialization of the streams to the trait so the `capture_stderr_separately` also works in the CommandTester.

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #27422
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Make it possible to test seperate stderr output.

```$tester = new CommandTester($command);
$tester->execute(
    array('foo' => 'bar'),
    array('capture_stderr_separately' => true)
);

$this->assertEquals('foo', $tester->getErrorOutput());
````

Commits
-------

cec5317 [Console] Add support for error ouput in the CommandTester
2018-09-23 13:45:23 +02:00
Chris de Kok
cec531707f [Console] Add support for error ouput in the CommandTester 2018-09-23 13:34:50 +02:00
Nicolas Grekas
a43f307224 feature #28555 [VarDumper] add caster for NumberFormatter (jschaedl)
This PR was squashed before being merged into the 4.2-dev branch (closes #28555).

Discussion
----------

[VarDumper] add caster for NumberFormatter

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

Commits
-------

0bd8a0b0bb [VarDumper] add caster for NumberFormatter
2018-09-23 12:41:31 +02:00
Jan Schädlich
0bd8a0b0bb [VarDumper] add caster for NumberFormatter 2018-09-23 12:41:24 +02:00
Christian Flothmann
280ecbc2be improved message when alias service is not found
When using the YAML config format, it can be confusing that you need to
prefix the aliased service id with an `@` character when passing it as
a string, but that you have to omit it when using the `alias` attribute:

```yaml
foo: '@App\Foo'

foo:
    alias: 'App\Foo'
```

This commit will enhance the generated error message in cases where the
aliased service id is prefixed with the `@` character in the `alias`
option like this:

```yaml
foo:
    alias: '@App\Foo'
```
2018-09-23 11:10:46 +02:00
Nicolas Grekas
a26bd3673f Merge branch '4.1'
* 4.1:
  [Debug] Fix false-positive "MicroKernelTrait::loadRoutes()" method is considered internal"
  [Console] Fixed boxed table style with colspan
  parse numbers terminated with decimal separator
  fail reverse transforming invalid RFC 3339 dates
2018-09-22 22:55:36 +02:00
Nicolas Grekas
0e47775d62 Merge branch '3.4' into 4.1
* 3.4:
  [Debug] Fix false-positive "MicroKernelTrait::loadRoutes()" method is considered internal"
  [Console] Fixed boxed table style with colspan
  parse numbers terminated with decimal separator
  fail reverse transforming invalid RFC 3339 dates
2018-09-22 21:04:12 +02:00
Nicolas Grekas
9bc774ccf2 bug #28553 [Debug] Fix false-positive "MicroKernelTrait::loadRoutes()" method is considered internal" (nicolas-grekas)
This PR was merged into the 3.4 branch.

Discussion
----------

[Debug] Fix false-positive "MicroKernelTrait::loadRoutes()" method is considered internal"

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes (fixing and unreleased issue)
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #28549
| License       | MIT
| Doc PR        | -

Introduced in #28411
Just a failing test for now.

Commits
-------

46c4f71bf0 [Debug] Fix false-positive "MicroKernelTrait::loadRoutes()" method is considered internal"
2018-09-22 20:50:47 +02:00
Nicolas Grekas
3e47e9ca59 Merge branch '2.8' into 3.4
* 2.8:
  [Console] Fixed boxed table style with colspan
  parse numbers terminated with decimal separator
  fail reverse transforming invalid RFC 3339 dates
2018-09-22 20:49:52 +02:00
Nicolas Grekas
57a34131c6 bug #28466 [Form] fail reverse transforming invalid RFC 3339 dates (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[Form] fail reverse transforming invalid RFC 3339 dates

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

Commits
-------

ee4ce43e91 fail reverse transforming invalid RFC 3339 dates
2018-09-22 20:44:32 +02:00
Nicolas Grekas
46c4f71bf0 [Debug] Fix false-positive "MicroKernelTrait::loadRoutes()" method is considered internal" 2018-09-22 20:25:03 +02:00
Fabien Potencier
7ae57225d1 feature #28538 [Lock] Wrap release exception (jderusse)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Lock] Wrap release exception

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

Commits
-------

c37f9e9e32 Wrap release exception
2018-09-22 18:08:30 +02:00
Fabien Potencier
85d335a66a feature #28551 [VarDumper] add caster for MessageFormatter (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[VarDumper] add caster for MessageFormatter

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

There are more classes in intl that could benefit from having a caster, see
http://php.net/manual/en/book.intl.php

Let's start with MessageFormatter.
PRs welcome for adding more.

Commits
-------

aa24e4ce15 [VarDumper] add caster for MessageFormatter
2018-09-22 17:44:38 +02:00
Nicolas Grekas
aa24e4ce15 [VarDumper] add caster for MessageFormatter 2018-09-22 10:46:58 +02:00
Nicolas Grekas
40b547e122 bug #28540 [Intl] parse numbers terminated with decimal separator (xabbuh)
This PR was merged into the 2.8 branch.

Discussion
----------

[Intl] parse numbers terminated with decimal separator

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

Commits
-------

4225f36b86 parse numbers terminated with decimal separator
2018-09-22 09:42:26 +02:00
Nicolas Grekas
2c8c6f7736 bug #28548 [Console] Fixed boxed table style with colspan (ro0NL)
This PR was merged into the 2.8 branch.

Discussion
----------

[Console] Fixed boxed table style with colspan

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #28532
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

Commits
-------

a67ff2a2d6 [Console] Fixed boxed table style with colspan
2018-09-22 09:36:09 +02:00
Roland Franssen
a67ff2a2d6 [Console] Fixed boxed table style with colspan 2018-09-21 21:58:02 +02:00
Nicolas Grekas
c51592c574 feature #28329 [Debug] Trigger a deprecation for new parameters not defined in sub classes (GuilhemN)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Debug] Trigger a deprecation for new parameters not defined in sub classes

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

I'm not sure the way https://github.com/symfony/symfony/pull/28316 is implemented is the best so here is an alternative.
Instead of counting on a call from the child method, it uses the `DebugClassLoader` and `@param` annotations. If a `@param` annotation is used on a parent but is then not actually implemented in the child class, a deprecation will be thrown.

Example:
```php
class ClassWithAnnotatedParameters
{
    /**
     * @param string $foo This is a foo parameter.
     */
    public function fooMethod(string $foo)
    {
    }

    /**
     * @param string $bar parameter not implemented yet
     */
    public function barMethod(/** string $bar = null */)
    {
    }

    /**
     * @param Quz $quz parameter not implemented yet
     */
    public function quzMethod(/** Quz $quz = null */)
    {
    }
}
```

```php
class SubClassWithAnnotatedParameters extends ClassWithAnnotatedParameters {
    public function fooMethod(string $foo) { }
    public function barMethod($bar = null) { }
    public function quzMethod() { }
}
```

A deprecation will be triggered because ``SubClassWithAnnotatedParameters::quzMethod()`` which doesn't definee `$quz`.

Commits
-------

1f5d8b62f7 [Debug] Trigger a deprecation for new parameters not defined in sub classes
2018-09-21 18:04:38 +02:00
Guilhem Niot
1f5d8b62f7 [Debug] Trigger a deprecation for new parameters not defined in sub classes 2018-09-21 17:50:51 +02:00
Christian Flothmann
4225f36b86 parse numbers terminated with decimal separator 2018-09-21 16:33:46 +02:00
Jérémy Derussé
c37f9e9e32
Wrap release exception 2018-09-21 15:50:12 +02:00
Nicolas Grekas
1fc66ff080 Merge branch '4.1'
* 4.1:
  Fix CS
  Allow reuse of Session between requests
  [MonologBridge] Re-add option option to ignore empty context and extra data
  [Lock] remove useless code
  [PhpUnitBridge] fix disabling DeprecationErrorHandler using phpunit.xml file
  Provide debug_backtrace with proper args
  [DI] fix infinite loop involving self-references in decorated services
  forward false label option to nested types
  [DI] fix dumping lazy services
  forward the invalid_message option in date types
2018-09-21 14:51:02 +02:00
Nicolas Grekas
76cf0ca661 Merge branch '3.4' into 4.1
* 3.4:
  Fix CS
  Allow reuse of Session between requests
  [MonologBridge] Re-add option option to ignore empty context and extra data
  [Lock] remove useless code
  [PhpUnitBridge] fix disabling DeprecationErrorHandler using phpunit.xml file
  Provide debug_backtrace with proper args
  [DI] fix infinite loop involving self-references in decorated services
  forward false label option to nested types
  forward the invalid_message option in date types
2018-09-21 14:49:42 +02:00
Nicolas Grekas
0218507b06 Merge branch '2.8' into 3.4
* 2.8:
  Fix CS
  Allow reuse of Session between requests
  Provide debug_backtrace with proper args
  forward false label option to nested types
  forward the invalid_message option in date types
2018-09-21 14:47:54 +02:00
Nicolas Grekas
76c2de0317 Fix CS 2018-09-21 14:46:38 +02:00
Rhodri Pugh
cbc2be8ba8 [Serializer] deprecated normalizers and encoders who dont implement the base interfaces 2018-09-21 14:14:25 +02:00
Nicolas Grekas
0d9154e5bb feature #27920 Add Zookeeper data store for Lock Component (Ganesh Chandrasekaran)
This PR was merged into the 4.2-dev branch.

Discussion
----------

Add Zookeeper data store for Lock Component

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

This change adds a new feature to the Lock Component to give the capability to store locks in Zookeeper Data Store. The corresponding documentation PR should describe how this works.

The change here also adds a functional test to make sure all the basic functionality of the lock using this data store works.

Requirements for this to work are having a PHP-Zookeeper extension available to use this.

Commits
-------

c72c297dc3 Add new Zookeeper Data Store. Add functional test for Zookeeper Data Store. Modify Store Factory to support initialization of Zookeeper Data Store.
2018-09-21 13:57:52 +02:00
Nicolas Grekas
5d30df78e7 bug #28433 [HttpFoundation] Allow reuse of Session between requests if ID did not change (tgalopin)
This PR was merged into the 2.8 branch.

Discussion
----------

[HttpFoundation] Allow reuse of Session between requests if ID did not change

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

I stumbled upon the issue from https://github.com/symfony/symfony/issues/13450 in a more simple case than what was exposed in the issue. From my understanding, the problem arises when the session is used between an access to the session and a functional test request: because the session was accessed (usually using the container directly), the session has started and the following request fails.

This PR checks whether the ID was actually regenerated before throwing (if a setId is called with the same ID, it is the same request context, it shouldn't throw IMO).

Not sure I understood everything correctly though, feel free to fix it for me if needed.

Commits
-------

fd30f4a21d Allow reuse of Session between requests
2018-09-21 13:42:18 +02:00