Skip to content

Commit

Permalink
Merge pull request #256 from PHPOffice/develop
Browse files Browse the repository at this point in the history
PR 0.11.0
  • Loading branch information
Progi1984 committed Jun 1, 2014
2 parents 8c7efde + ce21e8d commit 39cf5d0
Show file tree
Hide file tree
Showing 378 changed files with 22,330 additions and 7,843 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
.Trashes
Thumbs.db
Desktop.ini
composer.lock
composer.phar
phpunit.xml
phpword.ini
/.buildpath
/.idea
/.project
Expand Down
16 changes: 12 additions & 4 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,20 @@ before_commands:
- "composer install --prefer-source --dev"

tools:
php_code_sniffer:
enabled: true
config:
standard: PSR2
php_mess_detector:
enabled: true
config:
ruleset: phpmd.xml.dist
external_code_coverage:
enabled: true
timeout: 900
php_code_coverage:
enabled: false
test_command: phpunit -c phpunit.xml.dist
php_sim: true
php_cpd: true
# php_sim: # Temporarily disabled to allow focus on things other than duplicates
# min_mass: 40
php_pdepend: true
php_analyzer: true
sensiolabs_security_checker: true
93 changes: 49 additions & 44 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,55 +1,60 @@
language: php

php:
- 5.3.3
- 5.3
- 5.4
- 5.5
- 5.6
- hhvm
- 5.3.3
- 5.3
- 5.4
- 5.5
- 5.6
- hhvm

matrix:
allow_failures:
- php: 5.3.3
- php: 5.6
- php: hhvm
allow_failures:
- php: hhvm

env:
global:
- secure: "Sq+6bVtnPsu0mWX8DWQ+9bGAjxMcGorksUiHc4YIXEJsuDfVmVlH8tTD547IeCjDAx9MxXerZ2Z4HSjxTB70VEnJPvZMHI/EZn4Ny31YLHEthdZbV5Gd1h0TGp8VOzPKGShvGrtGBX6MvMfgpK4zuieVWbSfdKeecm8ZNLMpUd4="

before_script:
## Composer
# - curl -s http://getcomposer.org/installer | php
# - php composer.phar install --prefer-source
- composer self-update
- composer require dompdf/dompdf:0.6.*
- composer install --prefer-source
## PHP_CodeSniffer
- pyrus install pear/PHP_CodeSniffer
- phpenv rehash
## PHP Copy/Paste Detector
#- curl -o phpcpd.phar https://phar.phpunit.de/phpcpd.phar
## PHP Mess Detector
#- pear config-set preferred_state beta
#- printf "\n" | pecl install imagick
#- pear channel-discover pear.phpmd.org
#- pear channel-discover pear.pdepend.org
#- pear install --alldeps phpmd/PHP_PMD
#- phpenv rehash
## PHPLOC
#- curl -o phploc.phar https://phar.phpunit.de/phploc.phar
## Packages
- sudo apt-get -qq update > /dev/null
- sudo apt-get -qq install graphviz > /dev/null
## Composer
- composer self-update
- composer install --prefer-source --dev
## PHP Copy/Paste Detector
- curl -o phpcpd.phar https://phar.phpunit.de/phpcpd.phar
## PHP Mess Detector
- pear config-set preferred_state beta
- printf "\n" | pecl install imagick
- pear channel-discover pear.phpmd.org
- pear channel-discover pear.pdepend.org
- pear install --alldeps phpmd/PHP_PMD
- phpenv rehash
## PHPLOC
#- curl -o phploc.phar https://phar.phpunit.de/phploc.phar
## PHPDocumentor
- mkdir -p build/docs
- mkdir -p build/coverage

script:
## PHP_CodeSniffer
- phpcs --standard=PSR2 -n src/ --ignore=src/PhpWord/Shared/PCLZip
- phpcs --standard=PSR2 -n tests/
## PHP Copy/Paste Detector
#- php phpcpd.phar --verbose src/
## PHP Mess Detector
#- phpmd src/ text unusedcode,naming,design
## PHPLOC
#- php phploc.phar src/
## PHPUnit
- phpunit -c ./ --coverage-text
## PHP_CodeSniffer
- ./vendor/bin/phpcs src/ tests/ --standard=PSR2 -n --ignore=src/PhpWord/Shared/PCLZip
## PHP Copy/Paste Detector
- php phpcpd.phar src/ tests/ --verbose
## PHP Mess Detector
- phpmd src/,tests/ text ./phpmd.xml.dist --exclude pclzip.lib.php
## PHPLOC
#- php phploc.phar src/
## PHPUnit
- phpunit -c ./ --coverage-text --coverage-html ./build/coverage
## PHPDocumentor
- vendor/bin/phpdoc.php -q -d ./src -t ./build/docs --ignore "*/src/PhpWord/Shared/*/*" --template="responsive-twig"

after_script:
## Scrutinizer
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
## PHPDocumentor
- bash .travis_shell_after_success.sh
## Scrutinizer
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
39 changes: 39 additions & 0 deletions .travis_shell_after_success.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash

echo "--DEBUG--"
echo "TRAVIS_REPO_SLUG: $TRAVIS_REPO_SLUG"
echo "TRAVIS_PHP_VERSION: $TRAVIS_PHP_VERSION"
echo "TRAVIS_PULL_REQUEST: $TRAVIS_PULL_REQUEST"

if [ "$TRAVIS_REPO_SLUG" == "PHPOffice/PHPWord" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_PHP_VERSION" == "5.5" ]; then

echo -e "Publishing PHPDoc...\n"

cp -R build/docs $HOME/docs-latest
cp -R build/coverage $HOME/coverage-latest

cd $HOME
git config --global user.email "travis@travis-ci.org"
git config --global user.name "travis-ci"
git clone --quiet --branch=gh-pages https://${GH_TOKEN}@github.com/PHPOffice/PHPWord gh-pages > /dev/null

cd gh-pages
echo "--DEBUG : Suppression"
git rm -rf ./docs/$TRAVIS_BRANCH

echo "--DEBUG : Dossier"
mkdir -p docs/$TRAVIS_BRANCH
mkdir -p coverage/$TRAVIS_BRANCH

echo "--DEBUG : Copie"
cp -Rf $HOME/docs-latest/* ./docs/$TRAVIS_BRANCH/
cp -Rf $HOME/coverage-latest/* ./coverage/$TRAVIS_BRANCH/

echo "--DEBUG : Git"
git add -f .
git commit -m "PHPDocumentor (Travis Build: $TRAVIS_BUILD_NUMBER - Branch: $TRAVIS_BRANCH)"
git push -fq origin gh-pages > /dev/null

echo -e "Published PHPDoc to gh-pages.\n"

fi
69 changes: 68 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,73 @@

This is the changelog between releases of PHPWord. Releases are listed in reverse chronological order with the latest version listed on top, while additions/changes in each release are listed in chronological order. Changes in each release are divided into three parts: added or change features, bugfixes, and miscellaneous improvements. Each line contains short information about the change made, the person who made it, and the related issue number(s) in GitHub.

## 0.11.0 - 1 June 2014

This release marked the change of PHPWord license from LGPL 2.1 to LGPL 3. Four new elements were added: TextBox, ListItemRun, Field, and Line. Relative and absolute positioning for images and textboxes were added. Writer classes were refactored into parts, elements, and styles. ODT and RTF features were enhanced. Ability to add elements to PHPWord object via HTML were implemented. RTF and HTML reader were initiated.

### Features

- Image: Ability to define relative and absolute positioning - @basjan GH-217
- Footer: Conform footer with header by adding firstPage, evenPage and by inheritance - @basjan @ivanlanin GH-219
- Element: New `TextBox` element - @basjan @ivanlanin GH-228 GH-229 GH-231
- HTML: Ability to add elements to PHPWord object via html - @basjan GH-231
- Element: New `ListItemRun` element that can add a list item with inline formatting like a textrun - @basjan GH-235
- Table: Ability to add table inside a cell (nested table) - @ivanlanin GH-149
- RTF Writer: UTF8 support for RTF: Internal UTF8 text is converted to Unicode before writing - @ivanlanin GH-158
- Table: Ability to define table width (in percent and twip) and position - @ivanlanin GH-237
- RTF Writer: Ability to add links and page breaks in RTF - @ivanlanin GH-196
- ListItemRun: Remove fontStyle parameter because ListItemRun is inherited from TextRun and TextRun doesn't have fontStyle - @ivanlanin
- Config: Ability to use a config file to store various common settings - @ivanlanin GH-200
- ODT Writer: Enable inline font style in TextRun - @ivanlanin
- ODT Writer: Enable underline, strike/doublestrike, smallcaps/allcaps, superscript/subscript font style - @ivanlanin
- ODT Writer: Enable section and column - @ivanlanin
- PDF Writer: Add TCPDF and mPDF as optional PDF renderer library - @ivanlanin
- ODT Writer: Enable title element and custom document properties - @ivanlanin
- ODT Reader: Ability to read standard and custom document properties - @ivanlanin
- Word2007 Writer: Enable the missing custom document properties writer - @ivanlanin
- Image: Enable "image float left" - @ivanlanin GH-244
- RTF Writer: Ability to write document properties - @ivanlanin
- RTF Writer: Ability to write image - @ivanlanin
- Element: New `Field` element - @basjan GH-251
- RTF Reader: Basic RTF reader - @ivanlanin GH-72 GH-252
- Element: New `Line` element - @basjan GH-253
- Title: Ability to apply numbering in heading - @ivanlanin GH-193
- HTML Reader: Basic HTML reader - @ivanlanin GH-80 GH-254
- RTF Writer: Basic table writing - @ivanlanin GH-245

### Bugfixes

- Header: All images added to the second header were assigned to the first header - @basjan GH-222
- Conversion: Fix conversion from cm to pixel, pixel to cm, and pixel to point - @basjan GH-233 GH-234
- PageBreak: Page break adds new line in the beginning of the new page - @ivanlanin GH-150
- Image: `marginLeft` and `marginTop` cannot accept float value - @ivanlanin GH-248
- Title: Orphan `w:fldChar` caused OpenOffice to crash when opening DOCX - @ivanlanin GH-236

### Deprecated

- Static classes `Footnotes`, `Endnotes`, and `TOC`
- `Writer\Word2007\Part`: `Numbering::writeNumbering()`, `Settings::writeSettings()`, `WebSettings::writeWebSettings()`, `ContentTypes::writeContentTypes()`, `Styles::writeStyles()`, `Document::writeDocument()` all changed into `write()`
- `Writer\Word2007\Part\DocProps`: Split into `Writer\Word2007\Part\DocPropsCore` and `Writer\Word2007\Part\DocPropsApp`
- `Element\Title::getBookmarkId()` replaced by `Element\Title::getRelationId()`
- `Writer\HTML::writeDocument`: Replaced by `Writer\HTML::getContent`

### Miscellaneous

- License: Change the project license from LGPL 2.1 into LGPL 3.0 - GH-211
- Word2007 Writer: New `Style\Image` class - @ivanlanin
- Refactor: Replace static classes `Footnotes`, `Endnotes`, and `TOC` with `Collections` - @ivanlanin GH-206
- QA: Reactivate `phpcpd` and `phpmd` on Travis - @ivanlanin
- Refactor: PHPMD recommendation: Change all `get...` method that returns `boolean` into `is...` or `has...` - @ivanlanin
- Docs: Create gh-pages branch for API documentation - @Progi1984 GH-154
- QA: Add `.scrutinizer.yml` and include `composer.lock` for preparation to Scrutinizer - @ivanlanin GH-186
- Writer: Refactor writer parts using composite pattern - @ivanlanin
- Docs: Show code quality and test code coverage badge on README
- Style: Change behaviour of `set...` function of boolean properties; when none is defined, assumed true - @ivanlanin
- Shared: Unify PHP ZipArchive and PCLZip features into PhpWord ZipArchive - @ivanlanin
- Docs: Create VERSION file - @ivanlanin
- QA: Improve dan update requirement check in `samples` folder - @ivanlanin


## 0.10.1 - 21 May 2014

This is a bugfix release for `php-zip` requirement in Composer.
Expand Down Expand Up @@ -32,7 +99,7 @@ This release marked heavy refactorings on internal code structure with the creat
- Link: Ability to add link in header/footer - @ivanlanin GH-187
- Object: Ability to add object in header, footer, textrun, and footnote - @ivanlanin GH-187
- Media: Add `Media::resetElements()` to reset all media data - @juzi GH-19
- General: Add `Style::resetStyles()`, `Footnote::resetElements()`, and `TOC::resetTitles()` - @ivanlanin GH-187
- General: Add `Style::resetStyles()` - @ivanlanin GH-187
- DOCX Reader: Ability to read header, footer, footnotes, link, preservetext, textbreak, pagebreak, table, list, image, and title - @ivanlanin
- Endnote: Ability to add endnotes - @ivanlanin
- ListItem: Ability to create custom list and reset list number - @ivanlanin GH-10 GH-198
Expand Down

0 comments on commit 39cf5d0

Please sign in to comment.