Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
163aaab
Add Some PHPDocs
Oct 23, 2018
2af103b
Merge pull request #26 from tolbon/FixPHPDocs
Progi1984 Oct 23, 2018
d4803d4
Added PHP 7.3 support for travis
arzurchris Oct 29, 2018
91b3d70
Merge pull request #27 from arzurchris/develop
Progi1984 Oct 29, 2018
8d45746
Ensure that library re-sets original xml entity loading value after d…
seamuslee001 Feb 24, 2019
9e4d0dd
Merge pull request #29 from seamuslee001/libxml_improve_handling
Progi1984 Mar 4, 2019
f601421
Simplify calls to libxml_disable_entity_loader
troosan Mar 6, 2019
2caf520
Merge pull request #30 from troosan/avoid_double_call_to_function
Progi1984 May 13, 2019
186eb88
Removed Scrutinize
Progi1984 Jul 19, 2021
b3d2cce
Removed Travis CI
Progi1984 Jul 19, 2021
802af25
Added Github Action (Dependabot)
Progi1984 Jul 19, 2021
b7dc3da
Added PHPCSFixer Check
Progi1984 Jul 19, 2021
70ab3ee
Added PHPMD Check
Progi1984 Jul 19, 2021
b11f590
Added PHPStan Check
Progi1984 Jul 20, 2021
cf7bc4f
Added Github Action (PHP)
Progi1984 Jul 20, 2021
3bf1787
Fixed CI
Progi1984 Jul 20, 2021
26a63a1
Set minimal support to PHP 7.1
Progi1984 Jul 20, 2021
a3f6152
Merge pull request #38 from Progi1984/improveProject
Progi1984 Jul 20, 2021
378eae2
Fixed some errors
Progi1984 Jul 20, 2021
751b70e
Merge pull request #39 from Progi1984/fixIcons
Progi1984 Jul 20, 2021
84f4947
Improved Unit Tests
Progi1984 Jul 21, 2021
1431994
Merge pull request #40 from Progi1984/improveCoverage
Progi1984 Jul 21, 2021
eca93ab
Fixed Drawing pixelsToPoints and twipsToPixels ratios
Progi1984 Jul 21, 2021
b446746
Merge pull request #41 from Progi1984/fixPixelsSize
Progi1984 Jul 21, 2021
7b4e636
Added conversion from centimeters to points
Progi1984 Aug 1, 2021
da4c7ad
Merge pull request #42 from Progi1984/cm2pt
Progi1984 Aug 1, 2021
1a1eb0a
Fixed typing & Added conversion from points to EMU
Progi1984 Aug 2, 2021
0080806
Merge pull request #43 from Progi1984/fixTyping
Progi1984 Aug 2, 2021
29901fc
`pointsToCentimeters` accept float as parameter
Progi1984 Aug 3, 2021
4e9499e
Merge pull request #44 from Progi1984/pointsToCentimeters
Progi1984 Aug 3, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: composer
directory: "/"
schedule:
interval: monthly
time: "11:00"
open-pull-requests-limit: 10
assignees:
- Progi1984
98 changes: 98 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: PHPOffice\Common
on: [push, pull_request]
jobs:
php-cs-fixer:
name: PHP CS Fixer
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
extensions: mbstring, intl, gd, xml, dom, json, fileinfo, curl, zip, iconv
- uses: actions/checkout@v2

- name: Validate composer config
run: composer validate --strict

- name: Composer Install
run: composer global require friendsofphp/php-cs-fixer

- name: Add environment path
run: export PATH="$PATH:$HOME/.composer/vendor/bin"

- name: Run PHPCSFixer
run: php-cs-fixer fix --dry-run --diff

phpmd:
name: PHP Mess Detector
runs-on: ubuntu-latest
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
extensions: gd, xml, zip
- uses: actions/checkout@v2

- name: Composer Install
run: composer install --ansi --prefer-dist --no-interaction --no-progress

- name: Run phpmd
run: ./vendor/bin/phpmd src/,tests/ text ./phpmd.xml.dist

phpstan:
name: PHP Static Analysis
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['7.1', '7.2', '7.3', '7.4', '8.0'] #, '8.1'
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: gd, xml, zip
- uses: actions/checkout@v2

- name: Composer Install
run: composer install --ansi --prefer-dist --no-interaction --no-progress

- name: Run phpstan
run: ./vendor/bin/phpstan analyse -c phpstan.neon.dist

phpunit:
name: PHPUnit
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['7.1', '7.2', '7.3', '7.4', '8.0'] #, '8.1'
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: gd, xml, zip
coverage: xdebug

- name: Generate Locale (for tests)
run: sudo locale-gen de_DE.UTF-8 && sudo update-locale

- uses: actions/checkout@v2

- name: Composer Install
run: composer install --ansi --prefer-dist --no-interaction --no-progress

- name: Run phpunit
run: ./vendor/bin/phpunit -c phpunit.xml.dist --coverage-clover build/clover.xml

- name: Upload coverage results to Coveralls
if: matrix.php == '7.3'
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.4.3/php-coveralls.phar
chmod +x php-coveralls.phar
php php-coveralls.phar --coverage_clover=build/clover.xml --json_path=build/coveralls-upload.json -vvv
30 changes: 6 additions & 24 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,25 +1,7 @@
.DS_Store
._*
.Spotlight-V100
.Trashes
Thumbs.db
Desktop.ini
.idea
build/
phpunit.xml
composer.phar
vendor
*.settings
*.project
*.buildpath

/samples/results
/phpunit.bat
/todo.txt
/samples/Sample_00_Test.php
/samples/#47
/samples/#70
/samples/#71
/samples/Github_*.*
/samples/#83/*.lnk
## PHPCSFixer
/.php-cs-fixer.cache
## PHPUnit
/.phpunit.result.cache
## Dependencies
/composer.lock
/vendor/
44 changes: 44 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?php

$config = new PhpCsFixer\Config();

$config
->setUsingCache(true)
->setRiskyAllowed(true)
->setRules([
'@Symfony' => true,
'array_indentation' => true,
'cast_spaces' => [
'space' => 'single',
],
'combine_consecutive_issets' => true,
'concat_space' => [
'spacing' => 'one',
],
'error_suppression' => [
'mute_deprecation_error' => false,
'noise_remaining_usages' => false,
'noise_remaining_usages_exclude' => [],
],
'function_to_constant' => false,
'method_chaining_indentation' => true,
'no_alias_functions' => false,
'no_superfluous_phpdoc_tags' => false,
'non_printable_character' => [
'use_escape_sequences_in_strings' => true,
],
'phpdoc_align' => [
'align' => 'left',
],
'phpdoc_summary' => false,
'protected_to_private' => false,
'self_accessor' => false,
'yoda_style' => false,
'single_line_throw' => false,
'no_alias_language_construct_call' => false,
])
->getFinder()
->in(__DIR__)
->exclude('vendor');

return $config;
24 changes: 0 additions & 24 deletions .scrutinizer.yml

This file was deleted.

60 changes: 0 additions & 60 deletions .travis.yml

This file was deleted.

39 changes: 0 additions & 39 deletions .travis_shell_after_success.sh

This file was deleted.

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

PHPOffice Common requires the following:

- PHP 5.3+
- PHP 7.1+

## Contributing

Expand Down
11 changes: 4 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"keywords": ["PHP","Office","Common","component"],
"homepage": "http://phpoffice.github.io",
"type": "library",
"license": "LGPL",
"license": "LGPL-3.0-only",
"authors": [
{
"name": "Mark Baker"
Expand All @@ -15,16 +15,13 @@
}
],
"require": {
"php": ">=5.3.0",
"php": ">=7.1",
"pclzip/pclzip": "^2.8"
},
"require-dev": {
"phpunit/phpunit": "^4.8.36 || ^7.0",
"phpdocumentor/phpdocumentor":"2.*",
"phpunit/phpunit": ">=7",
"phpmd/phpmd": "2.*",
"sebastian/phpcpd": "2.*",
"phploc/phploc": "2.*",
"squizlabs/php_codesniffer": "2.*"
"phpstan/phpstan": "^0.12.88"
},
"autoload": {
"psr-4": {
Expand Down
12 changes: 12 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
parameters:
level: 6
bootstrapFiles:
- tests/bootstrap.php
paths:
- src
- tests
reportUnmatchedIgnoredErrors: false
ignoreErrors:

## Remove after remove ArrayObject
treatPhpDocTypesAsCertain: false
3 changes: 1 addition & 2 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
</whitelist>
</filter>
<logging>
<log type="coverage-html" target="./build/coverage" />
<log type="coverage-clover" target="./build/logs/clover.xml" />
<log type="coverage-clover" target="./build/clover.xml" />
</logging>
</phpunit>
Loading