Skip to content

Commit

Permalink
migrate from abandoned Zend\Escaper to Laminas Escaper
Browse files Browse the repository at this point in the history
  • Loading branch information
liborm85 committed Oct 18, 2020
1 parent 4e4282a commit f2516b0
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ PHPWord requires the following:

- PHP 5.3.3+
- [XML Parser extension](http://www.php.net/manual/en/xml.installation.php)
- [Zend\Escaper component](http://framework.zend.com/manual/current/en/modules/zend.escaper.introduction.html)
- [Zend\Stdlib component](http://framework.zend.com/manual/current/en/modules/zend.stdlib.hydrator.html)
- [Laminas Escaper component](https://docs.laminas.dev/laminas-escaper/intro/)
- [Zip extension](http://php.net/manual/en/book.zip.php) (optional, used to write OOXML and ODF)
- [GD extension](http://php.net/manual/en/book.image.php) (optional, used to add images)
- [XMLWriter extension](http://php.net/manual/en/book.xmlwriter.php) (optional, used to write OOXML and ODF)
Expand Down
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"require": {
"php": "^5.3.3 || ^7.0 || ^8.0",
"ext-xml": "*",
"zendframework/zend-escaper": "^2.2",
"laminas/laminas-escaper": "^2.2",
"phpoffice/common": "^0.2.9"
},
"require-dev": {
Expand All @@ -76,6 +76,9 @@
"mpdf/mpdf": "5.7.4 || 6.* || 7.* || 8.*",
"php-coveralls/php-coveralls": "1.1.0 || ^2.0"
},
"replace": {
"laminas/laminas-zendframework-bridge": "*"
},
"suggest": {
"ext-zip": "Allows writing OOXML and ODF",
"ext-gd2": "Allows adding images",
Expand Down
4 changes: 1 addition & 3 deletions docs/installing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ Mandatory:

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

Optional:

Expand Down
4 changes: 2 additions & 2 deletions src/PhpWord/Writer/HTML/Element/AbstractElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@

namespace PhpOffice\PhpWord\Writer\HTML\Element;

use Laminas\Escaper\Escaper;
use PhpOffice\PhpWord\Element\AbstractElement as Element;
use PhpOffice\PhpWord\Writer\AbstractWriter;
use Zend\Escaper\Escaper;

/**
* Abstract HTML element writer
Expand Down Expand Up @@ -50,7 +50,7 @@ abstract class AbstractElement
protected $withoutP = false;

/**
* @var \Zend\Escaper\Escaper|\PhpOffice\PhpWord\Escaper\AbstractEscaper
* @var \Laminas\Escaper\Escaper|\PhpOffice\PhpWord\Escaper\AbstractEscaper
*/
protected $escaper;

Expand Down
4 changes: 2 additions & 2 deletions src/PhpWord/Writer/HTML/Part/AbstractPart.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@

namespace PhpOffice\PhpWord\Writer\HTML\Part;

use Laminas\Escaper\Escaper;
use PhpOffice\PhpWord\Exception\Exception;
use PhpOffice\PhpWord\Writer\AbstractWriter;
use Zend\Escaper\Escaper;

/**
* @since 0.11.0
Expand All @@ -32,7 +32,7 @@ abstract class AbstractPart
private $parentWriter;

/**
* @var \Zend\Escaper\Escaper
* @var \Laminas\Escaper\Escaper
*/
protected $escaper;

Expand Down

0 comments on commit f2516b0

Please sign in to comment.