Skip to content

Commit 0958f58

Browse files
lennartdohmannata-no-oneRenovate Bot
authored
Release v31 (#245)
* fix: correct syntax error in ScanService.php for constant declaration for PHP < 8.3 (#227) * chore(deps): update dependency webpack-dev-server to v5.2.2 (#225) Co-authored-by: Renovate Bot <renovate-bot@gdata.de> * chore(deps): update all non-major dependencies (#231) Co-authored-by: Renovate Bot <renovate-bot@gdata.de> * chore(deps): update dependency psalm/phar to v6.13.0 (#232) Co-authored-by: Renovate Bot <renovate-bot@gdata.de> * chore(deps): update all non-major dependencies (#233) Co-authored-by: Renovate Bot <renovate-bot@gdata.de> * Add a quicker way for development with a local Nextcloud server and the app code changeable inside this server (#234) * Add Nextclouds worklfow templates and apply Nextcloud coding style (#235) * Add maximum scan size setting for file uploads (#236) * Devcontainer and Workflow Performance (#237) - Faster local development in devcontainer - Add Make stages for local fast developing as well as unit and bats tests - Remove unmaintained files from old debugging sessions` - Cleanup unused files and bundle utility scripts * Settings improvements (#238) - Add button to test current vaas configuration - Rename app settings to be more intuitive * Add additional settings (#239) - Control scan timeout - Control usage of cache - Control usage of hash lookup * Refactor logging messages and remove redundant debug statements (#240) * Update README with development environment setup instructions (#241) * Remove unused settings (#242) - Malicious file notifications summary - Scan only new files * Add make target for production like local setup (#243) * Outsource file scan actions (#244) --------- Co-authored-by: vaas-bot <108060048+ata-no-one@users.noreply.github.com> Co-authored-by: Renovate Bot <renovate-bot@gdata.de>
1 parent 772f2cc commit 0958f58

102 files changed

Lines changed: 16411 additions & 1838 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.

.devcontainer/devcontainer.json

Lines changed: 31 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,32 @@
1-
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2-
// README at: https://github.com/devcontainers/templates/tree/main/src/php
31
{
4-
"name": "PHP",
5-
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6-
"image": "mcr.microsoft.com/devcontainers/php:1-8.3-bullseye",
7-
// Features to add to the dev container. More info: https://containers.dev/features.
8-
// "features": {},
9-
// Configure tool-specific properties.
10-
// "customizations": {},
11-
// Use 'forwardPorts' to make a list of ports inside the container available locally.
12-
"forwardPorts": [
13-
80
14-
],
15-
"containerEnv": {
16-
"XDEBUG_MODE": "debug,develop"
17-
},
18-
"customizations": {
19-
"vscode": {
20-
"extensions": [
21-
"CharlieGerard.pride-vscode-themes",
22-
"junstyle.php-cs-fixer",
23-
"stylelint.vscode-stylelint",
24-
"jetmartin.bats",
25-
"recca0120.vscode-phpunit"
26-
]
27-
}
28-
},
29-
// Use 'postCreateCommand' to run commands after the container is created.
30-
"postStartCommand": ".devcontainer/postCreateCommands.sh",
31-
"features": {
32-
"ghcr.io/devcontainers/features/node:1": {},
33-
"ghcr.io/edouard-lopez/devcontainer-features/bats:0": {},
34-
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
35-
"ghcr.io/devcontainers/features/github-cli:1": {},
36-
"ghcr.io/wxw-matt/devcontainer-features/apt:latest": {
37-
"packages": "bash-completion vim iputils-ping telnet"
38-
}
39-
}
40-
}
2+
"name": "PHP",
3+
"image": "mcr.microsoft.com/devcontainers/php:1-8.4-bullseye",
4+
"forwardPorts": [
5+
8080,
6+
8081
7+
],
8+
"customizations": {
9+
"vscode": {
10+
"extensions": [
11+
"stylelint.vscode-stylelint",
12+
"jetmartin.bats",
13+
"ms-azuretools.vscode-containers",
14+
"github.vscode-github-actions",
15+
"ms-vscode-remote.remote-containers",
16+
"DEVSENSE.phptools-vscode",
17+
"redhat.vscode-yaml",
18+
"timonwong.shellcheck"
19+
]
20+
}
21+
},
22+
"postStartCommand": ".devcontainer/postCreateCommands.sh",
23+
"features": {
24+
"ghcr.io/devcontainers/features/node:1": {},
25+
"ghcr.io/szkiba/devcontainer-features/bats:1": {},
26+
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
27+
"ghcr.io/devcontainers/features/github-cli:1": {},
28+
"ghcr.io/wxw-matt/devcontainer-features/apt:latest": {
29+
"packages": "bash-completion vim iputils-ping telnet"
30+
}
31+
}
32+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
SPDX-FileCopyrightText: 2025 Lennart Dohmann <lennart.dohmann@gdata.de>
2+
3+
SPDX-License-Identifier: AGPL-3.0-or-later
Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,36 @@
11
#!/bin/bash
22

3+
# SPDX-FileCopyrightText: 2025 Lennart Dohmann <lennart.dohmann@gdata.de>
4+
#
5+
# SPDX-License-Identifier: AGPL-3.0-or-later
6+
7+
for d in "/usr/local/etc/php/conf.d" "${PHP_INI_DIR}/conf.d"; do
8+
if [ -n "$d" ] && [ -d "$d" ]; then
9+
echo "Setting PHP CLI memory_limit=-1 in $d/99-memory-limit.ini"
10+
echo "memory_limit = -1" | sudo tee "$d/99-memory-limit.ini" >/dev/null || true
11+
fi
12+
done
13+
14+
export COMPOSER_MEMORY_LIMIT=-1
15+
316
bash -i -c 'nvm install 20'
417
bash -i -c 'nvm use 20'
518

619
echo "setup php-scoper"
720
composer global require humbug/php-scoper
8-
$(composer config home)/vendor/bin/php-scoper completion bash >> $HOME.bash_completion
9-
echo "export PATH=$(composer config home)/vendor/bin/:\$PATH" >> $HOME/.bashrc
10-
export PATH=$(composer config home)/vendor/bin/:$PATH
21+
echo "export PATH=$(composer config home)/vendor/bin/:\$PATH" >> "$HOME"/.bashrc
22+
COMPOSER_HOME=$(composer config home)
23+
export PATH=$COMPOSER_HOME/vendor/bin/:$PATH
1124

12-
sudo cp memory.ini /usr/local/etc/php/conf.d/memory.ini
13-
14-
if [[ "$IS_CI" == "true" ]]; then
25+
if [[ "$IS_CI" == 1 ]]; then
26+
echo "Skipping bash completion setup in CI environment"
1527
exit 0
1628
fi
1729

1830
sudo bash -c "docker completion bash > /usr/share/bash-completion/completions/docker"
1931
sudo bash -c "composer completion bash > /usr/share/bash-completion/completions/composer"
2032
sudo bash -c "npm completion > /usr/share/bash-completion/completions/npm"
21-
sudo cp xdebug.local.ini /usr/local/etc/php/conf.d/xdebug.ini
2233

2334
echo ". /usr/share/bash-completion/bash_completion" >> /home/vscode/.bashrc
2435

25-
NEXTCLOUD_VERSION=$(grep -oP -m 1 "[0-9]+\.[0-9]+\.[0-9]+" install.sh)
26-
27-
mkdir -p ~/.ssh/
28-
29-
rm -rf nextcloud-server/
30-
git clone --depth 1 --recurse-submodules --single-branch --branch v$NEXTCLOUD_VERSION https://github.com/nextcloud/server.git ./nextcloud-server
31-
cd nextcloud-server
32-
git submodule update --init
33-
cd -
34-
./install.sh
36+
./scripts/run-app.sh

.editorconfig

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# SPDX-FileCopyrightText: 2025 Lennart Dohmann <lennart.dohmann@gdata.de>
2+
#
3+
# SPDX-License-Identifier: AGPL-3.0-or-later
4+
5+
root = true
6+
7+
[*]
8+
indent_style = space
9+
indent_size = 4
10+
tab_width = 4
11+
end_of_line = lf
12+
charset = utf-8
13+
trim_trailing_whitespace = true
14+
insert_final_newline = true
15+
max_line_length = 120
16+
17+
[*.{js,ts,jsx,tsx,html,css,scss,sass,php}]
18+
indent_style = tab
19+
20+
[*.{yml,yaml,json,txt}]
21+
trim_trailing_whitespace = false
22+
indent_size = 2
23+
24+
[Makefile]
25+
indent_style = tab
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# SPDX-FileCopyrightText: 2025 Lennart Dohmann <lennart.dohmann@gdata.de>
2+
#
3+
# SPDX-License-Identifier: AGPL-3.0-or-later
4+
5+
name: editorconfig-checker
6+
7+
on: pull_request
8+
9+
jobs:
10+
editorconfig:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: editorconfig-checker/action-editorconfig-checker@main
15+
- run: editorconfig-checker -exclude "\.sh|\.ya?ml|\.md|\.gitignore|\.json|admin\.php|Dockerfile\.Nextcloud|\.txt|Makefile|\.xml|\.bats|\.env-test|\.ini"

.github/workflows/lint-eslint.yml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
# This workflow is provided via the organization template repository
2+
#
3+
# https://github.com/nextcloud/.github
4+
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5+
#
6+
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-License-Identifier: MIT
8+
9+
name: Lint eslint
10+
11+
on: pull_request
12+
13+
permissions:
14+
contents: read
15+
16+
17+
jobs:
18+
changes:
19+
runs-on: ubuntu-latest
20+
permissions:
21+
contents: read
22+
pull-requests: read
23+
24+
outputs:
25+
src: ${{ steps.changes.outputs.src}}
26+
27+
steps:
28+
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
29+
id: changes
30+
continue-on-error: true
31+
with:
32+
filters: |
33+
src:
34+
- '.github/workflows/**'
35+
- 'src/**'
36+
- 'appinfo/info.xml'
37+
- 'package.json'
38+
- 'package-lock.json'
39+
- 'tsconfig.json'
40+
- '.eslintrc.*'
41+
- '.eslintignore'
42+
- '**.js'
43+
- '**.ts'
44+
- '**.vue'
45+
46+
lint:
47+
runs-on: ubuntu-latest
48+
49+
needs: changes
50+
if: needs.changes.outputs.src != 'false'
51+
52+
name: NPM lint
53+
54+
steps:
55+
- name: Checkout
56+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
57+
with:
58+
persist-credentials: false
59+
60+
- name: Read package.json node and npm engines version
61+
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
62+
id: versions
63+
with:
64+
fallbackNode: '^20'
65+
fallbackNpm: '^10'
66+
67+
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
68+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
69+
with:
70+
node-version: ${{ steps.versions.outputs.nodeVersion }}
71+
72+
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
73+
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
74+
75+
- name: Install dependencies
76+
env:
77+
CYPRESS_INSTALL_BINARY: 0
78+
PUPPETEER_SKIP_DOWNLOAD: true
79+
run: npm ci
80+
81+
- name: Lint
82+
run: npm run lint
83+
84+
summary:
85+
permissions:
86+
contents: none
87+
runs-on: ubuntu-latest
88+
needs: [changes, lint]
89+
90+
if: always()
91+
92+
# This is the summary, we just avoid to rename it so that branch protection rules still match
93+
name: eslint
94+
95+
steps:
96+
- name: Summary status
97+
run: if ${{ needs.changes.outputs.src != 'false' && needs.lint.result != 'success' }}; then exit 1; fi
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# This workflow is provided via the organization template repository
2+
#
3+
# https://github.com/nextcloud/.github
4+
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5+
#
6+
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-License-Identifier: MIT
8+
9+
name: Lint info.xml
10+
11+
on: pull_request
12+
13+
permissions:
14+
contents: read
15+
16+
17+
jobs:
18+
xml-linters:
19+
runs-on: ubuntu-latest
20+
21+
name: info.xml lint
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
25+
with:
26+
persist-credentials: false
27+
28+
- name: Download schema
29+
run: wget https://raw.githubusercontent.com/nextcloud/appstore/master/nextcloudappstore/api/v1/release/info.xsd
30+
31+
- name: Lint info.xml
32+
uses: ChristophWurst/xmllint-action@36f2a302f84f8c83fceea0b9c59e1eb4a616d3c1 # v1.2
33+
with:
34+
xml-file: ./appinfo/info.xml
35+
xml-schema-file: ./info.xsd

.github/workflows/lint-php-cs.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# This workflow is provided via the organization template repository
2+
#
3+
# https://github.com/nextcloud/.github
4+
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5+
#
6+
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-License-Identifier: MIT
8+
9+
name: Lint php-cs
10+
11+
on: pull_request
12+
13+
permissions:
14+
contents: read
15+
16+
17+
jobs:
18+
lint:
19+
runs-on: ubuntu-latest
20+
21+
name: php-cs
22+
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
26+
with:
27+
persist-credentials: false
28+
29+
- name: Get php version
30+
id: versions
31+
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
32+
33+
- name: Set up php${{ steps.versions.outputs.php-min }}
34+
uses: shivammathur/setup-php@20529878ed81ef8e78ddf08b480401e6101a850f # v2.35.3
35+
with:
36+
php-version: ${{ steps.versions.outputs.php-min }}
37+
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
38+
coverage: none
39+
ini-file: development
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
43+
- name: Install dependencies
44+
run: |
45+
composer remove nextcloud/ocp --dev --no-scripts
46+
composer i
47+
48+
- name: Lint
49+
run: composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 )

0 commit comments

Comments
 (0)