-
Notifications
You must be signed in to change notification settings - Fork 45
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
[2.x] Add events #81
[2.x] Add events #81
Conversation
11bcfbf
to
0b3d92a
Compare
6483024
to
d140253
Compare
I guess this would be the basis for a 2.x release? |
@stof since you seem to have authored similar changes in FOSUserBundle, can you also have a look here? |
This PR doesn't add any BC break, so this can be merged as is. But we will have duplicated lines about events:
Then we could remove I would like to implement #26 in order to provide a 2.x version that work without Trait too. |
@@ -221,4 +230,22 @@ protected function getCacheMetadataParameter() | |||
return $this->container->hasParameter(self::CACHE_METADATA_PARAMETER_NAME) | |||
&& false !== $this->container->getParameter(self::CACHE_METADATA_PARAMETER_NAME); | |||
} | |||
|
|||
/** | |||
* Compatibility layer for Symfony <= 4.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we even want to still care about <- 4.3? https://symfony.com/releases
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or would not including this create a BC break?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well, currently, the composer.json says it supports Symfony 3.4+.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to support Symfony 3.4 as long as it doesn't cause too many trouble.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, fine for me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finally, I changed my mind and removed support of Symfony < 4.4. Symfony 3.4 will only get security fixes now, I think no one would upgrade that bundle while keeping a legacy version of Symfony.
yeah I am fine bumping that to 4.4
…On Tue, 19 Jan 2021 at 11:25, Christophe Coevoet ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/Services/DatabaseTools/AbstractDatabaseTool.php
<#81 (comment)>
:
> @@ -221,4 +230,22 @@ protected function getCacheMetadataParameter()
return $this->container->hasParameter(self::CACHE_METADATA_PARAMETER_NAME)
&& false !== $this->container->getParameter(self::CACHE_METADATA_PARAMETER_NAME);
}
+
+ /**
+ * Compatibility layer for Symfony <= 4.3
well, currently, the composer.json says it supports Symfony 3.4+.
--
regards,
Lukas
|
split test and Kernel
d140253
to
b5d5e85
Compare
8806a47
to
12dfa7d
Compare
0c71063
to
97be0a8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest we create a new 2.x branch and point this PR at 2.x
wdyt?
LGTM aside from the small CS issue I noticed |
Thanks for the review @lsmith77 ! I fixed the issue and will merge once CI is finished. |
I took inspiration from FOSUserBundle: https://github.com/FriendsOfSymfony/FOSUserBundle/blob/8bb87890cbd872c870f7bd146922906f6e8ddf5c/FOSUserEvents.php#L26
TODO:
ObjectManager
,ReferenceRepository
andAbstractExecutor
from the events? Users could inject these services in their listenersReferenceRepository
in the relevant event, as requested in [RFC] Post Fixtures Database restore #27?require
instead ofrequire-dev