Skip to content

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

@MrDevCo

Description

@MrDevCo

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.

  • use PhpOffice\PhpWord\Shared\String AS OPString;

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions