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

Check if cache directories of sulu exist #182

Merged
merged 7 commits into from
Jun 8, 2017
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions DependencyInjection/SuluArticleExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
use Symfony\Component\DependencyInjection\Loader;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\HttpKernel\DependencyInjection\Extension;

/**
Expand Down Expand Up @@ -112,5 +113,10 @@ public function load(array $configs, ContainerBuilder $container)
if (array_key_exists('SuluAutomationBundle', $bundles)) {
$loader->load('automation.xml');
}

// ensure existing cache folder for documents proxies
$documentsProxyDir = $container->getParameterBag()->resolveValue('%sulu.cache_dir%/documents');
$filesystem = new Filesystem();
$filesystem->mkdir($documentsProxyDir);
}
}
4 changes: 3 additions & 1 deletion Tests/Functional/Controller/ArticleControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,9 @@ public function testPutExtensions(
$this->assertNotEquals($article['title'], $response['title']);
$this->assertEquals($title, $response['title']);
$this->assertEquals($extensions['seo'], $response['ext']['seo']);
$this->assertEquals($extensions['excerpt'], $response['ext']['excerpt']);
foreach ($extensions['excerpt'] as $key => $value) {
$this->assertEquals($value, $response['ext']['excerpt'][$key]);
}
}

public function testPutDifferentTemplate($title = 'Sulu', $description = 'Sulu is awesome')
Expand Down
2 changes: 1 addition & 1 deletion Tests/app/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class AppKernel extends SuluTestKernel
*/
public function registerBundles()
{
return array_merge([new SuluArticleBundle(), new ONGRElasticsearchBundle()], parent::registerBundles());
return array_merge(parent::registerBundles(), [new SuluArticleBundle(), new ONGRElasticsearchBundle()]);
}

/**
Expand Down
6 changes: 1 addition & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,12 @@
"zendframework/zend-stdlib": "2.3.1 as 2.0.0rc5",
"zendframework/zendsearch": "2.*@dev",
"symfony/monolog-bundle": "2.4.*",
"doctrine/doctrine-bundle": "1.4.*",
"jackalope/jackalope-doctrine-dbal": "^1.2.5",
"jackalope/jackalope-jackrabbit": "1.2.*",
"phpunit/phpunit": "^4.8 || ^5.0",

"sulu/document-manager": "@dev",
"massive/search-bundle": "@dev",

"php-task/task-bundle": "@dev",
"php-task/php-task": "@dev"
"massive/search-bundle": "@dev"
},
"keywords": [
"articles"
Expand Down