Skip to content

Commit

Permalink
fix(psalm): require-dev sabre/dav and use \OCP\Server
Browse files Browse the repository at this point in the history
* replace `\OC::$server` with public \OCP\Server::get()
* add sabre/dav to require-dev

Signed-off-by: Max <[email protected]>
  • Loading branch information
max-nextcloud committed Dec 2, 2024
1 parent 87c41f4 commit 5297788
Show file tree
Hide file tree
Showing 1,730 changed files with 193,846 additions and 957 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"require-dev": {
"bamarni/composer-bin-plugin": "^1.8",
"phpunit/phpunit": "^9.5",
"roave/security-advisories": "dev-latest"
"roave/security-advisories": "dev-latest",
"sabre/dav": "^4.1"
},
"scripts": {
"bin": "echo 'bin not installed'",
Expand Down
1,341 changes: 1,067 additions & 274 deletions composer.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/Dav/CheckPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function initialize(Server $server) {
*/
public function checkToS(RequestInterface $request, ResponseInterface $response) {
// we instantiate the checker here to make sure sabre auth backend was triggered
$checker = \OC::$server->get(Checker::class);
$checker = \OCP\Server::get(Checker::class);
if (!$checker->currentUserHasSigned()) {
throw new Forbidden($checker->getForbiddenMessage());
}
Expand Down
30 changes: 15 additions & 15 deletions vendor-bin/openapi-extractor/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

92 changes: 46 additions & 46 deletions vendor-bin/psalm/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInitf0bdd5b9b70328ede264941d59e950bb::getLoader();
return ComposerAutoloaderInitTermsOfService::getLoader();
35 changes: 35 additions & 0 deletions vendor/bamarni/composer-bin-plugin/.github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "Static analysis"

on:
push:
branches:
- "main"
- "master"
pull_request: null

jobs:
static-analysis:
runs-on: "ubuntu-latest"
name: "PHPStan on PHP ${{ matrix.php }}"
strategy:
fail-fast: false
matrix:
php:
- "8.1"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v2"

- name: "Setup PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php }}"
tools: "composer"

- name: "Install Composer dependencies"
uses: "ramsey/composer-install@v2"
with:
dependency-versions: "highest"

- name: "Perform static analysis"
run: "make phpstan"
Loading

0 comments on commit 5297788

Please sign in to comment.