diff --git a/.github/workflows/update-nextcloud-ocp.yml b/.github/workflows/update-nextcloud-ocp.yml index e40744d3..1f52f9b2 100644 --- a/.github/workflows/update-nextcloud-ocp.yml +++ b/.github/workflows/update-nextcloud-ocp.yml @@ -17,57 +17,90 @@ jobs: strategy: fail-fast: false matrix: - branches: ["main", "master", "stable27", "stable26", "stable25"] + branches: ['main', 'master', 'stable28', 'stable27', 'stable26'] name: update-nextcloud-ocp-${{ matrix.branches }} steps: - - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - id: checkout + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: ref: ${{ matrix.branches }} submodules: true + continue-on-error: true - - name: Set up php8.1 - uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2 + - name: Set up php8.2 + if: steps.checkout.outcome == 'success' + uses: shivammathur/setup-php@7fdd3ece872ec7ec4c098ae5ab7637d5e0a96067 # v2 with: - php-version: 8.1 + php-version: 8.2 # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite coverage: none env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Read codeowners + if: steps.checkout.outcome == 'success' + id: codeowners + run: | + grep '/appinfo/info.xml' .github/CODEOWNERS | cut -f 2- -d ' ' | xargs | awk '{ print "codeowners="$0 }' >> $GITHUB_OUTPUT + continue-on-error: true + - name: Composer install + if: steps.checkout.outcome == 'success' run: composer install - name: Composer update nextcloud/ocp - if: matrix.branches != 'main' + id: update_branch + if: ${{ steps.checkout.outcome == 'success' && matrix.branches != 'main' }} run: composer require --dev nextcloud/ocp:dev-${{ matrix.branches }} + - name: Raise on issue on failure + uses: dacbd/create-issue-action@ba4d1c45cccf9c483f2720cefb40e437f0ee6f7d # v1.2.1 + if: ${{ steps.checkout.outcome == 'success' && failure() && steps.update_branch.conclusion == 'failure' }} + with: + token: ${{ secrets.GITHUB_TOKEN }} + title: Failed to update nextcloud/ocp package on branch ${{ matrix.branches }} + body: Please check the output of the GitHub action and manually resolve the issues
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
${{ steps.codeowners.outputs.codeowners }} + - name: Composer update nextcloud/ocp - if: matrix.branches == 'main' + id: update_main + if: ${{ steps.checkout.outcome == 'success' && matrix.branches == 'main' }} run: composer require --dev nextcloud/ocp:dev-master + - name: Raise on issue on failure + uses: dacbd/create-issue-action@ba4d1c45cccf9c483f2720cefb40e437f0ee6f7d # v1.2.1 + if: ${{ steps.checkout.outcome == 'success' && failure() && steps.update_main.conclusion == 'failure' }} + with: + token: ${{ secrets.GITHUB_TOKEN }} + title: Failed to update nextcloud/ocp package on branch ${{ matrix.branches }} + body: Please check the output of the GitHub action and manually resolve the issues
${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
${{ steps.codeowners.outputs.codeowners }} + - name: Reset checkout 3rdparty + if: steps.checkout.outcome == 'success' run: | git clean -f 3rdparty git checkout 3rdparty continue-on-error: true - name: Reset checkout vendor + if: steps.checkout.outcome == 'success' run: | git clean -f vendor git checkout vendor continue-on-error: true - name: Reset checkout vendor-bin + if: steps.checkout.outcome == 'success' run: | git clean -f vendor-bin git checkout vendor-bin continue-on-error: true - name: Create Pull Request - uses: peter-evans/create-pull-request@284f54f989303d2699d373481a0cfa13ad5a6666 # v3 + if: steps.checkout.outcome == 'success' + uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v3 with: token: ${{ secrets.COMMAND_BOT_PAT }} commit-message: "chore(dev-deps): Bump nextcloud/ocp package" diff --git a/composer.lock b/composer.lock index 7a2f20de..8134c2e0 100644 --- a/composer.lock +++ b/composer.lock @@ -217,26 +217,26 @@ "source": { "type": "git", "url": "https://github.com/nextcloud-deps/ocp.git", - "reference": "a6a5f771184eed47d245bfdf30a15db2962a1a32" + "reference": "89782b01a6e496b6e4e16a449cb25eebc78a2359" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/a6a5f771184eed47d245bfdf30a15db2962a1a32", - "reference": "a6a5f771184eed47d245bfdf30a15db2962a1a32", + "url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/89782b01a6e496b6e4e16a449cb25eebc78a2359", + "reference": "89782b01a6e496b6e4e16a449cb25eebc78a2359", "shasum": "" }, "require": { - "php": "^7.4 || ~8.0 || ~8.1", + "php": "~8.0 || ~8.1 || ~8.2", "psr/clock": "^1.0", - "psr/container": "^1.1.1", + "psr/container": "^2.0.2", "psr/event-dispatcher": "^1.0", - "psr/log": "^1.1" + "psr/log": "^1.1.4" }, "default-branch": true, "type": "library", "extra": { "branch-alias": { - "dev-master": "26.0.0-dev" + "dev-master": "28.0.0-dev" } }, "notification-url": "https://packagist.org/downloads/", @@ -254,7 +254,7 @@ "issues": "https://github.com/nextcloud-deps/ocp/issues", "source": "https://github.com/nextcloud-deps/ocp/tree/master" }, - "time": "2023-05-17T11:01:47+00:00" + "time": "2023-10-27T00:30:38+00:00" }, { "name": "nikic/php-parser", @@ -982,22 +982,27 @@ }, { "name": "psr/container", - "version": "1.1.2", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", "shasum": "" }, "require": { "php": ">=7.4.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -1024,9 +1029,9 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.2" + "source": "https://github.com/php-fig/container/tree/2.0.2" }, - "time": "2021-11-05T16:50:12+00:00" + "time": "2021-11-05T16:47:00+00:00" }, { "name": "psr/event-dispatcher", @@ -2155,5 +2160,5 @@ "platform-overrides": { "php": "8.0" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/lib/PhpInfoResponse.php b/lib/PhpInfoResponse.php index 2ef55ae7..e25ffc30 100644 --- a/lib/PhpInfoResponse.php +++ b/lib/PhpInfoResponse.php @@ -29,6 +29,9 @@ use OCP\AppFramework\Http\FeaturePolicy; use OCP\AppFramework\Http\Response; +/** + * @template-extends Response> + */ class PhpInfoResponse extends Response { public function __construct() { parent::__construct();