Skip to content

Commit d8dae9e

Browse files
authored
Merge branch 'develop' into template_processor__set_image_value
2 parents 58f52e3 + e6496bf commit d8dae9e

File tree

441 files changed

+7555
-1220
lines changed

Some content is hidden

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

441 files changed

+7555
-1220
lines changed

.gitattributes

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# build config
2+
/.scrutinizer.yml export-ignore
3+
/.travis.yml export-ignore
4+
/php_cs.dist export-ignore
5+
/phpmd.xml.dist export-ignore
6+
/phpstan.neon export-ignore
7+
8+
/composer.lock export-ignore
9+
10+
# git files
11+
/.gitignore export-ignore
12+
/.gitattributes export-ignore
13+
14+
# project directories
15+
/build export-ignore
16+
/docs export-ignore
17+
/samples export-ignore
18+
19+
# tests
20+
/phpunit.xml.dist export-ignore
21+
/tests export-ignore

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ vendor
1818
/.settings
1919
phpword.ini
2020
/.buildpath
21+
/.scannerwork
2122
/.project
2223
/nbproject
2324
/.php_cs.cache

.scrutinizer.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
build:
2+
nodes:
3+
analysis:
4+
tests:
5+
override: [php-scrutinizer-run]
16
filter:
27
excluded_paths: [ 'vendor/*', 'tests/*', 'samples/*', 'src/PhpWord/Shared/PCLZip/*' ]
38

@@ -14,8 +19,8 @@ tools:
1419
config:
1520
ruleset: phpmd.xml.dist
1621
external_code_coverage:
17-
enabled: true
18-
timeout: 900
22+
enabled: false
23+
timeout: 1200
1924
php_cpd: true
2025
# php_sim: # Temporarily disabled to allow focus on things other than duplicates
2126
# min_mass: 40

.travis.yml

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,26 @@ php:
99
- 5.6
1010
- 7.0
1111
- 7.1
12+
- 7.2
13+
- 7.3
1214

1315
matrix:
1416
include:
15-
- php: 5.6
17+
- php: 7.0
1618
env: COVERAGE=1
17-
allow_failures:
19+
- php: 5.3
20+
env: COMPOSER_MEMORY_LIMIT=2G
21+
- php: 7.3
22+
env: DEPENDENCIES="--ignore-platform-reqs"
23+
exclude:
24+
- php: 5.3
1825
- php: 7.0
19-
- php: 7.1
26+
- php: 7.3
27+
allow_failures:
28+
- php: 7.3
2029

2130
cache:
2231
directories:
23-
- vendor
2432
- $HOME/.composer/cache
2533
- .php-cs.cache
2634

@@ -35,12 +43,12 @@ before_install:
3543

3644
before_script:
3745
## Deactivate xdebug if we don't do code coverage
38-
- if [ -z "$COVERAGE" ]; then phpenv config-rm xdebug.ini ; fi
46+
- if [ -z "$COVERAGE" ]; then phpenv config-rm xdebug.ini || echo "xdebug not available" ; fi
3947
## Composer
4048
- composer self-update
41-
- composer install --prefer-source
49+
- travis_wait composer install --prefer-source $(if [ -n "$DEPENDENCIES" ]; then echo $DEPENDENCIES; fi)
4250
## PHPDocumentor
43-
- mkdir -p build/docs
51+
##- mkdir -p build/docs
4452
- mkdir -p build/coverage
4553

4654
script:
@@ -55,10 +63,8 @@ script:
5563
## PHPLOC
5664
- if [ -z "$COVERAGE" ]; then ./vendor/bin/phploc src/ ; fi
5765
## PHPDocumentor
58-
- if [ -z "$COVERAGE" ]; then ./vendor/bin/phpdoc -q -d ./src -t ./build/docs --ignore "*/src/PhpWord/Shared/*/*" --template="responsive-twig" ; fi
66+
##- if [ -z "$COVERAGE" ]; then ./vendor/bin/phpdoc -q -d ./src -t ./build/docs --ignore "*/src/PhpWord/Shared/*/*" --template="responsive-twig" ; fi
5967

60-
after_script:
61-
## PHPDocumentor
62-
- bash .travis_shell_after_success.sh
63-
## Scrutinizer
64-
- if [ -n "$COVERAGE" ]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml ; fi
68+
after_success:
69+
## Coveralls
70+
- if [ -n "$COVERAGE" ]; then travis_retry php vendor/bin/php-coveralls -v ; fi

.travis_shell_after_success.sh

Lines changed: 0 additions & 39 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 74 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,75 @@ Change Log
33
All notable changes to this project will be documented in this file.
44
This project adheres to [Semantic Versioning](http://semver.org/).
55

6+
v0.16.0 (xx dec 2018)
7+
----------------------
8+
### Added
9+
- Add getVariableCount method in TemplateProcessor. @nicoder #1272
10+
- Add setting Chart Title and Legend visibility @Tom-Magill #1433
11+
- Add ability to pass a Style object in Section constructor @ndench #1416
12+
- Add support for hidden text @Alexmg86 #1527
13+
- Add support for setting images in TemplateProcessor @SailorMax #1170
14+
15+
### Fixed
16+
- Fix regex in `cloneBlock` function @nicoder #1269
17+
- HTML Title Writer loses text when Title contains a TextRun instead a string. @begnini #1436
18+
- Fix regex in fixBrokenMacros, make it less greedy @MuriloSo @brainwood @yurii-sio2 #1502 #1345
19+
- 240 twips are being added to line spacing, should not happen when using lineRule fixed @troosan #1509 #1505
20+
- Adding table layout to the generated HTML @aarangara #1441
21+
- Fix loading of Sharepoint document @Garrcomm #1498
22+
- RTF writer: Round getPageSizeW and getPageSizeH to avoid decimals @Patrick64 #1493
23+
- Fix parsing of Office 365 documents @Timanx #1485
24+
25+
v0.15.0 (14 Jul 2018)
26+
----------------------
627
### Added
7-
- Add support for setting images in TemplateProcessor - @SailorMax #1170
28+
- Parsing of `align` HTML attribute - @troosan #1231
29+
- Parse formatting inside HTML lists - @troosan @samimussbach #1239 #945 #1215 #508
30+
- Parsing of CSS `direction` instruction, HTML `lang` attribute, formatting inside table cell - @troosan #1273 #1252 #1254
31+
- Add support for Track changes @Cip @troosan #354 #1262
32+
- Add support for fixed Table Layout @aoloe @ekopach @troosan #841 #1276
33+
- Add support for Cell Spacing @dox07 @troosan #1040
34+
- Add parsing of formatting inside lists @atomicalnet @troosan #594
35+
- Added support for Vertically Raised or Lowered Text (w:position) @anrikun @troosan #640
36+
- Add support for MACROBUTTON field @phryneas @troosan #1021
37+
- Add support for Hyphenation @Trainmaster #1282 (Document: `autoHyphenation`, `consecutiveHyphenLimit`, `hyphenationZone`, `doNotHyphenateCaps`, Paragraph: `suppressAutoHyphens`)
38+
- Added support for Floating Table Positioning (tblpPr) @anrikun #639
39+
- Added support for Image text wrapping distance @troosan #1310
40+
- Added parsing of CSS line-height and text-indent in HTML reader @troosan #1316
41+
- Added the ability to enable gridlines and axislabels on charts @FrankMeyer #576
42+
- Add support for table indent (tblInd) @Trainmaster #1343
43+
- Added parsing of internal links in HTML reader @lalop #1336
44+
- Several improvements to charts @JAEK-S #1332
45+
- Add parsing of html image in base64 format @jgpATs2w #1382
46+
- Added Support for Indentation & Tabs on RTF Writer. @smaug1985 #1405
47+
- Allows decimal numbers in HTML line-height style @jgpATs2w #1413
48+
49+
### Fixed
50+
- Fix reading of docx default style - @troosan #1238
51+
- Fix the size unit of when parsing html images - @troosan #1254
52+
- Fixed HTML parsing of nested lists - @troosan #1265
53+
- Save PNG alpha information when using remote images. @samsullivan #779
54+
- Fix parsing of `<w:br/>` tag. @troosan #1274
55+
- Bookmark are not writton as internal link in html writer @troosan #1263
56+
- It should be possible to add a Footnote in a ListItemRun @troosan #1287 #1287
57+
- Fix colspan and rowspan for tables in HTML Writer @mattbolt #1292
58+
- Fix parsing of Heading and Title formating @troosan @gthomas2 #465
59+
- Fix Dateformat typo, fix hours casing, add Month-Day-Year formats @ComputerTinker #591
60+
- Support reading of w:drawing for documents produced by word 2011+ @gthomas2 #464 #1324
61+
- Fix missing column width in ODText writer @potofcoffee #413
62+
- Disable entity loader before parsing XML to avoid XXE injection @Tom4t0 #1427
63+
64+
### Changed
65+
- Remove zend-stdlib dependency @Trainmaster #1284
66+
- The default unit for `\PhpOffice\PhpWord\Style\Image` changed from `px` to `pt`.
867

9-
v0.14.0 (?? Dec 2017)
68+
### Miscelaneous
69+
- Drop GitHub pages, switch to coveralls for code coverage analysis @czosel #1360
70+
71+
v0.14.0 (29 Dec 2017)
1072
----------------------
1173
This release fixes several bugs and adds some new features.
12-
This is the last version to support PHP 5.3
74+
This version brings compatibility with PHP 7.0 & 7.1
1375

1476
### Added
1577
- Possibility to control the footnote numbering - @troosan #1068
@@ -27,11 +89,14 @@ This is the last version to support PHP 5.3
2789
- Implement PageBreak for odt writer @cookiekiller #863 #824
2890
- Allow to force an update of all fields on opening a document - @troosan #951
2991
- Allow adding a CheckBox in a TextRun - @irond #727
92+
- Add support for HTML img tag - @srggroup #934
93+
- Add support for password protection for docx - @mariahaubner #1019
3094

3195
### Fixed
3296
- Loosen dependency to Zend
3397
- Images are not being printed when generating PDF - @hubertinio #1074 #431
34-
- Fixed some PHP 7 warnings - @likeuntomurphy #927
98+
- Fixed some PHP 7 warnings - @ likeuntomurphy #927
99+
- Fixed PHP 7.2 compatibility (renamed `Object` class names to `ObjectElement`) - @SailorMax #1185
35100
- Fixed Word 97 reader - @alsofronie @Benpxpx @mario-rivera #912 #920 #892
36101
- Fixed image loading over https - @troosan #988
37102
- Impossibility to set different even and odd page headers - @troosan #981
@@ -45,10 +110,14 @@ This is the last version to support PHP 5.3
45110
- Padded the $args array to remove error - @kaigoh #1150, @reformed #870
46111
- Fix incorrect image size between windows and mac - @bskrtich #874
47112
- Fix adding HTML table to document - @mogilvie @arivanbastos #324
113+
- Fix parsing on/off values (w:val="true|false|1|0|on|off") - @troosan #1221 #1219
114+
- Fix error on Empty Dropdown Entry - @ComputerTinker #592
48115

49116
### Deprecated
50117
- PhpWord->getProtection(), get it from the settings instead PhpWord->getSettings()->getDocumentProtection();
51118

119+
120+
52121
v0.13.0 (31 July 2016)
53122
-------------------
54123
This release brings several improvements in `TemplateProcessor`, automatic output escaping feature for OOXML, ODF, HTML, and RTF (turned off, by default).
@@ -68,7 +137,7 @@ Manual installation feature has been dropped since the release. Please, use [Com
68137
- Improved error message for the case when `autoload.php` is not found. - @RomanSyroeshko #371
69138
- Renamed the `align` option of `NumberingLevel`, `Frame`, `Table`, and `Paragraph` styles into `alignment`. - @RomanSyroeshko
70139
- Improved performance of `TemplateProcessor::setValue()`. - @kazitanvirahsan #614, #617
71-
- Fixed some HTML tags not rendering any output (p, header & table) - #257, #324 - @twmobius and @garethellis
140+
- Fixed some HTML tags not rendering any output (p, header & table) - #257, #324 - @twmobius and @garethellis
72141

73142
### Deprecated
74143
- `getAlign` and `setAlign` methods of `NumberingLevel`, `Frame`, `Table`, and `Paragraph` styles.

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ We want to create a high quality document writer and reader library that people
66

77
- **Be brief, but be bold**. State your issues briefly. But speak out your ideas loudly, even if you can't or don't know how to implement it right away. The world will be better with limitless innovations.
88
- **Follow PHP-FIG standards**. We follow PHP Standards Recommendations (PSRs) by [PHP Framework Interoperability Group](http://www.php-fig.org/). If you're not familiar with these standards, please, [familiarize yourself now](https://github.com/php-fig/fig-standards). Also, please, use [PHPCodeSniffer](http://pear.php.net/package/PHP_CodeSniffer/) to validate your code against PSRs.
9-
- **Test your code**. Nobody else knows your code better than you. So, it's completely yours mission to test the changes you made before pull request submission. We use [PHPUnit](https://phpunit.de/) for our testing purposes and recommend you using this tool too. [Here](https://phpunit.de/presentations.html) you can find PHPUnit best practices and additional information on effective unit testing, which helps us making PHPWord better day to day. Do not hesitate to smoke it carefully. It's a great investment in quality of your work, and it saves you years of life.
9+
- **Test your code**. Nobody else knows your code better than you. So, it's completely your mission to test the changes you made before pull request submission. We use [PHPUnit](https://phpunit.de/) for our testing purposes and recommend you using this tool too. [Here](https://phpunit.de/presentations.html) you can find PHPUnit best practices and additional information on effective unit testing, which helps us making PHPWord better day to day. Do not hesitate to smoke it carefully. It's a great investment in quality of your work, and it saves you years of life.
1010
- **Request pull in separate branch**. Do not submit your request to the master branch. But create a separate branch named specifically for the issue that you addressed. Read [GitHub manual](https://help.github.com/articles/using-pull-requests) to find out more about this. If you are new to GitHub, read [this short manual](https://help.github.com/articles/fork-a-repo) to get yourself familiar with forks and how git works in general. [This video](http://www.youtube.com/watch?v=-zvHQXnBO6c) explains how to synchronize your Github Fork with the Branch of PHPWord.
1111

1212
That's it. Thank you for your interest in PHPWord, and welcome!

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
[![Latest Stable Version](https://poser.pugx.org/phpoffice/phpword/v/stable.png)](https://packagist.org/packages/phpoffice/phpword)
44
[![Build Status](https://travis-ci.org/PHPOffice/PHPWord.svg?branch=master)](https://travis-ci.org/PHPOffice/PHPWord)
55
[![Code Quality](https://scrutinizer-ci.com/g/PHPOffice/PHPWord/badges/quality-score.png?s=b5997ce59ac2816b4514f3a38de9900f6d492c1d)](https://scrutinizer-ci.com/g/PHPOffice/PHPWord/)
6-
[![Code Coverage](https://scrutinizer-ci.com/g/PHPOffice/PHPWord/badges/coverage.png?s=742a98745725c562955440edc8d2c39d7ff5ae25)](https://scrutinizer-ci.com/g/PHPOffice/PHPWord/)
6+
[![Coverage Status](https://coveralls.io/repos/github/PHPOffice/PHPWord/badge.svg?branch=develop)](https://coveralls.io/github/PHPOffice/PHPWord?branch=develop)
77
[![Total Downloads](https://poser.pugx.org/phpoffice/phpword/downloads.png)](https://packagist.org/packages/phpoffice/phpword)
88
[![License](https://poser.pugx.org/phpoffice/phpword/license.png)](https://packagist.org/packages/phpoffice/phpword)
99
[![Join the chat at https://gitter.im/PHPOffice/PHPWord](https://img.shields.io/badge/GITTER-join%20chat-green.svg)](https://gitter.im/PHPOffice/PHPWord)
1010

1111
PHPWord is a library written in pure PHP that provides a set of classes to write to and read from different document file formats. The current version of PHPWord supports Microsoft [Office Open XML](http://en.wikipedia.org/wiki/Office_Open_XML) (OOXML or OpenXML), OASIS [Open Document Format for Office Applications](http://en.wikipedia.org/wiki/OpenDocument) (OpenDocument or ODF), [Rich Text Format](http://en.wikipedia.org/wiki/Rich_Text_Format) (RTF), HTML, and PDF.
1212

13-
PHPWord is an open source project licensed under the terms of [LGPL version 3](https://github.com/PHPOffice/PHPWord/blob/develop/COPYING.LESSER). PHPWord is aimed to be a high quality software product by incorporating [continuous integration](https://travis-ci.org/PHPOffice/PHPWord) and [unit testing](http://phpoffice.github.io/PHPWord/coverage/develop/). You can learn more about PHPWord by reading the [Developers' Documentation](http://phpword.readthedocs.org/) and the [API Documentation](http://phpoffice.github.io/PHPWord/docs/develop/).
13+
PHPWord is an open source project licensed under the terms of [LGPL version 3](https://github.com/PHPOffice/PHPWord/blob/develop/COPYING.LESSER). PHPWord is aimed to be a high quality software product by incorporating [continuous integration](https://travis-ci.org/PHPOffice/PHPWord) and [unit testing](http://phpoffice.github.io/PHPWord/coverage/develop/). You can learn more about PHPWord by reading the [Developers' Documentation](http://phpword.readthedocs.org/).
1414

1515
If you have any questions, please ask on [StackOverFlow](https://stackoverflow.com/questions/tagged/phpword)
1616

@@ -22,7 +22,6 @@ Read more about PHPWord:
2222
- [Getting started](#getting-started)
2323
- [Contributing](#contributing)
2424
- [Developers' Documentation](http://phpword.readthedocs.org/)
25-
- [API Documentation](http://phpoffice.github.io/PHPWord/docs/master/)
2625

2726
## Features
2827

@@ -82,7 +81,7 @@ You can of course also manually edit your composer.json file
8281
```json
8382
{
8483
"require": {
85-
"phpoffice/phpword": "v0.13.*"
84+
"phpoffice/phpword": "v0.14.*"
8685
}
8786
}
8887
```
@@ -161,7 +160,8 @@ $objWriter->save('helloWorld.html');
161160
/* Note: we skip PDF, because "HTML-to-PDF" approach is used to create PDF documents. */
162161
```
163162

164-
More examples are provided in the [samples folder](samples/). You can also read the [Developers' Documentation](http://phpword.readthedocs.org/) and the [API Documentation](http://phpoffice.github.io/PHPWord/docs/master/) for more detail.
163+
More examples are provided in the [samples folder](samples/). For an easy access to those samples launch `php -S localhost:8000` in the samples directory then browse to [http://localhost:8000](http://localhost:8000) to view the samples.
164+
You can also read the [Developers' Documentation](http://phpword.readthedocs.org/) for more detail.
165165

166166
## Contributing
167167

VERSION

Lines changed: 0 additions & 1 deletion
This file was deleted.

bootstrap.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* contributors, visit https://github.com/PHPOffice/PHPWord/contributors. test bootstrap
1212
*
1313
* @see https://github.com/PHPOffice/PHPWord
14-
* @copyright 2010-2017 PHPWord contributors
14+
* @copyright 2010-2018 PHPWord contributors
1515
* @license http://www.gnu.org/licenses/lgpl.txt LGPL version 3
1616
*/
1717

0 commit comments

Comments
 (0)