PHPOffice / PHPWord

A pure PHP library for reading and writing word processing documents
https://phpoffice.github.io/PHPWord/
Other
7.2k stars 2.69k forks source link

PhpOffice\PhpWord\Shared\String as String because 'String' #2208

Closed MrDevCo closed 2 weeks ago

MrDevCo commented 2 years ago

I have a problem at the moment of using it in PHP 8 version I get this error when I try to replace the variable, it generates the Word file but it does not generate it with the content of the variable, it simply generates the file with the written variables but not with its content.

I first added an alias to the String word to avoid having to modify many files but it works.


I tried adding this line but the same thing keeps happening, I don't know where I should fix the problem with the template variables.

"require": { "phpoffice/phpword": "dev-develop" }

if someone can help me guiding me where I can have the error or some file in which I did not have to modify that alias I remain attentive

JefersonGuzman commented 2 years ago

Hi , A solution I can give you to avoid possible future problems is to update your library since those errors have already been corrected as the files are now.

OskarStark commented 1 month ago

Can be closed I guess