GrahamCampbell / Laravel-Markdown

A CommonMark wrapper for Laravel
https://gjcampbell.co.uk/
MIT License
1.32k stars 139 forks source link

Running the composer command throws an error #162

Closed dissto closed 2 years ago

dissto commented 2 years ago

PHP version: 8.0.13

Description Running the composer command throws the following error:

Problem 1

  • graham-campbell/markdown[v13.1.0, ..., 13.2.x-dev] require league/commonmark ^1.5 -> found league/commonmark[1.5.0, ..., 1.6.x-dev] but the package is fixed to 2.1.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 graham-campbell/markdown ^13.1 -> satisfiable by graham-campbell/markdown[v13.1.0, ..., 13.2.x-dev].

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

How to reproduce Run the composer command. composer require graham-campbell/markdown:^13.1

Possible Solution Running with -W flag. Throws a bunch more errors.

Additional context Laravel: ^8.65

GrahamCampbell commented 2 years ago

You need to first downgrade to commonmark v1. The simplest way to do this is to manually require graham-campbell/markdown in your composer.json, and then run composer update. I am working on a commonmark v2 compatable version of this package, that will run on Laravel 8 & 9. It should be out this week.

extricate commented 2 years ago

@GrahamCampbell have you maybe any updated eta on releasing a v2 compatible version/anything I can do to help?

GrahamCampbell commented 2 years ago

It's in progress. You can try it using ^14.0.

GrahamCampbell commented 2 years ago

Note that you will need to change your config file to match the new one on the 14.0 branch, if you have published it.

GrahamCampbell commented 2 years ago

Were you able to try the 14.0 branch @extricate? I'm looking for feedback before I do the release.

GrahamCampbell commented 2 years ago

cc @dissto

extricate commented 2 years ago

Hi @GrahamCampbell, not yet, ran into many other unrelated compatibility issues I hadn't foreseen and thus delayed upgrading to v9 altogether. Anything in particular you'd like feedback on?

GrahamCampbell commented 2 years ago

The 14.0 version works on both Laravel 8 and 9. :)

GrahamCampbell commented 2 years ago

I wanna know if it works, basically. Does your existing usage still work.

kyledoesdev commented 2 years ago

Not sure if this was ever closed, but wanted to chime in and say that I manually added

"graham-campbell/markdown": "^14.0"

to my composer.json and then ran composer update and everything is working with no issues. Cheers

GrahamCampbell commented 2 years ago

v14.0.0 has now been released, with support for CommonMark 2, and Laravel 8 & 9.