* 4.1:
Supress deprecation notices thrown when getting private servies from container in tests
Uses `protected` for test functions
[Messenger] Allow to scope handlers per bus
do not mock the session in token storage tests
[DependencyInjection] resolve array env vars
Add Occitan plural rule
Fix security/* cross-dependencies
[Messenger] implement several senders using a ChainSender
[Lock] Skip test if posix extension is not installed
fix bug when imported routes are prefixed
[DI] Allow defining bindings on ChildDefinition
use strict compare in url validator
Disallow illegal characters like "." in session.name
[HttpKernel] do file_exists() check instead of silent notice
Select alternatives on missing receiver arg or typo
fix rounding from string
* 4.0:
do not mock the session in token storage tests
[DependencyInjection] resolve array env vars
Add Occitan plural rule
Fix security/* cross-dependencies
[Lock] Skip test if posix extension is not installed
[DI] Allow defining bindings on ChildDefinition
use strict compare in url validator
Disallow illegal characters like "." in session.name
[HttpKernel] do file_exists() check instead of silent notice
fix rounding from string
* 3.4:
do not mock the session in token storage tests
[DependencyInjection] resolve array env vars
Add Occitan plural rule
Fix security/* cross-dependencies
[Lock] Skip test if posix extension is not installed
[DI] Allow defining bindings on ChildDefinition
use strict compare in url validator
Disallow illegal characters like "." in session.name
[HttpKernel] do file_exists() check instead of silent notice
fix rounding from string
* 2.8:
do not mock the session in token storage tests
Add Occitan plural rule
Fix security/* cross-dependencies
Disallow illegal characters like "." in session.name
fix rounding from string
* 2.7:
do not mock the session in token storage tests
Add Occitan plural rule
Disallow illegal characters like "." in session.name
fix rounding from string
This PR was submitted for the master branch but it was squashed and merged into the 4.1 branch instead (closes#27312).
Discussion
----------
Supress deprecation notices thrown when getting private servies from container in tests
| Q | A
| ------------- | ---
| Branch? | 4.1
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27037
| License | MIT
| Doc PR | na
This is my first attempt at fixing #27037.
This approach works for me, and I believe it will work globally, but I am not entirely sure if it is the "right" way to do this. Its not that I think it's the "wrong" way to do it, its just that the `phpunit-bridge` code structure is not the type of code structure that I'm used to, and I'm still new to this project, so I don't know all of the ins and outs, or if there might be a more ideal place to inject the logic we want.
Also, I think my code may be a bit redundant, and I was hoping to get feedback on that. @nicolas-grekas (or anyone else), do you think it is safe to simply check if the deprecation message contains the substring ` service is private, getting it from the container...`? if so, then I think we can simply get rid of my `$isNoticeForContainerGetUsage` bit altogether. If I am understanding things properly, `$isNoticeForContainerGetUsage` will always be true if `$isPrivateServiceNotice` is true, thus we can safely remove the former (as the later is more intuitive, IMO).
The last thing I wanted to confirm was my interpretation of the stack trace, as detailed in my code comment. If the bit after `NOTE` is not correct, this code might not be a proper solution. I tested various contexts where the error should be suppressed (from within tests) and also where it should not (from within controllers, etc), which is what I based my `NOTE` comment on.
Commits
-------
00603bf010 Supress deprecation notices thrown when getting private servies from container in tests
This PR was merged into the 4.1 branch.
Discussion
----------
[Messenger] Allow to scope handlers per bus
| Q | A
| ------------- | ---
| Branch? | 4.1 <!-- see below -->
| Bug fix? | no
| New feature? | yes <!-- 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 | todo
<img width="970" alt="screenshot 2018-05-15 a 18 34 11" src="https://user-images.githubusercontent.com/2211145/40070551-b36d1f50-586e-11e8-8a44-c6a1503312dd.PNG">
This prevents from dispatching a message in the wrong bus. It works especially great with PSR-4 discovery in DI:
```yaml
command_handlers:
namespace: App\Message\
resource: '%kernel.project_dir%/src/Message/*CommandHandler.php'
tags:
- { name: messenger.message_handler, bus: command_bus }
query_handlers:
namespace: App\Message\
resource: '%kernel.project_dir%/src/Message/*QueryHandler.php'
tags:
- { name: messenger.message_handler, bus: query_bus }
```
<details>
<summary>(or in some layered architecture)</summary>
```yaml
command_handlers:
namespace: App\Application\
resource: '%kernel.project_dir%/src/Application/**/Handler/*CommandHandler.php'
tags:
- { name: messenger.message_handler, bus: command_bus }
query_handlers:
namespace: App\Application\
resource: '%kernel.project_dir%/src/Application/**/Handler/*QueryHandler.php'
tags:
- { name: messenger.message_handler, bus: query_bus }
```
</details>
---
It also updates (and add tests for) the `DebugCommand`, so we can inspect easily where is supposed to be handled each message.
It's totally optional, and if the bus isn't provided, then it stays available in every bus.
Commits
-------
fd810cdee0 Uses `protected` for test functions
9d658e915e [Messenger] Allow to scope handlers per bus
This PR was merged into the 2.7 branch.
Discussion
----------
[Security] do not mock the session in token storage tests
| 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 |
Commits
-------
919f93d do not mock the session in token storage tests
This PR was merged into the 4.2-dev branch.
Discussion
----------
[LDAP] Add "applyOperations" method to EntryManager
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | yes
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27039
| License | MIT
| Doc PR | symfony/symfony-docs#9715
This PR adds a new method called `applyOperations` to the LDAP `EntryManager` class.
Internally it is mapping the new `UpdateOperation` object to the `ldap_modify_batch` method.
Tests green against openldap.
Thanks for any feedback.
Todo:
* [x] Add Docs PR
Commits
-------
8fc09c73c6 Add applyOperations batch method to EntryManager
This PR was merged into the 3.4 branch.
Discussion
----------
[HttpKernel] do file_exists() check instead of silent notice
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #27234
| License | MIT
| Doc PR | -
Commits
-------
f8cde70ba1 [HttpKernel] do file_exists() check instead of silent notice