Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,12 @@ jobs:
PIMCORE_INSTANCE_IDENTIFIER: ${{ secrets.PIMCORE_INSTANCE_IDENTIFIER }}
PIMCORE_PRODUCT_KEY: ${{ secrets.PIMCORE_PRODUCT_KEY }}
run: |
if [ "${{ matrix.dependencies }}" = "lowest" ]; then
export SYMFONY_DEPRECATIONS_HELPER=disabled
fi

if [ "${{ matrix.phpunit-version }}" = "^9.6" ]; then
CONFIG="--configuration phpunit9.xml.dist"
fi

# Ignore deprecations with "8191" = E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED
php -d error_reporting=8191 vendor/bin/phpunit --fail-on-risky ${CONFIG:-}
composer tests -- ${CONFIG:-}
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
"phpstan/phpstan-phpunit": "^1.3.16",
"phpstan/phpstan-symfony": "^1.3.8",
"shipmonk/composer-dependency-analyser": "^1.7",
"symfony/http-foundation": "^6.4 || ^7.3"
"symfony/http-foundation": "^6.4 || ^7.3",
"symfony/phpunit-bridge": "^8.0"
},
"conflict": {
"pimcore/pimcore": ">=11.2.0 <11.2.2"
Expand Down
6 changes: 6 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
beStrictAboutOutputDuringTests="true"
beStrictAboutChangesToGlobalState="true"
bootstrap="tests/bootstrap.php"
cacheDirectory=".phpunit.cache"
colors="true"
failOnRisky="true"
failOnNotice="true"
failOnWarning="true"
displayDetailsOnTestsThatTriggerErrors="true"
displayDetailsOnTestsThatTriggerNotices="true"
displayDetailsOnTestsThatTriggerWarnings="true"
>
<php>
<ini name="display_startup_errors" value="On"/>
Expand Down
6 changes: 6 additions & 0 deletions phpunit9.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
bootstrap="tests/bootstrap.php"
cacheResultFile=".phpunit.cache/test-results"
colors="true"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="display_startup_errors" value="On"/>
<ini name="display_errors" value="On"/>
<ini name="error_reporting" value="-1"/>
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[self]=0&amp;max[direct]=0&amp;max[indirect]=999999&amp;quiet[]=indirect&amp;ignoreFile=./tests/deprecation-baseline.txt"/>
</php>

<testsuites>
Expand All @@ -30,4 +32,8 @@
<extensions>
<extension class="DAMA\DoctrineTestBundle\PHPUnit\PHPUnitExtension"/>
</extensions>

<listeners>
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener"/>
</listeners>
</phpunit>
16 changes: 16 additions & 0 deletions tests/deprecation-baseline.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# This file contains patterns to be ignored while testing for use of deprecated code.

# Remaining "self" deprecation notices with Pimcore 11:
%Since symfony/framework-bundle 6\.4: The "annotations\.\w+" service is deprecated without replacement%

# Remaining "direct" deprecation notices with Pimcore 11:
%Since symfony/serializer 6\.4: Passing a "Doctrine\\Common\\Annotations\\PsrCachedReader" instance as argument 1 to "Symfony\\Component\\Serializer\\Mapping\\Loader\\AttributeLoader::__construct\(\)" is deprecated, pass null or omit the parameter instead%
%Since symfony/validator 6\.4: Method "Symfony\\Component\\Validator\\ValidatorBuilder::setDoctrineAnnotationReader\(\)" is deprecated without replacement%
%Since symfony/routing 6\.4: Passing an instance of "Doctrine\\Common\\Annotations\\Reader" as first and the environment as second argument to "Symfony\\Component\\Routing\\Loader\\AttributeClassLoader::__construct" is deprecated\. Pass the environment as first argument instead%

# Remaining "direct" deprecation notices with Pimcore 11 & 12:
%Since pimcore/skeleton 11\.2\.0: For consistency purpose, it is recommended to use the autoload from Symfony Runtime in project root "bin/console"%
%The "Pimcore\\Bundle\\InstallBundle\\Installer" class is considered internal\. It may change without further notice\. You should not use it from "Neusta\\Pimcore\\TestingFramework\\Database\\PimcoreInstaller"%

# Remaining "direct" deprecation notices with Pimcore 12:
%Since pimcore/admin-ui-classic-bundle 2\.3: The AdminUiClassicBundle is deprecated and will be discontinued with Pimcore Studio%