Browse Source

Add Mozart to avoid conflict with other JWT apps

Signed-off-by: Joas Schilling <coding@schilljs.com>
pull/7757/head
Joas Schilling 3 years ago
parent
commit
1cdd96a113
No known key found for this signature in database GPG Key ID: 74434EFE0D2E2205
  1. 8
      .github/dependabot.yml
  2. 5
      .gitignore
  3. 2
      .php-cs-fixer.dist.php
  4. 3
      Makefile
  5. 15
      composer.json
  6. 5
      lib/Config.php
  7. 1
      psalm.xml
  8. 5
      tests/php/ConfigTest.php
  9. 11
      vendor-bin/mozart/composer.json
  10. 1168
      vendor-bin/mozart/composer.lock

8
.github/dependabot.yml

@ -16,6 +16,14 @@ updates:
time: "03:00"
timezone: Europe/Paris
open-pull-requests-limit: 10
- package-ecosystem: composer
directory: "/vendor-bin/mozart"
schedule:
interval: weekly
day: saturday
time: "03:00"
timezone: Europe/Paris
open-pull-requests-limit: 10
- package-ecosystem: composer
directory: "/vendor-bin/phpunit"
schedule:

5
.gitignore

@ -4,9 +4,8 @@
# PHP Code Sniffer
/vendor
/vendor-bin/csfixer/vendor
/vendor-bin/phpunit/vendor
/vendor-bin/psalm/vendor
/vendor-bin/*/vendor
/lib/Vendor
/.php-cs-fixer.cache
# Local docs

2
.php-cs-fixer.dist.php

@ -13,6 +13,8 @@ $config
->notPath('build')
->notPath('l10n')
->notPath('src')
->notPath('lib/Vendor')
->notPath('vendor')
->notPath('vendor-bin')
->in(__DIR__);
return $config;

3
Makefile

@ -100,8 +100,7 @@ appstore:
--exclude=tests \
--exclude=tsconfig.json \
--exclude=vendor \
--exclude=vendor-bin/production/composer.json \
--exclude=vendor-bin/production/composer.lock \
--exclude=vendor-bin \
--exclude=webpack.js \
$(project_dir)/ $(sign_dir)/$(app_name)
@if [ -f $(cert_dir)/$(app_name).key ]; then \

15
composer.json

@ -24,17 +24,19 @@
"scripts": {
"cs:check": "php-cs-fixer fix --dry-run --diff",
"cs:fix": "php-cs-fixer fix",
"lint": "find . -name \\*.php -not -path './vendor/*' -not -path './build/*' -not -path './tests/integration/vendor/*' -print0 | xargs -0 -n1 php -l",
"lint": "find . -name \\*.php -not -path './vendor/*' -not -path './vendor-bin/*' -not -path './lib/Vendor/*' -not -path './build/*' -not -path './tests/integration/vendor/*' -print0 | xargs -0 -n1 php -l",
"psalm": "psalm --threads=1",
"psalm:update-baseline": "psalm --threads=1 --update-baseline --set-baseline=tests/psalm-baseline.xml",
"psalm:clear": "psalm --clear-cache && psalm --clear-global-cache",
"psalm:fix": "psalm --alter --issues=InvalidReturnType,InvalidNullableReturnType,MissingParamType,InvalidFalsableReturnType",
"post-install-cmd": [
"@composer bin all install --ansi",
"\"vendor/bin/mozart\" compose",
"composer dump-autoload"
],
"post-update-cmd": [
"@composer bin all update --ansi",
"\"vendor/bin/mozart\" compose",
"composer dump-autoload"
],
"test": "cd tests/php/ && phpunit -c phpunit.xml"
@ -46,5 +48,16 @@
},
"require": {
"firebase/php-jwt": "^6.3"
},
"extra": {
"mozart": {
"dep_namespace": "OCA\\Talk\\Vendor\\",
"dep_directory": "/lib/Vendor/",
"classmap_directory": "/lib/autoload/",
"classmap_prefix": "NEXTCLOUDTALK_",
"packages": [
"firebase/php-jwt"
]
}
}
}

5
lib/Config.php

@ -23,10 +23,9 @@ declare(strict_types=1);
namespace OCA\Talk;
use Firebase\JWT\JWT;
use OCP\AppFramework\Utility\ITimeFactory;
use OCA\Talk\Events\GetTurnServersEvent;
use OCA\Talk\Vendor\Firebase\JWT\JWT;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\IConfig;
use OCP\IGroupManager;

1
psalm.xml

@ -10,6 +10,7 @@
<projectFiles>
<directory name="lib" />
<ignoreFiles>
<directory name="lib/Vendor" />
<directory name="vendor" />
</ignoreFiles>
</projectFiles>

5
tests/php/ConfigTest.php

@ -20,12 +20,11 @@
*/
namespace OCA\Talk\Tests\php;
use Firebase\JWT\JWT;
use Firebase\JWT\Key;
use OCA\Talk\Config;
use OCA\Talk\Events\GetTurnServersEvent;
use OCA\Talk\Tests\php\Mocks\GetTurnServerListener;
use OCA\Talk\Vendor\Firebase\JWT\JWT;
use OCA\Talk\Vendor\Firebase\JWT\Key;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\EventDispatcher\IEventDispatcher;
use OCP\IConfig;

11
vendor-bin/mozart/composer.json

@ -0,0 +1,11 @@
{
"config": {
"platform": {
"php": "7.4"
},
"sort-packages": true
},
"require": {
"coenjacobs/mozart": "^0.7.1"
}
}

1168
vendor-bin/mozart/composer.lock
File diff suppressed because it is too large
View File

Loading…
Cancel
Save