Skip to content

Commit

Permalink
feature: enable support for Pimcore 11 (#18)
Browse files Browse the repository at this point in the history
* feature: enable support for Pimcore 11

* fix: add Pimcore Admin Bundle to pipeline

* fix: use Pimcore 10 only with PHP 8.1
  • Loading branch information
lukadschaak committed Nov 8, 2023
1 parent 80dc8e3 commit 99d230d
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 12 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
@@ -1,3 +1,4 @@
/.editorconfig export-ignore
/.gitattributes export-ignore
/.github/ export-ignore
/.gitignore export-ignore
Expand All @@ -10,4 +11,5 @@
/phpstan-baseline.neon export-ignore
/phpstan.neon export-ignore
/phpunit.xml.dist export-ignore
/sonar-project.properties export-ignore
/tests/ export-ignore
2 changes: 1 addition & 1 deletion .github/workflows/qa.yaml
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: PHP Setup
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
php-version: 8.2

- name: Validate composer.json
run: composer validate --strict
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/tests.yaml
Expand Up @@ -33,9 +33,11 @@ jobs:
matrix:
include:
- php-version: "8.1"
dependencies: "lowest"
dependencies: "lowest" # Pimcore 10.5.0
- php-version: "8.1"
dependencies: "highest"
dependencies: "highest" # Pimcore 11.*
- php-version: "8.2"
dependencies: "highest" # Pimcore 11.*

steps:
- name: Git Checkout
Expand All @@ -50,6 +52,11 @@ jobs:
uses: ramsey/composer-install@v2
with:
dependency-versions: ${{ matrix.dependencies }}
composer-options: ${{ matrix.composer-options }}

- name: Add Pimcore Admin UI
run: composer require --dev pimcore/admin-ui-classic-bundle --no-interaction
if: matrix.dependencies == 'highest'

- name: Execute tests
run: composer tests
Expand Down
13 changes: 10 additions & 3 deletions .gitignore
Expand Up @@ -2,10 +2,17 @@
/composer.lock
/vendor/

# Docker Compose
/compose.override.yaml

# PHP-CS-Fixer
.php-cs-fixer.cache
/.php-cs-fixer.cache

# PHPUnit
.phpunit.result.cache
/reports/
/.phpunit.result.cache
/.phpunit.cache/
/reports/

# Optionally, ignore project files for common IDE
# A better alternative would be to globally ignore configuration files of your preferred IDE (see: https://stackoverflow.com/a/7335487)
#/.idea/
2 changes: 1 addition & 1 deletion .php-cs-fixer.php
Expand Up @@ -3,7 +3,7 @@
/*
* This document has been initially generated with
* https://mlocati.github.io/php-cs-fixer-configurator/#version:3.5.0|configurator
* and then adapted be our needs
* and then adapted to our needs
*/

return (new PhpCsFixer\Config)
Expand Down
2 changes: 1 addition & 1 deletion compose.yaml
Expand Up @@ -16,7 +16,7 @@ services:
timeout: 10s

php:
image: pimcore/pimcore:php8.1-latest
image: pimcore/pimcore:php8.2-latest
volumes:
- ./:/var/www/html/
environment:
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Expand Up @@ -18,8 +18,8 @@
}
},
"require": {
"php": "~8.1.0",
"pimcore/pimcore": "^10.5.1",
"php": "~8.1.0 || ~8.2.0",
"pimcore/pimcore": "^10.5.1 || ^11.0",
"symfony/console": "^5.4 || ^6.0",
"symfony/finder": "^5.4 || ^6.0",
"symfony/framework-bundle": "^5.0 || ^6.0",
Expand All @@ -34,7 +34,7 @@
"phpstan/phpstan-symfony": "^1.2",
"phpunit/phpunit": "^9.5",
"spatie/phpunit-snapshot-assertions": "^4.2",
"symfony/filesystem": "^5.4",
"symfony/filesystem": "^5.4 || ^6.0",
"teamneusta/pimcore-testing-framework": "^0.11.0"
},
"conflict": {
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Expand Up @@ -25,7 +25,7 @@

<coverage cacheDirectory=".phpunit.cache/code-coverage" processUncoveredFiles="true">
<include>
<directory>./src</directory>
<directory>./src/</directory>
</include>
</coverage>
</phpunit>

0 comments on commit 99d230d

Please sign in to comment.