google-cloud-php icon indicating copy to clipboard operation
google-cloud-php copied to clipboard

Make monolog a optional dependency

Open alexander-schranz opened this issue 7 years ago • 10 comments

Is your feature request related to a problem? Please describe.

As opened in #2306 it would be good if monolog/monolog package is no hard required and is optional for the packages.

Describe the solution you'd like

Make Monolog optional and when really needed depend on the psr/log and use as fallback the NullLogger of it instead of Monolog implementation.

Describe alternatives you've considered

Remove complete logger implement and only depend on psr/log

Additional context

https://github.com/googleapis/google-cloud-php/pull/2306 https://www.php-fig.org/psr/psr-3/

alexander-schranz avatar Sep 11 '19 20:09 alexander-schranz

One more reason for this: Laravel 6 requires Monolog 2. Current Monolog requirement make it hard to use Laravel 6 with google/cloud-pubsub.

dankostojanovic avatar Sep 11 '19 21:09 dankostojanovic

@dankostojanovic monolog 2 support was merged #2302 thx to the work of @jeromegamez so it should with the next release be no problem to install it.

alexander-schranz avatar Sep 11 '19 21:09 alexander-schranz

Will this fix the following issue?


  Problem 1
    - Installation request for google/cloud ^0.110.0 -> satisfiable by google/cloud[v0.110.0].
    - Conclusion: remove monolog/monolog 2.0.0
    - Conclusion: don't install monolog/monolog 2.0.0
    - google/cloud v0.110.0 requires monolog/monolog ~1 -> satisfiable by monolog/monolog[1.0.0, 1.0.0-RC1, 1.0.1, 1.0.2, 1.1.0, 1.10.0, 1.11.0, 1.12.0, 1.13.0, 1.13.1, 1.14.0, 1.15.0, 1.16.0, 1.17.0, 1.17.1, 1.17.2, 1.18.0, 1.18.1, 1.18.2, 1.19.0, 1.2.0, 1.2.1, 1.20.0, 1.21.0, 1.22.0, 1.22.1, 1.23.0, 1.24.0, 1.25.0, 1.25.1, 1.3.0, 1.3.1, 1.4.0, 1.4.1, 1.5.0, 1.6.0, 1.7.0, 1.8.0, 1.9.0, 1.9.1, 1.x-dev].
    - Can only install one of: monolog/monolog[1.12.0, 2.0.0].```

roboza avatar Sep 12 '19 18:09 roboza

@roboza it would but as monolog 2 compatibility is fixed in #2302 you just need to wait for the next release.

alexander-schranz avatar Sep 12 '19 18:09 alexander-schranz

We're aiming for a release today, we'll keep everyone posted!

dwsupplee avatar Sep 12 '19 18:09 dwsupplee

The release has landed: https://github.com/googleapis/google-cloud-php/releases/tag/v0.111.0

Individual packages should be available shortly.

dwsupplee avatar Sep 12 '19 22:09 dwsupplee

@dwsupplee thank you!

alexander-schranz avatar Sep 13 '19 07:09 alexander-schranz

@dwsupplee Working, thank you!

roboza avatar Sep 13 '19 08:09 roboza

Looks like the problem is solved. Shouldn't this issue be closed?

ava12 avatar Jul 30 '20 19:07 ava12

Yes, thanks @ava12 - good eye!

dwsupplee avatar Jul 30 '20 20:07 dwsupplee