Skip to content

Commit 39cf5d0

Browse files
committed
Merge pull request #256 from PHPOffice/develop
PR 0.11.0
2 parents 8c7efde + ce21e8d commit 39cf5d0

File tree

378 files changed

+22330
-7843
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

378 files changed

+22330
-7843
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
.Trashes
55
Thumbs.db
66
Desktop.ini
7-
composer.lock
87
composer.phar
98
phpunit.xml
9+
phpword.ini
1010
/.buildpath
1111
/.idea
1212
/.project

.scrutinizer.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,20 @@ before_commands:
55
- "composer install --prefer-source --dev"
66

77
tools:
8+
php_code_sniffer:
9+
enabled: true
10+
config:
11+
standard: PSR2
12+
php_mess_detector:
13+
enabled: true
14+
config:
15+
ruleset: phpmd.xml.dist
816
external_code_coverage:
917
enabled: true
1018
timeout: 900
11-
php_code_coverage:
12-
enabled: false
13-
test_command: phpunit -c phpunit.xml.dist
14-
php_sim: true
19+
php_cpd: true
20+
# php_sim: # Temporarily disabled to allow focus on things other than duplicates
21+
# min_mass: 40
1522
php_pdepend: true
1623
php_analyzer: true
24+
sensiolabs_security_checker: true

.travis.yml

Lines changed: 49 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,60 @@
11
language: php
22

33
php:
4-
- 5.3.3
5-
- 5.3
6-
- 5.4
7-
- 5.5
8-
- 5.6
9-
- hhvm
4+
- 5.3.3
5+
- 5.3
6+
- 5.4
7+
- 5.5
8+
- 5.6
9+
- hhvm
1010

1111
matrix:
12-
allow_failures:
13-
- php: 5.3.3
14-
- php: 5.6
15-
- php: hhvm
12+
allow_failures:
13+
- php: hhvm
14+
15+
env:
16+
global:
17+
- secure: "Sq+6bVtnPsu0mWX8DWQ+9bGAjxMcGorksUiHc4YIXEJsuDfVmVlH8tTD547IeCjDAx9MxXerZ2Z4HSjxTB70VEnJPvZMHI/EZn4Ny31YLHEthdZbV5Gd1h0TGp8VOzPKGShvGrtGBX6MvMfgpK4zuieVWbSfdKeecm8ZNLMpUd4="
1618

1719
before_script:
18-
## Composer
19-
# - curl -s http://getcomposer.org/installer | php
20-
# - php composer.phar install --prefer-source
21-
- composer self-update
22-
- composer require dompdf/dompdf:0.6.*
23-
- composer install --prefer-source
24-
## PHP_CodeSniffer
25-
- pyrus install pear/PHP_CodeSniffer
26-
- phpenv rehash
27-
## PHP Copy/Paste Detector
28-
#- curl -o phpcpd.phar https://phar.phpunit.de/phpcpd.phar
29-
## PHP Mess Detector
30-
#- pear config-set preferred_state beta
31-
#- printf "\n" | pecl install imagick
32-
#- pear channel-discover pear.phpmd.org
33-
#- pear channel-discover pear.pdepend.org
34-
#- pear install --alldeps phpmd/PHP_PMD
35-
#- phpenv rehash
36-
## PHPLOC
37-
#- curl -o phploc.phar https://phar.phpunit.de/phploc.phar
20+
## Packages
21+
- sudo apt-get -qq update > /dev/null
22+
- sudo apt-get -qq install graphviz > /dev/null
23+
## Composer
24+
- composer self-update
25+
- composer install --prefer-source --dev
26+
## PHP Copy/Paste Detector
27+
- curl -o phpcpd.phar https://phar.phpunit.de/phpcpd.phar
28+
## PHP Mess Detector
29+
- pear config-set preferred_state beta
30+
- printf "\n" | pecl install imagick
31+
- pear channel-discover pear.phpmd.org
32+
- pear channel-discover pear.pdepend.org
33+
- pear install --alldeps phpmd/PHP_PMD
34+
- phpenv rehash
35+
## PHPLOC
36+
#- curl -o phploc.phar https://phar.phpunit.de/phploc.phar
37+
## PHPDocumentor
38+
- mkdir -p build/docs
39+
- mkdir -p build/coverage
3840

3941
script:
40-
## PHP_CodeSniffer
41-
- phpcs --standard=PSR2 -n src/ --ignore=src/PhpWord/Shared/PCLZip
42-
- phpcs --standard=PSR2 -n tests/
43-
## PHP Copy/Paste Detector
44-
#- php phpcpd.phar --verbose src/
45-
## PHP Mess Detector
46-
#- phpmd src/ text unusedcode,naming,design
47-
## PHPLOC
48-
#- php phploc.phar src/
49-
## PHPUnit
50-
- phpunit -c ./ --coverage-text
42+
## PHP_CodeSniffer
43+
- ./vendor/bin/phpcs src/ tests/ --standard=PSR2 -n --ignore=src/PhpWord/Shared/PCLZip
44+
## PHP Copy/Paste Detector
45+
- php phpcpd.phar src/ tests/ --verbose
46+
## PHP Mess Detector
47+
- phpmd src/,tests/ text ./phpmd.xml.dist --exclude pclzip.lib.php
48+
## PHPLOC
49+
#- php phploc.phar src/
50+
## PHPUnit
51+
- phpunit -c ./ --coverage-text --coverage-html ./build/coverage
52+
## PHPDocumentor
53+
- vendor/bin/phpdoc.php -q -d ./src -t ./build/docs --ignore "*/src/PhpWord/Shared/*/*" --template="responsive-twig"
5154

5255
after_script:
53-
## Scrutinizer
54-
- wget https://scrutinizer-ci.com/ocular.phar
55-
- php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
56+
## PHPDocumentor
57+
- bash .travis_shell_after_success.sh
58+
## Scrutinizer
59+
- wget https://scrutinizer-ci.com/ocular.phar
60+
- php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml

.travis_shell_after_success.sh

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/bin/bash
2+
3+
echo "--DEBUG--"
4+
echo "TRAVIS_REPO_SLUG: $TRAVIS_REPO_SLUG"
5+
echo "TRAVIS_PHP_VERSION: $TRAVIS_PHP_VERSION"
6+
echo "TRAVIS_PULL_REQUEST: $TRAVIS_PULL_REQUEST"
7+
8+
if [ "$TRAVIS_REPO_SLUG" == "PHPOffice/PHPWord" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_PHP_VERSION" == "5.5" ]; then
9+
10+
echo -e "Publishing PHPDoc...\n"
11+
12+
cp -R build/docs $HOME/docs-latest
13+
cp -R build/coverage $HOME/coverage-latest
14+
15+
cd $HOME
16+
git config --global user.email "[email protected]"
17+
git config --global user.name "travis-ci"
18+
git clone --quiet --branch=gh-pages https://${GH_TOKEN}@github.com/PHPOffice/PHPWord gh-pages > /dev/null
19+
20+
cd gh-pages
21+
echo "--DEBUG : Suppression"
22+
git rm -rf ./docs/$TRAVIS_BRANCH
23+
24+
echo "--DEBUG : Dossier"
25+
mkdir -p docs/$TRAVIS_BRANCH
26+
mkdir -p coverage/$TRAVIS_BRANCH
27+
28+
echo "--DEBUG : Copie"
29+
cp -Rf $HOME/docs-latest/* ./docs/$TRAVIS_BRANCH/
30+
cp -Rf $HOME/coverage-latest/* ./coverage/$TRAVIS_BRANCH/
31+
32+
echo "--DEBUG : Git"
33+
git add -f .
34+
git commit -m "PHPDocumentor (Travis Build: $TRAVIS_BUILD_NUMBER - Branch: $TRAVIS_BRANCH)"
35+
git push -fq origin gh-pages > /dev/null
36+
37+
echo -e "Published PHPDoc to gh-pages.\n"
38+
39+
fi

CHANGELOG.md

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,73 @@
22

33
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.
44

5+
## 0.11.0 - 1 June 2014
6+
7+
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.
8+
9+
### Features
10+
11+
- Image: Ability to define relative and absolute positioning - @basjan GH-217
12+
- Footer: Conform footer with header by adding firstPage, evenPage and by inheritance - @basjan @ivanlanin GH-219
13+
- Element: New `TextBox` element - @basjan @ivanlanin GH-228 GH-229 GH-231
14+
- HTML: Ability to add elements to PHPWord object via html - @basjan GH-231
15+
- Element: New `ListItemRun` element that can add a list item with inline formatting like a textrun - @basjan GH-235
16+
- Table: Ability to add table inside a cell (nested table) - @ivanlanin GH-149
17+
- RTF Writer: UTF8 support for RTF: Internal UTF8 text is converted to Unicode before writing - @ivanlanin GH-158
18+
- Table: Ability to define table width (in percent and twip) and position - @ivanlanin GH-237
19+
- RTF Writer: Ability to add links and page breaks in RTF - @ivanlanin GH-196
20+
- ListItemRun: Remove fontStyle parameter because ListItemRun is inherited from TextRun and TextRun doesn't have fontStyle - @ivanlanin
21+
- Config: Ability to use a config file to store various common settings - @ivanlanin GH-200
22+
- ODT Writer: Enable inline font style in TextRun - @ivanlanin
23+
- ODT Writer: Enable underline, strike/doublestrike, smallcaps/allcaps, superscript/subscript font style - @ivanlanin
24+
- ODT Writer: Enable section and column - @ivanlanin
25+
- PDF Writer: Add TCPDF and mPDF as optional PDF renderer library - @ivanlanin
26+
- ODT Writer: Enable title element and custom document properties - @ivanlanin
27+
- ODT Reader: Ability to read standard and custom document properties - @ivanlanin
28+
- Word2007 Writer: Enable the missing custom document properties writer - @ivanlanin
29+
- Image: Enable "image float left" - @ivanlanin GH-244
30+
- RTF Writer: Ability to write document properties - @ivanlanin
31+
- RTF Writer: Ability to write image - @ivanlanin
32+
- Element: New `Field` element - @basjan GH-251
33+
- RTF Reader: Basic RTF reader - @ivanlanin GH-72 GH-252
34+
- Element: New `Line` element - @basjan GH-253
35+
- Title: Ability to apply numbering in heading - @ivanlanin GH-193
36+
- HTML Reader: Basic HTML reader - @ivanlanin GH-80 GH-254
37+
- RTF Writer: Basic table writing - @ivanlanin GH-245
38+
39+
### Bugfixes
40+
41+
- Header: All images added to the second header were assigned to the first header - @basjan GH-222
42+
- Conversion: Fix conversion from cm to pixel, pixel to cm, and pixel to point - @basjan GH-233 GH-234
43+
- PageBreak: Page break adds new line in the beginning of the new page - @ivanlanin GH-150
44+
- Image: `marginLeft` and `marginTop` cannot accept float value - @ivanlanin GH-248
45+
- Title: Orphan `w:fldChar` caused OpenOffice to crash when opening DOCX - @ivanlanin GH-236
46+
47+
### Deprecated
48+
49+
- Static classes `Footnotes`, `Endnotes`, and `TOC`
50+
- `Writer\Word2007\Part`: `Numbering::writeNumbering()`, `Settings::writeSettings()`, `WebSettings::writeWebSettings()`, `ContentTypes::writeContentTypes()`, `Styles::writeStyles()`, `Document::writeDocument()` all changed into `write()`
51+
- `Writer\Word2007\Part\DocProps`: Split into `Writer\Word2007\Part\DocPropsCore` and `Writer\Word2007\Part\DocPropsApp`
52+
- `Element\Title::getBookmarkId()` replaced by `Element\Title::getRelationId()`
53+
- `Writer\HTML::writeDocument`: Replaced by `Writer\HTML::getContent`
54+
55+
### Miscellaneous
56+
57+
- License: Change the project license from LGPL 2.1 into LGPL 3.0 - GH-211
58+
- Word2007 Writer: New `Style\Image` class - @ivanlanin
59+
- Refactor: Replace static classes `Footnotes`, `Endnotes`, and `TOC` with `Collections` - @ivanlanin GH-206
60+
- QA: Reactivate `phpcpd` and `phpmd` on Travis - @ivanlanin
61+
- Refactor: PHPMD recommendation: Change all `get...` method that returns `boolean` into `is...` or `has...` - @ivanlanin
62+
- Docs: Create gh-pages branch for API documentation - @Progi1984 GH-154
63+
- QA: Add `.scrutinizer.yml` and include `composer.lock` for preparation to Scrutinizer - @ivanlanin GH-186
64+
- Writer: Refactor writer parts using composite pattern - @ivanlanin
65+
- Docs: Show code quality and test code coverage badge on README
66+
- Style: Change behaviour of `set...` function of boolean properties; when none is defined, assumed true - @ivanlanin
67+
- Shared: Unify PHP ZipArchive and PCLZip features into PhpWord ZipArchive - @ivanlanin
68+
- Docs: Create VERSION file - @ivanlanin
69+
- QA: Improve dan update requirement check in `samples` folder - @ivanlanin
70+
71+
572
## 0.10.1 - 21 May 2014
673

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

0 commit comments

Comments
 (0)