8000 Fix upgrade guides concerning erroneous removal of assets helper · symfony/symfony@5abac56 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5abac56

Browse files
committed
Fix upgrade guides concerning erroneous removal of assets helper
1 parent 414ddf7 commit 5abac56

File tree

2 files changed

+2
-47
lines changed

2 files changed

+2
-47
lines changed

UPGRADE-2.7.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -596,11 +596,11 @@ TwigBundle
596596
FrameworkBundle
597597
---------------
598598

599-
* The `templating.helper.assets` was refactored and returns now an object of the type
599+
* The `templating.helper.assets` service was refactored and now returns an object of type
600600
`Symfony\Bundle\FrameworkBundle\Templating\Helper\AssetsHelper` instead of
601601
`Symfony\Component\Templating\Helper\CoreAssetsHelper`. You can update your class definition
602602
or use the `assets.packages` service instead. Using the `assets.packages` service is the recommended
603-
way. The `templating.helper.assets` service will be removed in Symfony 3.0.
603+
way.
604604

605605
Before:
606606

UPGRADE-3.0.md

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -388,51 +388,6 @@ UPGRADE FROM 2.x to 3.0
388388
* The `request` service was removed. You must inject the `request_stack`
389389
service instead.
390390

391-
* The `templating.helper.assets` was removed in Symfony 3.0. You should
392-
use the `assets.package` service instead.
393-
394-
Before:
395-
396-
```php
397-
use Symfony\Component\Templating\Helper\CoreAssetsHelper;
398-
399-
class DemoService
400-
{
401-
private $assetsHelper;
402-
403-
public function __construct(CoreAssetsHelper $assetsHelper)
404-
{
405-
$this->assetsHelper = $assetsHelper;
406-
}
407-
408-
public function testMethod()
409-
{
410-
return $this->assetsHelper->getUrl('thumbnail.png', null, $this->assetsHelper->getVersion());
411-
}
412-
}
413-
```
414-
415-
After:
416-
417-
```php
418-
use Symfony\Component\Asset\Packages;
419-
420-
class DemoService
421-
{
422-
private $assetPackages;
423-
424-
public function __construct(Packages $assetPackages)
425-
{
426-
$this->assetPackages = $assetPackages;
427-
}
428-
429-
public function testMethod()
430-
{
431-
return $this->assetPackages->getUrl('thumbnail.png').$this->assetPackages->getVersion();
432-
}
433-
}
434-
```
435-
436391
* The `enctype` method of the `form` helper was removed. You should use the
437392
new method `start` instead.
438393

0 commit comments

Comments
 (0)
0