diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 4021d241c0e..b1e3ee758d7 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -262,7 +262,7 @@ jobs:
run: ant phar-snapshot
- name: Check whether PHAR is scoped
- run: grep -q PHPUnit\\\\DeepCopy\\\\Exception\\\\CloneException build/artifacts/phpunit-snapshot.phar || (echo "phpunit-snapshot.phar is not scoped." && false)
+ run: grep -q PHPUnitPHAR\\\\DeepCopy\\\\Exception\\\\CloneException build/artifacts/phpunit-snapshot.phar || (echo "phpunit-snapshot.phar is not scoped." && false)
- name: Upload PHAR
uses: actions/upload-artifact@v4
diff --git a/build.xml b/build.xml
index 35731fe5883..02a49607d44 100644
--- a/build.xml
+++ b/build.xml
@@ -309,18 +309,16 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/build/config/php-scoper.php b/build/config/php-scoper.php
index b9fbb781343..979bdaccd72 100644
--- a/build/config/php-scoper.php
+++ b/build/config/php-scoper.php
@@ -8,9 +8,12 @@
* file that was distributed with this source code.
*/
return [
+ 'prefix' => 'PHPUnitPHAR',
+
'exclude-namespaces' => [
'PHPUnit',
],
+
'expose-constants' => [
'/^__PHPUNIT_.+$/'
],