app-insights-php / monolog-handler

Microsoft App Insights monolog handler for trace tracking
MIT License
3 stars 7 forks source link

Allow monolog 2.x #17

Closed tomme87 closed 1 year ago

tomme87 commented 3 years ago

Looks like this package is locked to monolog 1.x, should allow 2.x

When I try to install the bundle I get this:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - app-insights-php/app-insights-php-bundle 0.2.6 requires app-insights-php/monolog-handler ^0.2.1 -> satisfiable by app-insights-php/monolog-handler[0.2.1, 0.2.2, 0.2.x-dev (alias of dev-master)].
    - app-insights-php/app-insights-php-bundle 0.2.x-dev is an alias of app-insights-php/app-insights-php-bundle dev-master and thus requires it to be installed too.
    - app-insights-php/monolog-handler 0.2.x-dev is an alias of app-insights-php/monolog-handler dev-master and thus requires it to be installed too.
    - app-insights-php/app-insights-php-bundle dev-master requires twig/twig ^1.2|^2 -> found twig/twig[1.3.0, ..., 1.x-dev, v2.0.0, ..., 2.x-dev] but the package is fixed to v3.3.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - app-insights-php/monolog-handler[dev-master, 0.2.1, ..., 0.2.2] require monolog/monolog ^1.1 -> found monolog/monolog[1.1.0, ..., 1.x-dev] but the package is fixed to 2.2.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
    - Root composer.json requires app-insights-php/app-insights-php-bundle ^0.2.6 -> satisfiable by app-insights-php/app-insights-php-bundle[0.2.6, 0.2.x-dev (alias of dev-master)].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Doing -W "fixes" the issue, but then monolog is downgraded to 1.x.

norberttech commented 3 years ago

yeah I think it should be doable to allow for both versions, 1.x and 2.x 👍

fernandesGabriel commented 3 years ago

I was just about to create the same issue. I am curious to use together Composer 2 as well.

norberttech commented 3 years ago

afaik it should work with composer 2 out of the box, about monolog 2.x support, feel free to open a pull request. I'm not sure when I will find time to work on it on my own but it's also on my roadmap.

fernandesGabriel commented 3 years ago

I am sorry, I mean Monolog 2 :)