From 336d65f851adf8331821aae0056a1d902f476477 Mon Sep 17 00:00:00 2001 From: Matthias Schuhmayer <38959016+mattamon@users.noreply.github.com> Date: Mon, 2 Dec 2024 17:08:44 +0100 Subject: [PATCH] [Task] Upgrade dependencies (#440) * Upgrade dependencies * Add upgrade notes * Remove unecessary files --- .github/ci/files/security.yaml | 31 ------------------- .../ci/scripts/setup-pimcore-environment.sh | 10 +----- .github/workflows/codeception.yml | 8 ++--- .github/workflows/static-analysis.yml | 8 ++--- composer.json | 17 +++++----- doc/03_Upgrade.md | 5 +++ 6 files changed, 19 insertions(+), 60 deletions(-) delete mode 100644 .github/ci/files/security.yaml create mode 100644 doc/03_Upgrade.md diff --git a/.github/ci/files/security.yaml b/.github/ci/files/security.yaml deleted file mode 100644 index 7dea2c6b..00000000 --- a/.github/ci/files/security.yaml +++ /dev/null @@ -1,31 +0,0 @@ -security: - enable_authenticator_manager: true - - providers: - pimcore_admin: - id: Pimcore\Security\User\UserProvider - - firewalls: - dev: - pattern: ^/(_(profiler|wdt)|css|images|js)/ - security: false - - # Pimcore WebDAV HTTP basic // DO NOT CHANGE! - pimcore_webdav: - pattern: ^/asset/webdav - provider: pimcore_admin - http_basic: ~ - - access_control: - # Pimcore admin ACl // DO NOT CHANGE! - - { path: ^/admin/settings/display-custom-logo, roles: PUBLIC_ACCESS } - - { path: ^/admin/login/2fa-verify, roles: IS_AUTHENTICATED_2FA_IN_PROGRESS } - - { path: ^/admin/login/2fa-setup, roles: ROLE_PIMCORE_USER } - - { path: ^/admin/login/2fa, roles: IS_AUTHENTICATED_2FA_IN_PROGRESS } - - { path: ^/admin/login$, roles: PUBLIC_ACCESS } - - { path: ^/admin/login/(login|lostpassword|deeplink|csrf-token)$, roles: PUBLIC_ACCESS } - - { path: ^/admin, roles: ROLE_PIMCORE_USER } - - role_hierarchy: - # Pimcore admin // DO NOT CHANGE! - ROLE_PIMCORE_ADMIN: [ROLE_PIMCORE_USER] diff --git a/.github/ci/scripts/setup-pimcore-environment.sh b/.github/ci/scripts/setup-pimcore-environment.sh index ca47df6e..ac32e84e 100755 --- a/.github/ci/scripts/setup-pimcore-environment.sh +++ b/.github/ci/scripts/setup-pimcore-environment.sh @@ -11,12 +11,4 @@ cp -r .github/ci/files/templates/. templates cp -r .github/ci/files/bin/console bin/console chmod 755 bin/console cp -r .github/ci/files/kernel/. kernel -cp -r .github/ci/files/public/. public - -if [ ${REQUIRE_ADMIN_BUNDLE} = true ]; then - composer require -n --no-update pimcore/admin-ui-classic-bundle:^1.0 -else - ## Todo Remove when dropping support for Pimcore 10 - rm config/packages/security.yaml - cp .github/ci/files/security.yaml config/packages -fi \ No newline at end of file +cp -r .github/ci/files/public/. public \ No newline at end of file diff --git a/.github/workflows/codeception.yml b/.github/workflows/codeception.yml index 0d69f304..f06f936b 100644 --- a/.github/workflows/codeception.yml +++ b/.github/workflows/codeception.yml @@ -28,9 +28,9 @@ jobs: strategy: matrix: include: - - { php-version: 8.0, database: "mariadb:10.3", pimcore_version: "", dependencies: lowest, experimental: false, require_admin_bundle: false } - - { php-version: 8.3, database: "mariadb:10.11", pimcore_version: "", dependencies: highest, experimental: false, require_admin_bundle: true } - - { php-version: 8.3, database: "mariadb:10.11", pimcore_version: "11.x-dev as 11.0.0", dependencies: highest, experimental: true, require_admin_bundle: true } + - { php-version: 8.1, database: "mariadb:10.11", pimcore_version: "", dependencies: lowest, experimental: false } + - { php-version: 8.3, database: "mariadb:10.11", pimcore_version: "", dependencies: highest, experimental: false } + - { php-version: 8.3, database: "mariadb:10.11", pimcore_version: "11.x-dev", dependencies: highest, experimental: true } services: mariadb: image: "${{ matrix.database }}" @@ -59,8 +59,6 @@ jobs: done - name: "Setup Pimcore environment" - env: - REQUIRE_ADMIN_BUNDLE: "${{ matrix.require_admin_bundle }}" run: | mysql -e "CREATE DATABASE pimcore_test CHARSET=utf8mb4;" chmod 755 .github/ci/scripts/setup-pimcore-environment.sh diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 8c24891a..976c64a5 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -19,9 +19,9 @@ jobs: strategy: matrix: include: - - { php-version: "8.0", dependencies: "lowest", require_admin_bundle: false } - - { php-version: "8.3", dependencies: "highest", require_admin_bundle: true } - - { php-version: "8.3", dependencies: "highest", pimcore_version: "11.x-dev as 11.0.0", require_admin_bundle: true, experimental: true } + - { php-version: "8.1", dependencies: "lowest" } + - { php-version: "8.3", dependencies: "highest" } + - { php-version: "8.3", dependencies: "highest", pimcore_version: "11.x-dev", experimental: true } steps: - name: "Checkout code" uses: "actions/checkout@v2" @@ -33,8 +33,6 @@ jobs: php-version: "${{ matrix.php-version }}" - name: "Setup Pimcore environment" - env: - REQUIRE_ADMIN_BUNDLE: "${{ matrix.require_admin_bundle }}" run: | .github/ci/scripts/setup-pimcore-environment.sh diff --git a/composer.json b/composer.json index daff1cd7..03803b32 100644 --- a/composer.json +++ b/composer.json @@ -13,17 +13,17 @@ "prefer-stable": true, "minimum-stability": "dev", "require": { - "php": "~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0", + "php": "~8.1.0 || ~8.2.0 || ~8.3.0", "ext-fileinfo": "*", "ext-json": "*", - "doctrine/dbal": "^2.12 || ^3.5", + "doctrine/dbal": "^2.12 || ^3.8", "dragonmantank/cron-expression": "^3.1", "league/flysystem-sftp-v3": "^3.0", - "nesbot/carbon": "^2.27", - "phpoffice/phpspreadsheet": "^1.24 || ^2.2", - "pimcore/compatibility-bridge-v10": "^1.0", + "nesbot/carbon": "^2.72", + "phpoffice/phpspreadsheet": "^2.2 || ^3.3", + "pimcore/admin-ui-classic-bundle": "^1.0", "pimcore/data-hub": "^1.6", - "pimcore/pimcore": "^10.6 || ^11.0", + "pimcore/pimcore": "^11.2", "symfony/mime": "^5.2 || ^6.2", "webmozarts/console-parallelization": "^1.2.0 || ^2.0.0" }, @@ -32,12 +32,9 @@ "codeception/module-asserts": "^2", "codeception/module-symfony": "^1.6.0 || ^3.1.0", "codeception/phpunit-wrapper": "^9", - "phpstan/phpstan": "^1.9.11", + "phpstan/phpstan": "1.12.5", "phpunit/phpunit": "^9.3" }, - "suggest": { - "pimcore/admin-ui-classic-bundle": "Required for Pimcore 11" - }, "autoload": { "psr-4": { "Pimcore\\Bundle\\DataImporterBundle\\": "src/" diff --git a/doc/03_Upgrade.md b/doc/03_Upgrade.md new file mode 100644 index 00000000..4899fd20 --- /dev/null +++ b/doc/03_Upgrade.md @@ -0,0 +1,5 @@ +# Update Notes + +## Update to Version 1.10 +### General +- Dropped support of Pimcore 10, bumped minimum requirement of `pimcore/pimcore` to `^11.2`. \ No newline at end of file