Skip to content

Commit 53e187a

Browse files
committed
Remove usage of old deprecated features
1 parent c1901a0 commit 53e187a

File tree

7 files changed

+32
-17
lines changed

7 files changed

+32
-17
lines changed

app/config/routing.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,29 @@ _app:
88
type: annotation
99

1010
home_redirect:
11-
pattern: /
11+
path: /
1212
defaults:
1313
_controller: lunetics_locale.switcher_controller:switchAction
1414
route: '/cms/routes/%locale%'
1515
statusCode: 301
1616
useReferrer: false
1717

1818
admin_wo_locale:
19-
pattern: /admin
19+
path: /admin
2020
defaults:
2121
_controller: FrameworkBundle:Redirect:redirect
2222
route: sonata_admin_dashboard
2323
permanent: true # this for 301
2424

2525
admin_dashboard_wo_locale:
26-
pattern: /admin/dashboard
26+
path: /admin/dashboard
2727
defaults:
2828
_controller: FrameworkBundle:Redirect:redirect
2929
route: sonata_admin_dashboard
3030
permanent: true # this for 301
3131

3232
admin_dashboard:
33-
pattern: /{_locale}/admin/
33+
path: /{_locale}/admin/
3434
defaults:
3535
_controller: FrameworkBundle:Redirect:redirect
3636
route: sonata_admin_dashboard

app/tests/AdminTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,12 @@ protected function doTestReachableAdminRoutes($admin)
9393
$requirements = $route->getRequirements();
9494

9595
// fix this one later
96-
if (strpos($route->getPattern(), 'export')) {
96+
if (strpos($route->getPath(), 'export')) {
9797
continue;
9898
}
9999

100100
// these don't all work atm
101-
if (strpos($route->getPattern(), 'show')) {
101+
if (strpos($route->getPath(), 'show')) {
102102
continue;
103103
}
104104

@@ -132,7 +132,7 @@ protected function doTestReachableAdminRoutes($admin)
132132

133133
$this->assertResponseSuccess($res);
134134

135-
$this->testedPatterns[] = $route->getPattern();
135+
$this->testedPatterns[] = $route->getPath();
136136
}
137137
}
138138
}

src/AppBundle/DataFixtures/PHPCR/LoadMenuData.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,15 @@
1616
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
1717
use Doctrine\Common\Persistence\ObjectManager;
1818
use PHPCR\Util\NodeHelper;
19-
use Symfony\Component\DependencyInjection\ContainerAware;
19+
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
20+
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
2021
use Symfony\Cmf\Bundle\MenuBundle\Doctrine\Phpcr\MenuNode;
2122
use Symfony\Cmf\Bundle\MenuBundle\Doctrine\Phpcr\Menu;
2223

23-
class LoadMenuData extends ContainerAware implements FixtureInterface, OrderedFixtureInterface
24+
class LoadMenuData implements ContainerAwareInterface, FixtureInterface, OrderedFixtureInterface
2425
{
26+
use ContainerAwareTrait;
27+
2528
public function getOrder()
2629
{
2730
return 60;

src/AppBundle/DataFixtures/PHPCR/LoadNewsData.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,15 @@
1515
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
1616
use Doctrine\Common\Persistence\ObjectManager;
1717
use Doctrine\ODM\PHPCR\DocumentManager;
18-
use Symfony\Component\DependencyInjection\ContainerAware;
18+
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
19+
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
1920
use PHPCR\Util\NodeHelper;
2021
use AppBundle\Document\DemoNewsContent;
2122

22-
class LoadNewsData extends ContainerAware implements FixtureInterface, OrderedFixtureInterface
23+
class LoadNewsData implements ContainerAwareInterface, FixtureInterface, OrderedFixtureInterface
2324
{
25+
use ContainerAwareTrait;
26+
2427
public function getOrder()
2528
{
2629
return 50;

src/AppBundle/DataFixtures/PHPCR/LoadRoutingData.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,14 @@
1818
use PHPCR\Util\NodeHelper;
1919
use Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr\RedirectRoute;
2020
use Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr\Route;
21-
use Symfony\Component\DependencyInjection\ContainerAware;
21+
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
22+
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
2223
use Symfony\Cmf\Component\Routing\RouteObjectInterface;
2324

24-
class LoadRoutingData extends ContainerAware implements FixtureInterface, OrderedFixtureInterface
25+
class LoadRoutingData implements ContainerAwareInterface, FixtureInterface, OrderedFixtureInterface
2526
{
27+
use ContainerAwareTrait;
28+
2629
public function getOrder()
2730
{
2831
return 21;

src/AppBundle/DataFixtures/PHPCR/LoadStaticPageData.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,14 @@
1818
use PHPCR\Util\NodeHelper;
1919
use AppBundle\Document\DemoSeoContent;
2020
use Symfony\Cmf\Bundle\SeoBundle\Doctrine\Phpcr\SeoMetadata;
21-
use Symfony\Component\DependencyInjection\ContainerAware;
21+
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
22+
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
2223
use Symfony\Component\Yaml\Parser;
2324

24-
class LoadStaticPageData extends ContainerAware implements FixtureInterface, OrderedFixtureInterface
25+
class LoadStaticPageData implements ContainerAwareInterface, FixtureInterface, OrderedFixtureInterface
2526
{
27+
use ContainerAwareTrait;
28+
2629
public function getOrder()
2730
{
2831
return 5;

src/AppBundle/EventListener/SandboxExceptionListener.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
namespace AppBundle\EventListener;
1313

1414
use PHPCR\RepositoryException;
15-
use Symfony\Component\DependencyInjection\ContainerAware;
15+
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
16+
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
1617
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
1718
use Symfony\Component\HttpFoundation\Response;
1819
use Symfony\Component\HttpKernel\KernelEvents;
@@ -23,8 +24,10 @@
2324
* Exception listener that will handle not found exceptions and try to give the
2425
* first time installer some clues what is wrong.
2526
*/
26-
class SandboxExceptionListener extends ContainerAware implements EventSubscriberInterface
27+
class SandboxExceptionListener implements EventSubscriberInterface, ContainerAwareInterface
2728
{
29+
use ContainerAwareTrait;
30+
2831
public function onKernelException(GetResponseForExceptionEvent $event)
2932
{
3033
if (!$event->getException() instanceof NotFoundHttpException) {

0 commit comments

Comments
 (0)