Skip to content

Commit 689d952

Browse files
committed
Merge branch 'feature/1.1'
2 parents f29e191 + 90a5595 commit 689d952

File tree

566 files changed

+23181
-17255
lines changed

Some content is hidden

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

566 files changed

+23181
-17255
lines changed

.gitattributes

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# build config
22
/.scrutinizer.yml export-ignore
3-
/.travis.yml export-ignore
3+
/.github export-ignore
44
/php_cs.dist export-ignore
55
/phpmd.xml.dist export-ignore
66
/phpstan.neon export-ignore
@@ -18,4 +18,4 @@
1818

1919
# tests
2020
/phpunit.xml.dist export-ignore
21-
/tests export-ignore
21+
/tests export-ignore

.github/ISSUE_TEMPLATE/how-to-use.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ labels: WontFix
99

1010
Documentation is available on [Read the Docs](https://phpword.readthedocs.io/en/latest/).
1111

12-
Sample code is in the [`/samples/` directory](https://github.com/PHPOffice/PHPWord/tree/develop/samples).
12+
Sample code is in the [`/samples/` directory](https://github.com/PHPOffice/PHPWord/tree/master/samples).
1313

1414
Usage questions belong on [Stack Overflow](https://stackoverflow.com/questions/tagged/phpword).

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: composer
4+
directory: "/"
5+
schedule:
6+
interval: monthly
7+
time: "11:00"
8+
open-pull-requests-limit: 10

.github/support.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Label used to mark issues as support requests
2+
supportLabel: Question
3+
# Comment to post on issues marked as support requests. Add a link
4+
# to a support page, or set to `false` to disable
5+
supportComment: >
6+
This looks like a support question. Please ask your support questions on
7+
[StackOverflow](http://stackoverflow.com/questions/tagged/phpword),
8+
or [Gitter](https://gitter.im/PHPOffice/PHPWord).
9+
10+
Thank you for your contributions.
11+
12+
# Whether to close issues marked as support requests
13+
close: true
14+
# Whether to lock issues marked as support requests
15+
lock: false

.github/workflows/ci.yml

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
name: CI
2+
on:
3+
- push
4+
- pull_request
5+
jobs:
6+
test:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
php-version:
11+
- "7.1.3"
12+
- "7.2"
13+
- "7.3"
14+
- "7.4"
15+
- "8.0"
16+
- "8.1"
17+
18+
name: PHP ${{ matrix.php-version }}
19+
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v3
23+
24+
- name: Setup PHP, with composer and extensions
25+
uses: shivammathur/setup-php@v2
26+
with:
27+
php-version: ${{ matrix.php-version }}
28+
extensions: ctype, dom, gd, iconv, fileinfo, libxml, mbstring, simplexml, xml, xmlreader, xmlwriter, zip, zlib
29+
coverage: none
30+
31+
- name: Get composer cache directory
32+
id: composer-cache
33+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
34+
35+
- name: Cache composer dependencies
36+
uses: actions/cache@v3
37+
with:
38+
path: ${{ steps.composer-cache.outputs.dir }}
39+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
40+
restore-keys: ${{ runner.os }}-composer-
41+
42+
- name: Remove lock for old EOL PHP versions
43+
if: matrix.php-version == '7.1.3' || matrix.php-version == '7.2' || matrix.php-version == '7.3' || matrix.php-version == '7.4'
44+
run: rm composer.lock && composer config platform.php ${{ matrix.php-version }}
45+
46+
- name: Install dependencies
47+
run: composer install --no-progress --prefer-dist --optimize-autoloader
48+
49+
- name: Setup problem matchers for PHP
50+
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
51+
52+
- name: Setup problem matchers for PHPUnit
53+
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
54+
55+
- name: Configure matchers
56+
uses: mheap/phpunit-matcher-action@v1
57+
58+
- name: Test with PHPUnit
59+
run: ./vendor/bin/phpunit --no-coverage
60+
61+
php-cs-fixer:
62+
runs-on: ubuntu-latest
63+
steps:
64+
- name: Checkout
65+
uses: actions/checkout@v3
66+
67+
- name: Setup PHP, with composer and extensions
68+
uses: shivammathur/setup-php@v2
69+
with:
70+
php-version: 8.0
71+
extensions: ctype, dom, gd, iconv, fileinfo, libxml, mbstring, simplexml, xml, xmlreader, xmlwriter, zip, zlib
72+
coverage: none
73+
tools: cs2pr
74+
75+
- name: Get composer cache directory
76+
id: composer-cache
77+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
78+
79+
- name: Cache composer dependencies
80+
uses: actions/cache@v3
81+
with:
82+
path: ${{ steps.composer-cache.outputs.dir }}
83+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
84+
restore-keys: ${{ runner.os }}-composer-
85+
86+
- name: Install dependencies
87+
run: composer install --no-progress --prefer-dist --optimize-autoloader
88+
89+
- name: Code style with PHP-CS-Fixer
90+
run: ./vendor/bin/php-cs-fixer fix --dry-run --diff
91+
92+
coverage:
93+
runs-on: ubuntu-latest
94+
steps:
95+
- name: Checkout
96+
uses: actions/checkout@v3
97+
with:
98+
fetch-depth: 0
99+
100+
- name: Setup PHP, with composer and extensions
101+
uses: shivammathur/setup-php@v2
102+
with:
103+
php-version: 8.0
104+
extensions: ctype, dom, gd, iconv, fileinfo, libxml, mbstring, simplexml, xml, xmlreader, xmlwriter, zip, zlib
105+
coverage: pcov
106+
107+
- name: Get composer cache directory
108+
id: composer-cache
109+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
110+
111+
- name: Cache composer dependencies
112+
uses: actions/cache@v3
113+
with:
114+
path: ${{ steps.composer-cache.outputs.dir }}
115+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
116+
restore-keys: ${{ runner.os }}-composer-
117+
118+
- name: Install dependencies
119+
run: composer install --no-progress --prefer-dist --optimize-autoloader
120+
121+
- name: Coverage
122+
run: |
123+
./vendor/bin/phpunit --coverage-clover coverage-clover.xml
124+
composer global require scrutinizer/ocular
125+
~/.composer/vendor/bin/ocular code-coverage:upload --format=php-clover coverage-clover.xml

.github/workflows/github-pages.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: GithHub Pages
2+
on:
3+
push:
4+
tags:
5+
- '*'
6+
7+
jobs:
8+
github-pages:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v3
13+
14+
- name: Setup PHP, with composer and extensions
15+
uses: shivammathur/setup-php@v2
16+
with:
17+
php-version: 7.4
18+
coverage: none # remove xdebug
19+
20+
- name: Build API documentation
21+
run: |
22+
curl -LO https://github.com/phpDocumentor/phpDocumentor/releases/download/v3.0.0/phpDocumentor.phar
23+
php phpDocumentor.phar --directory src/ --target docs/api
24+
25+
- name: Deploy to GithHub Pages
26+
uses: peaceiris/actions-gh-pages@v3
27+
with:
28+
github_token: ${{ secrets.GITHUB_TOKEN }}
29+
publish_dir: ./docs/api

.github_changelog_generator

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
user=PHPOffice
22
project=PHPWord
33

4-
since-tag=0.17.0
5-
future-release=0.18.0
4+
since-tag=0.18.1
5+
future-release=0.18.2
66

77
issues=false
88
pulls=true

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ Desktop.ini
88
_build
99
/build
1010
phpunit.xml
11-
composer.lock
1211
composer.phar
1312
vendor
1413
/report
@@ -21,3 +20,4 @@ phpword.ini
2120
/.project
2221
/nbproject
2322
/.php_cs.cache
23+
/.phpunit.result.cache

0 commit comments

Comments
 (0)