Chore/npm composer upgrades (#322)

* chore: upgrade package.json, composer.json
Some fixes in Makefile and lint in templates

* chore: use dependabot.yml

* chore: restrict tests from nc29

* chore: static analysis from nc29

* chore: back to psalm 5

* chore: use psr 2.0.2

* chore: psr upgrades

* chore: composer all dependencies

* chore: composer dependencies

* chore: no psr dependency

* chore: psalm analyze

* chore: phpunit composer
pull/324/head
Sébastien Marinier 2025-05-16 15:15:58 +02:00 committed by GitHub
parent fdd91dfab2
commit 6c4f4a414d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
14 changed files with 778 additions and 1478 deletions

28
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,28 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
commit-message:
prefix: "npm"
labels:
- "npm"
- "dependencies"
open-pull-requests-limit: 10
pull-request-branch-name:
separator: "/"
- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "daily"
commit-message:
prefix: "Composer"
labels:
- "composer"
- "dependencies"
open-pull-requests-limit: 10
pull-request-branch-name:
separator: "/"

View File

@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
php-versions: ['8.0', '8.1', '8.2']
nextcloud-versions: ['stable26', 'stable27', 'stable28', 'stable29', 'stable30']
nextcloud-versions: ['stable29', 'stable30']
exclude:
- php-versions: '8.0'
nextcloud-versions: 'stable30'
@ -37,7 +37,7 @@ jobs:
path: nextcloud/apps/bbb
- name: Update test stub
working-directory: nextcloud/apps/bbb
run: composer update friendsofphp/php-cs-fixer nextcloud/ocp -W
run: composer update friendsofphp/php-cs-fixer nextcloud/ocp phpunit/phpunit -W
- name: Install dependencies
working-directory: nextcloud/apps/bbb
run: composer install

View File

@ -6,11 +6,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ocp-version: [ "^30", "^29", '^28', '^27', '^26']
include:
- psrcontainer: "psr/container"
- psrcontainer: "psr/container:^1.1.2"
ocp-version: '^26'
ocp-version: [ "^30", "^29"]
name: Nextcloud ${{ matrix.ocp-version }}
steps:
- name: Checkout
@ -25,7 +21,7 @@ jobs:
- name: Install dependencies
run: composer i
- name: Install dependencies
run: composer require --dev nextcloud/ocp:${{ matrix.ocp-version }} ${{ matrix.psrcontainer }} symfony/service-contracts
run: composer require --dev nextcloud/ocp:${{ matrix.ocp-version }} symfony/service-contracts -W
- name: Run coding standards check
run: composer run psalm

View File

@ -41,14 +41,14 @@ lint: js-init
yarn run lint
lint-fix: js-init
yarn run lint:fix
yarn run fix
# Style linting
stylelint: js-init
yarn run stylelint
yarn run lint:style
stylelint-fix: js-init
yarn run stylelint:fix
yarn run lint:fix:style
phplint:
./vendor/bin/php-cs-fixer fix --dry-run

View File

@ -14,11 +14,11 @@
"require-dev": {
"phpunit/phpunit": "^8.5 || ^9.3",
"friendsofphp/php-cs-fixer": "^3",
"nextcloud/coding-standard": "^1.0.0",
"nextcloud/coding-standard": "^1.1.0",
"phpstan/phpstan": "^0.12.29",
"nextcloud/ocp": "^25.0 || ^26.0 || ^27.0",
"vimeo/psalm": "^5.0",
"psr/container": "^1.1.2 || ^2.0.2"
"nextcloud/ocp": "^29.0 || ^30.0 || ^31.0",
"vimeo/psalm": "5.9.0",
"psr/container": "^1.1.2 || ^1.1.4 || ^2.0.2"
},
"config": {
"optimize-autoloader": true,

1323
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -2,22 +2,22 @@
namespace OCA\BigBlueButton;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\ContentSecurityPolicy;
use OCP\AppFramework\Http\Response;
use OCP\Template;
/**
* @template-extends Response<int, array<string, mixed>>
* @template-extends Response<Http::STATUS_*, array<string, mixed>>
*
* (NC < 28)
* @psalm-suppress TooManyTemplateParams
*/
class NoPermissionResponse extends Response {
public function __construct() {
parent::__construct();
parent::__construct(Http::STATUS_FORBIDDEN);
$this->setContentSecurityPolicy(new ContentSecurityPolicy());
$this->setStatus(403);
}
public function render() {

View File

@ -2,22 +2,22 @@
namespace OCA\BigBlueButton;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\ContentSecurityPolicy;
use OCP\AppFramework\Http\Response;
use OCP\Template;
/**
* @template-extends Response<int, array<string, mixed>>
* @template-extends Response<Http::STATUS_*, array<string, mixed>>
*
* (NC < 28)
* @psalm-suppress TooManyTemplateParams
*/
class NotFoundResponse extends Response {
public function __construct() {
parent::__construct();
parent::__construct(Http::STATUS_NOT_FOUND);
$this->setContentSecurityPolicy(new ContentSecurityPolicy());
$this->setStatus(404);
}
public function render() {

View File

@ -45,7 +45,7 @@
"colors": "^1.4.0",
"dotenv": "^16.0.0",
"execa": "^6.1.0",
"libxmljs": "^0.19.8",
"libxmljs": "^1.0.11",
"qrcode.react": "^2.0.0",
"react-copy-to-clipboard": "^5.0.2",
"simple-git": "^3.16.0"
@ -65,6 +65,7 @@
},
"devDependencies": {
"@babel/core": "^7.9.0",
"@babel/eslint-parser": "^7.27.1",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/preset-env": "^7.9.0",
"@nextcloud/browserslist-config": "^2.2.0",
@ -79,12 +80,11 @@
"@types/webpack-env": "^1.15.2",
"@typescript-eslint/eslint-plugin": "^5.15.0",
"@typescript-eslint/parser": "^5.15.0",
"babel-eslint": "^10.1.0",
"babel-loader": "^8.1.0",
"css-loader": "^6.7.1",
"dotenv-cli": "^5.0.0",
"eslint": "^8.11.0",
"eslint-config-standard": "^16.0.3",
"eslint-config-standard": "^17.0",
"eslint-import-resolver-webpack": "^0.13.2",
"eslint-plugin-import": "^2.20.2",
"eslint-plugin-node": "^11.1.0",
@ -96,7 +96,6 @@
"husky": "^4.2.5",
"inquirer": "^8.2.1",
"install": "^0.13.0",
"node-sass": "^7.0.0",
"npm-run-all": "^4.1.5",
"react": "^17.0.2",
"react-dom": "^17.0.2",

View File

@ -11,6 +11,7 @@
>
<projectFiles>
<directory name="lib" />
<directory name="vendor/nextcloud/ocp" />
<ignoreFiles>
<directory name="vendor" />
</ignoreFiles>

View File

@ -1,8 +1,8 @@
<?php
/** @var $_ array */
/** @var $l \OCP\IL10N */
style('core', 'guest');
?>
/** @var $_ array */
/** @var $l \OCP\IL10N */
style('core', 'guest');
?>
<div class="update bbb guest-box">
<h2><?php p($_['room']) ?></h2>

View File

@ -1,9 +1,9 @@
<?php
/** @var $_ array */
/** @var $l \OCP\IL10N */
style('core', 'guest');
script('bbb', 'join');
?>
/** @var $_ array */
/** @var $l \OCP\IL10N */
style('core', 'guest');
script('bbb', 'join');
?>
<form method="get" action="?">
<fieldset class="warning bbb">
<h2><?php p($_['room']) ?></h2>

View File

@ -1,9 +1,9 @@
<?php
/** @var $_ array */
/** @var $l \OCP\IL10N */
style('core', 'guest');
script('bbb', 'waiting');
?>
/** @var $_ array */
/** @var $l \OCP\IL10N */
style('core', 'guest');
script('bbb', 'waiting');
?>
<div class="update bbb">
<h2><?php p($_['room']); ?></h2>

829
yarn.lock

File diff suppressed because it is too large Load Diff