Merge pull request #1284 from Trainmaster/feature-remove-zend-stdlib-dependency

Remove zend-stdlib dependency
This commit is contained in:
troosan 2018-02-17 08:39:55 +01:00 committed by GitHub
commit 7324070c30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 3 deletions

View File

@ -61,7 +61,6 @@
"php": "^5.3.3 || ^7.0",
"ext-xml": "*",
"zendframework/zend-escaper": "^2.2",
"zendframework/zend-stdlib": "^2.2 || ^3.0",
"phpoffice/common": "^0.2"
},
"require-dev": {

View File

@ -17,13 +17,13 @@
namespace PhpOffice\PhpWord;
use PhpOffice\Common\Text;
use PhpOffice\PhpWord\Escaper\RegExp;
use PhpOffice\PhpWord\Escaper\Xml;
use PhpOffice\PhpWord\Exception\CopyFileException;
use PhpOffice\PhpWord\Exception\CreateTemporaryFileException;
use PhpOffice\PhpWord\Exception\Exception;
use PhpOffice\PhpWord\Shared\ZipArchive;
use Zend\Stdlib\StringUtils;
class TemplateProcessor
{
@ -192,7 +192,7 @@ class TemplateProcessor
*/
protected static function ensureUtf8Encoded($subject)
{
if (!StringUtils::isValidUtf8($subject)) {
if (!Text::isUTF8($subject)) {
$subject = utf8_encode($subject);
}