#!/usr/bin/env php isInstalled()) { throw new \RuntimeException('Phraseanet is not installed, use setup command instead'); } if (!$app['phraseanet.configuration-tester']->isUpToDate()) { throw new \RuntimeException('Phraseanet is not up-to-date, use setup command instead'); } $app->command(new \module_console_aboutAuthors('about:authors')); $app->command(new \module_console_aboutLicense('about:license')); $app->command(new \module_console_checkExtension('check:extension')); $app->command(new CheckConfig('check:config')); $app->command(new UpgradeDBDatas('system:upgrade-datas')); $app->command(new \module_console_sphinxGenerateSuggestion('sphinx:generate-suggestions')); $app->command(new \module_console_systemMailCheck('system:mail-check')); $app->command(new \module_console_systemBackupDB('system:backup-db')); $app->command(new \module_console_systemClearCache('system:clear-cache')); $app->command(new \module_console_systemTemplateGenerator('system:template-generator')); $app->command(new \module_console_systemExport('system:export')); $app->command(new \module_console_taskrun('task:run')); $app->command(new \module_console_tasklist('task:list')); $app->command(new \module_console_taskState('task:state')); $app->command(new \module_console_schedulerState('scheduler:state')); $app->command(new \module_console_schedulerStop('scheduler:stop')); $app->command(new \module_console_schedulerStart('scheduler:start')); $app->command(new Mailtest('mail:test')); $app->command(new \module_console_fieldsList('fields:list')); $app->command(new \module_console_fieldsDelete('fields:delete')); $app->command(new \module_console_fieldsRename('fields:rename')); $app->command(new \module_console_fieldsMerge('fields:merge')); $app->command(new CreateCollection('collection:create')); $app->command(new RecordAdd('records:add')); $app->command(new RescanTechnicalDatas('records:rescan-technical-datas')); $app->command(new BuildMissingSubdefs('records:build-missing-subdefs')); $app->command(new AddPlugin()); $app->command(new RemovePlugin()); $app->command(new Configuration()); $result_code = is_int($app->run()) ? : 1; } catch (\Exception $e) { $result_code = 1; echo sprintf("\nAn error occured :\n\n\t\033[0;31m%s\033[0;37m\n\n", $e->getMessage()); } exit($result_code);