Skip to content
This repository was archived by the owner on Nov 20, 2020. It is now read-only.

Commit 3d0fa46

Browse files
phonixorharoldiedema
authored andcommitted
fix deprecations (#86)
* fix deprecations * removed testing with unstable requirements
1 parent 535fd7d commit 3d0fa46

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

.travis.yml

-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ before_install:
3131
- if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then phpenv config-rm xdebug.ini; fi
3232
- composer self-update
3333
- if [ "$SYMFONY_VERSION" != "" ]; then composer require --no-update symfony/symfony:${SYMFONY_VERSION}; fi
34-
- if [ "$DEPS" == "dev" ]; then echo "dev!"; fi
35-
- perl -pi -e 's/^}$/,"minimum-stability":"dev"}/' composer.json;
3634

3735
install: composer update $COMPOSER_FLAGS --prefer-dist
3836

test/Bundle/DependencyInjection/WebpackCompilerPassTest.php

+5-3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121
use Symfony\Component\DependencyInjection\Definition;
2222
use Symfony\Component\Filesystem\Filesystem;
2323
use Symfony\Component\Process\Process;
24+
use Twig\Environment;
25+
use Twig\Loader\FilesystemLoader;
2426

2527
/**
2628
* @covers \Hostnet\Bundle\WebpackBundle\DependencyInjection\WebpackCompilerPass
@@ -40,8 +42,8 @@ public function testPass()
4042
$container->setParameter('kernel.cache_dir', realpath($fixture_dir . '/cache'));
4143
$container->set('filesystem', new Filesystem());
4244
$container->set('templating.finder', $this->createMock(TemplateFinderInterface::class));
43-
$container->set('twig', $this->createMock(\Twig_Environment::class));
44-
$container->set('twig.loader', $this->createMock(\Twig_Loader_Filesystem::class));
45+
$container->set('twig', $this->createMock(Environment::class));
46+
$container->set('twig.loader', $this->createMock(FilesystemLoader::class));
4547
$container->set('logger', $this->createMock(LoggerInterface::class));
4648

4749
$code_block_provider = new Definition(CodeBlockProviderInterface::class);
@@ -95,7 +97,7 @@ public function testLoadNoWebpack()
9597
$container->set('filesystem', new Filesystem());
9698
$container->set('templating.finder', $this->getMockBuilder(TemplateFinderInterface::class)->getMock());
9799
$container->set('twig', $this
98-
->getMockBuilder(\Twig_Environment::class)
100+
->getMockBuilder(Environment::class)
99101
->disableOriginalConstructor()
100102
->getMock());
101103
$container->set('logger', $this->getMockBuilder(LoggerInterface::class)->getMock());

test/Component/Asset/TwigParserTest.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
namespace Hostnet\Component\Webpack\Asset;
88

99
use PHPUnit\Framework\TestCase;
10+
use Twig\Environment;
11+
use Twig\Loader\ArrayLoader;
1012

1113
/**
1214
* @covers \Hostnet\Component\Webpack\Asset\TwigParser
@@ -32,7 +34,7 @@ class TwigParserTest extends TestCase
3234
protected function setUp()
3335
{
3436
$this->tracker = $this->getMockBuilder(Tracker::class)->disableOriginalConstructor()->getMock();
35-
$this->twig = new \Twig_Environment(new \Twig_Loader_Array([]));
37+
$this->twig = new Environment(new ArrayLoader([]));
3638
$this->cache_dir = sys_get_temp_dir();
3739
}
3840

0 commit comments

Comments
 (0)