barryvdh / laravel-snappy

Laravel Snappy PDF
MIT License
2.63k stars 290 forks source link

getFileContents not compatible with knplabs/knp-snappy 1.3 #450

Closed andreshg112 closed 2 years ago

andreshg112 commented 2 years ago

This package: image

Other package: image

This package has knplabs/knp-snappy: ^1, so 1.3 can be installed, but it has problems.

alyas20 commented 2 years ago

also have same problem with this

thachlh-nals commented 2 years ago

dear @barryvdh ,

i got issue too, and i see requires must be knplabs/knp-snappy: v1.2.1 please fix it, thanks

because v1.30

method getFileContents is protected function getFileContents(string $filename): string required params datatype

ref: https://github.com/KnpLabs/snappy/blob/master/src/Knp/Snappy/AbstractGenerator.php#L639

EelcoHansma commented 2 years ago

Try this inside your composer.json. change the "^" to an "~" in front of the version.

"require": { "barryvdh/laravel-snappy": "~0.4.8", "knplabs/knp-snappy": "~1.3", },

also if you want more information on version control here is some information. https://getcomposer.org/doc/articles/versions.md#tilde-version-range-

andreshg112 commented 2 years ago

Don't worry. It was fixed in the other package.

image

But now it looks like the other package has another issue:

image