Added backward compatibility for deprecated alignment options.
This commit is contained in:
parent
3965f110ff
commit
015a34f5cb
|
|
@ -31,8 +31,6 @@ before_script:
|
||||||
script:
|
script:
|
||||||
## PHP_CodeSniffer
|
## PHP_CodeSniffer
|
||||||
- ./vendor/bin/phpcs src/ tests/ --standard=PSR2 -n --ignore=src/PhpWord/Shared/PCLZip
|
- ./vendor/bin/phpcs src/ tests/ --standard=PSR2 -n --ignore=src/PhpWord/Shared/PCLZip
|
||||||
## PHP Copy/Paste Detector
|
|
||||||
- ./vendor/bin/phpcpd src/ tests/ --verbose
|
|
||||||
## PHP Mess Detector
|
## PHP Mess Detector
|
||||||
- ./vendor/bin/phpmd src/,tests/ text ./phpmd.xml.dist --exclude pclzip.lib.php
|
- ./vendor/bin/phpmd src/,tests/ text ./phpmd.xml.dist --exclude pclzip.lib.php
|
||||||
## PHPUnit
|
## PHPUnit
|
||||||
|
|
|
||||||
10
CHANGELOG.md
10
CHANGELOG.md
|
|
@ -16,17 +16,17 @@ Place announcement text here.
|
||||||
### Changed
|
### Changed
|
||||||
- Improved error message for the case when `autoload.php` is not found. - @RomanSyroeshko #371
|
- Improved error message for the case when `autoload.php` is not found. - @RomanSyroeshko #371
|
||||||
- Renamed the `align` option of `NumberingLevel`, `Frame`, `Table`, and `Paragraph` styles into `alignment`. - @RomanSyroeshko
|
- Renamed the `align` option of `NumberingLevel`, `Frame`, `Table`, and `Paragraph` styles into `alignment`. - @RomanSyroeshko
|
||||||
- Bootstrap script for the manual installation scenario (now include `bootstrap.php` instead of `src/PhpWord/Autoloader.php`). - @RomanSyroeshko
|
|
||||||
|
|
||||||
### Deprecated
|
### Deprecated
|
||||||
- `getAlign` and `setAlign` methods of `NumberingLevel`, `Frame`, `Table`, and `Paragraph` styles.
|
- `getAlign` and `setAlign` methods of `NumberingLevel`, `Frame`, `Table`, and `Paragraph` styles.
|
||||||
Use the correspondent `getAlignment` and `setAlignment` methods instead.
|
Use the correspondent `getAlignment` and `setAlignment` methods instead. - @RomanSyroeshko
|
||||||
- `left`, `right`, and `justify` alignment options for paragraphs (now are mapped to `Jc::START`, `Jc::END`, and `Jc::BOTH`).
|
- `left`, `right`, and `justify` alignment options for paragraphs (now are mapped to `Jc::START`, `Jc::END`, and `Jc::BOTH`). - @RomanSyroeshko
|
||||||
- `left`, `right`, and `justify` alignment options for tables (now are mapped to `Jc::START`, `Jc::END`, and `Jc::CENTER`).
|
- `left`, `right`, and `justify` alignment options for tables (now are mapped to `Jc::START`, `Jc::END`, and `Jc::CENTER`). - @RomanSyroeshko
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
- `PhpOffice\PhpWord\Style\Alignment`. Style properties, which previously stored instances of this class, now deal with strings.
|
- `PhpOffice\PhpWord\Style\Alignment`. Style properties, which previously stored instances of this class, now deal with strings.
|
||||||
In each case set of available string values is defined by the correspondent simple type.
|
In each case set of available string values is defined by the correspondent simple type. - @RomanSyroeshko
|
||||||
|
- Manual installation option. To install PHPWord use Composer since now. - @RomanSyroeshko
|
||||||
|
|
||||||
|
|
||||||
0.12.1 (30 August 2015)
|
0.12.1 (30 August 2015)
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,6 @@
|
||||||
"phpdocumentor/phpdocumentor":"2.*",
|
"phpdocumentor/phpdocumentor":"2.*",
|
||||||
"squizlabs/php_codesniffer": "1.*",
|
"squizlabs/php_codesniffer": "1.*",
|
||||||
"phpmd/phpmd": "2.*",
|
"phpmd/phpmd": "2.*",
|
||||||
"sebastian/phpcpd": "2.*",
|
|
||||||
"phploc/phploc": "2.*",
|
"phploc/phploc": "2.*",
|
||||||
"dompdf/dompdf":"0.6.*",
|
"dompdf/dompdf":"0.6.*",
|
||||||
"tecnick.com/tcpdf": "6.*",
|
"tecnick.com/tcpdf": "6.*",
|
||||||
|
|
|
||||||
|
|
@ -21,25 +21,22 @@ Optional PHP extensions:
|
||||||
Installation
|
Installation
|
||||||
------------
|
------------
|
||||||
|
|
||||||
There are two ways to install PHPWord, i.e. via
|
PHPWord is installed via `Composer <https://getcomposer.org/>`__.
|
||||||
`Composer <http://getcomposer.org/>`__ or manually by downloading the library.
|
You just need to `add dependency <https://getcomposer.org/doc/04-schema.md#package-links>`__ on PHPWord into your package.
|
||||||
|
|
||||||
Using Composer
|
|
||||||
~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
To install via Composer, add the following lines to your ``composer.json``:
|
|
||||||
|
|
||||||
|
Example:
|
||||||
.. code-block:: json
|
.. code-block:: json
|
||||||
|
|
||||||
{
|
{
|
||||||
"require": {
|
"require": {
|
||||||
"phpoffice/phpword": "dev-master"
|
"phpoffice/phpword": "v0.13.*"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
If you are a developer or if you want to help us with testing then fetch the latest branch for developers.
|
If you are a developer or if you want to help us with testing then fetch the latest branch for developers.
|
||||||
Notice: all contributions must be done against the developer branch.
|
Notice: all contributions must be done against the developer branch.
|
||||||
|
|
||||||
|
Example:
|
||||||
.. code-block:: json
|
.. code-block:: json
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
@ -49,26 +46,6 @@ Notice: all contributions must be done against the developer branch.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Manual installation
|
|
||||||
~~~~~~~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
To install manually, you change to the web-server directory of your file system. Then you have 2 possibilities.
|
|
||||||
|
|
||||||
1. `download PHPWord package from github <https://github.com/PHPOffice/PHPWord/archive/master.zip>`__.
|
|
||||||
Extract the package and put the contents to your machine.
|
|
||||||
2. Alternatively you can use Git to install it:
|
|
||||||
.. code-block:: console
|
|
||||||
|
|
||||||
git clone https://github.com/PHPOffice/PHPWord.git
|
|
||||||
|
|
||||||
To use the library, include ``bootstrap.php`` in your PHP script and invoke ``Autoloader::register``.
|
|
||||||
|
|
||||||
.. code-block:: php
|
|
||||||
|
|
||||||
require_once "${path_to_the_cloned_repo}/bootstrap.php";
|
|
||||||
\PhpOffice\PhpWord\Autoloader::register();
|
|
||||||
|
|
||||||
|
|
||||||
Using samples
|
Using samples
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue