-
Notifications
You must be signed in to change notification settings - Fork 0
Chore: add dependabot and update psalm to v6 #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# SPDX-FileCopyrightText: 2025 Nextcloud GmbH and Nextcloud contributors | ||
# SPDX-License-Identifier: AGPL-3.0-or-later | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: composer | ||
directory: "/" | ||
schedule: | ||
interval: weekly | ||
day: saturday | ||
time: "03:00" | ||
timezone: Europe/Paris | ||
open-pull-requests-limit: 10 | ||
- package-ecosystem: npm | ||
directory: "/" | ||
schedule: | ||
interval: weekly | ||
day: saturday | ||
time: "03:00" | ||
timezone: Europe/Paris | ||
open-pull-requests-limit: 10 | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: weekly | ||
day: saturday | ||
time: "03:00" | ||
timezone: Europe/Paris | ||
open-pull-requests-limit: 10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
# 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 | ||
# | ||
# SPDX-FileCopyrightText: 2022-2024 Nextcloud GmbH and Nextcloud contributors | ||
# SPDX-License-Identifier: MIT | ||
|
||
name: Static analysis | ||
|
||
on: pull_request | ||
|
||
concurrency: | ||
group: psalm-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
matrix: | ||
runs-on: ubuntu-latest-low | ||
outputs: | ||
ocp-matrix: ${{ steps.versions.outputs.ocp-matrix }} | ||
steps: | ||
- name: Checkout app | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: Get version matrix | ||
id: versions | ||
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1 | ||
|
||
- name: Check enforcement of minimum PHP version ${{ steps.versions.outputs.php-min }} in psalm.xml | ||
run: grep 'phpVersion="${{ steps.versions.outputs.php-min }}' psalm.xml | ||
|
||
static-analysis: | ||
runs-on: ubuntu-latest | ||
needs: matrix | ||
strategy: | ||
# do not stop on another job's failure | ||
fail-fast: false | ||
matrix: ${{ fromJson(needs.matrix.outputs.ocp-matrix) }} | ||
|
||
name: static-psalm-analysis ${{ matrix.ocp-version }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: Set up php${{ matrix.php-min }} | ||
uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1 | ||
with: | ||
php-version: ${{ matrix.php-min }} | ||
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 | ||
ini-file: development | ||
# Temporary workaround for missing pcntl_* in PHP 8.3 | ||
ini-values: disable_functions= | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
composer remove nextcloud/ocp --dev --no-scripts | ||
composer i | ||
|
||
|
||
- name: Install dependencies # zizmor: ignore[template-injection] | ||
run: composer require --dev 'nextcloud/ocp:${{ matrix.ocp-version }}' --ignore-platform-reqs --with-dependencies | ||
|
||
- name: Run coding standards check | ||
run: composer run psalm -- --threads=1 --monochrome --no-progress --output-format=github | ||
|
||
summary: | ||
runs-on: ubuntu-latest-low | ||
needs: static-analysis | ||
|
||
if: always() | ||
|
||
name: static-psalm-analysis-summary | ||
|
||
steps: | ||
- name: Summary status | ||
run: if ${{ needs.static-analysis.result != 'success' }}; then exit 1; fi |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<?php | ||
|
||
/** | ||
* Nextcloud - TextTemplates | ||
* | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
min version needs to be adjusted as well, if we drop php 8.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to drop 8.0 here? I just adapted the composer config but left it in the
require
list, the tests seem fineThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The psalm action only runs with Php 8.4 (the biggest supported one). I think Marcel means that Psalm 6.12 does not support Php 8.0 anymore so the min Nextcloud version of the app should be bumped to the first one that drops support for Php 8.0 (NC 30).
Could you use the psalm-matrix action from the company templates here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Psalm 6.12 cannot run with 8.0 but it can target 8.0 so I'd say it`s fine?