TheoKouzelis / laravel-airbrake

Laravel service provider for Airbrake https://github.com/airbrake/phpbrake
MIT License
25 stars 24 forks source link

Can't install on Laravel 6 because of monolog/monolog version. #9

Closed ugurarici closed 4 years ago

ugurarici commented 4 years ago

When I try to install package on a Laravel 6 project, composer couldn't complete installation because of monolog/monolog version.

Since version 6, Laravel requires "monolog/monolog": "^1.12|^2.0", and this package requires "monolog/monolog": "^1.22" so when I tried to install this, it gives an error like this;

Using version ^0.5.0 for kouz/laravel-airbrake
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for kouz/laravel-airbrake ^0.5.0 -> satisfiable by kouz/laravel-airbrake[0.5.0].
    - Conclusion: remove monolog/monolog 2.0.1
    - Conclusion: don't install monolog/monolog 2.0.1
    - kouz/laravel-airbrake 0.5.0 requires monolog/monolog ^1.22 -> satisfiable by monolog/monolog[1.22.0, 1.22.1, 1.23.0, 1.24.0, 1.25.0, 1.25.1, 1.25.2, 1.x-dev].
    - Can only install one of: monolog/monolog[1.22.0, 2.0.1].
    - Can only install one of: monolog/monolog[1.22.1, 2.0.1].
    - Can only install one of: monolog/monolog[1.23.0, 2.0.1].
    - Can only install one of: monolog/monolog[1.24.0, 2.0.1].
    - Can only install one of: monolog/monolog[1.25.0, 2.0.1].
    - Can only install one of: monolog/monolog[1.25.1, 2.0.1].
    - Can only install one of: monolog/monolog[1.25.2, 2.0.1].
    - Can only install one of: monolog/monolog[1.x-dev, 2.0.1].
    - Installation request for monolog/monolog (locked at 2.0.1) -> satisfiable by monolog/monolog[2.0.1].

Installation failed, reverting ./composer.json to its original content.
TheoKouzelis commented 4 years ago

Hi @ugurarici

Laravel 6 will let you install either Monolog 1 or 2, but PHPBranke requires Monolog 1.

If you've installed the Laravel dependencies before installing this package, composer will have opted to install Monolog 2. So you have to downgrade the Monolog by running composer require monolog/monolog ^1.22 before installing this package.

I have updated the install readme.