Skip to content

Commit f2516b0

Browse files
committed
migrate from abandoned Zend\Escaper to Laminas Escaper
1 parent 4e4282a commit f2516b0

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ PHPWord requires the following:
6262

6363
- PHP 5.3.3+
6464
- [XML Parser extension](http://www.php.net/manual/en/xml.installation.php)
65-
- [Zend\Escaper component](http://framework.zend.com/manual/current/en/modules/zend.escaper.introduction.html)
66-
- [Zend\Stdlib component](http://framework.zend.com/manual/current/en/modules/zend.stdlib.hydrator.html)
65+
- [Laminas Escaper component](https://docs.laminas.dev/laminas-escaper/intro/)
6766
- [Zip extension](http://php.net/manual/en/book.zip.php) (optional, used to write OOXML and ODF)
6867
- [GD extension](http://php.net/manual/en/book.image.php) (optional, used to add images)
6968
- [XMLWriter extension](http://php.net/manual/en/book.xmlwriter.php) (optional, used to write OOXML and ODF)

composer.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"require": {
6161
"php": "^5.3.3 || ^7.0 || ^8.0",
6262
"ext-xml": "*",
63-
"zendframework/zend-escaper": "^2.2",
63+
"laminas/laminas-escaper": "^2.2",
6464
"phpoffice/common": "^0.2.9"
6565
},
6666
"require-dev": {
@@ -76,6 +76,9 @@
7676
"mpdf/mpdf": "5.7.4 || 6.* || 7.* || 8.*",
7777
"php-coveralls/php-coveralls": "1.1.0 || ^2.0"
7878
},
79+
"replace": {
80+
"laminas/laminas-zendframework-bridge": "*"
81+
},
7982
"suggest": {
8083
"ext-zip": "Allows writing OOXML and ODF",
8184
"ext-gd2": "Allows adding images",

docs/installing.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ Mandatory:
1010

1111
- PHP 5.3.3+
1212
- `XML Parser <http://www.php.net/manual/en/xml.installation.php>`__ extension
13-
- `Zend\\Escaper <http://framework.zend.com/manual/current/en/modules/zend.escaper.introduction.html>`__ component
14-
- Zend\\Stdlib component
15-
- `Zend\\Validator <http://framework.zend.com/manual/current/en/modules/zend.validator.html>`__ component
13+
- `Laminas Escaper <https://docs.laminas.dev/laminas-escaper/intro/>`__ component
1614

1715
Optional:
1816

src/PhpWord/Writer/HTML/Element/AbstractElement.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717

1818
namespace PhpOffice\PhpWord\Writer\HTML\Element;
1919

20+
use Laminas\Escaper\Escaper;
2021
use PhpOffice\PhpWord\Element\AbstractElement as Element;
2122
use PhpOffice\PhpWord\Writer\AbstractWriter;
22-
use Zend\Escaper\Escaper;
2323

2424
/**
2525
* Abstract HTML element writer
@@ -50,7 +50,7 @@ abstract class AbstractElement
5050
protected $withoutP = false;
5151

5252
/**
53-
* @var \Zend\Escaper\Escaper|\PhpOffice\PhpWord\Escaper\AbstractEscaper
53+
* @var \Laminas\Escaper\Escaper|\PhpOffice\PhpWord\Escaper\AbstractEscaper
5454
*/
5555
protected $escaper;
5656

src/PhpWord/Writer/HTML/Part/AbstractPart.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717

1818
namespace PhpOffice\PhpWord\Writer\HTML\Part;
1919

20+
use Laminas\Escaper\Escaper;
2021
use PhpOffice\PhpWord\Exception\Exception;
2122
use PhpOffice\PhpWord\Writer\AbstractWriter;
22-
use Zend\Escaper\Escaper;
2323

2424
/**
2525
* @since 0.11.0
@@ -32,7 +32,7 @@ abstract class AbstractPart
3232
private $parentWriter;
3333

3434
/**
35-
* @var \Zend\Escaper\Escaper
35+
* @var \Laminas\Escaper\Escaper
3636
*/
3737
protected $escaper;
3838

0 commit comments

Comments
 (0)