From 015a34f5cb47082c3b823f067c46b3c947a94df1 Mon Sep 17 00:00:00 2001 From: Roman Syroeshko Date: Sat, 14 Nov 2015 16:50:52 +0400 Subject: [PATCH] Added backward compatibility for deprecated alignment options. --- .travis.yml | 2 -- CHANGELOG.md | 10 +++++----- composer.json | 1 - docs/installing.rst | 33 +++++---------------------------- 4 files changed, 10 insertions(+), 36 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4d52286a..c39a05c4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,8 +31,6 @@ before_script: script: ## PHP_CodeSniffer - ./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 - ./vendor/bin/phpmd src/,tests/ text ./phpmd.xml.dist --exclude pclzip.lib.php ## PHPUnit diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c554bb7..51d0bb56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,17 +16,17 @@ Place announcement text here. ### Changed - 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 -- Bootstrap script for the manual installation scenario (now include `bootstrap.php` instead of `src/PhpWord/Autoloader.php`). - @RomanSyroeshko ### Deprecated - `getAlign` and `setAlign` methods of `NumberingLevel`, `Frame`, `Table`, and `Paragraph` styles. -Use the correspondent `getAlignment` and `setAlignment` methods instead. -- `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 tables (now are mapped to `Jc::START`, `Jc::END`, and `Jc::CENTER`). +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`). - @RomanSyroeshko +- `left`, `right`, and `justify` alignment options for tables (now are mapped to `Jc::START`, `Jc::END`, and `Jc::CENTER`). - @RomanSyroeshko ### Removed - `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) diff --git a/composer.json b/composer.json index b5795986..9629e306 100644 --- a/composer.json +++ b/composer.json @@ -41,7 +41,6 @@ "phpdocumentor/phpdocumentor":"2.*", "squizlabs/php_codesniffer": "1.*", "phpmd/phpmd": "2.*", - "sebastian/phpcpd": "2.*", "phploc/phploc": "2.*", "dompdf/dompdf":"0.6.*", "tecnick.com/tcpdf": "6.*", diff --git a/docs/installing.rst b/docs/installing.rst index 2ba8509a..fe34ad34 100644 --- a/docs/installing.rst +++ b/docs/installing.rst @@ -21,25 +21,22 @@ Optional PHP extensions: Installation ------------ -There are two ways to install PHPWord, i.e. via -`Composer `__ or manually by downloading the library. - -Using Composer -~~~~~~~~~~~~~~ - -To install via Composer, add the following lines to your ``composer.json``: +PHPWord is installed via `Composer `__. +You just need to `add dependency `__ on PHPWord into your package. +Example: .. code-block:: json { "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. Notice: all contributions must be done against the developer branch. +Example: .. 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 `__. - 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 -------------