Compare commits

..
2 Commits
Author SHA1 Message Date
Barry vd. Heuvel 3ac68d5446 Change order 2013-05-30 21:40:02 +03:00
Barry vd. Heuvel 26f09bccbf Throw error when compiled.php exists 2013-05-30 21:39:12 +03:00
2 changed files with 37 additions and 29 deletions
+6 -1
View File
@@ -8,6 +8,11 @@ Add the helper file to your laravel folder (not in a public folder). The file is
* SublimeText CodeIntel version: https://gist.github.com/barryvdh/5227814 * SublimeText CodeIntel version: https://gist.github.com/barryvdh/5227814
### Automatic phpDoc generation for Laravel Facades ### Automatic phpDoc generation for Laravel Facades
#### NOTE: run before optimising. If bootstrap/compiled.php is loaded, it doesn't work.
php artisan clear-compiled
php artisan ide-helper:generate
php artisan optimize
Require this package in your composer.json: Require this package in your composer.json:
@@ -31,8 +36,8 @@ You can configure your composer.json to do this after each commit:
"scripts":{ "scripts":{
"post-update-cmd":[ "post-update-cmd":[
"php artisan optimize",
"php artisan ide-helper:generate", "php artisan ide-helper:generate",
"php artisan optimize"
] ]
}, },
@@ -52,6 +52,9 @@ class GeneratorCommand extends Command {
*/ */
public function fire() public function fire()
{ {
if (file_exists($compiled = base_path().'/bootstrap/compiled.php')){
$this->error('Error: first delete bootstrap/compiled.php (php artisan clear-compiled)');
}else{
$filename = $this->argument('filename'); $filename = $this->argument('filename');
if($this->option('memory')){ if($this->option('memory')){
@@ -79,7 +82,7 @@ class GeneratorCommand extends Command {
}else{ }else{
$this->error("The helper file could not be created at $filename"); $this->error("The helper file could not be created at $filename");
} }
}
} }
protected function useMemoryDriver(){ protected function useMemoryDriver(){