From 8652fe5c66fe01e45e8d7dee32177ef8a546dd25 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 26 Sep 2022 20:13:44 +0200 Subject: [PATCH] Migrate to nextcloud/OCP package in stable25 Signed-off-by: Joas Schilling --- .../{static-analysis.yml => psalm.yml} | 11 +-- .github/workflows/update-nextcloud-ocp.yml | 65 +++++++++++++ composer.json | 9 +- composer.lock | 92 +++++++++---------- 4 files changed, 121 insertions(+), 56 deletions(-) rename .github/workflows/{static-analysis.yml => psalm.yml} (72%) create mode 100644 .github/workflows/update-nextcloud-ocp.yml diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/psalm.yml similarity index 72% rename from .github/workflows/static-analysis.yml rename to .github/workflows/psalm.yml index 7dc1b16d..ff271c1e 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/psalm.yml @@ -5,20 +5,17 @@ on: push: branches: - master + - main - stable* jobs: - static-psalm-analysis: + static-analysis: runs-on: ubuntu-latest - strategy: - matrix: - ocp-version: [ 'dev-stable25' ] - name: Nextcloud ${{ matrix.ocp-version }} steps: - name: Checkout - uses: actions/checkout@master + uses: actions/checkout@v3 - name: Set up php uses: shivammathur/setup-php@v2 @@ -27,7 +24,7 @@ jobs: coverage: none - name: Install dependencies - run: composer install --dev + run: composer i - name: Run coding standards check run: composer run psalm diff --git a/.github/workflows/update-nextcloud-ocp.yml b/.github/workflows/update-nextcloud-ocp.yml new file mode 100644 index 00000000..a396b6f8 --- /dev/null +++ b/.github/workflows/update-nextcloud-ocp.yml @@ -0,0 +1,65 @@ +# This workflow is provided via the organization template repository +# +# https://github.com/nextcloud/.github +# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization + +name: Update nextcloud/ocp + +on: + workflow_dispatch: + schedule: + - cron: "5 4 * * 0" + +jobs: + update-nextcloud-ocp: + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + branches: ["master", "stable25", "stable24", "stable23"] + + name: update-nextcloud-ocp-${{ matrix.branches }} + + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ matrix.branches }} + submodules: true + + - name: Set up php7.4 + uses: shivammathur/setup-php@v2 + with: + php-version: 7.4 + extensions: ctype,curl,dom,fileinfo,gd,intl,json,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip + coverage: none + + - name: Composer install + run: composer install + + - name: Composer update nextcloud/ocp + run: composer require --dev nextcloud/ocp:dev-${{ matrix.branches }} + continue-on-error: true + + - name: Reset checkout dirs + run: | + git clean -f 3rdparty + git clean -f vendor + git checkout 3rdparty vendor + continue-on-error: true + + - name: Create Pull Request + uses: peter-evans/create-pull-request@v3 + with: + token: ${{ secrets.COMMAND_BOT_PAT }} + commit-message: Update psalm baseline + committer: GitHub + author: nextcloud-command + signoff: true + branch: automated/noid/${{ matrix.branches }}-update-nextcloud-ocp + title: "[${{ matrix.branches }}] Update nextcloud/ocp dependency" + body: | + Auto-generated update of [nextcloud/ocp](https://github.com/nextcloud-deps/ocp/) dependency + labels: | + dependencies + 3. to review diff --git a/composer.json b/composer.json index d4b5122d..57e0cd2f 100644 --- a/composer.json +++ b/composer.json @@ -1,10 +1,10 @@ { "require-dev": { "nextcloud/coding-standard": "^0.4.0", - "christophwurst/nextcloud": "dev-master@dev", "psalm/phar": "^4.22", "bantu/ini-get-wrapper": "v1.0.1", - "phpunit/phpunit": "^9.5" + "phpunit/phpunit": "^9.5", + "nextcloud/ocp": "dev-stable25" }, "scripts": { "cs:check": "php-cs-fixer fix --dry-run --diff", @@ -21,5 +21,10 @@ "platform": { "php": "7.4" } + }, + "autoload-dev": { + "psr-4": { + "OCP\\": "vendor/nextcloud/ocp/OCP" + } } } diff --git a/composer.lock b/composer.lock index b3fc66bc..eaaf67f9 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "9cbe498b6f9c23f2761a96ab3e879849", + "content-hash": "bbb7b9a5f414b95fb0ffc5b7215c657c", "packages": [], "packages-dev": [ { @@ -41,50 +41,6 @@ }, "time": "2014-09-15T13:12:35+00:00" }, - { - "name": "christophwurst/nextcloud", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/ChristophWurst/nextcloud_composer.git", - "reference": "dca072ad12ea0ff201fa46da18f46dd1928eb139" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ChristophWurst/nextcloud_composer/zipball/dca072ad12ea0ff201fa46da18f46dd1928eb139", - "reference": "dca072ad12ea0ff201fa46da18f46dd1928eb139", - "shasum": "" - }, - "require": { - "php": "^7.4 || ~8.0 || ~8.1", - "psr/container": "^1.0", - "psr/event-dispatcher": "^1.0", - "psr/log": "^1.1" - }, - "default-branch": true, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "24.0.0-dev" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "AGPL-3.0-or-later" - ], - "authors": [ - { - "name": "Christoph Wurst", - "email": "christoph@winzerhof-wurst.at" - } - ], - "description": "Composer package containing Nextcloud's public API (classes, interfaces)", - "support": { - "issues": "https://github.com/ChristophWurst/nextcloud_composer/issues", - "source": "https://github.com/ChristophWurst/nextcloud_composer/tree/master" - }, - "time": "2022-03-30T01:48:24+00:00" - }, { "name": "composer/pcre", "version": "1.0.1", @@ -730,6 +686,48 @@ }, "time": "2020-12-14T07:22:40+00:00" }, + { + "name": "nextcloud/ocp", + "version": "dev-stable25", + "source": { + "type": "git", + "url": "https://github.com/nextcloud-deps/ocp.git", + "reference": "f79ac43d0422211b35542856338d808bc94a116b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/f79ac43d0422211b35542856338d808bc94a116b", + "reference": "f79ac43d0422211b35542856338d808bc94a116b", + "shasum": "" + }, + "require": { + "php": "^7.4 || ~8.0 || ~8.1", + "psr/container": "^1.1.1", + "psr/event-dispatcher": "^1.0", + "psr/log": "^1.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "26.0.0-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "AGPL-3.0-or-later" + ], + "authors": [ + { + "name": "Christoph Wurst", + "email": "christoph@winzerhof-wurst.at" + } + ], + "description": "Composer package containing Nextcloud's public API (classes, interfaces)", + "support": { + "source": "https://github.com/nextcloud-deps/ocp/tree/stable25" + }, + "time": "2022-09-22T12:39:39+00:00" + }, { "name": "nikic/php-parser", "version": "v4.13.2", @@ -4363,7 +4361,7 @@ "aliases": [], "minimum-stability": "stable", "stability-flags": { - "christophwurst/nextcloud": 20 + "nextcloud/ocp": 20 }, "prefer-stable": false, "prefer-lowest": false, @@ -4372,5 +4370,5 @@ "platform-overrides": { "php": "7.4" }, - "plugin-api-version": "2.1.0" + "plugin-api-version": "2.3.0" }