Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[FrameworkBundle] Register the DataUriNormalizer #17631

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 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Next Next commit
[FrameworkBundle] Register the DataUriNormalizer
  • Loading branch information
dunglas committed Feb 21, 2016
commit 9ee93b10e2040179dde71276f99bf7a1f5e144d7
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
<tag name="serializer.normalizer" priority="-1000" />
</service>

<service id="serializer.normalizer.data_uri" class="Symfony\Component\Serializer\Normalizer\DataUriNormalizer">
<!-- Run after serializer.normalizer.object -->
<tag name="serializer.normalizer" priority="-920" />
</service>

<!-- Loader -->
<service id="serializer.mapping.chain_loader" class="Symfony\Component\Serializer\Mapping\Loader\LoaderChain" public="false">
<argument type="collection" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use Symfony\Component\DependencyInjection\Loader\ClosureLoader;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\Serializer\Normalizer\DataUriNormalizer;

abstract class FrameworkExtensionTest extends TestCase
{
Expand Down Expand Up @@ -453,6 +454,17 @@ public function testRegisterSerializerExtractor()
$this->assertEquals(array('priority' => -999), $tag[0]);
}

public function testDataUriNormalizerRegistered()
{
$container = $this->createContainerFromFile('full');

$definition = $container->getDefinition('serializer.normalizer.data_uri');
$tag = $definition->getTag('serializer.normalizer');

$this->assertEquals(DataUriNormalizer::class, $definition->getClass());
$this->assertEquals(-920, $tag[0]['priority']);
}

public function testAssetHelperWhenAssetsAreEnabled()
{
$container = $this->createContainerFromFile('full');
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.