Skip to content

Commit

Permalink
Php8 (#3)
Browse files Browse the repository at this point in the history
* Require PHP 8.0+

* Set max phpstan level and fix errors
  • Loading branch information
nicolaasuni authored Nov 12, 2023
1 parent d523e09 commit 6c21457
Show file tree
Hide file tree
Showing 22 changed files with 2,725 additions and 1,765 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,10 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version: ["7.2", "7.3", "7.4", "8.0", "8.1", "8.2"]
php-version: ["8.0", "8.1", "8.2"]
experimental: [false]
os: [ubuntu-latest]
coverage-extension: [pcov]
include:
#- { php-version: '5.3', experimental: false, os: ubuntu-latest, coverage-extension: 'xdebug' }
#- { php-version: '5.4', experimental: false, os: ubuntu-latest, coverage-extension: 'xdebug' }
- { php-version: '5.5', experimental: false, os: ubuntu-latest, coverage-extension: 'xdebug' }
- { php-version: '5.6', experimental: false, os: ubuntu-latest, coverage-extension: 'xdebug' }
- { php-version: '7.1', experimental: false, os: ubuntu-latest, coverage-extension: 'xdebug' }
steps:
- uses: actions/checkout@v4
- name: Use php ${{ matrix.php-version }}
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,14 @@
**/.vagrant
**/auth.json
**/nbproject
**/temp.php
**/test.php
.phpdoc
.phpunit.cache
.phpunit.result.cache
composer.lock
ecs.php
phpunit.xml
rector.php
target
vendor
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ All artifacts are generated in the target directory.

Examples are located in the `example` directory.

Start a development server (requires PHP 5.4) using the command:
Start a development server (requires PHP 8.0+) using the command:

```
make server
Expand All @@ -78,15 +78,15 @@ Create a composer.json in your projects root-directory:
```json
{
"require": {
"tecnickcom/tc-lib-pdf-graph": "^1.5"
"tecnickcom/tc-lib-pdf-graph": "^2.0"
}
}
```

Or add to an existing project with:

```bash
composer require tecnickcom/tc-lib-pdf-graph ^1.5
composer require tecnickcom/tc-lib-pdf-graph ^2.0
```


Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.7.23
2.0.6
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@
}
],
"require": {
"php": ">=5.4",
"php": ">=8.0",
"ext-zlib": "*",
"tecnickcom/tc-lib-color": "^1.14",
"tecnickcom/tc-lib-pdf-encrypt": "^1.6"
"tecnickcom/tc-lib-color": "^2.0",
"tecnickcom/tc-lib-pdf-encrypt": "^2.0"
},
"require-dev": {
"pdepend/pdepend": "2.13.0",
"phpmd/phpmd": "2.13.0",
"phpunit/phpunit": "10.1.2 || 9.6.7 || 8.5.31 || 7.5.20 || 6.5.14 || 5.7.27 || 4.8.36",
"squizlabs/php_codesniffer": "3.7.2 || 2.9.2"
"phpunit/phpunit": "10.1.2 || 9.6.13",
"squizlabs/php_codesniffer": "3.7.2"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
parameters:
level: 5
level: max
paths:
- src
- test
Expand Down
2 changes: 1 addition & 1 deletion resources/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ Vcs-Git: https://github.com/~#VENDOR#~/~#PROJECT#~.git
Package: ~#PKGNAME#~
Provides: php-~#PROJECT#~
Architecture: all
Depends: php (>= 5.4.0), php-zip, php-tecnickcom-tc-lib-color (<< 2.0.0), php-tecnickcom-tc-lib-color (>= 1.14.39), php-tecnickcom-tc-lib-pdf-encrypt (<< 2.0.0), php-tecnickcom-tc-lib-pdf-encrypt (>= 1.6.35), ${misc:Depends}
Depends: php (>= 8.0.0), php-zip, php-tecnickcom-tc-lib-color (<< 2.0.0), php-tecnickcom-tc-lib-color (>= 2.0.3), php-tecnickcom-tc-lib-pdf-encrypt (<< 2.0.0), php-tecnickcom-tc-lib-pdf-encrypt (>= 2.0.6), ${misc:Depends}
Description: PHP PDF Graph Library
PHP library containing PDF graphic and geometric methods.
6 changes: 3 additions & 3 deletions resources/rpm/rpm.spec
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ URL: https://github.com/%{gh_owner}/%{gh_project}
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-%(%{__id_u} -n)
BuildArch: noarch

Requires: php(language) >= 5.4.0
Requires: php(language) >= 8.0.0
Requires: php-zlib
Requires: php-composer(%{c_vendor}/tc-lib-color) < 2.0.0
Requires: php-composer(%{c_vendor}/tc-lib-color) >= 1.14.39
Requires: php-composer(%{c_vendor}/tc-lib-color) >= 2.0.3
Requires: php-composer(%{c_vendor}/tc-lib-pdf-encrypt) < 2.0.0
Requires: php-composer(%{c_vendor}/tc-lib-pdf-encrypt) >= 1.6.35
Requires: php-composer(%{c_vendor}/tc-lib-pdf-encrypt) >= 2.0.6

Provides: php-composer(%{c_vendor}/%{gh_project}) = %{version}
Provides: php-%{gh_project} = %{version}
Expand Down
Loading

0 comments on commit 6c21457

Please sign in to comment.