diff --git a/composer.json b/composer.json index 59a552d..9973ea4 100644 --- a/composer.json +++ b/composer.json @@ -19,12 +19,6 @@ "Rougin\\Combustor\\": "src/" } }, - "scripts" : { - "post-install-cmd": [ - "Rougin\\Combustor\\Tools::ignite", - "composer update" - ] - }, "suggest": { "rougin/codeigniter": "Yet another way to install CodeIgniter via Composer", "rougin/refinery": "A command line interface for Migrations Class in CodeIgniter" diff --git a/src/Doctrine/InstallCommand.php b/src/Doctrine/InstallCommand.php index 6313276..dc0b360 100644 --- a/src/Doctrine/InstallCommand.php +++ b/src/Doctrine/InstallCommand.php @@ -41,11 +41,11 @@ protected function execute(InputInterface $input, OutputInterface $output) $composer = '{ - "description" : "The CodeIgniter framework", - "name" : "codeigniter/framework", - "license": "MIT", - "require": {' . "\n\t\t" . implode(',' . "\n\t\t", $requiredLibraries) . "\n\t" . '}, - "require-dev": {' . "\n\t\t" . implode(',' . "\n\t\t", $requiredDevLibraries) . "\n\t" . '} + "description" : "The CodeIgniter framework", + "name" : "codeigniter/framework", + "license": "MIT", + "require": {' . "\n " . implode(',' . "\n ", $requiredLibraries) . "\n " . '}, + "require-dev": {' . "\n " . implode(',' . "\n ", $requiredDevLibraries) . "\n " . '} }'; $file = fopen('composer.json', 'wb'); @@ -146,6 +146,7 @@ protected function execute(InputInterface $input, OutputInterface $output) file_put_contents(VENDOR . 'rougin/combustor/bin/combustor.php', $combustor); fclose($file); + Tools::ignite(); $output->writeln('The Doctrine ORM is now installed successfully!'); } diff --git a/src/Tools.php b/src/Tools.php index 16b383a..3c0aafc 100644 --- a/src/Tools.php +++ b/src/Tools.php @@ -1,8 +1,5 @@ __toString(), 'core/CodeIgniter.php') !== FALSE) { - $basepath = str_replace('core/CodeIgniter.php', '', $path->__toString()); - define('BASEPATH', $basepath); - - break; - } - } - /** * Get the templates */ - $miscellaneous = VENDOR . 'rougin/combustor/src/Templates/Miscellaneous/'; + $miscellaneous = VENDOR . 'rougin/combustor/src/Templates/Miscellaneous/'; $autoload = file_get_contents(APPPATH . 'config/autoload.php'); $codeigniterCore = file_get_contents(BASEPATH . 'core/CodeIgniter.php'); @@ -121,7 +101,7 @@ public static function ignite(Event $event = null) $config = file_get_contents('application/config/config.php'); $search = '$config[\'composer_autoload\'] = FALSE;'; - $replace = '$config[\'composer_autoload\'] = \'vendor/autoload.php\';'; + $replace = '$config[\'composer_autoload\'] = realpath(\'vendor\') . \'/autoload.php\';'; $config = str_replace($search, $replace, $config); diff --git a/src/Wildfire/InstallCommand.php b/src/Wildfire/InstallCommand.php index 42ac483..99e6043 100644 --- a/src/Wildfire/InstallCommand.php +++ b/src/Wildfire/InstallCommand.php @@ -80,6 +80,7 @@ protected function execute(InputInterface $input, OutputInterface $output) file_put_contents(VENDOR . 'rougin/combustor/bin/combustor.php', $combustor); fclose($file); + Tools::ignite(); $output->writeln('Wildfire is now installed successfully!'); }