mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 09:53:15 +00:00
Merge branch 'master' into PHRDPL-86_xdebug
This commit is contained in:
@@ -15,6 +15,7 @@ use Alchemy\Phrasea\Application;
|
|||||||
use Alchemy\Phrasea\Command\Command;
|
use Alchemy\Phrasea\Command\Command;
|
||||||
use Alchemy\Phrasea\Exception\RuntimeException;
|
use Alchemy\Phrasea\Exception\RuntimeException;
|
||||||
use Alchemy\Phrasea\Model\Entities\User;
|
use Alchemy\Phrasea\Model\Entities\User;
|
||||||
|
use Alchemy\Phrasea\Plugin\Plugin;
|
||||||
use Symfony\Component\Console\Input\InputInterface;
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\Output\OutputInterface;
|
use Symfony\Component\Console\Output\OutputInterface;
|
||||||
use Symfony\Component\HttpKernel\Client;
|
use Symfony\Component\HttpKernel\Client;
|
||||||
@@ -30,6 +31,15 @@ class JsFixtures extends Command
|
|||||||
|
|
||||||
protected function doExecute(InputInterface $input, OutputInterface $output)
|
protected function doExecute(InputInterface $input, OutputInterface $output)
|
||||||
{
|
{
|
||||||
|
/** @var Plugin $plugin */
|
||||||
|
$msg = [];
|
||||||
|
foreach($this->container['plugins.manager']->listPlugins() as $plugin) {
|
||||||
|
$msg[] = sprintf(" bin/setup plugins:remove \"%s\"", $plugin->getName());
|
||||||
|
}
|
||||||
|
if(count($msg) !== 0) {
|
||||||
|
throw new RuntimeException("You must remove plugins first:\n" . join("\n", $msg));
|
||||||
|
}
|
||||||
|
|
||||||
if (!file_exists($this->container['db.fixture.info']['path'])) {
|
if (!file_exists($this->container['db.fixture.info']['path'])) {
|
||||||
throw new RuntimeException('You must generate sqlite db first, run "bin/developer phraseanet:regenerate-sqlite" command.');
|
throw new RuntimeException('You must generate sqlite db first, run "bin/developer phraseanet:regenerate-sqlite" command.');
|
||||||
}
|
}
|
||||||
@@ -104,6 +114,7 @@ class JsFixtures extends Command
|
|||||||
private function writeResponse(OutputInterface $output, $method, $path, $to, $authenticateUser = false)
|
private function writeResponse(OutputInterface $output, $method, $path, $to, $authenticateUser = false)
|
||||||
{
|
{
|
||||||
$environment = Application::ENV_TEST;
|
$environment = Application::ENV_TEST;
|
||||||
|
/** @var Application $app */
|
||||||
$app = require __DIR__ . '/../../Application/Root.php';
|
$app = require __DIR__ . '/../../Application/Root.php';
|
||||||
$app['orm.em'] = $app->extend('orm.em', function($em, $app) {
|
$app['orm.em'] = $app->extend('orm.em', function($em, $app) {
|
||||||
return $app['orm.ems'][$app['db.fixture.hash.key']];
|
return $app['orm.ems'][$app['db.fixture.hash.key']];
|
||||||
|
Reference in New Issue
Block a user