Skip to content

Commit

Permalink
use Twig's namespaced classes to avoid deprecation notices
Browse files Browse the repository at this point in the history
  • Loading branch information
craue committed Apr 1, 2019
1 parent 35b2dfe commit 0545d34
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ matrix:
- php: 7.0
env: DEPS='lowest'
- php: 7.3
env: SYMFONY_VERSION='3.4.*'
env: SYMFONY_VERSION='3.4.*' SYMFONY_DEPRECATIONS_HELPER='1'
- php: 7.3
env: DEPS='unmodified'
fast_finish: true
Expand Down
6 changes: 4 additions & 2 deletions Twig/Extension/CountryExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,22 @@
namespace Craue\FormFlowDemoBundle\Twig\Extension;

use Symfony\Component\Intl\Intl;
use Twig\Extension\AbstractExtension;
use Twig\TwigFunction;

/**
* @author Christian Raue <christian.raue@gmail.com>
* @copyright 2013-2019 Christian Raue
* @license http://opensource.org/licenses/mit-license.php MIT License
*/
class CountryExtension extends \Twig_Extension {
class CountryExtension extends AbstractExtension {

/**
* {@inheritDoc}
*/
public function getFunctions() {
return [
new \Twig_SimpleFunction('country', [$this, 'getCountry']),
new TwigFunction('country', [$this, 'getCountry']),
];
}

Expand Down

0 comments on commit 0545d34

Please sign in to comment.