Merge pull request #225 from sualko/nc-25

Prepare release for Nextcloud 25
pull/224/head^2 v2.4.0-beta.1
Klaus 2022-10-26 20:43:11 +02:00 committed by GitHub
commit bc3ae05408
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
41 changed files with 416 additions and 763 deletions

View File

@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
php-versions: [7.2, 7.3, 7.4, 8.0] php-versions: [7.3, 7.4, 8.0]
name: php${{ matrix.php-versions }} lint name: php${{ matrix.php-versions }} lint
steps: steps:
- name: Checkout - name: Checkout

View File

@ -12,12 +12,7 @@ jobs:
strategy: strategy:
matrix: matrix:
php-versions: ['7.4', '8'] php-versions: ['7.4', '8']
nextcloud-versions: ['stable22', 'stable23', 'stable24'] nextcloud-versions: ['stable23', 'stable24', 'stable25']
include:
- php-versions: '7.3'
nextcloud-versions: 'stable22'
- php-versions: '7.3'
nextcloud-versions: 'stable23'
name: php${{ matrix.php-versions }} on ${{ matrix.nextcloud-versions }} unit tests name: php${{ matrix.php-versions }} on ${{ matrix.nextcloud-versions }} unit tests
env: env:
CI: true CI: true
@ -39,7 +34,7 @@ jobs:
path: nextcloud/apps/bbb path: nextcloud/apps/bbb
- name: Update test stub - name: Update test stub
working-directory: nextcloud/apps/bbb working-directory: nextcloud/apps/bbb
run: composer update friendsofphp/php-cs-fixer christophwurst/nextcloud -W run: composer update friendsofphp/php-cs-fixer nextcloud/ocp -W
- name: Install dependencies - name: Install dependencies
working-directory: nextcloud/apps/bbb working-directory: nextcloud/apps/bbb
run: composer install run: composer install

View File

@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
ocp-version: [ 'dev-stable24', 'dev-stable23', 'dev-stable22' ] ocp-version: [ 'dev-stable25', 'dev-stable24', 'dev-stable23' ]
name: Nextcloud ${{ matrix.ocp-version }} name: Nextcloud ${{ matrix.ocp-version }}
steps: steps:
- name: Checkout - name: Checkout
@ -21,7 +21,7 @@ jobs:
- name: Install dependencies - name: Install dependencies
run: composer i run: composer i
- name: Install dependencies - name: Install dependencies
run: composer require --dev christophwurst/nextcloud:${{ matrix.ocp-version }} run: composer require --dev nextcloud/ocp:${{ matrix.ocp-version }}
- name: Run coding standards check - name: Run coding standards check
run: composer run psalm run: composer run psalm

1
.gitignore vendored
View File

@ -9,3 +9,4 @@ node_modules/
/archives/ /archives/
.phpunit.result.cache .phpunit.result.cache
.vscode/settings.json .vscode/settings.json
.php-cs-fixer.cache

View File

@ -1,5 +0,0 @@
<?php
OCP\Util::addScript('bbb', 'filelist');
\OC::$server->query(\OCA\BigBlueButton\AppInfo\Application::class);

View File

@ -22,7 +22,7 @@ Developer wanted! If you have time it would be awesome if you could help to enha
*This app integrates BigBlueButton and is not endorsed or certified by BigBlueButton Inc. BigBlueButton and the BigBlueButton Logo are trademarks of BigBlueButton Inc.* *This app integrates BigBlueButton and is not endorsed or certified by BigBlueButton Inc. BigBlueButton and the BigBlueButton Logo are trademarks of BigBlueButton Inc.*
]]></description> ]]></description>
<version>2.3.1</version> <version>2.4.0-alpha</version>
<licence>agpl</licence> <licence>agpl</licence>
<author mail="klaus@jsxc.org">Klaus Herberth</author> <author mail="klaus@jsxc.org">Klaus Herberth</author>
<namespace>BigBlueButton</namespace> <namespace>BigBlueButton</namespace>
@ -43,7 +43,7 @@ Developer wanted! If you have time it would be awesome if you could help to enha
<lib>curl</lib> <lib>curl</lib>
<lib>mbstring</lib> <lib>mbstring</lib>
<lib>SimpleXML</lib> <lib>SimpleXML</lib>
<nextcloud min-version="22" max-version="24"/> <nextcloud min-version="23" max-version="25"/>
</dependencies> </dependencies>
<commands> <commands>
<command>OCA\BigBlueButton\Command\ClearAvatarCache</command> <command>OCA\BigBlueButton\Command\ClearAvatarCache</command>

View File

@ -14,10 +14,10 @@
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^8.5 || ^9.3", "phpunit/phpunit": "^8.5 || ^9.3",
"friendsofphp/php-cs-fixer": "^2.16", "friendsofphp/php-cs-fixer": "^3",
"nextcloud/coding-standard": "^0.5.0", "nextcloud/coding-standard": "^1.0.0",
"phpstan/phpstan": "^0.12.29", "phpstan/phpstan": "^0.12.29",
"christophwurst/nextcloud": "^22.0 || ^23.0 || ^24.0", "nextcloud/ocp": "^23.0 || ^24.0 || ^25.0",
"vimeo/psalm": "^4.5" "vimeo/psalm": "^4.5"
}, },
"config": { "config": {

997
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -12,7 +12,6 @@ use OCP\EventDispatcher\IEventListener;
use OCP\IUserSession; use OCP\IUserSession;
class MeetingListener implements IEventListener { class MeetingListener implements IEventListener {
/** @var IActivityManager */ /** @var IActivityManager */
private $activityManager; private $activityManager;

View File

@ -15,7 +15,6 @@ use OCP\IUserManager;
use OCP\L10N\IFactory; use OCP\L10N\IFactory;
class Provider implements IProvider { class Provider implements IProvider {
/** @var string */ /** @var string */
public const ROOM_CREATED = 'room_created'; public const ROOM_CREATED = 'room_created';

View File

@ -10,7 +10,6 @@ use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventListener; use OCP\EventDispatcher\IEventListener;
class RoomListener implements IEventListener { class RoomListener implements IEventListener {
/** @var IActivityManager */ /** @var IActivityManager */
private $activityManager; private $activityManager;

View File

@ -14,7 +14,6 @@ use OCP\EventDispatcher\IEventListener;
use OCP\IGroupManager; use OCP\IGroupManager;
class RoomShareListener implements IEventListener { class RoomShareListener implements IEventListener {
/** @var IActivityManager */ /** @var IActivityManager */
private $activityManager; private $activityManager;

View File

@ -16,86 +16,73 @@ use \OCA\BigBlueButton\Listener\UserDeletedListener;
use \OCA\BigBlueButton\Middleware\HookMiddleware; use \OCA\BigBlueButton\Middleware\HookMiddleware;
use \OCA\BigBlueButton\Middleware\JoinMiddleware; use \OCA\BigBlueButton\Middleware\JoinMiddleware;
use \OCP\AppFramework\App; use \OCP\AppFramework\App;
use \OCP\AppFramework\QueryException;
use \OCP\EventDispatcher\IEventDispatcher;
use \OCP\IConfig; use \OCP\IConfig;
use \OCP\Settings\IManager as ISettingsManager; use \OCP\Settings\IManager as ISettingsManager;
use \OCP\User\Events\UserDeletedEvent; use \OCP\User\Events\UserDeletedEvent;
use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
use OCP\AppFramework\Bootstrap\IRegistrationContext;
use OCP\INavigationManager;
use OCP\IURLGenerator;
use OCP\Util;
if ((@include_once __DIR__ . '/../../vendor/autoload.php') === false) { class Application extends App implements IBootstrap {
throw new \Exception('Cannot include autoload. Did you run install dependencies using composer?');
}
class Application extends App {
public const ID = 'bbb'; public const ID = 'bbb';
public function __construct(array $urlParams = []) { public function __construct(array $urlParams = []) {
parent::__construct(self::ID, $urlParams); parent::__construct(self::ID, $urlParams);
}
$container = $this->getContainer(); public function register(IRegistrationContext $context): void {
if ((@include_once __DIR__ . '/../../vendor/autoload.php') === false) {
throw new \Exception('Cannot include autoload. Did you run install dependencies using composer?');
}
/* @var IEventDispatcher $dispatcher */ $context->registerEventListener(RoomCreatedEvent::class, RoomListener::class);
$dispatcher = $container->query(IEventDispatcher::class); $context->registerEventListener(RoomDeletedEvent::class, RoomListener::class);
$this->registerServiceListener($dispatcher);
$container->registerMiddleWare(JoinMiddleware::class); $context->registerEventListener(RoomShareCreatedEvent::class, RoomShareListener::class);
$container->registerMiddleWare(HookMiddleware::class); $context->registerEventListener(RoomShareDeletedEvent::class, RoomShareListener::class);
$config = $container->query(IConfig::class); $context->registerEventListener(MeetingStartedEvent::class, MeetingListener::class);
$context->registerEventListener(MeetingEndedEvent::class, MeetingListener::class);
$context->registerEventListener(RecordingReadyEvent::class, MeetingListener::class);
$context->registerEventListener(UserDeletedEvent::class, UserDeletedListener::class);
$context->registerMiddleware(JoinMiddleware::class);
$context->registerMiddleware(HookMiddleware::class);
}
public function boot(IBootContext $context): void {
$context->injectFn([$this, 'registerAdminPage']);
Util::addScript('bbb', 'filelist');
}
public function registerAdminPage(ISettingsManager $settingsManager, INavigationManager $navigationManager, IURLGenerator $urlGenerator, IConfig $config):void {
if ($config->getAppValue(self::ID, 'app.navigation') === 'true') { if ($config->getAppValue(self::ID, 'app.navigation') === 'true') {
$name = $config->getAppValue(self::ID, 'app.navigation.name', 'BBB'); $this->registerAsNavigationEntry($navigationManager, $urlGenerator, $config);
$this->registerAsNavigationEntry($name);
} else { } else {
$this->registerAsPersonalSetting(); $this->registerAsPersonalSetting($settingsManager);
} }
} }
private function registerAsPersonalSetting(): void { private function registerAsPersonalSetting(ISettingsManager $settingsManager): void {
try {
/** @var ISettingsManager */
$settingsManager = $this->getContainer()->query(ISettingsManager::class);
} catch (QueryException $exception) {
// Workaround for Nextcloud 19
$server = $this->getContainer()->getServer();
if (method_exists($server, 'getSettingsManager')) {
$settingsManager = $server->getSettingsManager();
} else {
return;
}
}
$settingsManager->registerSetting(ISettingsManager::KEY_PERSONAL_SETTINGS, \OCA\BigBlueButton\Settings\Personal::class); $settingsManager->registerSetting(ISettingsManager::KEY_PERSONAL_SETTINGS, \OCA\BigBlueButton\Settings\Personal::class);
} }
private function registerAsNavigationEntry(string $name): void { private function registerAsNavigationEntry(INavigationManager $navigationManager, IURLGenerator $urlGenerator, IConfig $config): void {
$server = $this->getContainer()->getServer(); $name = $config->getAppValue(self::ID, 'app.navigation.name', 'BBB');
$server->getNavigationManager()->add(function () use ($server, $name) { $navigationManager->add(function () use ($urlGenerator, $name) {
return [ return [
'id' => self::ID, 'id' => self::ID,
'order' => 80, 'order' => 80,
'href' => $server->getURLGenerator()->linkToRoute('bbb.page.index'), 'href' => $urlGenerator->linkToRoute('bbb.page.index'),
'icon' => $server->getURLGenerator()->imagePath('bbb', 'app.svg'), 'icon' => $urlGenerator->imagePath('bbb', 'app.svg'),
'name' => $name, 'name' => $name,
]; ];
}); });
} }
private function registerServiceListener(IEventDispatcher $dispatcher): void {
$dispatcher->addServiceListener(RoomCreatedEvent::class, RoomListener::class);
$dispatcher->addServiceListener(RoomDeletedEvent::class, RoomListener::class);
$dispatcher->addServiceListener(RoomShareCreatedEvent::class, RoomShareListener::class);
$dispatcher->addServiceListener(RoomShareDeletedEvent::class, RoomShareListener::class);
$dispatcher->addServiceListener(MeetingStartedEvent::class, MeetingListener::class);
$dispatcher->addServiceListener(MeetingEndedEvent::class, MeetingListener::class);
$dispatcher->addServiceListener(RecordingReadyEvent::class, MeetingListener::class);
$dispatcher->addServiceListener(UserDeletedEvent::class, UserDeletedListener::class);
}
} }

View File

@ -10,7 +10,6 @@ use OCP\BackgroundJob\IJobList;
use OCP\BackgroundJob\TimedJob; use OCP\BackgroundJob\TimedJob;
class IsRunningJob extends TimedJob { class IsRunningJob extends TimedJob {
/** @var IJobList */ /** @var IJobList */
private $jobList; private $jobList;

View File

@ -8,7 +8,6 @@ use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
class ClearAvatarCache extends Command { class ClearAvatarCache extends Command {
/** /**
* @var AvatarRepository * @var AvatarRepository
*/ */

View File

@ -6,7 +6,6 @@ use OCA\BigBlueButton\Db\Room;
use OCP\EventDispatcher\Event; use OCP\EventDispatcher\Event;
abstract class RoomEvent extends Event { abstract class RoomEvent extends Event {
/** @var Room */ /** @var Room */
private $room; private $room;

View File

@ -6,7 +6,6 @@ use OCA\BigBlueButton\Db\RoomShare;
use OCP\EventDispatcher\Event; use OCP\EventDispatcher\Event;
abstract class RoomShareEvent extends Event { abstract class RoomShareEvent extends Event {
/** @var RoomShare */ /** @var RoomShare */
private $roomShare; private $roomShare;

View File

@ -10,7 +10,6 @@ use OCP\EventDispatcher\IEventListener;
use OCP\User\Events\UserDeletedEvent; use OCP\User\Events\UserDeletedEvent;
class UserDeletedListener implements IEventListener { class UserDeletedListener implements IEventListener {
/** @var IActivityManager */ /** @var IActivityManager */
private $activityManager; private $activityManager;

View File

@ -10,7 +10,6 @@ use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep; use OCP\Migration\SimpleMigrationStep;
class Version000000Date20200416124731 extends SimpleMigrationStep { class Version000000Date20200416124731 extends SimpleMigrationStep {
/** /**
* @param IOutput $output * @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`

View File

@ -10,7 +10,6 @@ use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep; use OCP\Migration\SimpleMigrationStep;
class Version000000Date20200613111242 extends SimpleMigrationStep { class Version000000Date20200613111242 extends SimpleMigrationStep {
/** /**
* @param IOutput $output * @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`

View File

@ -10,7 +10,6 @@ use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep; use OCP\Migration\SimpleMigrationStep;
class Version000000Date20200617055735 extends SimpleMigrationStep { class Version000000Date20200617055735 extends SimpleMigrationStep {
/** /**
* @param IOutput $output * @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`

View File

@ -13,7 +13,6 @@ use OCP\Migration\SimpleMigrationStep;
* Auto-generated migration step: Please modify to your needs! * Auto-generated migration step: Please modify to your needs!
*/ */
class Version000000Date20200826100844 extends SimpleMigrationStep { class Version000000Date20200826100844 extends SimpleMigrationStep {
/** /**
* @param IOutput $output * @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`

View File

@ -13,7 +13,6 @@ use OCP\Migration\SimpleMigrationStep;
* Auto-generated migration step: Please modify to your needs! * Auto-generated migration step: Please modify to your needs!
*/ */
class Version000000Date20200829112301 extends SimpleMigrationStep { class Version000000Date20200829112301 extends SimpleMigrationStep {
/** /**
* @param IOutput $output * @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`

View File

@ -13,7 +13,6 @@ use OCP\Migration\SimpleMigrationStep;
* Auto-generated migration step: Please modify to your needs! * Auto-generated migration step: Please modify to your needs!
*/ */
class Version000000Date20210122164501 extends SimpleMigrationStep { class Version000000Date20210122164501 extends SimpleMigrationStep {
/** /**
* @param IOutput $output * @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`

View File

@ -13,7 +13,6 @@ use OCP\Migration\SimpleMigrationStep;
* Auto-generated migration step: Please modify to your needs! * Auto-generated migration step: Please modify to your needs!
*/ */
class Version000000Date20210419132000 extends SimpleMigrationStep { class Version000000Date20210419132000 extends SimpleMigrationStep {
/** /**
* @param IOutput $output * @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`

View File

@ -13,8 +13,6 @@ use OCP\Migration\SimpleMigrationStep;
* Auto-generated migration step: Please modify to your needs! * Auto-generated migration step: Please modify to your needs!
*/ */
class Version000000Date20210729200144 extends SimpleMigrationStep { class Version000000Date20210729200144 extends SimpleMigrationStep {
/** /**
* @param IOutput $output * @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`

View File

@ -13,8 +13,6 @@ use OCP\Migration\SimpleMigrationStep;
* Auto-generated migration step: Please modify to your needs! * Auto-generated migration step: Please modify to your needs!
*/ */
class Version000000Date20220316151400 extends SimpleMigrationStep { class Version000000Date20220316151400 extends SimpleMigrationStep {
/** /**
* @param IOutput $output * @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`

View File

@ -13,8 +13,6 @@ use OCP\Migration\SimpleMigrationStep;
* Auto-generated migration step: Please modify to your needs! * Auto-generated migration step: Please modify to your needs!
*/ */
class Version000000Date20220728083700 extends SimpleMigrationStep { class Version000000Date20220728083700 extends SimpleMigrationStep {
/** /**
* @param IOutput $output * @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper` * @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`

View File

@ -13,7 +13,6 @@ use OCP\IGroupManager;
use OCP\IUserManager; use OCP\IUserManager;
class Permission { class Permission {
/** @var IUserManager */ /** @var IUserManager */
private $userManager; private $userManager;

View File

@ -16,7 +16,6 @@ use OCP\IConfig;
use OCP\Security\ISecureRandom; use OCP\Security\ISecureRandom;
class RoomService { class RoomService {
/** @var RoomMapper */ /** @var RoomMapper */
private $mapper; private $mapper;

View File

@ -14,7 +14,6 @@ use OCP\AppFramework\Db\MultipleObjectsReturnedException;
use OCP\EventDispatcher\IEventDispatcher; use OCP\EventDispatcher\IEventDispatcher;
class RoomShareService { class RoomShareService {
/** @var RoomShareMapper */ /** @var RoomShareMapper */
private $mapper; private $mapper;

View File

@ -7,7 +7,6 @@ use OCP\IConfig;
use OCP\Settings\ISettings; use OCP\Settings\ISettings;
class Admin implements ISettings { class Admin implements ISettings {
/** @var IConfig */ /** @var IConfig */
private $config; private $config;

View File

@ -12,14 +12,6 @@
<code>addServiceListener</code> <code>addServiceListener</code>
</InvalidArgument> </InvalidArgument>
</file> </file>
<file src="lib/BigBlueButton/API.php">
<UndefinedClass occurrences="1">
<code>InsertDocumentParameters</code>
</UndefinedClass>
<UndefinedMethod occurrences="1">
<code>insertDocument</code>
</UndefinedMethod>
</file>
<file src="lib/CircleHelper.php"> <file src="lib/CircleHelper.php">
<UndefinedClass occurrences="3"> <UndefinedClass occurrences="3">
<code>\OCA\Circles\Api\v1\Circles</code> <code>\OCA\Circles\Api\v1\Circles</code>

View File

@ -37,6 +37,7 @@
#bbb-root, #bbb-app { #bbb-root, #bbb-app {
width: 100%; width: 100%;
background-color: var(--color-main-background);
} }
pre { pre {

View File

@ -92,9 +92,6 @@ async function openDialog(fileId: number, filename: string) {
const row = $('<tr>'); const row = $('<tr>');
const button = $('<button>'); const button = $('<button>');
if (!OC.debug) {
button.prop('disabled', room.running);
}
button.text(room.running ? t('bbb', 'Send to') : t('bbb', 'Start with')); button.text(room.running ? t('bbb', 'Send to') : t('bbb', 'Start with'));
button.addClass(room.running ? 'success' : 'primary'); button.addClass(room.running ? 'success' : 'primary');
button.attr('type', 'button'); button.attr('type', 'button');

View File

@ -2483,9 +2483,9 @@ camelcase@^5.3.1:
integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==
caniuse-lite@^1.0.30001317: caniuse-lite@^1.0.30001317:
version "1.0.30001317" version "1.0.30001425"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001317.tgz#0548fb28fd5bc259a70b8c1ffdbe598037666a1b" resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001425.tgz"
integrity sha512-xIZLh8gBm4dqNX0gkzrBeyI86J2eCjWzYAs40q88smG844YIrN4tVQl/RhquHvKEKImWWFIVh1Lxe5n1G/N+GQ== integrity sha512-/pzFv0OmNG6W0ym80P3NtapU0QEiDS3VuYAZMGoLLqiC7f6FJFe1MjpQDREGApeenD9wloeytmVDj+JLXPC6qw==
caseless@~0.12.0: caseless@~0.12.0:
version "0.12.0" version "0.12.0"