8000 Removed templating.helper.assets service configuration by peterrehm · Pull Request #14956 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Removed templating.helper.assets service configuration #14956

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 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions UPGRADE-3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -353,9 +353,9 @@ UPGRADE FROM 2.x to 3.0
* The `request` service was removed. You must inject the `request_stack`
service instead.

* The `templating.helper.assets` was moved to `templating_php.xml`. You can
* The `templating.helper.assets` was removed in Symfony 3.0. You should
use the `assets.package` service instead.

Before:

```php
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -557,12 +557,6 @@ private function registerTemplatingConfiguration(array $config, $ide, ContainerB
'Symfony\\Bundle\\FrameworkBundle\\Templating\\PhpEngine',
'Symfony\\Bundle\\FrameworkBundle\\Templating\\Loader\\FilesystemLoader',
));

if ($container->hasDefinition('assets.packages')) {
$container->getDefinition('templating.helper.assets')->replaceArgument(0, new Reference('assets.packages'));
} else {
$container->removeDefinition('templating.helper.assets');
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,6 @@
<argument type="service" id="router" />
</service>

<service id="templating.helper.assets" class="Symfony\Bundle\FrameworkBundle\Templating\Helper\AssetsHelper">
<tag name="templating.helper" alias="assets" />
<argument /> <!-- default package -->
<argument type="collection" /> <!-- named packages -->
</service>

<service id="templating.helper.actions" class="Symfony\Bundle\FrameworkBundle\Templating\Helper\ActionsHelper">
<tag name="templating.helper" alias="actions" />
<argument type="service" id="fragment.handler" />
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -467,21 +467,6 @@ public function testSerializerEnabled()
$this->assertTrue($container->has('serializer'));
}

public function testAssetHelperWhenAssetsAreEnabled()
{
$container = $this->createContainerFromFile('full');
$packages = $container->getDefinition('templating.helper.assets')->getArgument(0);

$this->assertSame('assets.packages', (string) $packages);
}

public function testAssetHelperWhenTemplatesAreEnabledAndAssetsAreDisabled()
{
$container = $this->createContainerFromFile('assets_disabled');

$this->assertFalse($container->hasDefinition('templating.helper.assets'));
}

protected function createContainer(array $data = array())
{
return new ContainerBuilder(new ParameterBag(array_merge(array(
Expand Down
0