Skip to content

Wrong path to config directory in v2 Service Provider #336

@gerardojbaez

Description

@gerardojbaez

Describe the bug
Wrong path to config directory in v2 Service Provider:

$path = __DIR__.'/../../config/'.$config_key.'.php';

This path is causing composer require webklex/laravel-imap:^2.0 to fail with:

ErrorException: require(/var/www/html/vendor/webklex/laravel-imap/src/Providers/../../config/imap.php): failed to open stream: No such file or directory

The package is trying to access the config path as if it were located in laravel-imap/, it is currently located under laravel-imap/src/.

To Reproduce
Steps to reproduce the behavior:

  1. On a Laravel instance, execute composer require webklex/laravel-imap:^2.0
  2. See error when install reaches @php artisan package:discover --ansi step

Expected behavior
The config directory is properly loaded, and the package is successfully installed.

Screenshots

image

Desktop / Server:

  • OS: Alpine Linux v3.12.0
  • PHP: 7.4.7
  • Version: v2.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions