Commit Graph

39045 Commits

Author SHA1 Message Date
Nicolas Grekas
2b7985d5e6 minor #29068 Remove unused variable (jschaedl)
This PR was merged into the 4.2-dev branch.

Discussion
----------

Remove unused variable

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

Commits
-------

246b3bf757 Remove unused variable
2018-11-06 16:44:47 +01:00
Nicolas Grekas
8cd0538a7f bug #29094 Add samesite attribute to session cookie after session migration (rpkamp)
This PR was merged into the 4.2-dev branch.

Discussion
----------

Add samesite attribute to session cookie after session migration

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

Commits
-------

df903005c1 Add samesite attribute to session cookie after session migration
2018-11-06 16:33:07 +01:00
Nicolas Grekas
23a0b2dcda minor #29100 [Messenger] Cleaning after new changes (yceruto)
This PR was squashed before being merged into the 4.2-dev branch (closes #29100).

Discussion
----------

[Messenger] Cleaning after new changes

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

See topic per commit

Commits
-------

3d31772949 [Messenger] Cleaning after new changes
2018-11-06 16:29:10 +01:00
Yonel Ceruto
3d31772949 [Messenger] Cleaning after new changes 2018-11-06 16:29:01 +01:00
Fabien Potencier
5e0d3f0b8d minor #29093 Clarify deprecation of Email constraint without egulias/email-validator (rpkamp)
This PR was merged into the 4.2-dev branch.

Discussion
----------

Clarify deprecation of Email constraint without egulias/email-validator

| 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

Commits
-------

f77970b950 Clarify deprecation of Email constraint without egulias/email-validator
2018-11-06 09:13:06 +01:00
Remon van de Kamp
f77970b950
Clarify deprecation of Email constraint without egulias/email-validator 2018-11-05 21:30:49 +01:00
Remon van de Kamp
df903005c1
Add samesite attribute to session cookie after session migration 2018-11-05 10:25:33 +01:00
Fabien Potencier
4bc1cc7e43 bug #29080 [FrameworkBundle][4.2] fix deps (ro0NL)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[FrameworkBundle][4.2] fix deps

| Q             | A
| ------------- | ---
| Branch?       | master
| 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 | #...   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | symfony/symfony-docs#... <!-- required for new features -->

The bundle requires the `MetadataAwareNameConverter` added in 4.2

1fc577f2c7/src/Symfony/Bundle/FrameworkBundle/Resources/config/serializer.xml (L122-L124)

This PR fixes

```
Attempted to load interface "AdvancedNameConverterInterface" from namespace "Symfony\Component\Serializer\NameConverter".
Did you forget a "use" statement for another namespace?
```

Commits
-------

71fe97a7ab [FrameworkBundle][4.2] fix deps
2018-11-04 20:05:04 +01:00
Fabien Potencier
95b975d0d2 minor #29083 [Messenger] The component is still experimental (ogizanagi)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Messenger] The component is still experimental

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

Commits
-------

3136611d1e [Messenger] The component is still experimental
2018-11-04 20:04:20 +01:00
Maxime Steinhausser
3136611d1e
[Messenger] The component is still experimental 2018-11-04 20:00:43 +01:00
Roland Franssen
71fe97a7ab
[FrameworkBundle][4.2] fix deps 2018-11-04 14:52:16 +01:00
Fabien Potencier
1fc577f2c7 bumped Symfony version to 4.2.0 2018-11-03 14:17:14 +01:00
Fabien Potencier
736f710805
Merge pull request #29073 from fabpot/release-4.2.0-BETA1
released v4.2.0-BETA1
2018-11-03 13:49:05 +01:00
Fabien Potencier
91957aa4cc updated VERSION for 4.2.0-BETA1 2018-11-03 13:37:30 +01:00
Fabien Potencier
d782263056 updated CHANGELOG for 4.2.0-BETA1 2018-11-03 13:37:19 +01:00
Jan Schädlich
246b3bf757
Remove unused variable 2018-11-03 08:39:20 +01:00
Nicolas Grekas
08fb12b6f3 bug #29064 [DI] Fix EOL replacement (ro0NL)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[DI] Fix EOL replacement

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #29063
| 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
-------

52f15f75a5 [DI] Fix EOL replacement
2018-11-02 14:03:32 +01:00
Roland Franssen
52f15f75a5 [DI] Fix EOL replacement 2018-11-02 13:47:27 +01:00
Nicolas Grekas
1736df735f bug #29062 Fix GlobResource serialization (alexismarquis)
This PR was squashed before being merged into the 4.2-dev branch (closes #29062).

Discussion
----------

Fix GlobResource serialization

| Q             | A
| ------------- | ---
| Branch?       | master <!-- see below -->
| Bug fix?      | yes
| 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?   | no    <!-- please add some, will be required by reviewers -->
| Fixed tickets | #28200   <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | <!-- required for new features -->

Since @gonzalovilaseca improvement in PR #28200, I noticed that the container is being compiled systematically. This is caused by the two added properties (`forExclusion`, `excludedPrefixes`) not being serialized, and lead to wrong hash computing. I updated the `serialize` and `unserialize` methods in this PR.

ping @nicolas-grekas

Commits
-------

6ce7f07439 Fix GlobResource serialization
2018-11-02 12:14:24 +01:00
Alexis MARQUIS
6ce7f07439 Fix GlobResource serialization 2018-11-02 12:14:17 +01:00
Nicolas Grekas
79bbee2e56 feature #28622 [VarDumper] add caster for Memcached (jschaedl)
This PR was squashed before being merged into the 4.2-dev branch (closes #28622).

Discussion
----------

[VarDumper] add caster for Memcached

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

Commits
-------

f95d943cc4 [VarDumper] add caster for Memcached
2018-11-02 12:05:12 +01:00
Jan Schädlich
f95d943cc4 [VarDumper] add caster for Memcached 2018-11-02 12:04:59 +01:00
Fabien Potencier
d699036e5b feature #29042 [DI] use filter_var() instead of XmlUtils::phpize() in EnvVarProcessor (nicolas-grekas)
This PR was submitted for the 3.4 branch but it was merged into the 4.2-dev branch instead (closes #29042).

Discussion
----------

[DI] use filter_var() instead of XmlUtils::phpize() in EnvVarProcessor

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

#29041 made me realize that we don't need this dependency on the Config component: `filter_var()` is just fine. This allows using a few more legit values for boolean styles, which are already accepted in php.ini

Commits
-------

ce53261323 [DI] use filter_var() instead of XmlUtils::phpize() in EnvVarProcessor
2018-11-02 08:26:17 +01:00
Nicolas Grekas
ce53261323 [DI] use filter_var() instead of XmlUtils::phpize() in EnvVarProcessor 2018-11-02 08:25:53 +01:00
Tobias Schultze
2bfcaeb31f minor #29052 [Messenger] make senders/handlers locator accept envelopes (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Messenger] make senders/handlers locator accept envelopes

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

As suggested by @Tobion in https://github.com/symfony/symfony/pull/29045#issuecomment-434906250 - works for me also.

Commits
-------

9cd88b0dc5 [Messenger] make senders/handlers locator accept envelopes
2018-11-01 14:33:33 +01:00
Nicolas Grekas
90ac841404 minor #29051 [Messenger] extract stamp header prefix into private const (Tobion)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Messenger] extract stamp header prefix into private const

| Q             | A
| ------------- | ---
| Branch?       | master f
| Bug fix?      | no
| 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        |

Commits
-------

564cf3d156 [Messenger] extract stamp header prefix into private const
2018-11-01 10:57:18 +01:00
Nicolas Grekas
0d60ebac42 feature #29047 Revert "[HttpFoundation] Adds getAcceptableFormats() method for Request" (Tobion)
This PR was merged into the 4.2-dev branch.

Discussion
----------

Revert "[HttpFoundation] Adds getAcceptableFormats() method for Request"

This reverts commit 8a127ea34a.

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| 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 | #26486
| License       | MIT
| Doc PR        |

As I said in https://github.com/symfony/symfony/pull/26486#discussion_r228697658 and people wonder in https://symfony.com/blog/new-in-symfony-4-2-acceptable-request-formats#comment-22747, I don't think this method clear and generic enough to be added to the core.
I can't see where I would possibly use this method. What would be useful is a similar method that accepts formats as argument and would return the ones that are acceptable according to the accept header. This would then allow to make use of `*/*` and this is what people usually need in REST APIs etc.
But for now, we should revert it before it gets released like this.

Commits
-------

397ed83c3c Revert "[HttpFoundation] Adds getAcceptableFormats() method for Request"
2018-11-01 10:55:14 +01:00
Nicolas Grekas
9cd88b0dc5 [Messenger] make senders/handlers locator accept envelopes 2018-11-01 10:43:31 +01:00
Tobias Schultze
564cf3d156 [Messenger] extract stamp header prefix into private const 2018-11-01 03:41:35 +01:00
Fabien Potencier
b142eaecd5 feature #29046 [Bridge/Doctrine] remove workarounds from the past (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Bridge/Doctrine] remove workarounds from the past

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

Aligns the bridge with latest Messenger improvements.

Commits
-------

385856413c [Bridge/Doctrine] remove workarounds from the past
2018-10-31 19:13:29 +01:00
Tobias Schultze
397ed83c3c Revert "[HttpFoundation] Adds getAcceptableFormats() method for Request"
This reverts commit 8a127ea34a.
2018-10-31 18:20:23 +01:00
Nicolas Grekas
385856413c [Bridge/Doctrine] remove workarounds from the past 2018-10-31 18:17:13 +01:00
Nicolas Grekas
78192e776c Merge branch '4.1'
* 4.1:
  [DependencyInjection] Fix tags on multiple decorated service
  fix merge
  SCA: reverted code style changes
  SCA: reverted code style changes
  SCA: applied requested code style changes
  SCA: simplify some ifs in favour of null coalescing operator
2018-10-31 11:56:31 +01:00
Nicolas Grekas
25c2975cd4 Merge branch '3.4' into 4.1
* 3.4:
  [DependencyInjection] Fix tags on multiple decorated service
2018-10-31 11:54:16 +01:00
Nicolas Grekas
5d1120593c bug #28820 [DependencyInjection] Fix tags on multiple decorated service (Soner Sayakci)
This PR was merged into the 3.4 branch.

Discussion
----------

[DependencyInjection] Fix tags on multiple decorated service

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

After the first run in the loop with the same decorated service it goes only in the hasAlias condition. The tags will be not set here, so the `ResolveTaggedIteratorArgumentPass` will handle only the first decoration.

Commits
-------

90f8df2830 [DependencyInjection] Fix tags on multiple decorated service
2018-10-31 11:49:51 +01:00
Soner Sayakci
90f8df2830 [DependencyInjection] Fix tags on multiple decorated service 2018-10-31 11:41:01 +01:00
Nicolas Grekas
d9b4872454 minor #29009 SCA: simplify some ifs in favour of null coalescing operator (kalessil, vladimir.reznichenko)
This PR was merged into the 4.1 branch.

Discussion
----------

SCA: simplify some ifs in favour of null coalescing operator

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

Some of ifs were replaced with null coalescing operator in order to simplify control flow.

Commits
-------

636a872389 SCA: reverted code style changes
c926b1abd3 SCA: reverted code style changes
300b31fa75 SCA: applied requested code style changes
0180cb936f SCA: simplify some ifs in favour of null coalescing operator
2018-10-31 10:30:44 +01:00
Nicolas Grekas
6dde5b969d Merge branch '3.4' into 4.1
* 3.4:
  fix merge
2018-10-31 10:30:22 +01:00
Nicolas Grekas
bcc4454079 fix merge 2018-10-31 10:26:14 +01:00
Nicolas Grekas
63d34515a5 Merge branch '4.1'
* 4.1:
  fix merge
2018-10-31 10:23:57 +01:00
Nicolas Grekas
448da09fe9 fix merge 2018-10-31 10:23:48 +01:00
Nicolas Grekas
c6e8a657ec Merge branch '4.1'
* 4.1:
  Fixed typo
  Fix ini_get() for boolean values
  SCA: fixed broken tests
  SCA: applied code style as per guidelines
  SCA: minor code tweaks
2018-10-31 10:23:02 +01:00
Nicolas Grekas
3e8a423047 Merge branch '3.4' into 4.1
* 3.4:
  Fixed typo
  Fix ini_get() for boolean values
  SCA: fixed broken tests
  SCA: applied code style as per guidelines
  SCA: minor code tweaks
2018-10-31 10:09:42 +01:00
Nicolas Grekas
63c74f7c29 Merge branch '2.8' into 3.4
* 2.8:
  Fixed typo
  Fix ini_get() for boolean values
2018-10-31 10:06:03 +01:00
Nicolas Grekas
555f2d922e minor #28994 SCA: minor code tweaks (vladimir.reznichenko, kalessil)
This PR was merged into the 3.4 branch.

Discussion
----------

SCA: minor code tweaks

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

Following tweaks included:
- repetitive method calls
- greedy regex
- unnecessary function calls (simplifications)

Commits
-------

b12c89d481 SCA: fixed broken tests
42e96ff7a2 SCA: applied code style as per guidelines
8dbd927a33 SCA: minor code tweaks
2018-10-31 09:57:11 +01:00
Nicolas Grekas
92f5747e38 feature #29022 [Cache] allow to skip saving the computed value when using CacheInterface::get() (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Cache] allow to skip saving the computed value when using CacheInterface::get()

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

While trying to play with using Messenger and Cache together, I spotted a few issues related to the new `CacheInterface::get()` method:
- there must be a way to skip saving the computed value in the pool. This is needed in my (still local WIP) use case - and is also needed for `LockRegistry`: processes that wait for the lock to be released should not write the value back when the lock is over. This is addressed by adding a 2nd `bool &$save` argument to the computing callback. When the callback sets this reference to true, the returned value should not be written to the pool.
- in order to better document the signature of this callback, a new `CallbackInterface` is added in the `Contracts\Cache` namespace. This will help autocompletion and implementations.
- `ContractsTrait` was writing twice the value to the pool - now fixed
- `LockRegistry` did not retry locking when a waiting process wasn't able to fetch the fresh value - now fixed.

Commits
-------

321d7f4be0 [Cache] allow to skip saving the computed value when using CacheInterface::get()
2018-10-31 09:48:12 +01:00
Nicolas Grekas
321d7f4be0 [Cache] allow to skip saving the computed value when using CacheInterface::get() 2018-10-31 09:00:32 +01:00
Samuel ROZE
d2b8014147 feature #29010 [Messenger] make senders and handlers subscribing to parent interfaces receive *all* matching messages, wildcard included (nicolas-grekas)
This PR was merged into the 4.2-dev branch.

Discussion
----------

 [Messenger] make senders and handlers subscribing to parent interfaces receive *all* matching messages, wildcard included

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

~Embeds #29006 for now.~

From the CHANGELOG:
 * senders and handlers subscribing to parent interfaces now receive *all* matching messages, wildcard included
 * `HandlerLocatorInterface::resolve()` has been removed, use `HandlersLocator::getHandlers()` instead
 * `SenderLocatorInterface::getSenderForMessage()` has been removed, use `SendersLocator::getSenders()` instead
 * The `ChainHandler` and `ChainSender` classes have been removed
 * The `ContainerHandlerLocator`, `AbstractHandlerLocator`, `SenderLocator` and `AbstractSenderLocator` classes have been removed

The new `HandlersLocatorInterface` and `SendersLocatorInterface` interfaces return **`iterable`** of corresponding handlers/senders. This allows simplifying a lot the DI configuration and standalone usage.

Inheritance-based configuration is now stable: when a sender or a handler is bound to `SomeMessageInterface`, it will always get all messages of that kind. This fixes the unstable nature of the previous logic, where only the first matching type bound to a message would match, making routing/handling unpredictable (note that the new behavior is also how Laravel does it.)

Some cleanups found meanwhile:
 * the `messenger.sender` tag was useless, it's removed
 * the reponsibility of the "send-and-handle" decision has been moved to the locator, where it belongs
 * thanks to type+argument autowiring aliases, we don't need to force defining a default bus - gaining nice errors when a named argument has a typo
 * some services have been renamed to make them more conventional

As far as priorities are concerned, the priority number applies in the scope of the type bound to it: senders/handlers that are bound to more specific types are always called before less specific ones, no matter the defined priority.

Commits
-------

1e7af4d35e [Messenger] make senders and handlers subscribing to parent interfaces receive *all* matching messages, wildcard included
2018-10-31 08:00:26 +00:00
Nicolas Grekas
1e7af4d35e [Messenger] make senders and handlers subscribing to parent interfaces receive *all* matching messages, wildcard included 2018-10-31 08:48:19 +01:00
Samuel ROZE
225746b212 bug #29037 [Messenger] Mark the component as experimental for 4.2 (fabpot)
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Messenger] Mark the component as experimental for 4.2

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| 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 | n/a
| License       | MIT
| Doc PR        | n/a

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

7cb99fa665 [Messenger] marked the component as experimental for 4.2
2018-10-31 07:41:35 +00:00