Skip to content
Snippets Groups Projects
Commit cb0d2034 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

ZF3 : rétablissement de l'utilisation du mode console

parent 1831fa41
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@ try {
$c->exec([
"cd $osedir",
"rm -Rf cache/*",
"php vendor/bin/doctrine-module orm:generate-proxies",
"php admin/actions/doctrine.php orm:generate-proxies",
"chmod -R 777 cache/DoctrineProxy",
"chmod -R 777 cache/Doctrine",
], false);
......
<?php
/* Chargement de la config globale */
require_once dirname(dirname(__DIR__)).'/config/application.config.php';
Application::init();
Application::run();
/* @var $cli \Symfony\Component\Console\Application */
$cli = Application::$container->get('doctrine.cli');
exit($cli->run());
\ No newline at end of file
......@@ -11,7 +11,7 @@ try {
$c->exec([
"cd $osedir",
"rm -Rf cache/*",
"php vendor/bin/doctrine-module orm:generate-proxies",
"php admin/actions/doctrine.php orm:generate-proxies",
"chmod -R 777 cache/DoctrineProxy",
"chmod -R 777 cache/Doctrine",
], false);
......
<?php
include_once dirname(__DIR__).'/module/Application/Application.php';
class AppConfig
......@@ -90,7 +90,6 @@ class AppConfig
'DoctrineModule',
'DoctrineORMModule',
'ZfcUser',
'BjyAuthorize',
'UnicaenApp',
'UnicaenAuth',
'UnicaenImport',
......@@ -134,11 +133,7 @@ class AppConfig
private static function inConsole()
{
if (class_exists('Zend\Console\Console')){
return \Zend\Console\Console::isConsole();
}else{
return true;
}
return PHP_SAPI == 'cli';
}
......
......@@ -31,8 +31,6 @@ class Application
define('REQUEST_MICROTIME', microtime(true));
chdir($appDir);
/* Chargement de la config globale */
require_once $appDir.'/config/application.config.php';
/* Définition de la config globale, éventuellement à partir du fichier de config général */
if (AppConfig::get('global', 'affichageErreurs')) {
......
......@@ -29,8 +29,7 @@ class Module implements ConsoleUsageProviderInterface, ConsoleBannerProviderInte
public function onBootstrap(MvcEvent $e)
{
if (!class_exists('Application')){
include_once __DIR__.'/Application.php';
if (empty(\Application::$container)){
\Application::$container = $e->getApplication()->getServiceManager();
}
......
<?php
include_once '../module/Application/Application.php';
/* Chargement de la config globale */
require_once dirname(__DIR__).'/config/application.config.php';
Application::init();
Application::run();
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment