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
strategy:
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
steps:
- name: Checkout

View File

@ -12,12 +12,7 @@ jobs:
strategy:
matrix:
php-versions: ['7.4', '8']
nextcloud-versions: ['stable22', 'stable23', 'stable24']
include:
- php-versions: '7.3'
nextcloud-versions: 'stable22'
- php-versions: '7.3'
nextcloud-versions: 'stable23'
nextcloud-versions: ['stable23', 'stable24', 'stable25']
name: php${{ matrix.php-versions }} on ${{ matrix.nextcloud-versions }} unit tests
env:
CI: true
@ -39,7 +34,7 @@ jobs:
path: nextcloud/apps/bbb
- name: Update test stub
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
working-directory: nextcloud/apps/bbb
run: composer install

View File

@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ocp-version: [ 'dev-stable24', 'dev-stable23', 'dev-stable22' ]
ocp-version: [ 'dev-stable25', 'dev-stable24', 'dev-stable23' ]
name: Nextcloud ${{ matrix.ocp-version }}
steps:
- name: Checkout
@ -21,7 +21,7 @@ jobs:
- name: Install dependencies
run: composer i
- 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
run: composer run psalm

1
.gitignore vendored
View File

@ -9,3 +9,4 @@ node_modules/
/archives/
.phpunit.result.cache
.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.*
]]></description>
<version>2.3.1</version>
<version>2.4.0-alpha</version>
<licence>agpl</licence>
<author mail="klaus@jsxc.org">Klaus Herberth</author>
<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>mbstring</lib>
<lib>SimpleXML</lib>
<nextcloud min-version="22" max-version="24"/>
<nextcloud min-version="23" max-version="25"/>
</dependencies>
<commands>
<command>OCA\BigBlueButton\Command\ClearAvatarCache</command>

View File

@ -14,10 +14,10 @@
},
"require-dev": {
"phpunit/phpunit": "^8.5 || ^9.3",
"friendsofphp/php-cs-fixer": "^2.16",
"nextcloud/coding-standard": "^0.5.0",
"friendsofphp/php-cs-fixer": "^3",
"nextcloud/coding-standard": "^1.0.0",
"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"
},
"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;
class MeetingListener implements IEventListener {
/** @var IActivityManager */
private $activityManager;

View File

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

View File

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

View File

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

View File

@ -16,86 +16,73 @@ use \OCA\BigBlueButton\Listener\UserDeletedListener;
use \OCA\BigBlueButton\Middleware\HookMiddleware;
use \OCA\BigBlueButton\Middleware\JoinMiddleware;
use \OCP\AppFramework\App;
use \OCP\AppFramework\QueryException;
use \OCP\EventDispatcher\IEventDispatcher;
use \OCP\IConfig;
use \OCP\Settings\IManager as ISettingsManager;
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) {
throw new \Exception('Cannot include autoload. Did you run install dependencies using composer?');
}
class Application extends App {
class Application extends App implements IBootstrap {
public const ID = 'bbb';
public function __construct(array $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 */
$dispatcher = $container->query(IEventDispatcher::class);
$this->registerServiceListener($dispatcher);
$context->registerEventListener(RoomCreatedEvent::class, RoomListener::class);
$context->registerEventListener(RoomDeletedEvent::class, RoomListener::class);
$container->registerMiddleWare(JoinMiddleware::class);
$container->registerMiddleWare(HookMiddleware::class);
$context->registerEventListener(RoomShareCreatedEvent::class, RoomShareListener::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') {
$name = $config->getAppValue(self::ID, 'app.navigation.name', 'BBB');
$this->registerAsNavigationEntry($name);
$this->registerAsNavigationEntry($navigationManager, $urlGenerator, $config);
} else {
$this->registerAsPersonalSetting();
$this->registerAsPersonalSetting($settingsManager);
}
}
private function registerAsPersonalSetting(): 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;
}
}
private function registerAsPersonalSetting(ISettingsManager $settingsManager): void {
$settingsManager->registerSetting(ISettingsManager::KEY_PERSONAL_SETTINGS, \OCA\BigBlueButton\Settings\Personal::class);
}
private function registerAsNavigationEntry(string $name): void {
$server = $this->getContainer()->getServer();
private function registerAsNavigationEntry(INavigationManager $navigationManager, IURLGenerator $urlGenerator, IConfig $config): void {
$name = $config->getAppValue(self::ID, 'app.navigation.name', 'BBB');
$server->getNavigationManager()->add(function () use ($server, $name) {
$navigationManager->add(function () use ($urlGenerator, $name) {
return [
'id' => self::ID,
'order' => 80,
'href' => $server->getURLGenerator()->linkToRoute('bbb.page.index'),
'icon' => $server->getURLGenerator()->imagePath('bbb', 'app.svg'),
'href' => $urlGenerator->linkToRoute('bbb.page.index'),
'icon' => $urlGenerator->imagePath('bbb', 'app.svg'),
'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;
class IsRunningJob extends TimedJob {
/** @var IJobList */
private $jobList;

View File

@ -9,7 +9,7 @@ class Presentation {
public function __construct(string $url, string $filename) {
$this->url = $url;
$this->filename = preg_replace('/[^\x20-\x7E]+/','#', $filename);
$this->filename = preg_replace('/[^\x20-\x7E]+/', '#', $filename);
}
public function getUrl(): string {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -10,7 +10,6 @@ use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
class Version000000Date20200617055735 extends SimpleMigrationStep {
/**
* @param IOutput $output
* @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!
*/
class Version000000Date20200826100844 extends SimpleMigrationStep {
/**
* @param IOutput $output
* @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!
*/
class Version000000Date20200829112301 extends SimpleMigrationStep {
/**
* @param IOutput $output
* @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!
*/
class Version000000Date20210122164501 extends SimpleMigrationStep {
/**
* @param IOutput $output
* @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!
*/
class Version000000Date20210419132000 extends SimpleMigrationStep {
/**
* @param IOutput $output
* @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!
*/
class Version000000Date20210729200144 extends SimpleMigrationStep {
/**
* @param IOutput $output
* @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!
*/
class Version000000Date20220316151400 extends SimpleMigrationStep {
/**
* @param IOutput $output
* @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!
*/
class Version000000Date20220728083700 extends SimpleMigrationStep {
/**
* @param IOutput $output
* @param Closure $schemaClosure The `\Closure` returns a `ISchemaWrapper`

View File

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

View File

@ -16,7 +16,6 @@ use OCP\IConfig;
use OCP\Security\ISecureRandom;
class RoomService {
/** @var RoomMapper */
private $mapper;
@ -61,9 +60,9 @@ class RoomService {
return $this->mapper->find($id);
// in order to be able to plug in different storage backends like files
// for instance it is a good idea to turn storage related exceptions
// into service related exceptions so controllers and service users
// have to deal with only one type of exception
// for instance it is a good idea to turn storage related exceptions
// into service related exceptions so controllers and service users
// have to deal with only one type of exception
} catch (Exception $e) {
$this->handleException($e);
}

View File

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

View File

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

View File

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

View File

@ -3,7 +3,7 @@
/** @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

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

View File

@ -12,14 +12,6 @@
<code>addServiceListener</code>
</InvalidArgument>
</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">
<UndefinedClass occurrences="3">
<code>\OCA\Circles\Api\v1\Circles</code>

View File

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

View File

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

View File

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