Skip to content

Commit

Permalink
Merge pull request #9 from BassRefleXive/master
Browse files Browse the repository at this point in the history
WEB-21070: Migrate to Symfony 4
  • Loading branch information
eglobal-it authored Sep 12, 2018
2 parents 3afa22a + 3c86496 commit f0a41ec
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 22 deletions.
8 changes: 3 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: php

php:
- 7.0
- 7.1

sudo: false

Expand All @@ -12,12 +12,10 @@ cache:
matrix:
fast_finish: true
include:
- php: 7.0
env: SYMFONY_VERSION='3.4.*'
- php: 7.1
env: SYMFONY_VERSION='3.4.*'
env: SYMFONY_VERSION='4.1.*'
- php: 7.2
env: SYMFONY_VERSION='3.4.*'
env: SYMFONY_VERSION='4.1.*'

before_install:
- phpenv config-add travis.php.ini
Expand Down
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,13 @@ Mark controller routes as cacheable
namespace Acme\FooBundle\Controller;

use EGlobal\Bundle\TemplateCacheBundle\Annotation\CacheableTemplate;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;

class MyController extends Controller
{
/**
* @Method("GET")
* @Route("/my/foo.html", name="my.template.foo", options={"expose"=true})
* @Route(methods={"GET"}, path="/my/foo.html", name="my.template.foo", options={"expose"=true})
* @CacheableTemplate("AcmeFooBundle:Template:foo.html.twig")
*/
public function fooAction()
Expand All @@ -82,8 +80,7 @@ class MyController extends Controller
}

/**
* @Method("GET")
* @Route("/my/bar.svg", name="my.template.bar", options={"expose"=true})
* @Route(methods={"GET"}, path="/my/bar.svg", name="my.template.bar", options={"expose"=true})
* @CacheableTemplate("AcmeFooBundle:Template:bar.svg.twig")
*/
public function barAction()
Expand Down
18 changes: 9 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
"keywords": [ "template", "cache" ],
"license": "MIT",
"require": {
"php": ">=7.0",
"php": ">=7.1",
"doctrine/annotations": "~1.0",
"symfony/asset": "3.4.*",
"symfony/framework-bundle": "3.4.*",
"symfony/console": "3.4.*",
"symfony/translation": "3.4.*",
"symfony/routing": "3.4.*",
"symfony/twig-bundle": "3.4.*",
"symfony/templating": "3.4.*",
"sensio/framework-extra-bundle": "^3.0",
"symfony/asset": "^4.0",
"symfony/framework-bundle": "^4.0",
"symfony/console": "^4.0",
"symfony/translation": "^4.0",
"symfony/routing": "^4.0",
"symfony/twig-bundle": "^4.0",
"symfony/templating": "^4.0",
"sensio/framework-extra-bundle": "^5.2",
"psr/log": "~1.0"
},
"require-dev": {
Expand Down
2 changes: 1 addition & 1 deletion src/Finder/CacheableTemplateFinder.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
use EGlobal\Bundle\TemplateCacheBundle\Helper\FileContentTokenizer;
use EGlobal\Bundle\TemplateCacheBundle\Model\CacheableTemplate as CacheableTemplateModel;
use ReflectionMethod;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Component\Config\FileLocatorInterface;
use Symfony\Component\Finder\Finder;
use Symfony\Component\Finder\SplFileInfo;
use Symfony\Component\Routing\Annotation\Route;

class CacheableTemplateFinder implements CacheableTemplateFinderInterface
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Command/DumpTemplateCacheCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function setUp()
->setMethods(['getDumper'])
->getMock();

$application = new Application(self::$kernel);
$application = new Application();
$application->add($this->command);

$this->tester = new CommandTester($this->command);
Expand Down

0 comments on commit f0a41ec

Please sign in to comment.