Skip to content

Commit 44f6c93

Browse files
authored
Merge branch 'master' into patch-2
2 parents 0633a1d + a61331f commit 44f6c93

1,950 files changed

Lines changed: 27236 additions & 16547 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/CODEOWNERS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,10 @@
88
/apps/twofactor_backupcodes @ChristophWurst @miaulalala @nickvergessen
99
*/TwoFactorAuth/* @ChristophWurst @miaulalala @nickvergessen
1010
/core/templates/twofactor* @ChristophWurst @miaulalala @nickvergessen
11+
12+
/apps/user_status @CarlSchwan
13+
/apps/settings/lib @CarlSchwan
14+
/lib/private/Metadata @CarlSchwan
15+
/lib/private/Profiler @CarlSchwan
16+
/lib/public/Profiler @CarlSchwan
17+

.github/ISSUE_TEMPLATE/BUG_REPORT.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ body:
2121
required: true
2222
- label: Nextcloud Server **is** up to date. See [Maintenance and Release Schedule](https://github.com/nextcloud/server/wiki/Maintenance-and-Release-Schedule) for supported versions.
2323
required: true
24+
- label: Nextcloud Server **is** running on 64bit capable CPU, PHP and OS.
25+
required: true
2426
- label: I agree to follow Nextcloud's [Code of Conduct](https://nextcloud.com/contribute/code-of-conduct/).
2527
required: true
2628
- type: textarea

.github/workflows/command-rebase.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,14 @@ on:
99
issue_comment:
1010
types: created
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
rebase:
1417
runs-on: ubuntu-latest
18+
permissions:
19+
contents: none
1520

1621
# On pull requests and if the comment starts with `/rebase`
1722
if: github.event.issue.pull_request != '' && startsWith(github.event.comment.body, '/rebase')
@@ -32,7 +37,7 @@ jobs:
3237
token: ${{ secrets.COMMAND_BOT_PAT }}
3338

3439
- name: Automatic Rebase
35-
uses: cirrus-actions/rebase@1.6
40+
uses: cirrus-actions/rebase@1.7
3641
env:
3742
GITHUB_TOKEN: ${{ secrets.COMMAND_BOT_PAT }}
3843

.github/workflows/node.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ on:
1313
- master
1414
- stable*
1515

16+
permissions:
17+
contents: read
18+
1619
jobs:
1720
build:
1821
runs-on: ubuntu-latest
@@ -50,10 +53,12 @@ jobs:
5053

5154
- name: Check webpack build changes
5255
run: |
53-
bash -c "[[ ! \"`git status --porcelain `\" ]] || exit 1"
56+
bash -c "[[ ! \"`git status --porcelain `\" ]] || (echo 'Please recompile and commit the assets, see the section \"Show changes on failure\" for details' && exit 1)"
5457
5558
- name: Show changes on failure
5659
if: failure()
5760
run: |
5861
git status
5962
git --no-pager diff
63+
exit 1 # make it red to grab attention
64+

.github/workflows/performance.yml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: Performance testing
2+
on:
3+
pull_request:
4+
5+
jobs:
6+
performance-testing:
7+
runs-on: ubuntu-latest
8+
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
php-versions: ['8.0']
13+
14+
name: performance-${{ matrix.php-versions }}
15+
16+
steps:
17+
- name: Checkout server before PR
18+
uses: actions/checkout@v3
19+
with:
20+
submodules: true
21+
ref: ${{ github.event.pull_request.base.ref }}
22+
23+
- name: Set up php ${{ matrix.php-versions }}
24+
uses: shivammathur/setup-php@v2
25+
with:
26+
php-version: ${{ matrix.php-versions }}
27+
tools: phpunit
28+
extensions: mbstring, fileinfo, intl, sqlite, pdo_sqlite, zip, gd
29+
30+
- name: Set up Nextcloud
31+
run: |
32+
mkdir data
33+
./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password
34+
35+
php -S localhost:8080 &
36+
- name: Apply blueprint
37+
uses: icewind1991/blueprint@v0.1.2
38+
with:
39+
blueprint: tests/blueprints/basic.toml
40+
ref: ${{ github.event.pull_request.head.ref }}
41+
- name: Run before measurements
42+
uses: nextcloud/profiler@fa03a1e6864fcb63fb92b8940fa72f5191baffbe
43+
with:
44+
run: |
45+
curl -s -X PROPFIND -u test:test http://localhost:8080/remote.php/dav/files/test
46+
curl -s -u test:test http://localhost:8080/remote.php/dav/files/test/test.txt
47+
curl -s -X PROPFIND -u test:test http://localhost:8080/remote.php/dav/files/test/many_files
48+
curl -s -u test:test -T README.md http://localhost:8080/remote.php/dav/files/test/new_file.txt
49+
curl -s -u test:test -X DELETE http://localhost:8080/remote.php/dav/files/test/new_file.txt
50+
output: before.json
51+
52+
- name: Apply PR
53+
run: |
54+
git fetch origin ${{ github.event.pull_request.head.ref }}
55+
git checkout ${{ github.event.pull_request.head.ref }}
56+
git submodule update
57+
58+
./occ upgrade
59+
60+
- name: Run after measurements
61+
id: compare
62+
uses: nextcloud/profiler@fa03a1e6864fcb63fb92b8940fa72f5191baffbe
63+
with:
64+
run: |
65+
curl -s -X PROPFIND -u test:test http://localhost:8080/remote.php/dav/files/test
66+
curl -s -u test:test http://localhost:8080/remote.php/dav/files/test/test.txt
67+
curl -s -X PROPFIND -u test:test http://localhost:8080/remote.php/dav/files/test/many_files
68+
curl -s -u test:test -T README.md http://localhost:8080/remote.php/dav/files/test/new_file.txt
69+
curl -s -u test:test -X DELETE http://localhost:8080/remote.php/dav/files/test/new_file.txt
70+
output: after.json
71+
compare-with: before.json
72+
73+
- name: Upload profiles
74+
if: always()
75+
uses: actions/upload-artifact@v2
76+
with:
77+
name: profiles
78+
path: |
79+
before.json
80+
after.json
81+
82+
- uses: actions/github-script@v5
83+
if: failure() && steps.compare.outcome == 'failure'
84+
with:
85+
github-token: ${{secrets.GITHUB_TOKEN}}
86+
script: |
87+
let comment = `Possible performance regression detected\n`;
88+
comment += `<details><summary>Show Output</summary>
89+
90+
\`\`\`
91+
${{ steps.compare.outputs.compare }}
92+
\`\`\`
93+
94+
</details>`;
95+
96+
github.rest.issues.createComment({
97+
issue_number: context.issue.number,
98+
owner: context.repo.owner,
99+
repo: context.repo.repo,
100+
body: comment
101+
})

.github/workflows/stale.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
for your contributions.
2525
stale-issue-label: 'stale'
2626
only-labels: 'needs info'
27+
labels-to-remove-when-unstale: 'needs info,stale'
2728
exempt-issue-labels: '1. to develop,2. developing,3. to review,4. to release,security'
2829
days-before-stale: 30
2930
days-before-close: 14

.github/workflows/update-psalm-baseline.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,23 @@ name: Update Psalm baseline
33
on:
44
workflow_dispatch:
55
schedule:
6-
- cron: '5 4 * * *'
6+
- cron: "5 4 * * *"
77

88
jobs:
99
update-psalm-baseline:
1010
runs-on: ubuntu-latest
1111

12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
branches: ["master", "stable24", "stable23", "stable22"]
16+
17+
name: update-psalm-baseline-${{ matrix.branches }}
18+
1219
steps:
1320
- uses: actions/checkout@v2
1421
with:
22+
ref: ${{ matrix.branches }}
1523
submodules: true
1624

1725
- name: Set up php7.4
@@ -41,10 +49,8 @@ jobs:
4149
committer: GitHub <noreply@github.com>
4250
author: nextcloud-command <nextcloud-command@users.noreply.github.com>
4351
signoff: true
44-
branch: automated/noid/psalm-baseline-update
45-
# Make sure we can open multiple PRs
46-
branch-suffix: timestamp
47-
title: '[Automated] Update psalm-baseline.xml'
52+
branch: automated/noid/${{ matrix.branches }}-update-psalm-baseline
53+
title: "[${{ matrix.branches }}] Update psalm-baseline.xml"
4854
body: |
4955
Auto-generated update psalm-baseline.xml with fixed psalm warnings
5056
labels: |

3rdparty

Submodule 3rdparty updated 160 files

apps/admin_audit/composer/composer/InstalledVersions.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class InstalledVersions
2828
{
2929
/**
3030
* @var mixed[]|null
31-
* @psalm-var array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}|array{}|null
31+
* @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
3232
*/
3333
private static $installed;
3434

@@ -39,7 +39,7 @@ class InstalledVersions
3939

4040
/**
4141
* @var array[]
42-
* @psalm-var array<string, array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
42+
* @psalm-var array<string, array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
4343
*/
4444
private static $installedByVendor = array();
4545

@@ -243,7 +243,7 @@ public static function getInstallPath($packageName)
243243

244244
/**
245245
* @return array
246-
* @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}
246+
* @psalm-return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}
247247
*/
248248
public static function getRootPackage()
249249
{
@@ -257,7 +257,7 @@ public static function getRootPackage()
257257
*
258258
* @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
259259
* @return array[]
260-
* @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}
260+
* @psalm-return array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}
261261
*/
262262
public static function getRawData()
263263
{
@@ -280,7 +280,7 @@ public static function getRawData()
280280
* Returns the raw data of all installed.php which are currently loaded for custom implementations
281281
*
282282
* @return array[]
283-
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
283+
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
284284
*/
285285
public static function getAllRawData()
286286
{
@@ -303,7 +303,7 @@ public static function getAllRawData()
303303
* @param array[] $data A vendor/composer/installed.php data set
304304
* @return void
305305
*
306-
* @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data
306+
* @psalm-param array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>} $data
307307
*/
308308
public static function reload($data)
309309
{
@@ -313,7 +313,7 @@ public static function reload($data)
313313

314314
/**
315315
* @return array[]
316-
* @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
316+
* @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
317317
*/
318318
private static function getInstalled()
319319
{

0 commit comments

Comments
 (0)