dompdf / php-svg-lib

SVG file parsing / rendering library
GNU Lesser General Public License v3.0
1.4k stars 77 forks source link

Please fix version numbers #73

Closed jbiancovns closed 2 years ago

jbiancovns commented 2 years ago

Hello!. In the last release you introduced breaking change (droping php versions) that affects other libraries that depend on yours, for example barryvdh/laravel-dompdf in its version 0.8.0 and dompdf/dompdf version 0.8.6.

dompdf/dompdf version 0.8.6 uses "phenx/php-svg-lib": "^0.3.3", thats generates a problem due to the new release its included on ."^0.3.3" selector

If the changes introduced are breaking changes, please change to a new version, for example 0.4. *

Thanks

Captura de Pantalla 2021-10-19 a la(s) 10 51 13 a  m Captura de Pantalla 2021-10-19 a la(s) 10 53 00 a  m
PowerKiKi commented 2 years ago

Dropping support for PHP versions is not a breaking change as long as let composer do its job correctly.

Composer with PHP 7.2 will correctly install phenx/php-svg-lib 0.3.3 when requiring DomPdf:

$ php7.2 `which composer` require dompdf/dompdf
Using version ^1.0 for dompdf/dompdf
./composer.json has been created
Running composer update dompdf/dompdf
Loading composer repositories with package information
Updating dependencies
Lock file operations: 4 installs, 0 updates, 0 removals
  - Locking dompdf/dompdf (v1.0.2)
  - Locking phenx/php-font-lib (0.5.2)
  - Locking phenx/php-svg-lib (v0.3.3)                     <== THIS IS CORRECT
  - Locking sabberworm/php-css-parser (8.3.1)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 4 installs, 0 updates, 0 removals
  - Installing sabberworm/php-css-parser (8.3.1): Extracting archive
  - Installing phenx/php-svg-lib (v0.3.3): Extracting archive
  - Installing phenx/php-font-lib (0.5.2): Extracting archive
  - Installing dompdf/dompdf (v1.0.2): Extracting archive
2 package suggestions were added by new dependencies, use `composer suggest` to see details.
Generating autoload files

And with PHP 8.0, phenx/php-svg-lib 0.3.4:

$ php8.0 `which composer` require dompdf/dompdf
Using version ^1.0 for dompdf/dompdf
./composer.json has been created
Running composer update dompdf/dompdf
Loading composer repositories with package information
Updating dependencies
Lock file operations: 4 installs, 0 updates, 0 removals
  - Locking dompdf/dompdf (v1.0.2)
  - Locking phenx/php-font-lib (0.5.2)
  - Locking phenx/php-svg-lib (0.3.4)                     <== THIS IS ALSO CORRECT
  - Locking sabberworm/php-css-parser (8.3.1)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 4 installs, 0 updates, 0 removals
  - Downloading phenx/php-svg-lib (0.3.4)
  - Installing sabberworm/php-css-parser (8.3.1): Extracting archive
  - Installing phenx/php-svg-lib (0.3.4): Extracting archive
  - Installing phenx/php-font-lib (0.5.2): Extracting archive
  - Installing dompdf/dompdf (v1.0.2): Extracting archive
2 package suggestions were added by new dependencies, use `composer suggest` to see details.
Generating autoload files

And of course that works in exactly the same way if you were to require barryvdh/laravel-dompdf instead.