diff options
author | Sean Molenaar <sean@seanmolenaar.eu> | 2021-02-04 20:58:05 +0100 |
---|---|---|
committer | Sean Molenaar <SMillerDev@users.noreply.github.com> | 2021-02-05 07:27:11 +0100 |
commit | 540608682988c627d46b6891089183568db06798 (patch) | |
tree | 1dc9c4b0cefc3b5484d18ba9045d02cc5dfabdd3 | |
parent | 5c7838e9bdd7081008483913def07a3233daa9fd (diff) |
Psalm: Fix class loading
-rw-r--r-- | .github/workflows/static-code-check.yml | 25 | ||||
-rw-r--r-- | AUTHORS.md | 2 | ||||
-rw-r--r-- | lib/Db/ItemMapperV2.php | 2 | ||||
-rw-r--r-- | psalm.xml | 1 | ||||
-rw-r--r-- | tests/psalm-autoload.php | 13 |
5 files changed, 37 insertions, 6 deletions
diff --git a/.github/workflows/static-code-check.yml b/.github/workflows/static-code-check.yml index cad11c939..4473057bb 100644 --- a/.github/workflows/static-code-check.yml +++ b/.github/workflows/static-code-check.yml @@ -7,8 +7,10 @@ jobs: continue-on-error: true strategy: matrix: - ocp-version: [ '21.0.0.x-dev', 'v20.0.5' ] - name: "Psalm: Nextcloud ${{ matrix.ocp-version }}" + php-versions: [ '7.4' ] + nextcloud: [ 'stable20', 'v21.0.0RC1' ] + database: [ 'sqlite' ] + name: "Psalm: Nextcloud ${{ matrix.nextcloud }}" steps: - name: Checkout uses: actions/checkout@master @@ -16,10 +18,25 @@ jobs: uses: shivammathur/setup-php@master with: php-version: 7.4 + extensions: pdo_sqlite,pdo_mysql,pdo_pgsql,gd,zip coverage: none + + - name: Set up server non MySQL + uses: SMillerDev/nextcloud-actions/setup-nextcloud@main + with: + cron: true + version: ${{ matrix.nextcloud }} + database-type: ${{ matrix.database }} + - name: Install dependencies run: composer install - - name: Install dependencies - run: composer require --dev christophwurst/nextcloud:${{ matrix.ocp-version }} + + - name: Configure server with app + uses: SMillerDev/nextcloud-actions/setup-nextcloud-app@main + with: + app: 'news' + check-code: false + - name: Run coding standards check + working-directory: ../server/apps/news run: ./vendor/bin/psalm
\ No newline at end of file diff --git a/AUTHORS.md b/AUTHORS.md index 89571c36c..558128d24 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -5,8 +5,8 @@ * [Robin Appelman](mailto:icewind@owncloud.com) * [Sean Molenaar](mailto:sean@seanmolenaar.eu) * [Gregor Tätzner](mailto:gregor@freenet.de) -* [Morris Jobke](mailto:hey@morrisjobke.de) * [Sean Molenaar](mailto:SMillerDev@users.noreply.github.com) +* [Morris Jobke](mailto:hey@morrisjobke.de) * [anoy](mailto:anoymouserver+github@mailbox.org) * [Jan-Christoph Borchardt](mailto:hey@jancborchardt.net) * [Daniel Schaal](mailto:daniel@schaal.email) diff --git a/lib/Db/ItemMapperV2.php b/lib/Db/ItemMapperV2.php index ecc635e32..ed7efff3f 100644 --- a/lib/Db/ItemMapperV2.php +++ b/lib/Db/ItemMapperV2.php @@ -144,7 +144,7 @@ class ItemMapperV2 extends NewsMapperV2 * * @return int|null Removed items * - * @throws \Doctrine\DBAL\Exception|\OCP\DB\Exception + * @throws \Doctrine\DBAL\Exception */ public function deleteOverThreshold(int $threshold, bool $removeUnread = false): ?int { @@ -6,6 +6,7 @@ xmlns="https://getpsalm.org/schema/config" xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" errorBaseline="tests/psalm-baseline.xml" + autoloader="tests/psalm-autoload.php" > <projectFiles> <directory name="lib" /> diff --git a/tests/psalm-autoload.php b/tests/psalm-autoload.php new file mode 100644 index 000000000..3da2d7f55 --- /dev/null +++ b/tests/psalm-autoload.php @@ -0,0 +1,13 @@ +<?php +/** + * Nextcloud - News + * + * This file is licensed under the Affero General Public License version 3 or + * later. See the COPYING file. + * + * @author Sean Molenaar <sean@seanmolenaar.eu> + * @copyright Sean Molenaar 2021 + */ + +require_once __DIR__ . '/../../../3rdparty/autoload.php'; +require_once __DIR__ . '/../vendor/autoload.php'; |