How to correctly install snappdf

We just installed Invoice Ninja Version v5.3.85-W83 (self-hosted) and tried to switch from Phantom JS to Snappdf but somehow that didn’t work.

Installing it through “composer require beganovich/snappdf” leads to problems with some dependencies (“Your requirements could not be resolved to an installable set of packages.”).

Does someone know this problem?
Are we missing something here? Anything else we need to do to use snappdf?
(apart from also setting PDF_GENERATOR=snappdf)

Hi,

Have you seen the info here:

Note: if you have a white label license you can use the hosted SnapPDF option

Yes we have seen this information.
We tried installing it by
“composer require beganovich/snappdf”
but we always run into problems with some dependencies:


root@LiveBilling:/var/www/html/invoiceninja# composer require beganovich/snappdf
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]? yes
Info from https://repo.packagist.org: #StandWithUkraine
Using version ^2.1 for beganovich/snappdf
./composer.json has been updated
Running composer update beganovich/snappdf
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Root composer.json requires beganovich/snappdf ^2.1 → satisfiable by beganovich/snappdf[v2.1.0].
- beganovich/snappdf v2.1.0 requires symfony/process ^6.0 → found symfony/process[v6.0.0-BETA1, …, 6.1.x-dev] but the package is fixed to v5.4.7 (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.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. “composer require beganovich/snappdf:*” to figure out if any version is installable, or “composer require beganovich/snappdf:^2.1” if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.
root@LiveBilling:/var/www/html/invoiceninja# composer require beganovich/snappdf --with-all-dependencies
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]? yes
Using version ^2.1 for beganovich/snappdf
./composer.json has been updated
Running composer update beganovich/snappdf --with-all-dependencies
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Root composer.json requires beganovich/snappdf ^2.1 → satisfiable by beganovich/snappdf[v2.1.0].
- beganovich/snappdf v2.1.0 requires symfony/process ^6.0 → found symfony/process[v6.0.0-BETA1, …, 6.1.x-dev] but these were not loaded, likely because it conflicts with another require.

You can also try re-running composer require with an explicit version constraint, e.g. “composer require beganovich/snappdf:*” to figure out if any version is installable, or “composer require beganovich/snappdf:^2.1” if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.
root@LiveBilling:/var/www/html/invoiceninja# composer require symfony/process
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]? yes
Using version ^6.0 for symfony/process
./composer.json has been updated
Running composer update symfony/process
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

Problem 1
- Root composer.json requires symfony/process ^6.0, found symfony/process[v6.0.0-BETA1, …, 6.1.x-dev] but these were not loaded, likely because it conflicts with another require.
Problem 2
- asm/php-ansible is locked to version v3.0.1 and an update of this package was not requested.
- asm/php-ansible v3.0.1 requires symfony/process ^4.0|^5.0 → found symfony/process[v4.0.0-BETA1, …, 4.4.x-dev, v5.0.0-BETA1, …, 5.4.x-dev] but it conflicts with your root composer.json require (^6.0).
Problem 3
- beganovich/snappdf is locked to version v1.10.0 and an update of this package was not requested.
- beganovich/snappdf v1.10.0 requires symfony/process ^5.2 → found symfony/process[v5.2.0-BETA1, …, 5.4.x-dev] but it conflicts with your root composer.json require (^6.0).
Problem 4
- laravel/framework is locked to version v8.83.9 and an update of this package was not requested.
- laravel/framework v8.83.9 requires symfony/process ^5.4 → found symfony/process[v5.4.0-BETA1, …, 5.4.x-dev] but it conflicts with your root composer.json require (^6.0).
Problem 5
- brianium/paratest is locked to version v6.4.4 and an update of this package was not requested.
- brianium/paratest v6.4.4 requires symfony/process ^5.4.0 || ^6.0.0 → found symfony/process[v5.4.0-BETA1, …, 5.4.x-dev, v6.0.0-BETA1, …, 6.1.x-dev] but these were not loaded, likely because it conflicts with another require.
Problem 6
- friendsofphp/php-cs-fixer is locked to version v2.19.3 and an update of this package was not requested.
- friendsofphp/php-cs-fixer v2.19.3 requires symfony/process ^3.0 || ^4.0 || ^5.0 → found symfony/process[v3.0.0-BETA1, …, 3.4.x-dev, v4.0.0-BETA1, …, 4.4.x-dev, v5.0.0-BETA1, …, 5.4.x-dev] but it conflicts with your root composer.json require (^6.0).
Problem 7
- laravel/dusk is locked to version v6.23.0 and an update of this package was not requested.
- laravel/dusk v6.23.0 requires symfony/process ^4.3|^5.0|^6.0 → found symfony/process[v4.3.0-BETA1, …, 4.4.x-dev, v5.0.0-BETA1, …, 5.4.x-dev, v6.0.0-BETA1, …, 6.1.x-dev] but these were not loaded, likely because it conflicts with another require.
Problem 8
- laravel/framework v8.83.9 requires symfony/process ^5.4 → found symfony/process[v5.4.0-BETA1, …, 5.4.x-dev] but it conflicts with your root composer.json require (^6.0).
- facade/ignition 2.17.5 requires illuminate/support ^7.0|^8.0 → satisfiable by laravel/framework[v8.83.9].
- facade/ignition is locked to version 2.17.5 and an update of this package was not requested.

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. “composer require symfony/process:*” to figure out if any version is installable, or “composer require symfony/process:^2.1” if you know which you need.

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


Are we forgetting something or doing something wrong?
How can we get rid of these dependency problems?

@ben do you have any ideas?