Skip to content
This repository has been archived by the owner on Aug 12, 2022. It is now read-only.

Add PHPStan and fix level 1 errors #2

Merged
merged 8 commits into from
Mar 23, 2021
Merged

Add PHPStan and fix level 1 errors #2

merged 8 commits into from
Mar 23, 2021

Conversation

mvorisek
Copy link
Member

based on tecnickcom/TCPDF#307, conflicts fixed

@williamdes enable phpstan in CI

@codecov
Copy link

codecov bot commented Mar 22, 2021

Codecov Report

Merging #2 (512c978) into main (8703d9f) will increase coverage by 7.46%.
The diff coverage is 59.45%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main       #2      +/-   ##
==========================================
+ Coverage   64.59%   72.05%   +7.46%     
==========================================
  Files         115      125      +10     
  Lines       21166    22872    +1706     
==========================================
+ Hits        13672    16481    +2809     
+ Misses       7494     6391    -1103     
Flag Coverage Δ
php-5.3-ubuntu-latest 71.59% <59.45%> (-28.41%) ⬇️
php-5.4-ubuntu-latest 71.74% <59.45%> (-28.26%) ⬇️
php-5.5-ubuntu-latest 71.75% <59.45%> (-28.25%) ⬇️
php-5.6-ubuntu-latest 46.93% <37.83%> (?)
php-7.1-ubuntu-latest 47.34% <40.90%> (+0.01%) ⬆️
php-7.2-ubuntu-latest 47.29% <40.90%> (+0.01%) ⬆️
php-7.3-ubuntu-latest 47.28% <40.90%> (+0.01%) ⬆️
php-7.4-ubuntu-latest 47.28% <40.90%> (+<0.01%) ⬆️
php-8.0-ubuntu-latest 64.54% <50.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
include/barcodes/qrcode.php 63.72% <33.33%> (+0.16%) ⬆️
tests/coverage.php 17.24% <33.33%> (ø)
tcpdf.php 70.95% <82.35%> (+8.10%) ⬆️
include/barcodes/datamatrix.php 52.23% <100.00%> (-0.09%) ⬇️
include/tcpdf_static.php 54.00% <100.00%> (+5.53%) ⬆️
examples/example_020.php 94.23% <0.00%> (-1.77%) ⬇️
include/barcodes/pdf417.php 59.27% <0.00%> (-1.34%) ⬇️
include/tcpdf_images.php 54.54% <0.00%> (-1.24%) ⬇️
tcpdf_autoconfig.php 46.29% <0.00%> (-0.38%) ⬇️
... and 52 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8703d9f...512c978. Read the comment docs.

@mvorisek
Copy link
Member Author

PHP 7.1 needed also for better syntax, see https://github.com/tecnickcom/TCPDF/pull/300/files#diff-d2ab9925cad7eac58e0ff4cc0d251a937ecf49e4b6bf57f8b95aab76648a9d34R25 , is there any strong reason to not drop support of these historical php versions?

composer.json Outdated Show resolved Hide resolved
@williamdes
Copy link
Member

PHP 7.1 needed also for better syntax, see https://github.com/tecnickcom/TCPDF/pull/300/files#diff-d2ab9925cad7eac58e0ff4cc0d251a937ecf49e4b6bf57f8b95aab76648a9d34R25 , is there any strong reason to not drop support of these historical php versions?

Well, a lof of systems use this lib, and maybe because it is supported for old PHP versions.
Sadly all the world is not ready for PHP 7, maybe more years to wait :/

@mvorisek
Copy link
Member Author

PHP 7.1 needed also for better syntax, see https://github.com/tecnickcom/TCPDF/pull/300/files#diff-d2ab9925cad7eac58e0ff4cc0d251a937ecf49e4b6bf57f8b95aab76648a9d34R25 , is there any strong reason to not drop support of these historical php versions?

Well, a lof of systems use this lib, and maybe because it is supported for old PHP versions.
Sadly all the world is not ready for PHP 7, maybe more years to wait :/

That is correct, but these systems can use original tcpdf :)

@williamdes
Copy link
Member

That is correct, but these systems can use original tcpdf :)

This is true and an interesting fact 🤔

@williamdes williamdes self-assigned this Mar 23, 2021
@williamdes williamdes added this to the 7.0.0 milestone Mar 23, 2021
@williamdes williamdes merged commit 512c978 into code-lts:main Mar 23, 2021
@williamdes
Copy link
Member

Thank you @mvorisek for your contribution !
I added a bunch of work and cut out in a commit the code removal

@mvorisek mvorisek deleted the merge_phpstan branch March 23, 2021 12:53
@mvorisek mvorisek restored the merge_phpstan branch March 23, 2021 12:54
@mvorisek mvorisek deleted the merge_phpstan branch March 23, 2021 12:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants