Skip to content

Installation fails on Windows / PHP 7.3.5 / Laravel 6.0.4 #743

@georgimorozov

Description

@georgimorozov
  • Telescope Version: 2.1
  • Laravel Version: 6.0.4
  • PHP Version: 7.3.5
  • Database Driver & Version:
  • OS: Windows 10

Description:

Telescope fails to create the required files from the stubs, resulting in a failed installation with the following error:

PS C:\wamp64\www\site> php artisan telescope:install
Publishing Telescope Service Provider...
Publishing Telescope Assets...
Publishing Telescope Configuration...

   ErrorException  : file_get_contents(C:\wamp64\www\site\app\Providers/TelescopeServiceProvider.php): failed to open stream: No such file or directory

  at C:\wamp64\www\site\vendor\laravel\telescope\src\Console\InstallCommand.php:80
    76| 
    77|         file_put_contents(app_path('Providers/TelescopeServiceProvider.php'), str_replace(
    78|             "namespace App\Providers;",
    79|             "namespace {$namespace}\Providers;",
  > 80|             file_get_contents(app_path('Providers/TelescopeServiceProvider.php'))
    81|         ));
    82|     }
    83| }
    84| 

  Exception trace:

  1   file_get_contents("C:\wamp64\www\site\app\Providers/TelescopeServiceProvider.php")
      C:\wamp64\www\site\vendor\laravel\telescope\src\Console\InstallCommand.php:80

  2   Laravel\Telescope\Console\InstallCommand::registerTelescopeServiceProvider()
      C:\wamp64\www\site\vendor\laravel\telescope\src\Console\InstallCommand.php:43

  Please use the argument -v to see more details.

Running a second time results in:

PS C:\wamp64\www\site> php artisan telescope:install
Publishing Telescope Service Provider...
Publishing Telescope Assets...
Publishing Telescope Configuration...
Telescope scaffolding installed successfully.

Due to the install being skipped because of the presence of the service provider declaration in config\app.php. However, none of the migrations or the actual service provider file has been created.

Steps To Reproduce:

composer require laravel/telescope
php artisan telescope:install

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions