Skip to content

Commit 2367e0c

Browse files
authored
CRM: Bump dompdf to v3 (#47743)
* Bump to dompdf v3 * Enable PHP tests in PHP 8.5 and add basic PDF test * Add PHP prepend file to ignore deprecations in thecodingmachine/safe during tests
1 parent 029eef3 commit 2367e0c

17 files changed

Lines changed: 487 additions & 473 deletions

projects/plugins/crm/.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
/vendor/composer/** production-include
1010
/vendor/jetpack-autoloader/** production-include
1111
/vendor/dompdf/** production-include
12-
/vendor/phenx/** production-include
1312
/vendor/masterminds/html5/** production-include
1413
/vendor/sabberworm/php-css-parser/** production-include
14+
/vendor/thecodingmachine/safe/** production-include
1515
**/css/** production-include
1616
**/js/*.min.js production-include
1717
**/js/*.min.js.LICENSE.txt production-include

projects/plugins/crm/.phan/baseline.php

Lines changed: 84 additions & 76 deletions
Large diffs are not rendered by default.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Significance: minor
2+
Type: changed
3+
4+
Improve PHP 8.5 compatibility.

projects/plugins/crm/composer.json

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,17 @@
2121
"pnpm run build-production"
2222
],
2323
"test-coverage": [
24-
"php -dpcov.directory=. ./vendor/bin/phpunit-select-config phpunit.#.xml.dist --coverage-php \"$COVERAGE_DIR/php.cov\""
24+
"php -d auto_prepend_file=tests/suppress_php84_deprecations.php -dpcov.directory=. ./vendor/bin/phpunit-select-config phpunit.#.xml.dist --coverage-php \"$COVERAGE_DIR/php.cov\""
2525
],
26-
"tests": "vendor/bin/codecept run acceptance --fail-fast",
27-
"tests-debug": "vendor/bin/codecept run acceptance --fail-fast --debug",
28-
"create-test": "vendor/bin/codecept generate:cest acceptance $1",
29-
"build-tests": "vendor/bin/codecept build",
26+
"tests": "php -d auto_prepend_file=tests/suppress_php84_deprecations.php vendor/bin/codecept run acceptance --fail-fast",
27+
"tests-debug": "php -d auto_prepend_file=tests/suppress_php84_deprecations.php vendor/bin/codecept run acceptance --fail-fast --debug",
28+
"create-test": "php -d auto_prepend_file=tests/suppress_php84_deprecations.php vendor/bin/codecept generate:cest acceptance $1",
29+
"build-tests": "php -d auto_prepend_file=tests/suppress_php84_deprecations.php vendor/bin/codecept build",
3030
"cs": "temp=$(git diff --diff-filter=d --name-only trunk HEAD | grep '.php'); [[ -n $temp ]] && phpcs-changed -s --always-exit-zero --git --git-base trunk $temp || echo 'No changes found.'",
3131
"cs-staged": "temp=$(git diff --diff-filter=d --name-only --cached | grep '.php'); [[ -n $temp ]] && phpcs-changed -s --always-exit-zero --git --git-staged $temp || echo 'No changes found.'",
3232
"cs-unstaged": "temp=$(git diff --diff-filter=d --name-only | grep '.php'); [[ -n $temp ]] && phpcs-changed -s --always-exit-zero --git --git-unstaged $temp || echo 'No changes found.'",
3333
"phpunit": [
34-
"phpunit-select-config phpunit.#.xml.dist --colors=always"
34+
"php -d auto_prepend_file=tests/suppress_php84_deprecations.php vendor/bin/phpunit-select-config phpunit.#.xml.dist --colors=always"
3535
],
3636
"skip-test-php": "tests/action-skip-test-php.sh",
3737
"test-php": [
@@ -58,7 +58,8 @@
5858
"automattic/jetpack-autoloader": "@dev",
5959
"automattic/jetpack-composer-plugin": "@dev",
6060
"automattic/woocommerce": "^3.1",
61-
"dompdf/dompdf": "^2.0"
61+
"dompdf/dompdf": "^3.1",
62+
"thecodingmachine/safe": "^1.3"
6263
},
6364
"repositories": [
6465
{

0 commit comments

Comments
 (0)