Skip to content

[PHPUnit] Fixed composer error on Windows #32186

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 184 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
184 commits
Select commit Hold shift + click to select a range
387207f
updated version to 4.4
fabpot May 9, 2019
780439d
Merge branch '4.3'
nicolas-grekas May 9, 2019
79814a2
Merge branch '4.3'
nicolas-grekas May 9, 2019
0ad9f24
Merge branch '4.3'
fabpot May 10, 2019
e19db43
Merge branch '4.3'
fabpot May 10, 2019
3d6b303
[Console] Optimisation on getting the command
Simperfit May 8, 2019
b563fe6
minor #31420 [Console] optimisation getting the command when finding …
May 14, 2019
519ba3c
Merge remote-tracking branch 'origin/4.3'
lyrixx May 16, 2019
429307d
[Monolog] Setup the LoggerProcessor after all other processor
lyrixx May 16, 2019
45446e8
[FrameworkBundle] Mention that the described service has been removed…
May 17, 2019
2da226a
[Validator] Add compared value path to violation parameters
ogizanagi May 10, 2019
5bf7759
bug #31525 [FrameworkBundle] Mention that the described service has b…
fabpot May 18, 2019
beb6036
Merge branch '4.3'
nicolas-grekas May 20, 2019
f8a04fd
[DI] deprecate short callables in yaml
nicolas-grekas May 19, 2019
5239873
feature #31543 [DI] deprecate short callables in yaml (nicolas-grekas)
nicolas-grekas May 22, 2019
80e8b21
[Cache] Add Redis Sentinel support
StephenClouse May 9, 2019
63d7309
feature #31437 [Cache] Add Redis Sentinel support (StephenClouse)
nicolas-grekas May 22, 2019
1b29cb1
[Ldap] Add exception for mapping ldap errors
Simperfit May 19, 2019
11c8b45
Add exception as HTML comment to beginning and end of `exception_full…
ruudk May 21, 2019
1da79ed
[HttpKernel] Add lts config
noniagriconomie May 19, 2019
24af4c5
feature #31539 [HttpKernel] Add lts config (noniagriconomie)
fabpot May 25, 2019
5dba412
Merge branch '4.3'
fabpot May 26, 2019
b1a6cea
Merge branch '4.3'
nicolas-grekas May 26, 2019
97d378a
Merge branch '4.3'
fabpot May 27, 2019
e2aae82
Merge branch '4.3'
fabpot May 27, 2019
e69551f
Merge branch '4.3'
fabpot May 27, 2019
f0a14b1
Merge branch '4.3'
nicolas-grekas May 28, 2019
086ca1b
Merge branch '4.3'
nicolas-grekas May 28, 2019
3c8aa87
Merge branch '4.3'
nicolas-grekas May 28, 2019
64c1626
Merge branch '4.3'
nicolas-grekas May 28, 2019
2c9a196
Merge branch '4.3'
nicolas-grekas May 28, 2019
94fd42c
Merge branch '4.3' into 4.4
nicolas-grekas May 28, 2019
384393c
Allow Symfony 5.0
nicolas-grekas May 28, 2019
1f2b66f
minor #31657 Allow Symfony 5.0 (nicolas-grekas)
nicolas-grekas May 28, 2019
7f40716
[Translation] fix dep
nicolas-grekas May 28, 2019
19811b8
fix typo
nicolas-grekas May 29, 2019
beca864
exchanged $rootDir and $fileLinkFormatter arguments in DebugCommand
yceruto May 29, 2019
5af3e54
Merge branch '4.3' into 4.4
nicolas-grekas May 29, 2019
ea8c054
minor #31688 [TwigBridge] Swapped $rootDir and $fileLinkFormatter arg…
Tobion May 29, 2019
e6a4526
Marked several components as incompatible with EventDispatcher 5.
derrabus May 29, 2019
b49d59f
minor #31712 Marked several components as incompatible with EventDisp…
nicolas-grekas May 30, 2019
9df66b8
bump Twig bridge dependency
xabbuh May 30, 2019
299b626
minor #31728 [TwigBundle] bump Twig bridge dependency (xabbuh)
nicolas-grekas May 30, 2019
44f326d
HttpKernel 4.4 is incompatible with Console 5 because of the EventDis…
derrabus May 30, 2019
2ff0273
minor #31734 [HttpKernel] Don't install HttpKernel 4.4 with Console 5…
nicolas-grekas May 30, 2019
1a8db29
[HttpKernel] Make DebugHandlersListener internal
May 30, 2019
1203290
feature #31732 [HttpKernel] Make DebugHandlersListener internal (chal…
nicolas-grekas May 30, 2019
47fd08e
Merge branch '4.3' into 4.4
nicolas-grekas May 30, 2019
e7279c2
Merge branch '4.3' into 4.4
nicolas-grekas May 30, 2019
c62032a
Merge branch '4.3' into 4.4
nicolas-grekas May 30, 2019
7481db6
[Security][Http] Forbid security-core 5.x
May 30, 2019
8fc75e3
minor #31753 [Security][Http] Forbid security-core 5.x (chalasr)
May 30, 2019
9646364
[MonologBridge] RouteProcessor class is now final to ease the the rem…
Simperfit May 29, 2019
9934252
feature #31700 [MonologBridge] RouteProcessor class is now final to e…
nicolas-grekas May 31, 2019
fbdb7f6
[SecurityBundle][Workflow] Forbid security-core 5.x
May 31, 2019
d2c3169
minor #31768 [SecurityBundle][Workflow] Forbid security-core 5.x (cha…
May 31, 2019
8e5b657
Merge branch '4.3' into 4.4
May 31, 2019
c8100f3
[Validator] Improve TypeValidator to handle array of types
jschaedl May 1, 2019
4b593b0
[FrameworkBundle] Allow dots in translation domains
jschaedl May 8, 2019
e2c9701
[Security][Guard] Forbid security-http >= 5.0
Jun 1, 2019
435a2c7
minor #31783 [Security][Guard] Forbid security-http >= 5.0 (chalasr)
Jun 1, 2019
d775303
[SecurityBundled] Forbid security-http >= 5.0
Jun 1, 2019
1409338
[Messenger] Deprecate passing a bus locator to ConsumeMessagesCommand…
Jun 1, 2019
c8f3cef
feature #31785 [Messenger] Deprecate passing a bus locator to Consume…
fabpot Jun 1, 2019
1f37275
[FrameworkBundle] Add missing BC layer for deprecated ControllerNameP…
May 30, 2019
693cbff
feature #31509 [Monolog] Setup the LoggerProcessor after all other pr…
lyrixx Jun 3, 2019
6e690a6
Add clear Entity Manager middleware (closes #29662)
Koc Apr 30, 2019
61613d0
Add missing deprecations for PHP templating layer
yceruto Jun 3, 2019
061f622
feature #31821 [FrameworkBundle][TwigBundle] Add missing deprecations…
fabpot Jun 3, 2019
549930e
[HttpClient] add $response->cancel()
nicolas-grekas Jun 3, 2019
50590dc
[Security] add PasswordEncoderInterface::needsRehash()
nicolas-grekas Apr 17, 2019
37c7a2b
Improved error message on create a form builder with invalid options
yceruto Jun 3, 2019
0119d21
Merge branch '4.3' into 4.4
nicolas-grekas Jun 3, 2019
9b46c17
[TwigBundle] mark TemplateIterator as internal
Tobion Jun 3, 2019
1768c93
feature #31594 [Security] add PasswordEncoderInterface::needsRehash()…
Jun 4, 2019
957a0b8
minor #31828 [TwigBundle] mark TemplateIterator as internal (Tobion)
fabpot Jun 4, 2019
be7b7fe
feature #31334 [Messenger] Add clear Entity Manager middleware (Koc)
fabpot Jun 4, 2019
9ce3ff3
minor #31827 [Form][DX] Improved error message on create a form build…
fabpot Jun 4, 2019
852fb36
feature #31831 [HttpClient] add $response->cancel() (nicolas-grekas)
fabpot Jun 4, 2019
a2b79e1
feature #31739 [FrameworkBundle] Add missing BC layer for deprecated …
fabpot Jun 4, 2019
5b05446
[Translation] refactor ArrayLoader::flatten
azjezz May 28, 2019
05d6d31
minor #31661 [Translation] refactor ArrayLoader::flatten (azjezz)
fabpot Jun 4, 2019
184ce66
Extract Abstract Doctrine Middleware
Koc May 22, 2019
765f14c
[Security] add MigratingPasswordEncoder
nicolas-grekas Apr 17, 2019
6f9d0f0
feature #31514 Add exception as HTML comment to beginning and end of …
fabpot Jun 4, 2019
129bf73
feature #31526 [Validator] Add compared value path to violation param…
fabpot Jun 4, 2019
5d261bc
minor #31633 [Messenger][DoctrineBridge] Extract Abstract Doctrine Mi…
fabpot Jun 4, 2019
8d359b2
feature #31351 [Validator] Improve TypeValidator to handle array of t…
fabpot Jun 4, 2019
ec9159e
feature #31597 [Security] add MigratingPasswordEncoder (nicolas-grekas)
fabpot Jun 4, 2019
be82b98
conflict with HttpKernel component 5.0
xabbuh Jun 4, 2019
491c0d5
minor #31838 [MonologBridge] conflict with HttpKernel component 5.0 (…
fabpot Jun 4, 2019
926ded8
Merge branch '4.3' into 4.4
fabpot Jun 4, 2019
59fa1bd
[HTTP Foundation] Deprecate passing argument to method Request::isMet…
May 28, 2019
5c8fb7b
feature #31658 [HTTP Foundation] Deprecate passing argument to method…
fabpot Jun 5, 2019
7207849
Merge branch '4.3' into 4.4
fabpot Jun 5, 2019
a24f4db
Merge branch '4.3' into 4.4
Tobion Jun 5, 2019
d305581
Merge branch '4.3' into 4.4
nicolas-grekas Jun 5, 2019
3c8d4c2
Merge branch '4.3' into 4.4
nicolas-grekas Jun 6, 2019
6dd72de
Merge branch '4.3' into 4.4
fabpot Jun 6, 2019
92aa6ee
[FrameworkBundle] fix compat with some SF5 components
nicolas-grekas Jun 6, 2019
1093a5e
minor #31907 [FrameworkBundle] fix compat with some SF5 components (n…
nicolas-grekas Jun 6, 2019
c289687
fix typo
nicolas-grekas Jun 6, 2019
a0e4ad3
Several components are incompatible with HttpKernel 5.0
Simperfit Jun 6, 2019
ad5028c
minor #31890 Several components are incompatible with HttpKernel 5.0 …
nicolas-grekas Jun 6, 2019
c8c159a
Merge branch '4.3' into 4.4
nicolas-grekas Jun 6, 2019
482c357
[Validator] v4 conflicts with translation v5
nicolas-grekas Jun 7, 2019
0fc0a34
[WebProfilerBundle] Select default theme based on user preferences
javiereguiluz Jun 7, 2019
3d9e884
Merge branch '4.3' into 4.4
nicolas-grekas Jun 7, 2019
0ebc425
[Validator] fix conflict rule
nicolas-grekas Jun 7, 2019
c5a2927
[Validator] relax low dep
nicolas-grekas Jun 7, 2019
6c109c7
[FrameworkBundle] fix FC with HttpKernel v5
nicolas-grekas Jun 7, 2019
3bef037
Merge branch '4.3' into 4.4
nicolas-grekas Jun 7, 2019
02a792a
minor #31938 [FrameworkBundle] fix FC with HttpKernel v5 (nicolas-gre…
nicolas-grekas Jun 7, 2019
e8975e2
Merge branch '4.3' into 4.4
nicolas-grekas Jun 8, 2019
1dce522
[Config] decouple tests from DI
nicolas-grekas Jun 8, 2019
ac95704
[FrameworkBundle] fix FC with DI v5
nicolas-grekas Jun 8, 2019
82d5ff0
[TwigBundle] fix FC with DI v5
nicolas-grekas Jun 8, 2019
cdaa4d6
[FrameworkBundle] remove dead code
nicolas-grekas Jun 8, 2019
bdb6217
Changed EventDispatcherInterface dependency from Component to Contracts
Koc Jun 8, 2019
ab8fb18
[DI] deprecates tag !tagged in favor of !tagged_iterator
jschaedl Apr 29, 2019
7f39f36
feature #31321 [DI] deprecates tag !tagged in favor of !tagged_iterat…
nicolas-grekas Jun 9, 2019
1c0baf6
[HttpClient] make Psr18Client implement relevant PSR-17 factories
nicolas-grekas Jun 10, 2019
c33f69c
feature #31451 [FrameworkBundle] Allow dots in translation domains (j…
fabpot Jun 11, 2019
cc1fc5b
feature #31919 [WebProfilerBundle] Select default theme based on user…
fabpot Jun 11, 2019
71731c6
feature #31980 [HttpClient] make Psr18Client implement relevant PSR-1…
fabpot Jun 11, 2019
dc7f6f7
feature #31956 [Mailer] Changed EventDispatcherInterface dependency f…
fabpot Jun 11, 2019
e54b62c
Merge branch '4.3' into 4.4
nicolas-grekas Jun 11, 2019
28674b1
[HttpClient] add HttplugClient for compat with libs that need httplug…
nicolas-grekas Jun 10, 2019
9d7e9fc
feature #31976 [HttpClient] add HttplugClient for compat with libs th…
nicolas-grekas Jun 11, 2019
8787bbc
Merge branch '4.3' into 4.4
fabpot Jun 13, 2019
fa38497
fixed CS
fabpot Jun 13, 2019
7a1e6f7
Merge branch '4.3' into 4.4
nicolas-grekas Jun 13, 2019
567cb27
[Security] minor improvement
nicolas-grekas Jun 13, 2019
2b26837
[VarDumper] caster for HttpClient's response dumps all info
nicolas-grekas Jun 13, 2019
bad18dc
feature #32026 [VarDumper] caster for HttpClient's response dumps all…
fabpot Jun 13, 2019
ff53cb4
[DomCrawler][Feature][DX] Add Form::getName() method
JustBlackBird Jun 8, 2019
f06a35b
feature #31959 [DomCrawler][Feature][DX] Add Form::getName() method (…
fabpot Jun 14, 2019
e3b248a
[Config] Introduce find method in ArrayNodeDefinition to ease configu…
jschaedl Apr 27, 2019
50c62d7
feature #31287 [Config] Introduce find method in ArrayNodeDefinition …
fabpot Jun 14, 2019
0c0978c
[Validator] Deprecate unused arg in ExpressionValidator
ogizanagi Jun 14, 2019
68d1b3f
feature #32041 [Validator] Deprecate unused arg in ExpressionValidato…
fabpot Jun 14, 2019
ecded5e
prevent double deprecation message
xabbuh Jun 14, 2019
9f6cbaa
minor #32047 [Validator] prevent double deprecation message (xabbuh)
Tobion Jun 14, 2019
7cf3fb4
Prepare for PHP 7.4 preload
nicolas-grekas Jun 14, 2019
5491d53
[PhpUnitBridge] Bump PHPUnit 7+8
ro0NL Jun 15, 2019
8496003
feature #32059 [PhpUnitBridge] Bump PHPUnit 7+8 (ro0NL)
fabpot Jun 16, 2019
507794a
Fine tune constructor types
Tobion Jun 16, 2019
a0aa941
minor #32054 Prepare for PHP 7.4 preload (nicolas-grekas)
nicolas-grekas Jun 17, 2019
6ee3efa
minor #32066 Fine tune constructor types (Tobion)
fabpot Jun 17, 2019
651de17
Merge branch '4.3' into 4.4
nicolas-grekas Jun 17, 2019
c34fcd9
Add BC layer for updated constructor types
nicolas-grekas Jun 17, 2019
67f99ce
Merge branch '4.3' into 4.4
nicolas-grekas Jun 17, 2019
561ad17
minor #32074 Add BC layer for updated constructor types (nicolas-grekas)
nicolas-grekas Jun 17, 2019
8a09579
remove bc break code
walidboughdiri May 31, 2019
411ad97
feature #31764 [FrameworkBundle] add attribute stamps (walidboughdiri)
fabpot Jun 18, 2019
d04a3b3
[CACHE] Correct required file added in #32054
andersonamuller Jun 18, 2019
b88f950
minor #32082 [CACHE] Correct required file added in #32054 (andersona…
nicolas-grekas Jun 18, 2019
d31b716
Merge branch '4.3' into 4.4
nicolas-grekas Jun 19, 2019
8a1813a
Revert "minor #32054 Prepare for PHP 7.4 preload (nicolas-grekas)"
nicolas-grekas Jun 20, 2019
dca9325
bug #32110 Revert "minor #32054 Prepare for PHP 7.4 preload (nicolas-…
fabpot Jun 20, 2019
f76e77d
Add autowiring for HTTPlug
nicolas-grekas Jun 19, 2019
431a769
Merge branch '4.3' into 4.4
xabbuh Jun 21, 2019
3bbf9da
fix order of items in upgrade file
xabbuh Jun 21, 2019
d8c008a
deprecate int/float for string input in NumberType
xabbuh Jun 7, 2019
f429986
feature #31547 [Ldap] Add exception for mapping ldap errors (Simperfit)
fabpot Jun 22, 2019
b9ad880
feature #32130 [Form] deprecate int/float for string input in NumberT…
fabpot Jun 22, 2019
115e67b
feature #32104 Add autowiring for HTTPlug (nicolas-grekas)
fabpot Jun 22, 2019
bcfff04
[Ldap] Add users extra_fields in ldap component
Simperfit May 18, 2019
aa4385d
feature #31532 [Ldap] Add users extraFields in ldap component (Simper…
fabpot Jun 22, 2019
3f8354f
[Process] Allow writing portable "prepared" command lines
Oct 31, 2017
2f9121b
use proper return types in ErrorHandler and ArgumentResolver
Tobion Jun 24, 2019
9fe532d
add return type declaration
xabbuh Jun 24, 2019
013904b
[Messenger] make all stamps final and mark stamp not meant to be sent
Tobion Jun 18, 2019
8124159
minor #32078 [Messenger] make all stamps final and mark stamp not mea…
Tobion Jun 24, 2019
efaa154
minor #32146 [Security] add return type declaration (xabbuh)
Jun 25, 2019
b80ce9a
[Form] remove comment about to-be-removed method as it is used in mas…
Tobion Jun 25, 2019
aaea4b0
minor #32177 [Form] remove comment about to-be-removed method (Tobion)
fabpot Jun 26, 2019
f15722d
minor #32143 use proper return types in ErrorHandler and ArgumentReso…
fabpot Jun 26, 2019
bd8ad3f
feature #32126 [Process] Allow writing portable "prepared" command li…
fabpot Jun 26, 2019
55c0b02
Merge branch '4.3' into 4.4
nicolas-grekas Jun 26, 2019
19cfc41
Fix typo
nicolas-grekas Jun 26, 2019
5f60bc9
Merge branch '4.3' into 4.4
nicolas-grekas Jun 26, 2019
f0a6675
Merge branch '4.3' into 4.4
nicolas-grekas Jun 26, 2019
f4d2e55
Fixes windows error
misterx Jun 26, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 94 additions & 0 deletions UPGRADE-4.4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
UPGRADE FROM 4.3 to 4.4
=======================

DependencyInjection
-------------------

* Deprecated support for short factories and short configurators in Yaml

Before:
```yaml
services:
my_service:
factory: factory_service:method
```

After:
```yaml
services:
my_service:
factory: ['@factory_service', method]
```
* Deprecated `tagged` in favor of `tagged_iterator`

Before:
```yaml
services:
App\Handler:
tags: ['app.handler']

App\HandlerCollection:
arguments: [!tagged app.handler]
```

After:
```yaml
services:
App\Handler:
tags: ['app.handler']

App\HandlerCollection:
arguments: [!tagged_iterator app.handler]
```

Form
----

* Using `int` or `float` as data for the `NumberType` when the `input` option is set to `string` is deprecated.

FrameworkBundle
---------------

* Deprecated support for `templating` engine in `TemplateController`, use Twig instead
* The `$parser` argument of `ControllerResolver::__construct()` and `DelegatingLoader::__construct()`
has been deprecated.
* The `ControllerResolver` and `DelegatingLoader` classes have been marked as `final`.
* The `controller_name_converter` and `resolve_controller_name_subscriber` services have been deprecated.

HttpClient
----------

* Added method `cancel()` to `ResponseInterface`

HttpKernel
----------

* The `DebugHandlersListener` class has been marked as `final`

Messenger
---------

* Deprecated passing a `ContainerInterface` instance as first argument of the `ConsumeMessagesCommand` constructor,
pass a `RoutableMessageBus` instance instead.

MonologBridge
--------------

* The `RouteProcessor` has been marked final.

Security
--------

* Implementations of `PasswordEncoderInterface` and `UserPasswordEncoderInterface` should add a new `needsRehash()` method

TwigBridge
----------

* Deprecated to pass `$rootDir` and `$fileLinkFormatter` as 5th and 6th argument respectively to the
`DebugCommand::__construct()` method, swap the variables position.

Validator
---------

* Deprecated passing an `ExpressionLanguage` instance as the second argument of `ExpressionValidator::__construct()`.
Pass it as the first argument instead.
59 changes: 59 additions & 0 deletions UPGRADE-5.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,43 @@ DependencyInjection
env(NAME): '1.5'
```

* Removed support for short factories and short configurators in Yaml

Before:
```yaml
services:
my_service:
factory: factory_service:method
```

After:
```yaml
services:
my_service:
factory: ['@factory_service', method]
```
* Removed `tagged` in favor of `tagged_iterator`

Before:
```yaml
services:
App\Handler:
tags: ['app.handler']

App\HandlerCollection:
arguments: [!tagged app.handler]
```

After:
```yaml
services:
App\Handler:
tags: ['app.handler']

App\HandlerCollection:
arguments: [!tagged_iterator app.handler]
```

DoctrineBridge
--------------

Expand Down Expand Up @@ -109,6 +146,7 @@ Finder
Form
----

* Removed support for using `int` or `float` as data for the `NumberType` when the `input` option is set to `string`.
* Removed support for using the `format` option of `DateType` and `DateTimeType` when the `html5` option is enabled.
* Using names for buttons that do not start with a letter, a digit, or an underscore leads to an exception.
* Using names for buttons that do not contain only letters, digits, underscores, hyphens, and colons leads to an
Expand Down Expand Up @@ -203,6 +241,16 @@ FrameworkBundle
* Removed support for legacy translations directories `src/Resources/translations/` and `src/Resources/<BundleName>/translations/`, use `translations/` instead.
* Support for the legacy directory structure in `translation:update` and `debug:translation` commands has been removed.
* Removed the "Psr\SimpleCache\CacheInterface" / "cache.app.simple" service, use "Symfony\Contracts\Cache\CacheInterface" / "cache.app" instead.
* Removed support for `templating` engine in `TemplateController`, use Twig instead

HttpClient
----------

* Added method `cancel()` to `ResponseInterface`
* The `$parser` argument of `ControllerResolver::__construct()` and `DelegatingLoader::__construct()`
has been removed.
* The `ControllerResolver` and `DelegatingLoader` classes have been made `final`.
* The `controller_name_converter` and `resolve_controller_name_subscriber` services have been removed.

HttpFoundation
--------------
Expand Down Expand Up @@ -238,6 +286,7 @@ HttpKernel
* Removed `GetResponseForExceptionEvent`, use `ExceptionEvent` instead
* Removed `PostResponseEvent`, use `TerminateEvent` instead
* Removed `TranslatorListener` in favor of `LocaleAwareListener`
* The `DebugHandlersListener` class has been made `final`

Intl
----
Expand All @@ -252,12 +301,19 @@ Messenger
---------

* The `LoggingMiddleware` class has been removed, pass a logger to `SendMessageMiddleware` instead.
* Passing a `ContainerInterface` instance as first argument of the `ConsumeMessagesCommand` constructor now
throws as `\TypeError`, pass a `RoutableMessageBus` instance instead.

Monolog
-------

* The methods `DebugProcessor::getLogs()`, `DebugProcessor::countErrors()`, `Logger::getLogs()` and `Logger::countErrors()` have a new `$request` argument.

MonologBridge
--------------

* The `RouteProcessor` class is final.

Process
-------

Expand Down Expand Up @@ -289,6 +345,7 @@ Routing
Security
--------

* Implementations of `PasswordEncoderInterface` and `UserPasswordEncoderInterface` must have a new `needsRehash()` method
* The `Role` and `SwitchUserRole` classes have been removed.
* The `getReachableRoles()` method of the `RoleHierarchy` class has been removed. It has been replaced by the new
`getReachableRoleNames()` method.
Expand Down Expand Up @@ -389,13 +446,15 @@ TwigBundle
TwigBridge
----------

* Removed argument `$rootDir` from the `DebugCommand::__construct()` method and the 5th argument must be an instance of `FileLinkFormatter`
* removed the `$requestStack` and `$requestContext` arguments of the
`HttpFoundationExtension`, pass a `Symfony\Component\HttpFoundation\UrlHelper`
instance as the only argument instead

Validator
--------

* An `ExpressionLanguage` instance or null must be passed as the first argument of `ExpressionValidator::__construct()`
* The `checkMX` and `checkHost` options of the `Email` constraint were removed
* The `Email::__construct()` 'strict' property has been removed. Use 'mode'=>"strict" instead.
* Calling `EmailValidator::__construct()` method with a boolean parameter has been removed, use `EmailValidator("strict")` instead.
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@
"monolog/monolog": "~1.11",
"nyholm/psr7": "^1.0",
"ocramius/proxy-manager": "^2.1",
"php-http/httplug": "^1.0|^2.0",
"predis/predis": "~1.1",
"psr/http-client": "^1.0",
"psr/simple-cache": "^1.0",
Expand Down Expand Up @@ -154,7 +155,7 @@
"minimum-stability": "dev",
"extra": {
"branch-alias": {
"dev-master": "4.3-dev"
"dev-master": "4.4-dev"
}
}
}
6 changes: 6 additions & 0 deletions src/Symfony/Bridge/Doctrine/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
CHANGELOG
=========

4.4.0
-----

* added `DoctrineClearEntityManagerMiddleware`


4.3.0
-----

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?php

/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Bridge\Doctrine\Messenger;

use Doctrine\Common\Persistence\ManagerRegistry;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\Messenger\Envelope;
use Symfony\Component\Messenger\Exception\UnrecoverableMessageHandlingException;
use Symfony\Component\Messenger\Middleware\MiddlewareInterface;
use Symfony\Component\Messenger\Middleware\StackInterface;

/**
* @author Konstantin Myakshin <molodchick@gmail.com>
*
* @internal
*/
abstract class AbstractDoctrineMiddleware implements MiddlewareInterface
{
protected $managerRegistry;
protected $entityManagerName;

public function __construct(ManagerRegistry $managerRegistry, string $entityManagerName = null)
{
$this->managerRegistry = $managerRegistry;
$this->entityManagerName = $entityManagerName;
}

final public function handle(Envelope $envelope, StackInterface $stack): Envelope
{
try {
$entityManager = $this->managerRegistry->getManager($this->entityManagerName);
} catch (\InvalidArgumentException $e) {
throw new UnrecoverableMessageHandlingException($e->getMessage(), 0, $e);
}

return $this->handleForManager($entityManager, $envelope, $stack);
}

abstract protected function handleForManager(EntityManagerInterface $entityManager, Envelope $envelope, StackInterface $stack): Envelope;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Symfony\Bridge\Doctrine\Messenger;

use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\Messenger\Envelope;
use Symfony\Component\Messenger\Middleware\StackInterface;

/**
* Clears entity manager after calling all handlers.
*
* @author Konstantin Myakshin <molodchick@gmail.com>
*/
class DoctrineClearEntityManagerMiddleware extends AbstractDoctrineMiddleware
{
protected function handleForManager(EntityManagerInterface $entityManager, Envelope $envelope, StackInterface $stack): Envelope
{
try {
return $stack->next()->handle($envelope, $stack);
} finally {
$entityManager->clear();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@

namespace Symfony\Bridge\Doctrine\Messenger;

use Doctrine\Common\Persistence\ManagerRegistry;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\Messenger\Envelope;
use Symfony\Component\Messenger\Exception\UnrecoverableMessageHandlingException;
use Symfony\Component\Messenger\Middleware\MiddlewareInterface;
use Symfony\Component\Messenger\Middleware\StackInterface;

/**
Expand All @@ -24,28 +22,10 @@
*
* @experimental in 4.3
*/
class DoctrineCloseConnectionMiddleware implements MiddlewareInterface
class DoctrineCloseConnectionMiddleware extends AbstractDoctrineMiddleware
{
private $managerRegistry;
private $entityManagerName;

public function __construct(ManagerRegistry $managerRegistry, string $entityManagerName = null)
{
$this->managerRegistry = $managerRegistry;
$this->entityManagerName = $entityManagerName;
}

/**
* {@inheritdoc}
*/
public function handle(Envelope $envelope, StackInterface $stack): Envelope
protected function handleForManager(EntityManagerInterface $entityManager, Envelope $envelope, StackInterface $stack): Envelope
{
try {
$entityManager = $this->managerRegistry->getManager($this->entityManagerName);
} catch (\InvalidArgumentException $e) {
throw new UnrecoverableMessageHandlingException($e->getMessage(), 0, $e);
}

try {
$connection = $entityManager->getConnection();

Expand Down
Loading