Skip to content
This repository has been archived by the owner on Sep 30, 2021. It is now read-only.

Sf 3.4 compat #457

Merged
merged 3 commits into from
Nov 4, 2017
Merged

Sf 3.4 compat #457

merged 3 commits into from
Nov 4, 2017

Conversation

greg0ire
Copy link
Contributor

@greg0ire greg0ire commented Nov 4, 2017

I am targeting this branch, because this does not break BC.

Changelog

### Fixed
- reusable test case `Sonata\CoreBundle\Test\AbstractWidgetTestCase` is now compatible with Symfony 3.4

Subject

This fixes the 3.4 build.

soullivaneuh
soullivaneuh previously approved these changes Nov 4, 2017
@soullivaneuh soullivaneuh requested review from core23 and jlamur November 4, 2017 16:24
@greg0ire greg0ire force-pushed the sf_3.4_compat branch 2 times, most recently from 9183b09 to c692b95 Compare November 4, 2017 16:34
@@ -88,6 +78,11 @@ protected function setUp()
$this->extension->initRuntime($environment);
}

public function getRenderer()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing PHPDoc.

soullivaneuh
soullivaneuh previously approved these changes Nov 4, 2017
@@ -89,6 +80,14 @@ protected function setUp()
}

/**
* @return TwigRendererInterface
*/
public function getRenderer()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

final?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. Done!

This breaks with Symfony 3.4, but luckily, there is a very simple
implementation of Twig_RuntimeLoaderInterface, let's try it!
Implies a minor Twig version bump.
->method('load')
->with($this->equalTo('Symfony\Bridge\Twig\Form\TwigRenderer'))
->will($this->returnValue($this->renderer));
$runtimeLoader = new \Twig_FactoryRuntimeLoader([
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do it later.

->method('load')
->with($this->equalTo('Symfony\Bridge\Twig\Form\TwigRenderer'))
->will($this->returnValue($this->renderer));
$runtimeLoader = new \Twig_FactoryRuntimeLoader([
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do it later.

@soullivaneuh soullivaneuh merged commit 64745f6 into sonata-project:3.x Nov 4, 2017
@greg0ire greg0ire deleted the sf_3.4_compat branch November 4, 2017 20:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants