From b759f442755863ec75a2b604c9097feea3cb69b6 Mon Sep 17 00:00:00 2001 From: Joey Smith Date: Fri, 27 Nov 2026 17:13:24 -0600 Subject: [PATCH 1/2] Keep the test and tooling files out of the distributed archive Every other php-db package marks its test directory, PHPUnit config, mago config and CI files export-ignore, so a consumer's vendor directory gets the source and the licence only. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .gitattributes | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..eeb5831 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,9 @@ +/.gitattributes export-ignore +/.github/ export-ignore +/.gitignore export-ignore +/clover.xml export-ignore +/infection.json5.dist export-ignore +/mago.toml export-ignore +/phpunit.xml.dist export-ignore +/renovate.json export-ignore +/test/ export-ignore From 241895276e67c69667fc58f2f3fb8c8f81ed9469 Mon Sep 17 00:00:00 2001 From: Joey Smith Date: Fri, 27 Nov 2026 17:17:23 -0600 Subject: [PATCH 2/2] Make the formatter and PHPUnit config independent of the matrix leg The workflow overrides mago's php-version per matrix leg, and from 8.4 the formatter drops the parentheses around new in member access, so the check passed on 8.3 and failed on 8.4 and 8.5. phpdb and phpdb-mysql pin parentheses-around-new-in-member-access for the same reason. PHPUnit 12 reports a failed ini_set as a warning, and this config runs with failOnWarning, so the xdebug.max_nesting_level line failed the coverage leg, where the driver is pcov and xdebug is not loaded. This suite does not nest, and phpdb-mysql on PHPUnit 12 carries no ini lines either. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- mago.toml | 5 +++++ phpunit.xml.dist | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/mago.toml b/mago.toml index a865e25..a48302b 100644 --- a/mago.toml +++ b/mago.toml @@ -4,3 +4,8 @@ php-version = "8.3.0" [source] paths = ["src", "test"] includes = ["vendor"] + +# Keeps the parentheses around `new` in member access, so the formatted output does not +# depend on which PHP version a matrix leg targets. +[formatter] +parentheses-around-new-in-member-access = true diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 6a8583e..a6240c1 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -24,7 +24,6 @@ -