Skip to content

Commit de83da2

Browse files
authored
Merge branch 'develop' into parse_drawings
2 parents e028aef + 6475812 commit de83da2

Some content is hidden

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

66 files changed

+1322
-517
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

.scrutinizer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ tools:
1919
config:
2020
ruleset: phpmd.xml.dist
2121
external_code_coverage:
22-
enabled: true
22+
enabled: false
2323
timeout: 1200
2424
php_cpd: true
2525
# php_sim: # Temporarily disabled to allow focus on things other than duplicates

.travis.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ before_script:
3737
- composer self-update
3838
- travis_wait composer install --prefer-source
3939
## PHPDocumentor
40-
- mkdir -p build/docs
40+
##- mkdir -p build/docs
4141
- mkdir -p build/coverage
4242

4343
script:
@@ -52,10 +52,8 @@ script:
5252
## PHPLOC
5353
- if [ -z "$COVERAGE" ]; then ./vendor/bin/phploc src/ ; fi
5454
## PHPDocumentor
55-
- if [ -z "$COVERAGE" ]; then ./vendor/bin/phpdoc -q -d ./src -t ./build/docs --ignore "*/src/PhpWord/Shared/*/*" --template="responsive-twig" ; fi
55+
##- if [ -z "$COVERAGE" ]; then ./vendor/bin/phpdoc -q -d ./src -t ./build/docs --ignore "*/src/PhpWord/Shared/*/*" --template="responsive-twig" ; fi
5656

57-
after_script:
58-
## PHPDocumentor
59-
- bash .travis_shell_after_success.sh
60-
## Scrutinizer
61-
- 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
57+
after_success:
58+
## Coveralls
59+
- 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: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@ v0.15.0 (?? ??? 2018)
2020
- Added support for Image text wrapping distance @troosan #1310
2121
- Added parsing of CSS line-height and text-indent in HTML reader @troosan #1316
2222
- Added the ability to enable gridlines and axislabels on charts @FrankMeyer #576
23+
- Add support for table indent (tblInd) @Trainmaster #1343
24+
- Added parsing of internal links in HTML reader @lalop #1336
25+
- Several improvements to charts @JAEK-S #1332
26+
- Add parsing of html image in base64 format @jgpATs2w #1382
27+
- Added Support for Indentation & Tabs on RTF Writer. @smaug1985 #1405
2328

2429
### Fixed
2530
- Fix reading of docx default style - @troosan #1238
@@ -33,10 +38,15 @@ v0.15.0 (?? ??? 2018)
3338
- Fix parsing of Heading and Title formating @troosan @gthomas2 #465
3439
- Fix Dateformat typo, fix hours casing, add Month-Day-Year formats @ComputerTinker #591
3540
- Support reading of w:drawing for documents produced by word 2011+ @gthomas2 #464 #1324
41+
- Fix missing column width in ODText writer @potofcoffee #413
42+
- Disable entity loader before parsing XML to avoid XXE injection @Tom4t0 #1427
3643

3744
### Changed
3845
- Remove zend-stdlib dependency @Trainmaster #1284
46+
- The default unit for `\PhpOffice\PhpWord\Style\Image` changed from `px` to `pt`.
3947

48+
### Miscelaneous
49+
- Drop GitHub pages, switch to coveralls for code coverage analysis @czosel #1360
4050

4151
v0.14.0 (29 Dec 2017)
4252
----------------------

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
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)

composer.json

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,17 @@
6464
"phpoffice/common": "^0.2.9"
6565
},
6666
"require-dev": {
67-
"phpunit/phpunit": "^4.8.36 || ^5.0",
68-
"phpdocumentor/phpdocumentor":"2.*",
69-
"squizlabs/php_codesniffer": "^2.7",
70-
"friendsofphp/php-cs-fixer": "^2.0",
67+
"ext-zip": "*",
68+
"ext-gd": "*",
69+
"phpunit/phpunit": "^4.8.36 || ^7.0",
70+
"squizlabs/php_codesniffer": "^2.9",
71+
"friendsofphp/php-cs-fixer": "^2.2",
7172
"phpmd/phpmd": "2.*",
7273
"phploc/phploc": "2.* || 3.* || 4.*",
7374
"dompdf/dompdf":"0.8.*",
7475
"tecnickcom/tcpdf": "6.*",
75-
"mpdf/mpdf": "5.* || 6.* || 7.*"
76+
"mpdf/mpdf": "5.7.4 || 6.* || 7.*",
77+
"php-coveralls/php-coveralls": "1.1.0 || ^2.0"
7678
},
7779
"suggest": {
7880
"ext-zip": "Allows writing OOXML and ODF",

docs/elements.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ To add an image, use the ``addImage`` method to sections, headers, footers, text
242242
243243
$section->addImage($src, [$style]);
244244
245-
- ``$src``. String path to a local image, URL of a remote image or the image data, as a string.
245+
- ``$src``. String path to a local image, URL of a remote image or the image data, as a string. Warning: Do not pass user-generated strings here, as that would allow an attacker to read arbitrary files or perform server-side request forgery by passing file paths or URLs instead of image data.
246246
- ``$style``. See :ref:`image-style`.
247247

248248
Examples:
@@ -435,8 +435,8 @@ Available line style attributes:
435435
- ``dash``. Line types: dash, rounddot, squaredot, dashdot, longdash, longdashdot, longdashdotdot.
436436
- ``beginArrow``. Start type of arrow: block, open, classic, diamond, oval.
437437
- ``endArrow``. End type of arrow: block, open, classic, diamond, oval.
438-
- ``width``. Line-object width in pt.
439-
- ``height``. Line-object height in pt.
438+
- ``width``. Line-object width in *pt*.
439+
- ``height``. Line-object height in *pt*.
440440
- ``flip``. Flip the line element: true, false.
441441

442442
Chart

docs/installing.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,5 @@ Example:
5454
Using samples
5555
-------------
5656

57-
After installation, you can browse and use the samples that we've
58-
provided, either by command line or using browser. If you can access
59-
your PHPWord library folder using browser, point your browser to the
60-
``samples`` folder, e.g. ``http://localhost/PhpWord/samples/``.
57+
More examples are provided in the ``samples`` directory.
58+
For an easy access to those samples launch ``php -S localhost:8000`` in the samples directory then browse to http://localhost:8000 to view the samples.

docs/styles.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ Available Table style options:
104104
- ``border(Top|Right|Bottom|Left)Color``. Border color, e.g. '9966CC'.
105105
- ``border(Top|Right|Bottom|Left)Size``. Border size in *twip*.
106106
- ``cellMargin(Top|Right|Bottom|Left)``. Cell margin in *twip*.
107+
- ``indent``. Table indent from leading margin. Must be an instance of ``\PhpOffice\PhpWord\ComplexType\TblWidth``.
107108
- ``width``. Table width in percent.
108109
- ``unit``. The unit to use for the width. One of ``\PhpOffice\PhpWord\SimpleType\TblWidth``. Defaults to *auto*.
109110
- ``layout``. Table layout, either *fixed* or *autofit* See ``\PhpOffice\PhpWord\Style\Table`` for constants.
@@ -149,10 +150,10 @@ Image
149150
Available Image style options:
150151

151152
- ``alignment``. See ``\PhpOffice\PhpWord\SimpleType\Jc`` class for the details.
152-
- ``height``. Height in pixels.
153+
- ``height``. Height in *pt*.
153154
- ``marginLeft``. Left margin in inches, can be negative.
154155
- ``marginTop``. Top margin in inches, can be negative.
155-
- ``width``. Width in pixels.
156+
- ``width``. Width in *pt*.
156157
- ``wrappingStyle``. Wrapping style, *inline*, *square*, *tight*, *behind*, or *infront*.
157158
- ``wrapDistanceTop``. Top text wrapping in pixels.
158159
- ``wrapDistanceBottom``. Bottom text wrapping in pixels.

0 commit comments

Comments
 (0)