When I try to download the module with composer, it returns an error.
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Conclusion: don't install drupal/printable 1.0.0
- Conclusion: remove symfony/css-selector v2.8.27
- Conclusion: don't install symfony/css-selector v2.8.27
- wa72/htmlpagedom 1.1.x-dev requires symfony/css-selector >=2.3,<2.8 -> satisfiable by symfony/css-selector[2.3.x-dev, 2.4.x-dev, 2.5.x-dev, 2.6.x-dev, 2.7.x-dev].
- wa72/htmlpagedom v1.1.3 requires symfony/css-selector >=2.3,<2.8 -> satisfiable by symfony/css-selector[2.3.x-dev, 2.4.x-dev, 2.5.x-dev, 2.6.x-dev, 2.7.x-dev].
- Can only install one of: symfony/css-selector[2.3.x-dev, v2.8.27].
- Can only install one of: symfony/css-selector[2.4.x-dev, v2.8.27].
- Can only install one of: symfony/css-selector[2.5.x-dev, v2.8.27].
- Can only install one of: symfony/css-selector[2.6.x-dev, v2.8.27].
- Can only install one of: symfony/css-selector[2.7.x-dev, v2.8.27].
- Conclusion: don't install symfony/dom-crawler v3.3.6|install wa72/htmlpagedom 1.1.x-dev|install wa72/htmlpagedom v1.1.3
- Conclusion: don't install drupal/printable 1.0.0|remove symfony/dom-crawler v3.3.6|install wa72/htmlpagedom 1.1.x-dev|install wa72/htmlpagedom v1.1.3
- Conclusion: don't install drupal/printable 1.0.0|don't install symfony/dom-crawler v3.3.6|install wa72/htmlpagedom 1.1.x-dev|install wa72/htmlpagedom v1.1.3
- Installation request for symfony/css-selector (locked at v2.8.27, required as ~2.8) -> satisfiable by symfony/css-selector[v2.8.27].
- Conclusion: don't install drupal/printable 1.0.0|remove symfony/dom-crawler v3.3.6|install wa72/htmlpagedom 1.1.x-dev|install wa72/htmlpagedom v1.1.3
- Conclusion: don't install drupal/printable 1.0.0|don't install symfony/dom-crawler v3.3.6|install wa72/htmlpagedom 1.1.x-dev|install wa72/htmlpagedom v1.1.3
- Installation request for drupal/printable ^1.0 -> satisfiable by drupal/printable[1.x-dev, 1.0.0].
- Conclusion: remove symfony/dom-crawler v3.3.6|install wa72/htmlpagedom 1.1.x-dev|install wa72/htmlpagedom v1.1.3
- drupal/printable 1.x-dev requires wa72/htmlpagedom 1.1.* -> satisfiable by wa72/htmlpagedom[1.1.x-dev, v1.1.0, v1.1.1, v1.1.2, v1.1.3].
- wa72/htmlpagedom v1.1.0 requires symfony/dom-crawler ~2.3 -> satisfiable by symfony/dom-crawler[2.3.x-dev, 2.4.x-dev,..............
Comments
Comment #2
maxq10 commentedI'm seeing a very similar (if not exactly the same) error when I try to install this using composer as well.
Comment #3
fmb commentedApparently branch 1.1 of wa72/htmlpagedom is incompatible with the versions of symfony/css-selector we are currently using. Would this module work with branch 1.3 (see attached patch)?
Comment #4
pmoncel commentedYes the module is compatible with wa72/htmlpagedom branch 1.3.
However some bugs : when 'Close window after sending to printer' is checked, the page is not sent to printer.
Comment #5
cbccharlie commentedI use the following command to download the module:
composer require drupal/printableHow can I apply the patch on the composer.json of the module for testing the patch?
Comment #6
fmb commentedcbccharlie: you can apply patches with cweagans/composer-patches. However, since patches are applied after depencies are computed and packages are dowloaded, I do not think it will solve your issue right now: only when maintainers decide to commit it will you notice its effects on repositories and Composer—namely, no more dependencies errors (hopefully). Bugs affecting modules composer.json files are indeed tough to test before committing for this reason.
What you can do, though, is testing the Printable module to make sure it behaves correctly with newer versions of wa72/htmlpagedom:
composer require wa72/htmlpagedom smalot/pdfparser.drush dl printable.Comment #7
cbccharlie commentedYes, I know cweagans/composer-patches and I can confirm that patches are applied after dependencies.
It was in case there was another solution.
Thanks fmb.
Comment #8
cbccharlie commentedComment #9
huahaiyang commentedI did the following:
* install dependencies (latest versions): composer require wa72/htmlpagedom smalot/pdfparser.
* «Manually» install the Printable module: drush dl printable.
* manually change composer.json to use wa72/htmlpagedom smalot/pdfparser, and it seems to work.
* drush en printable
It seems to solve the problem
Comment #10
donm commentedFor Drupal 8.4.3, with Composer and Drush 9, this is my experience in trying to install Printable:
- "composer require drupal/printable" shows an error message similar to the original issue, pointing at the css-selector v3.4.2: "- Can only install one of: symfony/css-selector[2.4.x-dev, v3.4.2]."
- I then followed the patch in #3 (in part), using Composer to install wa72/htmlpagedom v. 1.3.0 and the sma... module. Then tried to install printable, with this result:
- Then tried to install wa72/htmlpagedom v. 1.1.* (per the other item in the patch), which didn't work, and generated a long error message pointing again to symfony/css-selector v. 3.4.2.
- Per the item about using Drush to download printable, got an error message saying "Drush dl" is deprecated and to use Composer. I suppose I could download the thing manually, but for now I need to move on to other issues (upgrading Drupal 7 to Drupal 8).
- I also tried: uninstalled wa72... v1.3.0 and tried to install v.1.1.*, but that failed with the css-selector v.3.4.2 incompatibility. (When I'm brave, I'll see whether it's possible to downgrade that version.)
Comment #11
nigelcunningham commentedTested and applied; thanks. I'll look at other issues and do further testing before preparing a new release.
Comment #14
avpaderno