laravel-ide-helper icon indicating copy to clipboard operation
laravel-ide-helper copied to clipboard

How do we ignore a directory?

Open CitizenBeta opened this issue 2 years ago • 4 comments

Versions:

  • ide-helper Version: 2.10.0
  • PHP Version: 8

Question:

How do we specify a more narrow directory for importing models, or is there a way to ignore a directory?

I'm running into multiple definitions warnings in Phpstorm due to classes imported into ide_helper from my app/Services classes which are not models. I read the docs and it seems like maybe something like this would work, but it doesnt:

/*
    |--------------------------------------------------------------------------
    | Model locations to include
    |--------------------------------------------------------------------------
    |
    | Define in which directories the ide-helper:models command should look
    | for models.
    |
    | glob patterns are supported to easier reach models in sub-directories,
    | e.g. `app/Services/* /Models` (without the space)
    |
    */

    'model_locations' => [
        'app/Models',
    ],

    /*
    |--------------------------------------------------------------------------
    | Models to ignore
    |--------------------------------------------------------------------------
    |
    | Define which models should be ignored.
    |
    */

    'ignored_models' => [
        'app/Services'
    ],

How can we import app/Models but not app/Services?

CitizenBeta avatar Nov 02 '21 20:11 CitizenBeta

I updated to the latest version and I'm still getting multiple definitions warnings for my /Services classes.

CitizenBeta avatar Dec 28 '21 20:12 CitizenBeta

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this issue is still present on the latest version of this library on supported Laravel versions, please let us know by replying to this issue so we can investigate further. Thank you for your contribution! Apologies for any delayed response on our side.

stale[bot] avatar Apr 16 '22 12:04 stale[bot]

Any plans on implementing ignore by namespace prefix?

mvehar-preskok avatar Apr 26 '22 10:04 mvehar-preskok

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If this issue is still present on the latest version of this library on supported Laravel versions, please let us know by replying to this issue so we can investigate further. Thank you for your contribution! Apologies for any delayed response on our side.

stale[bot] avatar Jul 31 '22 12:07 stale[bot]