Skip to content

Commit 96b577c

Browse files
committed
Merge remote-tracking branch 'origin/master' into 5.0
2 parents 97969f3 + d45a0cb commit 96b577c

32 files changed

+438
-222
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ codeception.yml export-ignore
66
phpunit.xml.dist export-ignore
77
psalm.xml export-ignore
88
/tests export-ignore
9+
/tools export-ignore

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
- name: Install php dependencies
3030
run: composer install --dev --no-interaction
3131
- name: Execute tests without coverage
32-
run: vendor/bin/phpunit --testsuite="BigBlueButton unit test suite,BigBlueButton integration test suite"
32+
run: tools/phpunit --testsuite="BigBlueButton unit test suite,BigBlueButton integration test suite"
3333

3434
PHP:
3535
name: PHP ${{ matrix.php-versions }}
@@ -56,19 +56,19 @@ jobs:
5656
run: composer install --dev --no-interaction
5757
continue-on-error: ${{ matrix.experimental }}
5858
- name: Execute code style check via php-cs-fixer
59-
run: vendor/bin/php-cs-fixer fix --dry-run
59+
run: tools/php-cs-fixer fix --dry-run
6060
continue-on-error: ${{ matrix.experimental }}
6161
- name: Execute tests with coverage
6262
if: ${{ !matrix.experimental }}
6363
run: |
6464
mkdir -p build/logs
65-
vendor/bin/phpunit --coverage-clover=build/logs/coverage.xml --testsuite="BigBlueButton unit test suite,BigBlueButton integration test suite"
65+
tools/phpunit --coverage-clover=build/logs/coverage.xml --testsuite="BigBlueButton unit test suite,BigBlueButton integration test suite"
6666
- name: Execute tests without coverage
6767
if: ${{ matrix.experimental }}
68-
run: vendor/bin/phpunit --testsuite="BigBlueButton test suite"
68+
run: tools/phpunit --testsuite="BigBlueButton test suite"
6969
continue-on-error: true
7070
- name: Coveralls
7171
env:
7272
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7373
if: ${{ matrix.php-versions == '7.4' && env.COVERALLS_REPO_TOKEN != null }}
74-
run: vendor/bin/php-coveralls --coverage_clover=build/logs/coverage.xml -v
74+
run: tools/php-coveralls --coverage_clover=build/logs/coverage.xml -v

composer.json

Lines changed: 32 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"authors": [
1313
{
1414
"name": "Ghazi Triki",
15-
"email": "ghazi.[email protected]",
15+
"email": "ghazi.[email protected]",
1616
"role": "Developer"
1717
},
1818
{
@@ -36,7 +36,7 @@
3636
"role": "Developer"
3737
},
3838
{
39-
"name": "Alfonso Rodríguez",
39+
"name": "Alfonso Rodr\u00edguez",
4040
"email": "[email protected]",
4141
"role": "Developer"
4242
},
@@ -72,56 +72,65 @@
7272
"symfony/http-client": "To use the SymfonyHttpClientTransport."
7373
},
7474
"require-dev": {
75-
"composer/composer": "^1.10.0",
76-
"phpunit/phpunit": "^8",
77-
"friendsofphp/php-cs-fixer": "2.*",
78-
"squizlabs/php_codesniffer": "3.*",
79-
"php-coveralls/php-coveralls": "^2.4.0",
80-
"brainmaestro/composer-git-hooks": "^2.8",
81-
"vimeo/psalm": "^4.5",
8275
"psr/http-client": "^1.0",
8376
"psr/http-factory": "^1.0",
8477
"psr/http-message": "^1.0",
8578
"symfony/dotenv": "^3.4|^4.0|^5.0",
8679
"symfony/http-client-contracts": "^1.1|^2.0",
8780
"symfony/http-client": "^4.4|^5.0",
8881
"symfony/process": "^3.4|^4.0|^5.0",
89-
"nyholm/psr7": "^1.4",
90-
"fakerphp/faker": "^1.14"
82+
"nyholm/psr7": "^1.4"
9183
},
9284
"autoload": {
9385
"psr-4": {
94-
"BigBlueButton\\": ["src", "tests/integration"]
86+
"BigBlueButton\\": [
87+
"src",
88+
"tests/integration"
89+
]
9590
}
9691
},
9792
"autoload-dev": {
9893
"psr-4": {
99-
"BigBlueButton\\Tests\\Functional\\": ["tests/functional"]
94+
"BigBlueButton\\Tests\\Functional\\": [
95+
"tests/functional"
96+
]
10097
}
10198
},
10299
"scripts": {
103-
"test": "vendor/bin/phpunit --testsuite=\"BigBlueButton unit test suite\"",
104-
"test-integration": "vendor/bin/phpunit --testsuite=\"BigBlueButton integration test suite\"",
105-
"test-functional": "vendor/bin/phpunit --testsuite=\"BigBlueButton functional test suite\" --exclude-group=functional-legacy",
106-
"cs-fix": "vendor/bin/php-cs-fixer fix --allow-risky=yes",
107-
"cs-test": "vendor/bin/php-cs-fixer fix --dry-run --allow-risky=yes",
100+
"test": "tools/phpunit --testsuite=\"BigBlueButton unit test suite\"",
101+
"test-integration": "tools/phpunit --testsuite=\"BigBlueButton integration test suite\"",
102+
"test-functional": "tools/phpunit --testsuite=\"BigBlueButton functional test suite\" --exclude-group=functional-legacy",
103+
"cs-fix": "tools/php-cs-fixer fix --allow-risky=yes",
104+
"cs-test": "tools/php-cs-fixer fix --dry-run --allow-risky=yes",
108105
"psalm": "psalm --threads=1",
109106
"psalm-clear": "psalm --clear-cache && psalm --clear-global-cache",
110107
"psalm-fix": "psalm --alter --issues=InvalidReturnType,InvalidNullableReturnType,MissingParamType,InvalidFalsableReturnType",
111-
"post-install-cmd": "vendor/bin/cghooks add --ignore-lock",
112-
"post-update-cmd": "vendor/bin/cghooks update"
108+
"post-install-cmd": "tools/composer-git-hooks add --ignore-lock",
109+
"post-update-cmd": "tools/composer-git-hooks update"
113110
},
114111
"extra": {
115112
"hooks": {
116113
"pre-commit": [
117-
"vendor/bin/php-cs-fixer fix --dry-run --allow-risky=yes"
114+
"tools/php-cs-fixer fix --dry-run --allow-risky=yes"
118115
],
119116
"pre-push": [
120-
"vendor/bin/phpunit --testsuite=\"BigBlueButton unit test suite,BigBlueButton integration test suite\"",
121-
"vendor/bin/psalm --threads=1"
117+
"tools/phpunit --testsuite=\"BigBlueButton unit test suite,BigBlueButton integration test suite\"",
118+
"tools/psalm --threads=1"
122119
],
123120
"post-merge": "composer install",
124121
"post-checkout": "composer install"
122+
},
123+
"cotor": {
124+
"brainmaestro/composer-git-hooks": "^2.8",
125+
"extensions": {
126+
"phpunit/phpunit": {
127+
"fakerphp/faker": "^1.14"
128+
}
129+
},
130+
"friendsofphp/php-cs-fixer": "^3.7",
131+
"php-coveralls/php-coveralls": "^2.4",
132+
"phpunit/phpunit": "^8",
133+
"vimeo/psalm": "^4.22"
125134
}
126135
}
127136
}

src/BigBlueButton.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -587,4 +587,9 @@ private function requestUrl(string $url, string $payload = '', string $contentTy
587587

588588
return $response->getBody();
589589
}
590+
591+
public function buildUrl(string $method = '', string $params = '', bool $append = true): string
592+
{
593+
return $this->urlBuilder->buildUrl($method, $params, $append);
594+
}
590595
}

src/Core/GuestPolicy.php

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
/**
6+
* BigBlueButton open source conferencing system - https://www.bigbluebutton.org/.
7+
*
8+
* Copyright (c) 2016-2021 BigBlueButton Inc. and by respective authors (see below).
9+
*
10+
* This program is free software; you can redistribute it and/or modify it under the
11+
* terms of the GNU Lesser General Public License as published by the Free Software
12+
* Foundation; either version 3.0 of the License, or (at your option) any later
13+
* version.
14+
*
15+
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
16+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
17+
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
18+
*
19+
* You should have received a copy of the GNU Lesser General Public License along
20+
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
21+
*/
22+
namespace BigBlueButton\Core;
23+
24+
final class GuestPolicy
25+
{
26+
public const ALWAYS_ACCEPT = 'ALWAYS_ACCEPT';
27+
public const ALWAYS_DENY = 'ALWAYS_DENY';
28+
public const ASK_MODERATOR = 'ASK_MODERATOR';
29+
public const ALWAYS_ACCEPT_AUTH = 'ALWAYS_ACCEPT_AUTH';
30+
}

src/Core/MeetingLayout.php

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
/**
6+
* BigBlueButton open source conferencing system - https://www.bigbluebutton.org/.
7+
*
8+
* Copyright (c) 2016-2021 BigBlueButton Inc. and by respective authors (see below).
9+
*
10+
* This program is free software; you can redistribute it and/or modify it under the
11+
* terms of the GNU Lesser General Public License as published by the Free Software
12+
* Foundation; either version 3.0 of the License, or (at your option) any later
13+
* version.
14+
*
15+
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
16+
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
17+
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
18+
*
19+
* You should have received a copy of the GNU Lesser General Public License along
20+
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
21+
*/
22+
namespace BigBlueButton\Core;
23+
24+
final class MeetingLayout
25+
{
26+
public const CUSTOM_LAYOUT = 'CUSTOM_LAYOUT';
27+
public const SMART_LAYOUT = 'SMART_LAYOUT';
28+
public const PRESENTATION_FOCUS = 'PRESENTATION_FOCUS';
29+
public const VIDEO_FOCUS = 'VIDEO_FOCUS';
30+
}

src/Parameters/CreateMeetingParameters.php

Lines changed: 56 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
*/
1919
namespace BigBlueButton\Parameters;
2020

21+
use BigBlueButton\Core\GuestPolicy;
22+
use BigBlueButton\Core\MeetingLayout;
23+
2124
/**
2225
* @method string getName()
2326
* @method $this setName(string $name)
@@ -33,6 +36,8 @@
3336
* @method $this setDialNumber(string $dialNumber)
3437
* @method string getVoiceBridge()
3538
* @method $this setVoiceBridge(string $voiceBridge)
39+
* @method string getWebVoice()
40+
* @method $this setWebVoice(string $webVoice)
3641
* @method int getMaxParticipants()
3742
* @method $this setMaxParticipants(int $maxParticipants)
3843
* @method string getLogoutURL()
@@ -101,6 +106,8 @@
101106
* @method $this setEndWhenNoModeratorDelayInMinutes(int $endWhenNoModeratorDelayInMinutes)
102107
* @method string getMeetingLayout()
103108
* @method $this setMeetingLayout(string $meetingLayout)
109+
* @method string getMeetingEndedURL()
110+
* @method $this setMeetingEndedURL(string $meetingEndedURL)
104111
* @method bool|null isLearningDashboardEnabled()
105112
* @method $this setLearningDashboardEnabled(bool $isLearningDashboardEnabled)
106113
* @method int getLearningDashboardCleanupDelayInMinutes()
@@ -117,15 +124,39 @@
117124
*/
118125
class CreateMeetingParameters extends MetaParameters
119126
{
120-
public const ALWAYS_ACCEPT = 'ALWAYS_ACCEPT';
121-
public const ALWAYS_DENY = 'ALWAYS_DENY';
122-
public const ASK_MODERATOR = 'ASK_MODERATOR';
123-
public const ALWAYS_ACCEPT_AUTH = 'ALWAYS_ACCEPT_AUTH';
127+
/**
128+
* @deprecated Use GuestPolicy::ALWAYS_ACCEPT instead.
129+
*/
130+
public const ALWAYS_ACCEPT = GuestPolicy::ALWAYS_ACCEPT;
131+
/**
132+
* @deprecated Use GuestPolicy::ALWAYS_DENY instead.
133+
*/
134+
public const ALWAYS_DENY = GuestPolicy::ALWAYS_DENY;
135+
/**
136+
* @deprecated Use GuestPolicy::ASK_MODERATOR instead.
137+
*/
138+
public const ASK_MODERATOR = GuestPolicy::ASK_MODERATOR;
139+
/**
140+
* @deprecated Use GuestPolicy::ALWAYS_ACCEPT_AUTH instead.
141+
*/
142+
public const ALWAYS_ACCEPT_AUTH = GuestPolicy::ALWAYS_ACCEPT_AUTH;
124143

125-
const CUSTOM_LAYOUT = 'CUSTOM_LAYOUT';
126-
const SMART_LAYOUT = 'SMART_LAYOUT';
127-
const PRESENTATION_FOCUS = 'PRESENTATION_FOCUS';
128-
const VIDEO_FOCUS = 'VIDEO_FOCUS';
144+
/**
145+
* @deprecated Use MeetingLayout::CUSTOM_LAYOUT instead.
146+
*/
147+
public const CUSTOM_LAYOUT = MeetingLayout::CUSTOM_LAYOUT;
148+
/**
149+
* @deprecated Use MeetingLayout::SMART_LAYOUT instead.
150+
*/
151+
public const SMART_LAYOUT = MeetingLayout::SMART_LAYOUT;
152+
/**
153+
* @deprecated Use MeetingLayout::PRESENTATION_FOCUS instead.
154+
*/
155+
public const PRESENTATION_FOCUS = MeetingLayout::PRESENTATION_FOCUS;
156+
/**
157+
* @deprecated Use MeetingLayout::VIDEO_FOCUS instead.
158+
*/
159+
public const VIDEO_FOCUS = MeetingLayout::VIDEO_FOCUS;
129160

130161
/**
131162
* @var string
@@ -162,6 +193,11 @@ class CreateMeetingParameters extends MetaParameters
162193
*/
163194
protected $voiceBridge;
164195

196+
/**
197+
* @var string
198+
*/
199+
protected $webVoice;
200+
165201
/**
166202
* @var int
167203
*/
@@ -315,7 +351,7 @@ class CreateMeetingParameters extends MetaParameters
315351
/**
316352
* @var string
317353
*/
318-
protected $guestPolicy = self::ALWAYS_ACCEPT;
354+
protected $guestPolicy = GuestPolicy::ALWAYS_ACCEPT;
319355

320356
/**
321357
* @var bool
@@ -337,6 +373,11 @@ class CreateMeetingParameters extends MetaParameters
337373
*/
338374
protected $meetingLayout;
339375

376+
/**
377+
* @var string
378+
*/
379+
protected $meetingEndedURL;
380+
340381
/**
341382
* @var bool
342383
*/
@@ -439,15 +480,15 @@ public function disableUserCameraCap(): self
439480
*/
440481
public function isGuestPolicyAlwaysDeny()
441482
{
442-
return $this->guestPolicy === self::ALWAYS_DENY;
483+
return $this->guestPolicy === GuestPolicy::ALWAYS_DENY;
443484
}
444485

445486
/**
446487
* @return CreateMeetingParameters
447488
*/
448489
public function setGuestPolicyAlwaysDeny()
449490
{
450-
$this->guestPolicy = self::ALWAYS_DENY;
491+
$this->guestPolicy = GuestPolicy::ALWAYS_DENY;
451492

452493
return $this;
453494
}
@@ -457,7 +498,7 @@ public function setGuestPolicyAlwaysDeny()
457498
*/
458499
public function isGuestPolicyAskModerator()
459500
{
460-
return $this->guestPolicy === self::ASK_MODERATOR;
501+
return $this->guestPolicy === GuestPolicy::ASK_MODERATOR;
461502
}
462503

463504
/**
@@ -466,7 +507,7 @@ public function isGuestPolicyAskModerator()
466507
*/
467508
public function setGuestPolicyAskModerator()
468509
{
469-
$this->guestPolicy = self::ASK_MODERATOR;
510+
$this->guestPolicy = GuestPolicy::ASK_MODERATOR;
470511

471512
return $this;
472513
}
@@ -476,7 +517,7 @@ public function setGuestPolicyAskModerator()
476517
*/
477518
public function isGuestPolicyAlwaysAcceptAuth()
478519
{
479-
return $this->guestPolicy === self::ALWAYS_ACCEPT_AUTH;
520+
return $this->guestPolicy === GuestPolicy::ALWAYS_ACCEPT_AUTH;
480521
}
481522

482523
/**
@@ -485,7 +526,7 @@ public function isGuestPolicyAlwaysAcceptAuth()
485526
*/
486527
public function setGuestPolicyAlwaysAcceptAuth()
487528
{
488-
$this->guestPolicy = self::ALWAYS_ACCEPT_AUTH;
529+
$this->guestPolicy = GuestPolicy::ALWAYS_ACCEPT_AUTH;
489530

490531
return $this;
491532
}

0 commit comments

Comments
 (0)