-
Notifications
You must be signed in to change notification settings - Fork 84
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
Fixed deprecation with Symfony 4.2 #164
Fixed deprecation with Symfony 4.2 #164
Conversation
Had to do the same thing, thank you! Can you maybe check the build errors? |
I'm no Travis expert, but I tried to fix the DI component to version 4.2 for the phpstan check - seems it breaks memory limit (which is set to 1.5GB). Should I increase composer's memory limit for this build? Do you think this issue is "normal"? |
Not a normal issue, will check it out tonight |
…oser's memory limit
Just pushed a commit increasing the memory limit of composer - for this check - reveals the Also, an other failing test, but I think it is unrelated to what I did. Any idea how I can fix this dependency issue? |
Accidentally closed, didn't have time to check this and now I am afk for a few days. Do we event need distribution bundle? About test, took a quick look and it seems that new version of phpunit has a different signature which is a BC break, not sure tho |
For Symfony < 4 I guess. It shouldn't install if Flex is already there. |
Do we use it in code? If no, drop it, sf should install it as its dependency |
Update symfony phpunit bridge to 4.1 that should solve it IIRC. Also, do we still need memory limit? |
I removed composer memory_limit env var as it's not required anymore - needed it to get the error message from composer. Well, it only gets worse :p I changed the min requirement of phpunit bridge to ^4.1, now two tests fail. |
@@ -24,8 +24,14 @@ | |||
public function getConfigTreeBuilder(): TreeBuilder | |||
{ | |||
$treeBuilder = $this->createTreeBuilder(); | |||
$treeBuilder | |||
->root('fos_ck_editor') | |||
if (method_exists($treeBuilder, 'getRootNode')) { |
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.
Try this instead, because TreeBuilder has no constructor in previous versions
if (method_exists($treeBuilder, 'getRootNode')) { | |
if (method_exists(TreeBuilder::class, 'getRootNode')) { | |
$treeBuilder = new TreeBuilder('fos_ck_editor'); | |
$rootNode = $treeBuilder->getRootNode(); | |
} else { | |
$treeBuilder = new TreeBuilder(); | |
$rootNode = $treeBuilder->root('fos_ck_editor'); | |
} |
Try adding |
Green 🎉 now to address suggestions by @angelsk |
Co-authored-by: Jo Carter <github@jocarter.co.uk>
Hi, this PR fixes a small deprecation introduced in Symfony 4.2; the fix includes a BC layer for older versions.