diff options
author | Joas Schilling <coding@schilljs.com> | 2022-10-02 10:40:41 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2022-10-02 10:40:41 +0300 |
commit | ef314ebd0f260a0236a3591a12ed9f5e88194aef (patch) | |
tree | dc4b1788eac93f0879c34a6ecf08a62528ddacde | |
parent | 001e4804eab88d2ce2a95a9e97c0586f18be10ef (diff) |
Migrate to nextcloud/OCP package in stable24
Signed-off-by: Joas Schilling <coding@schilljs.com>
-rw-r--r-- | .github/workflows/psalm.yml | 35 | ||||
-rw-r--r-- | .github/workflows/static-analysis.yml | 31 | ||||
-rw-r--r-- | .github/workflows/update-nextcloud-ocp.yml | 65 | ||||
-rw-r--r-- | composer.json | 11 | ||||
-rw-r--r-- | composer.lock | 92 |
5 files changed, 153 insertions, 81 deletions
diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml new file mode 100644 index 00000000..27091d53 --- /dev/null +++ b/.github/workflows/psalm.yml @@ -0,0 +1,35 @@ +# 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: Static analysis + +on: + pull_request: + push: + branches: + - master + - main + - stable* + +jobs: + static-analysis: + runs-on: ubuntu-latest + + name: Nextcloud + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up php + uses: shivammathur/setup-php@v2 + with: + php-version: 7.4 + coverage: none + + - name: Install dependencies + run: composer i + + - name: Run coding standards check + run: composer run psalm diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml deleted file mode 100644 index 0c073ef9..00000000 --- a/.github/workflows/static-analysis.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Static analysis - -on: - pull_request: - push: - branches: - - master - - stable* - -jobs: - static-psalm-analysis: - runs-on: ubuntu-latest - strategy: - matrix: - ocp-version: [ 'dev-master' ] - name: Nextcloud ${{ matrix.ocp-version }} - steps: - - name: Checkout - uses: actions/checkout@master - - name: Set up php - uses: shivammathur/setup-php@master - with: - php-version: 7.4 - tools: composer:v1 - coverage: none - - name: Install dependencies - run: composer i - - name: Install dependencies - run: composer require --dev christophwurst/nextcloud:${{ matrix.ocp-version }} - - 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..cabfc6fe --- /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 2 * * 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 <noreply@github.com> + author: nextcloud-command <nextcloud-command@users.noreply.github.com> + 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 a8c4baec..f5a5001e 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "nextcloud/richdocuments", "type": "project", "minimum-stability": "dev", - "prefer-stable" : true, + "prefer-stable": true, "config": { "platform": { "php": "7.4" @@ -10,9 +10,9 @@ }, "require-dev": { "roave/security-advisories": "dev-master", - "christophwurst/nextcloud": "dev-master", "jakub-onderka/php-parallel-lint": "^1.0.0", - "psalm/phar": "^4.7" + "psalm/phar": "^4.7", + "nextcloud/ocp": "dev-stable24" }, "license": "AGPLv3", "authors": [ @@ -25,5 +25,10 @@ "lint": "find . -name \\*.php -not -path './vendor/*' -print0 | xargs -0 -n1 php -l", "psalm": "psalm.phar", "psalm:fix": "psalm.phar --alter --issues=InvalidReturnType,InvalidNullableReturnType,MismatchingDocblockParamType,MismatchingDocblockReturnType,MissingParamType,InvalidFalsableReturnType" + }, + "autoload-dev": { + "psr-4": { + "OCP\\": "vendor/nextcloud/ocp/OCP" + } } } diff --git a/composer.lock b/composer.lock index 44c90f55..c3051d68 100644 --- a/composer.lock +++ b/composer.lock @@ -4,54 +4,10 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "5ed06db4c44ca91547903d4da3c52081", + "content-hash": "e41509ca43f72eb38b3752f190702ced", "packages": [], "packages-dev": [ { - "name": "christophwurst/nextcloud", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/ChristophWurst/nextcloud_composer.git", - "reference": "5c5d849a8796ab3b3ab803368d6e479d0b0d443d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ChristophWurst/nextcloud_composer/zipball/5c5d849a8796ab3b3ab803368d6e479d0b0d443d", - "reference": "5c5d849a8796ab3b3ab803368d6e479d0b0d443d", - "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": "25.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-05-06T01:53:16+00:00" - }, - { "name": "jakub-onderka/php-parallel-lint", "version": "v1.0.0", "source": { @@ -105,6 +61,48 @@ "time": "2018-02-24T15:31:20+00:00" }, { + "name": "nextcloud/ocp", + "version": "dev-stable24", + "source": { + "type": "git", + "url": "https://github.com/nextcloud-deps/ocp.git", + "reference": "aa88708d8280ffd8498ccda9954d923a1da55c92" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/aa88708d8280ffd8498ccda9954d923a1da55c92", + "reference": "aa88708d8280ffd8498ccda9954d923a1da55c92", + "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": "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": { + "source": "https://github.com/nextcloud-deps/ocp/tree/stable24" + }, + "time": "2022-09-27T08:15:22+00:00" + }, + { "name": "psalm/phar", "version": "4.22.0", "source": { @@ -780,7 +778,7 @@ "minimum-stability": "dev", "stability-flags": { "roave/security-advisories": 20, - "christophwurst/nextcloud": 20 + "nextcloud/ocp": 20 }, "prefer-stable": true, "prefer-lowest": false, @@ -789,5 +787,5 @@ "platform-overrides": { "php": "7.4" }, - "plugin-api-version": "2.2.0" + "plugin-api-version": "2.3.0" } |