Skip to content

Commit 0c70164

Browse files
authored
Merge pull request #46 from PHPOffice/develop
Release 1.0.0
2 parents edb5d32 + 4e9499e commit 0c70164

37 files changed

+1025
-648
lines changed

.github/dependabot.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
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
9+
assignees:
10+
- Progi1984

.github/workflows/php.yml

+98
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: PHPOffice\Common
2+
on: [push, pull_request]
3+
jobs:
4+
php-cs-fixer:
5+
name: PHP CS Fixer
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Setup PHP
9+
uses: shivammathur/setup-php@v2
10+
with:
11+
php-version: '7.4'
12+
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv
13+
- uses: actions/checkout@v2
14+
15+
- name: Validate composer config
16+
run: composer validate --strict
17+
18+
- name: Composer Install
19+
run: composer global require friendsofphp/php-cs-fixer
20+
21+
- name: Add environment path
22+
run: export PATH="$PATH:$HOME/.composer/vendor/bin"
23+
24+
- name: Run PHPCSFixer
25+
run: php-cs-fixer fix --dry-run --diff
26+
27+
phpmd:
28+
name: PHP Mess Detector
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Setup PHP
32+
uses: shivammathur/setup-php@v2
33+
with:
34+
php-version: '7.4'
35+
extensions: gd, xml, zip
36+
- uses: actions/checkout@v2
37+
38+
- name: Composer Install
39+
run: composer install --ansi --prefer-dist --no-interaction --no-progress
40+
41+
- name: Run phpmd
42+
run: ./vendor/bin/phpmd src/,tests/ text ./phpmd.xml.dist
43+
44+
phpstan:
45+
name: PHP Static Analysis
46+
runs-on: ubuntu-latest
47+
strategy:
48+
fail-fast: false
49+
matrix:
50+
php: ['7.1', '7.2', '7.3', '7.4', '8.0'] #, '8.1'
51+
steps:
52+
- name: Setup PHP
53+
uses: shivammathur/setup-php@v2
54+
with:
55+
php-version: ${{ matrix.php }}
56+
extensions: gd, xml, zip
57+
- uses: actions/checkout@v2
58+
59+
- name: Composer Install
60+
run: composer install --ansi --prefer-dist --no-interaction --no-progress
61+
62+
- name: Run phpstan
63+
run: ./vendor/bin/phpstan analyse -c phpstan.neon.dist
64+
65+
phpunit:
66+
name: PHPUnit
67+
runs-on: ubuntu-latest
68+
strategy:
69+
fail-fast: false
70+
matrix:
71+
php: ['7.1', '7.2', '7.3', '7.4', '8.0'] #, '8.1'
72+
steps:
73+
- name: Setup PHP
74+
uses: shivammathur/setup-php@v2
75+
with:
76+
php-version: ${{ matrix.php }}
77+
extensions: gd, xml, zip
78+
coverage: xdebug
79+
80+
- name: Generate Locale (for tests)
81+
run: sudo locale-gen de_DE.UTF-8 && sudo update-locale
82+
83+
- uses: actions/checkout@v2
84+
85+
- name: Composer Install
86+
run: composer install --ansi --prefer-dist --no-interaction --no-progress
87+
88+
- name: Run phpunit
89+
run: ./vendor/bin/phpunit -c phpunit.xml.dist --coverage-clover build/clover.xml
90+
91+
- name: Upload coverage results to Coveralls
92+
if: matrix.php == '7.3'
93+
env:
94+
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
95+
run: |
96+
wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.4.3/php-coveralls.phar
97+
chmod +x php-coveralls.phar
98+
php php-coveralls.phar --coverage_clover=build/clover.xml --json_path=build/coveralls-upload.json -vvv

.gitignore

+6-24
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,7 @@
1-
.DS_Store
2-
._*
3-
.Spotlight-V100
4-
.Trashes
5-
Thumbs.db
6-
Desktop.ini
7-
.idea
8-
build/
9-
phpunit.xml
10-
composer.phar
11-
vendor
12-
*.settings
13-
*.project
14-
*.buildpath
15-
16-
/samples/results
17-
/phpunit.bat
18-
/todo.txt
19-
/samples/Sample_00_Test.php
20-
/samples/#47
21-
/samples/#70
22-
/samples/#71
23-
/samples/Github_*.*
24-
/samples/#83/*.lnk
1+
## PHPCSFixer
2+
/.php-cs-fixer.cache
3+
## PHPUnit
4+
/.phpunit.result.cache
5+
## Dependencies
256
/composer.lock
7+
/vendor/

.php-cs-fixer.dist.php

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?php
2+
3+
$config = new PhpCsFixer\Config();
4+
5+
$config
6+
->setUsingCache(true)
7+
->setRiskyAllowed(true)
8+
->setRules([
9+
'@Symfony' => true,
10+
'array_indentation' => true,
11+
'cast_spaces' => [
12+
'space' => 'single',
13+
],
14+
'combine_consecutive_issets' => true,
15+
'concat_space' => [
16+
'spacing' => 'one',
17+
],
18+
'error_suppression' => [
19+
'mute_deprecation_error' => false,
20+
'noise_remaining_usages' => false,
21+
'noise_remaining_usages_exclude' => [],
22+
],
23+
'function_to_constant' => false,
24+
'method_chaining_indentation' => true,
25+
'no_alias_functions' => false,
26+
'no_superfluous_phpdoc_tags' => false,
27+
'non_printable_character' => [
28+
'use_escape_sequences_in_strings' => true,
29+
],
30+
'phpdoc_align' => [
31+
'align' => 'left',
32+
],
33+
'phpdoc_summary' => false,
34+
'protected_to_private' => false,
35+
'self_accessor' => false,
36+
'yoda_style' => false,
37+
'single_line_throw' => false,
38+
'no_alias_language_construct_call' => false,
39+
])
40+
->getFinder()
41+
->in(__DIR__)
42+
->exclude('vendor');
43+
44+
return $config;

.scrutinizer.yml

-24
This file was deleted.

.travis.yml

-60
This file was deleted.

.travis_shell_after_success.sh

-39
This file was deleted.

README.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[![Latest Stable Version](https://poser.pugx.org/phpoffice/common/v/stable.png)](https://packagist.org/packages/phpoffice/common)
2-
[![Build Status](https://travis-ci.org/PHPOffice/Common.svg?branch=master)](https://travis-ci.org/PHPOffice/Common)
3-
[![Code Quality](https://scrutinizer-ci.com/g/PHPOffice/Common/badges/quality-score.png?s=b5997ce59ac2816b4514f3a38de9900f6d492c1d)](https://scrutinizer-ci.com/g/PHPOffice/Common/)
4-
[![Code Coverage](https://scrutinizer-ci.com/g/PHPOffice/Common/badges/coverage.png?s=742a98745725c562955440edc8d2c39d7ff5ae25)](https://scrutinizer-ci.com/g/PHPOffice/Common/)
2+
[![PHPOffice\Common](https://github.com/PHPOffice/Common/actions/workflows/php.yml/badge.svg)](https://github.com/PHPOffice/Common/actions/workflows/php.yml)
3+
[![Coverage Status](https://coveralls.io/repos/github/PHPOffice/Common/badge.svg?branch=develop)](https://coveralls.io/github/PHPOffice/Common?branch=develop)
54
[![Total Downloads](https://poser.pugx.org/phpoffice/common/downloads.png)](https://packagist.org/packages/phpoffice/common)
65
[![License](https://poser.pugx.org/phpoffice/common/license.png)](https://packagist.org/packages/phpoffice/common)
76
[![Join the chat at https://gitter.im/PHPOffice/Common](https://img.shields.io/badge/GITTER-join%20chat-green.svg)](https://gitter.im/PHPOffice/Common)
@@ -21,7 +20,7 @@ Read more about PHPPowerPoint:
2120

2221
PHPOffice Common requires the following:
2322

24-
- PHP 5.3+
23+
- PHP 7.1+
2524

2625
## Contributing
2726

composer.json

+4-7
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"keywords": ["PHP","Office","Common","component"],
55
"homepage": "http://phpoffice.github.io",
66
"type": "library",
7-
"license": "LGPL",
7+
"license": "LGPL-3.0-only",
88
"authors": [
99
{
1010
"name": "Mark Baker"
@@ -15,16 +15,13 @@
1515
}
1616
],
1717
"require": {
18-
"php": ">=5.3.0",
18+
"php": ">=7.1",
1919
"pclzip/pclzip": "^2.8"
2020
},
2121
"require-dev": {
22-
"phpunit/phpunit": "^4.8.36 || ^7.0",
23-
"phpdocumentor/phpdocumentor":"2.*",
22+
"phpunit/phpunit": ">=7",
2423
"phpmd/phpmd": "2.*",
25-
"sebastian/phpcpd": "2.*",
26-
"phploc/phploc": "2.*",
27-
"squizlabs/php_codesniffer": "2.*"
24+
"phpstan/phpstan": "^0.12.88"
2825
},
2926
"autoload": {
3027
"psr-4": {

phpstan.neon.dist

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
parameters:
2+
level: 6
3+
bootstrapFiles:
4+
- tests/bootstrap.php
5+
paths:
6+
- src
7+
- tests
8+
reportUnmatchedIgnoredErrors: false
9+
ignoreErrors:
10+
11+
## Remove after remove ArrayObject
12+
treatPhpDocTypesAsCertain: false

phpunit.xml.dist

+1-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
</whitelist>
1919
</filter>
2020
<logging>
21-
<log type="coverage-html" target="./build/coverage" />
22-
<log type="coverage-clover" target="./build/logs/clover.xml" />
21+
<log type="coverage-clover" target="./build/clover.xml" />
2322
</logging>
2423
</phpunit>

0 commit comments

Comments
 (0)