Skip to content

Commit

Permalink
Merge branch 'master' into svglib-update
Browse files Browse the repository at this point in the history
  • Loading branch information
bsweeney committed Apr 14, 2024
2 parents 502e966 + a30da03 commit b5ea9a6
Show file tree
Hide file tree
Showing 177 changed files with 9,333 additions and 1,715 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/test.yml
Expand Up @@ -3,6 +3,7 @@ name: "Run unit tests"
on:
- push
- pull_request
- workflow_dispatch

env:
COMPOSER_MEMORY_LIMIT: -1
Expand All @@ -14,7 +15,7 @@ jobs:
strategy:
max-parallel: 12
matrix:
php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3']
package-release: [dist]
extensions: ['gd']
include:
Expand All @@ -26,7 +27,7 @@ jobs:
extensions: 'imagick'
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
Expand All @@ -39,9 +40,24 @@ jobs:
with:
dependency-versions: ${{ matrix.package-release }}

- name: Install Ghostscript
run: |
sudo apt-get update
sudo apt --fix-broken install
sudo apt-get install ghostscript
sudo apt --fix-broken install
- name: Run unit tests
run: vendor/bin/phpunit

- name: Upload failed tests
if: failure()
uses: actions/upload-artifact@v3
with:
name: failed-output-tests
path: /home/runner/work/dompdf/dompdf/tmp/failed-output-tests
if-no-files-found: ignore

- name: Run code sniffer
run: vendor/bin/phpcs --standard=phpcs.xml src tests lib

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -4,6 +4,7 @@ composer.lock
phpunit.xml
vendor
build
tmp
.idea
.project
.phpunit.result.cache
Expand Down
6 changes: 4 additions & 2 deletions README.md
Expand Up @@ -57,9 +57,9 @@ Note that some required dependencies may have further dependencies

### Recommendations

* OPcache (OPcache, XCache, APC, etc.): improves performance
* GD (for image processing)
* IMagick or GMagick extension: improves image processing performance
* Additionally, the IMagick or GMagick extension improves image processing performance for certain image types
* OPcache (OPcache, XCache, APC, etc.): improves performance

Visit the wiki for more information:
https://github.com/dompdf/dompdf/wiki/Requirements
Expand Down Expand Up @@ -224,6 +224,8 @@ Files accessed through the local file system have the following requirement:
Watch https://github.com/dompdf/dompdf/issues/320 for progress
* Does not support CSS flexbox.
* Does not support CSS Grid.
* A single Dompdf instance should not be used to render more than one HTML document
because persisted parsing and rendering artifacts can impact future renders.
---

[![Donate button](https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif)](http://goo.gl/DSvWf)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
2.0.5
$Format:<%h>$
31 changes: 31 additions & 0 deletions bin/update-reference-output.php
@@ -0,0 +1,31 @@
<?php
use Dompdf\Tests\OutputTest\Dataset;
use Dompdf\Tests\OutputTest\OutputTest;

/**
* Usage:
* * `php bin/update-reference-output.php` to update the reference files for all
* test cases
* * `php bin/update-reference-output.php <name-prefix>` to update the reference
* files for all test cases with a path starting with the specified prefix
* (paths considered relative to the parent `OutputTest` directory)
*/
require __DIR__ . "/../vendor/autoload.php";

$pathTest = $argv[1] ?? "";
$datasets = OutputTest::datasets();
$include = $pathTest !== ""
? function (Dataset $set) use ($pathTest) {
return substr($set->name, 0, strlen($pathTest)) === $pathTest;
} : function () {
return true;
};

foreach ($datasets as $dataset) {
if (!$include($dataset)) {
continue;
}

echo "Updating " . $dataset->name . PHP_EOL;
$dataset->updateReferenceFile();
}
6 changes: 4 additions & 2 deletions composer.json
Expand Up @@ -32,11 +32,13 @@
"phenx/php-svg-lib": ">=0.5.2 <1.0.0"
},
"require-dev": {
"ext-gd": "*",
"ext-json": "*",
"ext-zip": "*",
"phpunit/phpunit": "^7.5 || ^8 || ^9",
"phpunit/phpunit": "^7.5 || ^8 || ^9 || ^10",
"squizlabs/php_codesniffer": "^3.5",
"mockery/mockery": "^1.3"
"mockery/mockery": "^1.3",
"symfony/process": "^4.4 || ^5.4 || ^6.2 || ^7.0"
},
"suggest": {
"ext-gd": "Needed to process images",
Expand Down

0 comments on commit b5ea9a6

Please sign in to comment.