Laravel-ide-helper: Using Laravel IDE Helper with version 5.5

Created on 16 Oct 2017  路  3Comments  路  Source: barryvdh/laravel-ide-helper

Hello, and sorry for the dumb questions
I'm using a fresh installation of Laravel 5.5 and I have some doubts about installing IDE Helper:

  1. Even with the brand new package discovery feature do I have to manually add the service provider Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class, ? (please notice that I installed IDE Helper with --dev option)
  2. in Laravel 5.5 there is no "post-update-cmd" command in composer.json file: so, how do I configure it to add the following lines?
"scripts":{
    "post-update-cmd": [
        "Illuminate\\Foundation\\ComposerScripts::postUpdate",
        "php artisan ide-helper:generate",
        "php artisan ide-helper:meta",
        "php artisan optimize"
    ]
},

Thanks a lot for your answers

Most helpful comment

  1. You should be good to go as long as you're using v.2.4.0, when Auto-Discovery support was added, or newer. You don't need to manually add the service provider. Dev dependencies will also be auto-discovered whenever they are installed.
  2. You can still use "post-update-cmd", since it's a Composer hook. The new configuration is:
    json "scripts": { "post-update-cmd": [ "@php artisan ide-helper:generate", "@php artisan ide-helper:meta" ] },

Hope this helps 馃檪

All 3 comments

Just add it to your composer file as another json attribute.
(Require is one of the attribute)
ex

{
 "require" : { 
  [PACKAGES]
 },
 "scripts":{
   "post-update-cmd": [
    "Illuminate\\Foundation\\ComposerScripts::postUpdate",
    "php artisan ide-helper:generate",
    "php artisan ide-helper:meta",
    "php artisan optimize"
   ]
 }
}
  1. You should be good to go as long as you're using v.2.4.0, when Auto-Discovery support was added, or newer. You don't need to manually add the service provider. Dev dependencies will also be auto-discovered whenever they are installed.
  2. You can still use "post-update-cmd", since it's a Composer hook. The new configuration is:
    json "scripts": { "post-update-cmd": [ "@php artisan ide-helper:generate", "@php artisan ide-helper:meta" ] },

Hope this helps 馃檪

@barryvdh all question where answered, IMHO this is good to be closed :}

Was this page helpful?
0 / 5 - 0 ratings