Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tests] [Deprecation] Updated bundle notation to accommodate Symfony 4.1 and set browser client to not catch exceptions #1090

Merged
merged 1 commit into from May 8, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions DependencyInjection/Configuration.php
Expand Up @@ -11,6 +11,7 @@

namespace Liip\ImagineBundle\DependencyInjection;

use Liip\ImagineBundle\Controller\ImagineController;
use Liip\ImagineBundle\DependencyInjection\Factory\Loader\LoaderFactoryInterface;
use Liip\ImagineBundle\DependencyInjection\Factory\Resolver\ResolverFactoryInterface;
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
Expand Down Expand Up @@ -118,8 +119,8 @@ public function getConfigTreeBuilder()
->arrayNode('controller')
->addDefaultsIfNotSet()
->children()
->scalarNode('filter_action')->defaultValue('liip_imagine.controller:filterAction')->end()
->scalarNode('filter_runtime_action')->defaultValue('liip_imagine.controller:filterRuntimeAction')->end()
->scalarNode('filter_action')->defaultValue(sprintf('%s::filterAction', ImagineController::class))->end()
->scalarNode('filter_runtime_action')->defaultValue(sprintf('%s::filterRuntimeAction', ImagineController::class))->end()
->end()
->end()
->arrayNode('filter_sets')
Expand Down
4 changes: 3 additions & 1 deletion Resources/config/imagine.xml
Expand Up @@ -69,12 +69,14 @@

<!-- Controller -->

<service id="liip_imagine.controller" class="Liip\ImagineBundle\Controller\ImagineController" public="true">
<service id="Liip\ImagineBundle\Controller\ImagineController" public="true">
<argument type="service" id="liip_imagine.service.filter" />
<argument type="service" id="liip_imagine.data.manager" />
<argument type="service" id="liip_imagine.cache.signer" />
</service>

<service id="liip_imagine.controller" alias="Liip\ImagineBundle\Controller\ImagineController" public="true" />

<service id="liip_imagine.meta_data.reader" class="Imagine\Image\Metadata\ExifMetadataReader" public="false" />

<!-- ImagineInterface instances -->
Expand Down
3 changes: 2 additions & 1 deletion Tests/DependencyInjection/LiipImagineExtensionTest.php
Expand Up @@ -11,6 +11,7 @@

namespace Liip\ImagineBundle\Tests\DependencyInjection;

use Liip\ImagineBundle\Controller\ImagineController;
use Liip\ImagineBundle\DependencyInjection\Factory\Loader\FileSystemLoaderFactory;
use Liip\ImagineBundle\DependencyInjection\Factory\Resolver\WebPathResolverFactory;
use Liip\ImagineBundle\DependencyInjection\LiipImagineExtension;
Expand Down Expand Up @@ -49,7 +50,7 @@ public function testLoadWithDefaults()
$this->assertAlias('liip_imagine.gd', 'liip_imagine');
$this->assertHasDefinition('liip_imagine.controller');
$this->assertDICConstructorArguments(
$this->containerBuilder->getDefinition('liip_imagine.controller'),
$this->containerBuilder->getDefinition(ImagineController::class),
[
new Reference('liip_imagine.service.filter'),
new Reference('liip_imagine.data.manager'),
Expand Down
1 change: 1 addition & 0 deletions Tests/Functional/AbstractSetupWebTestCase.php
Expand Up @@ -44,6 +44,7 @@ public function setUp()
parent::setUp();

$this->client = $this->createClient();
$this->client->catchExceptions(false);
$this->webRoot = sprintf('%s/public', self::$kernel->getContainer()->getParameter('kernel.root_dir'));
$this->cacheRoot = $this->webRoot.'/media/cache';
$this->filesystem = new Filesystem();
Expand Down
2 changes: 1 addition & 1 deletion Tests/Functional/Controller/ImagineControllerTest.php
Expand Up @@ -23,7 +23,7 @@ class ImagineControllerTest extends AbstractSetupWebTestCase
{
public function testCouldBeGetFromContainer()
{
$this->assertInstanceOf(ImagineController::class, self::$kernel->getContainer()->get('liip_imagine.controller'));
$this->assertInstanceOf(ImagineController::class, self::$kernel->getContainer()->get(ImagineController::class));
}

public function testShouldResolvePopulatingCacheFirst()
Expand Down
30 changes: 15 additions & 15 deletions composer.json
Expand Up @@ -20,14 +20,14 @@
"require": {
"php": "^7.1",
"imagine/Imagine": "^0.7.1,<0.8",
"symfony/asset": "^3.0|^4.0",
"symfony/filesystem": "^3.0|^4.0",
"symfony/finder": "^3.0|^4.0",
"symfony/framework-bundle": "^3.0|^4.0",
"symfony/options-resolver": "^3.0|^4.0",
"symfony/process": "^3.0|^4.0",
"symfony/templating": "^3.0|^4.0",
"symfony/translation": "^3.0|^4.0"
"symfony/asset": "^3.4|^4.0",
"symfony/filesystem": "^3.4|^4.0",
"symfony/finder": "^3.4|^4.0",
"symfony/framework-bundle": "^3.4|^4.0",
"symfony/options-resolver": "^3.4|^4.0",
"symfony/process": "^3.4|^4.0",
"symfony/templating": "^3.4|^4.0",
"symfony/translation": "^3.4|^4.0"
},
"require-dev": {
"ext-gd": "*",
Expand All @@ -39,13 +39,13 @@
"friendsofphp/php-cs-fixer": "^2.10",
"league/flysystem": "^1.0",
"psr/log": "^1.0",
"symfony/browser-kit": "^3.0|^4.0",
"symfony/console": "^3.0|^4.0",
"symfony/dependency-injection": "^3.0|^4.0",
"symfony/form": "^3.0|^4.0",
"symfony/phpunit-bridge": "^3.0|^4.0",
"symfony/validator": "^3.0|^4.0",
"symfony/yaml": "^3.0|^4.0",
"symfony/browser-kit": "^3.4|^4.0",
"symfony/console": "^3.4|^4.0",
"symfony/dependency-injection": "^3.4|^4.0",
"symfony/form": "^3.4|^4.0",
"symfony/phpunit-bridge": "^3.4|^4.0",
"symfony/validator": "^3.4|^4.0",
"symfony/yaml": "^3.4|^4.0",
"twig/twig": "^1.12|^2.0"
},
"suggest": {
Expand Down