From: Dan Brown Date: Tue, 27 Sep 2022 18:34:48 +0000 (+0100) Subject: Merge branch 'auth_review' into development X-Git-Tag: v22.10~1^2~23 X-Git-Url: http://source.bookstackapp.com/bookstack/commitdiff_plain/bf562540770a2889d2dacc02248572911eeb5fa5?hp=5c5ea642285751c322d9cf384950a5c7d6cd851f Merge branch 'auth_review' into development --- diff --git a/LICENSE b/LICENSE index 0ec2e91ab..5b3d8699a 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015-present, Dan Brown and the BookStack Project contributors -https://github.com/BookStackApp/BookStack/graphs/contributors +Copyright (c) 2015-2022, Dan Brown and the BookStack Project contributors. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/app/Config/app.php b/app/Config/app.php index 738aacdbc..98f83fc39 100644 --- a/app/Config/app.php +++ b/app/Config/app.php @@ -114,6 +114,8 @@ return [ Illuminate\Foundation\Providers\FoundationServiceProvider::class, Illuminate\Hashing\HashServiceProvider::class, Illuminate\Mail\MailServiceProvider::class, + Illuminate\Notifications\NotificationServiceProvider::class, + Illuminate\Pagination\PaginationServiceProvider::class, Illuminate\Pipeline\PipelineServiceProvider::class, Illuminate\Queue\QueueServiceProvider::class, Illuminate\Redis\RedisServiceProvider::class, @@ -121,27 +123,22 @@ return [ Illuminate\Session\SessionServiceProvider::class, Illuminate\Validation\ValidationServiceProvider::class, Illuminate\View\ViewServiceProvider::class, - Illuminate\Notifications\NotificationServiceProvider::class, - SocialiteProviders\Manager\ServiceProvider::class, // Third party service providers - Intervention\Image\ImageServiceProvider::class, Barryvdh\DomPDF\ServiceProvider::class, Barryvdh\Snappy\ServiceProvider::class, - - // BookStack replacement service providers (Extends Laravel) - BookStack\Providers\PaginationServiceProvider::class, - BookStack\Providers\TranslationServiceProvider::class, + Intervention\Image\ImageServiceProvider::class, + SocialiteProviders\Manager\ServiceProvider::class, // BookStack custom service providers BookStack\Providers\ThemeServiceProvider::class, - BookStack\Providers\AuthServiceProvider::class, BookStack\Providers\AppServiceProvider::class, - BookStack\Providers\BroadcastServiceProvider::class, + BookStack\Providers\AuthServiceProvider::class, BookStack\Providers\EventServiceProvider::class, BookStack\Providers\RouteServiceProvider::class, - BookStack\Providers\CustomFacadeProvider::class, - BookStack\Providers\CustomValidationServiceProvider::class, + BookStack\Providers\TranslationServiceProvider::class, + BookStack\Providers\ValidationRuleServiceProvider::class, + BookStack\Providers\ViewTweaksServiceProvider::class, ], /* diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 3c1212e32..d0841059b 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -2,32 +2,44 @@ namespace BookStack\Providers; -use BookStack\Auth\Access\LoginService; +use BookStack\Actions\ActivityLogger; use BookStack\Auth\Access\SocialAuthService; -use BookStack\Entities\BreadcrumbsViewComposer; use BookStack\Entities\Models\Book; use BookStack\Entities\Models\Bookshelf; use BookStack\Entities\Models\Chapter; use BookStack\Entities\Models\Page; use BookStack\Exceptions\WhoopsBookStackPrettyHandler; -use BookStack\Settings\Setting; use BookStack\Settings\SettingService; use BookStack\Util\CspService; use GuzzleHttp\Client; -use Illuminate\Contracts\Cache\Repository; use Illuminate\Database\Eloquent\Relations\Relation; -use Illuminate\Pagination\Paginator; -use Illuminate\Support\Facades\Blade; use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\URL; -use Illuminate\Support\Facades\View; use Illuminate\Support\ServiceProvider; -use Laravel\Socialite\Contracts\Factory as SocialiteFactory; use Psr\Http\Client\ClientInterface as HttpClientInterface; use Whoops\Handler\HandlerInterface; class AppServiceProvider extends ServiceProvider { + /** + * Custom container bindings to register. + * @var string[] + */ + public $bindings = [ + HandlerInterface::class => WhoopsBookStackPrettyHandler::class, + ]; + + /** + * Custom singleton bindings to register. + * @var string[] + */ + public $singletons = [ + 'activity' => ActivityLogger::class, + SettingService::class => SettingService::class, + SocialAuthService::class => SocialAuthService::class, + CspService::class => CspService::class, + ]; + /** * Bootstrap any application services. * @@ -43,11 +55,6 @@ class AppServiceProvider extends ServiceProvider URL::forceScheme($isHttps ? 'https' : 'http'); } - // Custom blade view directives - Blade::directive('icon', function ($expression) { - return ""; - }); - // Allow longer string lengths after upgrade to utf8mb4 Schema::defaultStringLength(191); @@ -58,12 +65,6 @@ class AppServiceProvider extends ServiceProvider 'chapter' => Chapter::class, 'page' => Page::class, ]); - - // View Composers - View::composer('entities.breadcrumbs', BreadcrumbsViewComposer::class); - - // Set paginator to use bootstrap-style pagination - Paginator::useBootstrap(); } /** @@ -73,22 +74,6 @@ class AppServiceProvider extends ServiceProvider */ public function register() { - $this->app->bind(HandlerInterface::class, function ($app) { - return $app->make(WhoopsBookStackPrettyHandler::class); - }); - - $this->app->singleton(SettingService::class, function ($app) { - return new SettingService($app->make(Setting::class), $app->make(Repository::class)); - }); - - $this->app->singleton(SocialAuthService::class, function ($app) { - return new SocialAuthService($app->make(SocialiteFactory::class), $app->make(LoginService::class)); - }); - - $this->app->singleton(CspService::class, function ($app) { - return new CspService(); - }); - $this->app->bind(HttpClientInterface::class, function ($app) { return new Client([ 'timeout' => 3, diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index a4022cc50..5e16179ab 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -24,9 +24,7 @@ class AuthServiceProvider extends ServiceProvider { // Password Configuration // Changes here must be reflected in ApiDocsGenerate@getValidationAsString. - Password::defaults(function () { - return Password::min(8); - }); + Password::defaults(fn () => Password::min(8)); // Custom guards Auth::extend('api-token', function ($app, $name, array $config) { diff --git a/app/Providers/BroadcastServiceProvider.php b/app/Providers/BroadcastServiceProvider.php deleted file mode 100644 index 69925e945..000000000 --- a/app/Providers/BroadcastServiceProvider.php +++ /dev/null @@ -1,25 +0,0 @@ -id === (int) $userId; -// }); - } -} diff --git a/app/Providers/CustomFacadeProvider.php b/app/Providers/CustomFacadeProvider.php deleted file mode 100644 index 6ba5632e6..000000000 --- a/app/Providers/CustomFacadeProvider.php +++ /dev/null @@ -1,36 +0,0 @@ -app->singleton('activity', function () { - return $this->app->make(ActivityLogger::class); - }); - - $this->app->singleton('theme', function () { - return $this->app->make(ThemeService::class); - }); - } -} diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php index 659843ce3..0edc7f09c 100644 --- a/app/Providers/EventServiceProvider.php +++ b/app/Providers/EventServiceProvider.php @@ -10,7 +10,7 @@ class EventServiceProvider extends ServiceProvider /** * The event listener mappings for the application. * - * @var array + * @var array> */ protected $listen = [ SocialiteWasCalled::class => [ diff --git a/app/Providers/PaginationServiceProvider.php b/app/Providers/PaginationServiceProvider.php deleted file mode 100644 index 416aa5f34..000000000 --- a/app/Providers/PaginationServiceProvider.php +++ /dev/null @@ -1,35 +0,0 @@ -app['view']; - }); - - Paginator::currentPathResolver(function () { - return url($this->app['request']->path()); - }); - - Paginator::currentPageResolver(function ($pageName = 'page') { - $page = $this->app['request']->input($pageName); - - if (filter_var($page, FILTER_VALIDATE_INT) !== false && (int) $page >= 1) { - return $page; - } - - return 1; - }); - } -} diff --git a/app/Providers/ThemeServiceProvider.php b/app/Providers/ThemeServiceProvider.php index 54c83884a..50c4a5d19 100644 --- a/app/Providers/ThemeServiceProvider.php +++ b/app/Providers/ThemeServiceProvider.php @@ -15,9 +15,8 @@ class ThemeServiceProvider extends ServiceProvider */ public function register() { - $this->app->singleton(ThemeService::class, function ($app) { - return new ThemeService(); - }); + // Register the ThemeService as a singleton + $this->app->singleton(ThemeService::class, fn ($app) => new ThemeService()); } /** @@ -27,6 +26,7 @@ class ThemeServiceProvider extends ServiceProvider */ public function boot() { + // Boot up the theme system $themeService = $this->app->make(ThemeService::class); $themeService->readThemeActions(); $themeService->dispatch(ThemeEvents::APP_BOOT, $this->app); diff --git a/app/Providers/CustomValidationServiceProvider.php b/app/Providers/ValidationRuleServiceProvider.php similarity index 93% rename from app/Providers/CustomValidationServiceProvider.php rename to app/Providers/ValidationRuleServiceProvider.php index ac95099cc..928918dc7 100644 --- a/app/Providers/CustomValidationServiceProvider.php +++ b/app/Providers/ValidationRuleServiceProvider.php @@ -6,7 +6,7 @@ use BookStack\Uploads\ImageService; use Illuminate\Support\Facades\Validator; use Illuminate\Support\ServiceProvider; -class CustomValidationServiceProvider extends ServiceProvider +class ValidationRuleServiceProvider extends ServiceProvider { /** * Register our custom validation rules when the application boots. diff --git a/app/Providers/ViewTweaksServiceProvider.php b/app/Providers/ViewTweaksServiceProvider.php new file mode 100644 index 000000000..f1f1554ae --- /dev/null +++ b/app/Providers/ViewTweaksServiceProvider.php @@ -0,0 +1,31 @@ +"; + }); + } +} diff --git a/composer.json b/composer.json index 3306d3da5..59c96ba29 100644 --- a/composer.json +++ b/composer.json @@ -43,6 +43,7 @@ "ssddanbrown/htmldiff": "^1.0.2" }, "require-dev": { + "brianium/paratest": "^6.6", "fakerphp/faker": "^1.16", "itsgoingd/clockwork": "^5.1", "mockery/mockery": "^1.4", @@ -72,6 +73,8 @@ "format": "phpcbf", "lint": "phpcs", "test": "phpunit", + "t": "@php artisan test --parallel", + "t-reset": "@php artisan test --recreate-databases", "post-autoload-dump": [ "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", "@php artisan package:discover --ansi" diff --git a/composer.lock b/composer.lock index cf7b8f72f..1804ef379 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "01795571047babf7ee6372b7f98843af", + "content-hash": "1fed6278d440ef18af1ffa6ca7b29166", "packages": [ { "name": "aws/aws-crt-php", @@ -58,16 +58,16 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.235.1", + "version": "3.236.1", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "2025db05c7dd22ae414857dadd49207f64c2fc74" + "reference": "1e8d1abe7582968df16a2e7a87c5dcc51d0dfd1b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/2025db05c7dd22ae414857dadd49207f64c2fc74", - "reference": "2025db05c7dd22ae414857dadd49207f64c2fc74", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/1e8d1abe7582968df16a2e7a87c5dcc51d0dfd1b", + "reference": "1e8d1abe7582968df16a2e7a87c5dcc51d0dfd1b", "shasum": "" }, "require": { @@ -86,6 +86,7 @@ "aws/aws-php-sns-message-validator": "~1.0", "behat/behat": "~3.0", "composer/composer": "^1.10.22", + "dms/phpunit-arraysubset-asserts": "^0.4.0", "doctrine/cache": "~1.4", "ext-dom": "*", "ext-openssl": "*", @@ -93,10 +94,11 @@ "ext-sockets": "*", "nette/neon": "^2.3", "paragonie/random_compat": ">= 2", - "phpunit/phpunit": "^4.8.35 || ^5.6.3", + "phpunit/phpunit": "^4.8.35 || ^5.6.3 || ^9.5", "psr/cache": "^1.0", "psr/simple-cache": "^1.0", - "sebastian/comparator": "^1.2.3" + "sebastian/comparator": "^1.2.3 || ^4.0", + "yoast/phpunit-polyfills": "^1.0" }, "suggest": { "aws/aws-php-sns-message-validator": "To validate incoming SNS notifications", @@ -144,9 +146,9 @@ "support": { "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.235.1" + "source": "https://github.com/aws/aws-sdk-php/tree/3.236.1" }, - "time": "2022-09-02T18:18:19+00:00" + "time": "2022-09-27T18:19:10+00:00" }, { "name": "bacon/bacon-qr-code", @@ -559,16 +561,16 @@ }, { "name": "doctrine/dbal", - "version": "3.4.3", + "version": "3.4.5", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "a24b89d663d8f261199bc0a91c48016042ebda85" + "reference": "a5a58773109c0abb13e658c8ccd92aeec8d07f9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/a24b89d663d8f261199bc0a91c48016042ebda85", - "reference": "a24b89d663d8f261199bc0a91c48016042ebda85", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/a5a58773109c0abb13e658c8ccd92aeec8d07f9e", + "reference": "a5a58773109c0abb13e658c8ccd92aeec8d07f9e", "shasum": "" }, "require": { @@ -583,14 +585,14 @@ "require-dev": { "doctrine/coding-standard": "10.0.0", "jetbrains/phpstorm-stubs": "2022.2", - "phpstan/phpstan": "1.8.2", + "phpstan/phpstan": "1.8.3", "phpstan/phpstan-strict-rules": "^1.3", - "phpunit/phpunit": "9.5.21", + "phpunit/phpunit": "9.5.24", "psalm/plugin-phpunit": "0.17.0", "squizlabs/php_codesniffer": "3.7.1", "symfony/cache": "^5.4|^6.0", "symfony/console": "^4.4|^5.4|^6.0", - "vimeo/psalm": "4.24.0" + "vimeo/psalm": "4.27.0" }, "suggest": { "symfony/console": "For helpful console commands such as SQL execution and import of files." @@ -650,7 +652,7 @@ ], "support": { "issues": "https://github.com/doctrine/dbal/issues", - "source": "https://github.com/doctrine/dbal/tree/3.4.3" + "source": "https://github.com/doctrine/dbal/tree/3.4.5" }, "funding": [ { @@ -666,7 +668,7 @@ "type": "tidelift" } ], - "time": "2022-08-28T17:26:36+00:00" + "time": "2022-09-23T17:48:57+00:00" }, { "name": "doctrine/deprecations", @@ -804,28 +806,28 @@ }, { "name": "doctrine/inflector", - "version": "2.0.4", + "version": "2.0.5", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89" + "reference": "ade2b3bbfb776f27f0558e26eed43b5d9fe1b392" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89", - "reference": "8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/ade2b3bbfb776f27f0558e26eed43b5d9fe1b392", + "reference": "ade2b3bbfb776f27f0558e26eed43b5d9fe1b392", "shasum": "" }, "require": { "php": "^7.2 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^8.2", - "phpstan/phpstan": "^0.12", - "phpstan/phpstan-phpunit": "^0.12", - "phpstan/phpstan-strict-rules": "^0.12", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", - "vimeo/psalm": "^4.10" + "doctrine/coding-standard": "^9", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpstan/phpstan-strict-rules": "^1.3", + "phpunit/phpunit": "^8.5 || ^9.5", + "vimeo/psalm": "^4.25" }, "type": "library", "autoload": { @@ -875,7 +877,7 @@ ], "support": { "issues": "https://github.com/doctrine/inflector/issues", - "source": "https://github.com/doctrine/inflector/tree/2.0.4" + "source": "https://github.com/doctrine/inflector/tree/2.0.5" }, "funding": [ { @@ -891,7 +893,7 @@ "type": "tidelift" } ], - "time": "2021-10-22T20:16:43+00:00" + "time": "2022-09-07T09:01:28+00:00" }, { "name": "doctrine/lexer", @@ -971,24 +973,24 @@ }, { "name": "dompdf/dompdf", - "version": "v2.0.0", + "version": "v2.0.1", "source": { "type": "git", "url": "https://github.com/dompdf/dompdf.git", - "reference": "79573d8b8a141ec8a17312515de8740eed014fa9" + "reference": "c5310df0e22c758c85ea5288175fc6cd777bc085" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dompdf/dompdf/zipball/79573d8b8a141ec8a17312515de8740eed014fa9", - "reference": "79573d8b8a141ec8a17312515de8740eed014fa9", + "url": "https://api.github.com/repos/dompdf/dompdf/zipball/c5310df0e22c758c85ea5288175fc6cd777bc085", + "reference": "c5310df0e22c758c85ea5288175fc6cd777bc085", "shasum": "" }, "require": { "ext-dom": "*", "ext-mbstring": "*", "masterminds/html5": "^2.0", - "phenx/php-font-lib": "^0.5.4", - "phenx/php-svg-lib": "^0.3.3 || ^0.4.0", + "phenx/php-font-lib": ">=0.5.4 <1.0.0", + "phenx/php-svg-lib": ">=0.3.3 <1.0.0", "php": "^7.1 || ^8.0" }, "require-dev": { @@ -1019,38 +1021,30 @@ ], "authors": [ { - "name": "Fabien Ménager", - "email": "fabien.menager@gmail.com" - }, - { - "name": "Brian Sweeney", - "email": "eclecticgeek@gmail.com" - }, - { - "name": "Gabriel Bull", - "email": "me@gabrielbull.com" + "name": "The Dompdf Community", + "homepage": "https://github.com/dompdf/dompdf/blob/master/AUTHORS.md" } ], "description": "DOMPDF is a CSS 2.1 compliant HTML to PDF converter", "homepage": "https://github.com/dompdf/dompdf", "support": { "issues": "https://github.com/dompdf/dompdf/issues", - "source": "https://github.com/dompdf/dompdf/tree/v2.0.0" + "source": "https://github.com/dompdf/dompdf/tree/v2.0.1" }, - "time": "2022-06-21T21:14:57+00:00" + "time": "2022-09-22T13:43:41+00:00" }, { "name": "dragonmantank/cron-expression", - "version": "v3.3.1", + "version": "v3.3.2", "source": { "type": "git", "url": "https://github.com/dragonmantank/cron-expression.git", - "reference": "be85b3f05b46c39bbc0d95f6c071ddff669510fa" + "reference": "782ca5968ab8b954773518e9e49a6f892a34b2a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/be85b3f05b46c39bbc0d95f6c071ddff669510fa", - "reference": "be85b3f05b46c39bbc0d95f6c071ddff669510fa", + "url": "https://api.github.com/repos/dragonmantank/cron-expression/zipball/782ca5968ab8b954773518e9e49a6f892a34b2a8", + "reference": "782ca5968ab8b954773518e9e49a6f892a34b2a8", "shasum": "" }, "require": { @@ -1090,7 +1084,7 @@ ], "support": { "issues": "https://github.com/dragonmantank/cron-expression/issues", - "source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.1" + "source": "https://github.com/dragonmantank/cron-expression/tree/v3.3.2" }, "funding": [ { @@ -1098,7 +1092,7 @@ "type": "github" } ], - "time": "2022-01-18T15:43:28+00:00" + "time": "2022-09-10T18:51:20+00:00" }, { "name": "egulias/email-validator", @@ -1792,16 +1786,16 @@ }, { "name": "laravel/framework", - "version": "v8.83.23", + "version": "v8.83.24", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "bdc707f8b9bcad289b24cd182d98ec7480ac4491" + "reference": "a684da6197ae77eee090637ae4411b2f321adfc7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/bdc707f8b9bcad289b24cd182d98ec7480ac4491", - "reference": "bdc707f8b9bcad289b24cd182d98ec7480ac4491", + "url": "https://api.github.com/repos/laravel/framework/zipball/a684da6197ae77eee090637ae4411b2f321adfc7", + "reference": "a684da6197ae77eee090637ae4411b2f321adfc7", "shasum": "" }, "require": { @@ -1961,20 +1955,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2022-07-26T13:30:00+00:00" + "time": "2022-09-22T18:59:47+00:00" }, { "name": "laravel/serializable-closure", - "version": "v1.2.1", + "version": "v1.2.2", "source": { "type": "git", "url": "https://github.com/laravel/serializable-closure.git", - "reference": "d78fd36ba031a1a695ea5a406f29996948d7011b" + "reference": "47afb7fae28ed29057fdca37e16a84f90cc62fae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/d78fd36ba031a1a695ea5a406f29996948d7011b", - "reference": "d78fd36ba031a1a695ea5a406f29996948d7011b", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/47afb7fae28ed29057fdca37e16a84f90cc62fae", + "reference": "47afb7fae28ed29057fdca37e16a84f90cc62fae", "shasum": "" }, "require": { @@ -2021,7 +2015,7 @@ "issues": "https://github.com/laravel/serializable-closure/issues", "source": "https://github.com/laravel/serializable-closure" }, - "time": "2022-08-26T15:25:27+00:00" + "time": "2022-09-08T13:45:54+00:00" }, { "name": "laravel/socialite", @@ -3377,21 +3371,21 @@ }, { "name": "phenx/php-svg-lib", - "version": "0.4.1", + "version": "0.5.0", "source": { "type": "git", "url": "https://github.com/dompdf/php-svg-lib.git", - "reference": "4498b5df7b08e8469f0f8279651ea5de9626ed02" + "reference": "76876c6cf3080bcb6f249d7d59705108166a6685" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/dompdf/php-svg-lib/zipball/4498b5df7b08e8469f0f8279651ea5de9626ed02", - "reference": "4498b5df7b08e8469f0f8279651ea5de9626ed02", + "url": "https://api.github.com/repos/dompdf/php-svg-lib/zipball/76876c6cf3080bcb6f249d7d59705108166a6685", + "reference": "76876c6cf3080bcb6f249d7d59705108166a6685", "shasum": "" }, "require": { "ext-mbstring": "*", - "php": "^7.1 || ^7.2 || ^7.3 || ^7.4 || ^8.0", + "php": "^7.1 || ^8.0", "sabberworm/php-css-parser": "^8.4" }, "require-dev": { @@ -3417,9 +3411,9 @@ "homepage": "https://github.com/PhenX/php-svg-lib", "support": { "issues": "https://github.com/dompdf/php-svg-lib/issues", - "source": "https://github.com/dompdf/php-svg-lib/tree/0.4.1" + "source": "https://github.com/dompdf/php-svg-lib/tree/0.5.0" }, - "time": "2022-03-07T12:52:04+00:00" + "time": "2022-09-06T12:16:56+00:00" }, { "name": "phpoption/phpoption", @@ -3498,16 +3492,16 @@ }, { "name": "phpseclib/phpseclib", - "version": "3.0.15", + "version": "3.0.16", "source": { "type": "git", "url": "https://github.com/phpseclib/phpseclib.git", - "reference": "c96e250238e88bf1040e9f7715efab1d6bc7f622" + "reference": "7181378909ed8890be4db53d289faac5b77f8b05" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/c96e250238e88bf1040e9f7715efab1d6bc7f622", - "reference": "c96e250238e88bf1040e9f7715efab1d6bc7f622", + "url": "https://api.github.com/repos/phpseclib/phpseclib/zipball/7181378909ed8890be4db53d289faac5b77f8b05", + "reference": "7181378909ed8890be4db53d289faac5b77f8b05", "shasum": "" }, "require": { @@ -3588,7 +3582,7 @@ ], "support": { "issues": "https://github.com/phpseclib/phpseclib/issues", - "source": "https://github.com/phpseclib/phpseclib/tree/3.0.15" + "source": "https://github.com/phpseclib/phpseclib/tree/3.0.16" }, "funding": [ { @@ -3604,7 +3598,7 @@ "type": "tidelift" } ], - "time": "2022-09-02T17:05:08+00:00" + "time": "2022-09-05T18:03:08+00:00" }, { "name": "pragmarx/google2fa", @@ -7197,16 +7191,16 @@ }, { "name": "tijsverkoyen/css-to-inline-styles", - "version": "2.2.4", + "version": "2.2.5", "source": { "type": "git", "url": "https://github.com/tijsverkoyen/CssToInlineStyles.git", - "reference": "da444caae6aca7a19c0c140f68c6182e337d5b1c" + "reference": "4348a3a06651827a27d989ad1d13efec6bb49b19" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/da444caae6aca7a19c0c140f68c6182e337d5b1c", - "reference": "da444caae6aca7a19c0c140f68c6182e337d5b1c", + "url": "https://api.github.com/repos/tijsverkoyen/CssToInlineStyles/zipball/4348a3a06651827a27d989ad1d13efec6bb49b19", + "reference": "4348a3a06651827a27d989ad1d13efec6bb49b19", "shasum": "" }, "require": { @@ -7244,9 +7238,9 @@ "homepage": "https://github.com/tijsverkoyen/CssToInlineStyles", "support": { "issues": "https://github.com/tijsverkoyen/CssToInlineStyles/issues", - "source": "https://github.com/tijsverkoyen/CssToInlineStyles/tree/2.2.4" + "source": "https://github.com/tijsverkoyen/CssToInlineStyles/tree/2.2.5" }, - "time": "2021-12-08T09:12:39+00:00" + "time": "2022-09-12T13:28:28+00:00" }, { "name": "vlucas/phpdotenv", @@ -7462,6 +7456,98 @@ } ], "packages-dev": [ + { + "name": "brianium/paratest", + "version": "v6.6.4", + "source": { + "type": "git", + "url": "https://github.com/paratestphp/paratest.git", + "reference": "4ce800dc32fd0292a4f05c00f347142dce1ecdda" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paratestphp/paratest/zipball/4ce800dc32fd0292a4f05c00f347142dce1ecdda", + "reference": "4ce800dc32fd0292a4f05c00f347142dce1ecdda", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-simplexml": "*", + "jean85/pretty-package-versions": "^2.0.5", + "php": "^7.3 || ^8.0", + "phpunit/php-code-coverage": "^9.2.17", + "phpunit/php-file-iterator": "^3.0.6", + "phpunit/php-timer": "^5.0.3", + "phpunit/phpunit": "^9.5.24", + "sebastian/environment": "^5.1.4", + "symfony/console": "^5.4.12 || ^6.1.4", + "symfony/process": "^5.4.11 || ^6.1.3" + }, + "require-dev": { + "doctrine/coding-standard": "^10.0.0", + "ext-pcov": "*", + "ext-posix": "*", + "infection/infection": "^0.26.14", + "malukenho/mcbumpface": "^1.1.5", + "squizlabs/php_codesniffer": "^3.7.1", + "symfony/filesystem": "^5.4.12 || ^6.1.4", + "vimeo/psalm": "^4.27.0" + }, + "bin": [ + "bin/paratest", + "bin/paratest.bat", + "bin/paratest_for_phpstorm" + ], + "type": "library", + "autoload": { + "psr-4": { + "ParaTest\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brian Scaturro", + "email": "scaturrob@gmail.com", + "role": "Developer" + }, + { + "name": "Filippo Tessarotto", + "email": "zoeslam@gmail.com", + "role": "Developer" + } + ], + "description": "Parallel testing for PHP", + "homepage": "https://github.com/paratestphp/paratest", + "keywords": [ + "concurrent", + "parallel", + "phpunit", + "testing" + ], + "support": { + "issues": "https://github.com/paratestphp/paratest/issues", + "source": "https://github.com/paratestphp/paratest/tree/v6.6.4" + }, + "funding": [ + { + "url": "https://github.com/sponsors/Slamdunk", + "type": "github" + }, + { + "url": "https://paypal.me/filippotessarotto", + "type": "paypal" + } + ], + "time": "2022-09-13T10:47:01+00:00" + }, { "name": "composer/ca-bundle", "version": "1.3.3", @@ -7613,16 +7699,16 @@ }, { "name": "composer/composer", - "version": "2.4.1", + "version": "2.4.2", "source": { "type": "git", "url": "https://github.com/composer/composer.git", - "reference": "777d542e3af65f8e7a66a4d98ce7a697da339414" + "reference": "7d887621e69a0311eb50aed4a16f7044b2b385b9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/777d542e3af65f8e7a66a4d98ce7a697da339414", - "reference": "777d542e3af65f8e7a66a4d98ce7a697da339414", + "url": "https://api.github.com/repos/composer/composer/zipball/7d887621e69a0311eb50aed4a16f7044b2b385b9", + "reference": "7d887621e69a0311eb50aed4a16f7044b2b385b9", "shasum": "" }, "require": { @@ -7652,7 +7738,7 @@ "phpstan/phpstan-deprecation-rules": "^1", "phpstan/phpstan-phpunit": "^1.0", "phpstan/phpstan-strict-rules": "^1", - "phpstan/phpstan-symfony": "^1.1", + "phpstan/phpstan-symfony": "^1.2.10", "symfony/phpunit-bridge": "^6.0" }, "suggest": { @@ -7705,7 +7791,7 @@ "support": { "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/composer/issues", - "source": "https://github.com/composer/composer/tree/2.4.1" + "source": "https://github.com/composer/composer/tree/2.4.2" }, "funding": [ { @@ -7721,7 +7807,7 @@ "type": "tidelift" } ], - "time": "2022-08-20T09:44:50+00:00" + "time": "2022-09-14T14:11:15+00:00" }, { "name": "composer/metadata-minifier", @@ -8333,16 +8419,16 @@ }, { "name": "itsgoingd/clockwork", - "version": "v5.1.7", + "version": "v5.1.8", "source": { "type": "git", "url": "https://github.com/itsgoingd/clockwork.git", - "reference": "2cad6c75dc2b96cbfd48c0511bb035a4e328c17f" + "reference": "74ee05a61296aa7298164ef5346f0a568aa6106e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/itsgoingd/clockwork/zipball/2cad6c75dc2b96cbfd48c0511bb035a4e328c17f", - "reference": "2cad6c75dc2b96cbfd48c0511bb035a4e328c17f", + "url": "https://api.github.com/repos/itsgoingd/clockwork/zipball/74ee05a61296aa7298164ef5346f0a568aa6106e", + "reference": "74ee05a61296aa7298164ef5346f0a568aa6106e", "shasum": "" }, "require": { @@ -8389,7 +8475,7 @@ ], "support": { "issues": "https://github.com/itsgoingd/clockwork/issues", - "source": "https://github.com/itsgoingd/clockwork/tree/v5.1.7" + "source": "https://github.com/itsgoingd/clockwork/tree/v5.1.8" }, "funding": [ { @@ -8397,7 +8483,66 @@ "type": "github" } ], - "time": "2022-08-14T21:23:22+00:00" + "time": "2022-09-25T20:21:14+00:00" + }, + { + "name": "jean85/pretty-package-versions", + "version": "2.0.5", + "source": { + "type": "git", + "url": "https://github.com/Jean85/pretty-package-versions.git", + "reference": "ae547e455a3d8babd07b96966b17d7fd21d9c6af" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/ae547e455a3d8babd07b96966b17d7fd21d9c6af", + "reference": "ae547e455a3d8babd07b96966b17d7fd21d9c6af", + "shasum": "" + }, + "require": { + "composer-runtime-api": "^2.0.0", + "php": "^7.1|^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.17", + "jean85/composer-provided-replaced-stub-package": "^1.0", + "phpstan/phpstan": "^0.12.66", + "phpunit/phpunit": "^7.5|^8.5|^9.4", + "vimeo/psalm": "^4.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Jean85\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Alessandro Lai", + "email": "alessandro.lai85@gmail.com" + } + ], + "description": "A library to get pretty versions strings of installed dependencies", + "keywords": [ + "composer", + "package", + "release", + "versions" + ], + "support": { + "issues": "https://github.com/Jean85/pretty-package-versions/issues", + "source": "https://github.com/Jean85/pretty-package-versions/tree/2.0.5" + }, + "time": "2021-10-08T21:21:46+00:00" }, { "name": "justinrainbow/json-schema", @@ -8471,16 +8616,16 @@ }, { "name": "mockery/mockery", - "version": "1.5.0", + "version": "1.5.1", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "c10a5f6e06fc2470ab1822fa13fa2a7380f8fbac" + "reference": "e92dcc83d5a51851baf5f5591d32cb2b16e3684e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/c10a5f6e06fc2470ab1822fa13fa2a7380f8fbac", - "reference": "c10a5f6e06fc2470ab1822fa13fa2a7380f8fbac", + "url": "https://api.github.com/repos/mockery/mockery/zipball/e92dcc83d5a51851baf5f5591d32cb2b16e3684e", + "reference": "e92dcc83d5a51851baf5f5591d32cb2b16e3684e", "shasum": "" }, "require": { @@ -8537,9 +8682,9 @@ ], "support": { "issues": "https://github.com/mockery/mockery/issues", - "source": "https://github.com/mockery/mockery/tree/1.5.0" + "source": "https://github.com/mockery/mockery/tree/1.5.1" }, - "time": "2022-01-20T13:18:17+00:00" + "time": "2022-09-07T15:32:08+00:00" }, { "name": "myclabs/deep-copy", @@ -8898,16 +9043,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.8.4", + "version": "1.8.6", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "eed4c9da531f6ebb4787235b6fb486e2c20f34e5" + "reference": "c386ab2741e64cc9e21729f891b28b2b10fe6618" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/eed4c9da531f6ebb4787235b6fb486e2c20f34e5", - "reference": "eed4c9da531f6ebb4787235b6fb486e2c20f34e5", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/c386ab2741e64cc9e21729f891b28b2b10fe6618", + "reference": "c386ab2741e64cc9e21729f891b28b2b10fe6618", "shasum": "" }, "require": { @@ -8937,7 +9082,7 @@ ], "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/1.8.4" + "source": "https://github.com/phpstan/phpstan/tree/1.8.6" }, "funding": [ { @@ -8953,7 +9098,7 @@ "type": "tidelift" } ], - "time": "2022-09-03T13:08:04+00:00" + "time": "2022-09-23T09:54:39+00:00" }, { "name": "phpunit/php-code-coverage", @@ -9275,16 +9420,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.24", + "version": "9.5.25", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "d0aa6097bef9fd42458a9b3c49da32c6ce6129c5" + "reference": "3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/d0aa6097bef9fd42458a9b3c49da32c6ce6129c5", - "reference": "d0aa6097bef9fd42458a9b3c49da32c6ce6129c5", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d", + "reference": "3e6f90ca7e3d02025b1d147bd8d4a89fd4ca8a1d", "shasum": "" }, "require": { @@ -9306,14 +9451,14 @@ "phpunit/php-timer": "^5.0.2", "sebastian/cli-parser": "^1.0.1", "sebastian/code-unit": "^1.0.6", - "sebastian/comparator": "^4.0.5", + "sebastian/comparator": "^4.0.8", "sebastian/diff": "^4.0.3", "sebastian/environment": "^5.1.3", - "sebastian/exporter": "^4.0.3", + "sebastian/exporter": "^4.0.5", "sebastian/global-state": "^5.0.1", "sebastian/object-enumerator": "^4.0.3", "sebastian/resource-operations": "^3.0.3", - "sebastian/type": "^3.1", + "sebastian/type": "^3.2", "sebastian/version": "^3.0.2" }, "suggest": { @@ -9357,7 +9502,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.24" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.25" }, "funding": [ { @@ -9367,9 +9512,13 @@ { "url": "https://github.com/sebastianbergmann", "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" } ], - "time": "2022-08-30T07:42:16+00:00" + "time": "2022-09-25T03:44:45+00:00" }, { "name": "react/promise", @@ -9616,16 +9765,16 @@ }, { "name": "sebastian/comparator", - "version": "4.0.6", + "version": "4.0.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382" + "reference": "fa0f136dd2334583309d32b62544682ee972b51a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/55f4261989e546dc112258c7a75935a81a7ce382", - "reference": "55f4261989e546dc112258c7a75935a81a7ce382", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a", "shasum": "" }, "require": { @@ -9678,7 +9827,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.6" + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" }, "funding": [ { @@ -9686,7 +9835,7 @@ "type": "github" } ], - "time": "2020-10-26T15:49:45+00:00" + "time": "2022-09-14T12:41:17+00:00" }, { "name": "sebastian/complexity", @@ -9876,16 +10025,16 @@ }, { "name": "sebastian/exporter", - "version": "4.0.4", + "version": "4.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9" + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/65e8b7db476c5dd267e65eea9cab77584d3cfff9", - "reference": "65e8b7db476c5dd267e65eea9cab77584d3cfff9", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", "shasum": "" }, "require": { @@ -9941,7 +10090,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.4" + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" }, "funding": [ { @@ -9949,7 +10098,7 @@ "type": "github" } ], - "time": "2021-11-11T14:18:36+00:00" + "time": "2022-09-14T06:03:37+00:00" }, { "name": "sebastian/global-state", @@ -10304,16 +10453,16 @@ }, { "name": "sebastian/type", - "version": "3.1.0", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/type.git", - "reference": "fb44e1cc6e557418387ad815780360057e40753e" + "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb44e1cc6e557418387ad815780360057e40753e", - "reference": "fb44e1cc6e557418387ad815780360057e40753e", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", + "reference": "fb3fe09c5f0bae6bc27ef3ce933a1e0ed9464b6e", "shasum": "" }, "require": { @@ -10325,7 +10474,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "3.2-dev" } }, "autoload": { @@ -10348,7 +10497,7 @@ "homepage": "https://github.com/sebastianbergmann/type", "support": { "issues": "https://github.com/sebastianbergmann/type/issues", - "source": "https://github.com/sebastianbergmann/type/tree/3.1.0" + "source": "https://github.com/sebastianbergmann/type/tree/3.2.0" }, "funding": [ { @@ -10356,7 +10505,7 @@ "type": "github" } ], - "time": "2022-08-29T06:55:37+00:00" + "time": "2022-09-12T14:47:03+00:00" }, { "name": "sebastian/version", diff --git a/readme.md b/readme.md index d0ae1b4f6..469ec88fd 100644 --- a/readme.md +++ b/readme.md @@ -108,14 +108,9 @@ npm run dev BookStack has many integration tests that use Laravel's built-in testing capabilities which makes use of PHPUnit. There is a `mysql_testing` database defined within the app config which is what is used by PHPUnit. This database is set with the database name, user name and password all defined as `bookstack-test`. You will have to create that database and that set of credentials before testing. -The testing database will also need migrating and seeding beforehand. This can be done with the following commands: +The testing database will also need migrating and seeding beforehand. This can be done by running `composer refresh-test-database`. -``` bash -php artisan migrate --database=mysql_testing -php artisan db:seed --class=DummyContentSeeder --database=mysql_testing -``` - -Once done you can run `composer test` in the application root directory to run all tests. +Once done you can run `composer test` in the application root directory to run all tests. Tests can be ran in parallel by running them via `composer t`. This will use Laravel's built-in parallel testing functionality, and attempt to create and seed a database instance for each testing thread. If required these parallel testing instances can be reset, before testing again, by running `composer t-reset`. ### 📜 Code Standards @@ -221,16 +216,14 @@ The website which contains the project docs & Blog can be found in the [BookStac ## ⚖️ License -The BookStack source is provided under the MIT License. +The BookStack source is provided under the [MIT License](https://github.com/BookStackApp/BookStack/blob/development/LICENSE). The libraries used by, and included with, BookStack are provided under their own licenses and copyright. The licenses for many of our core dependencies can be found in the attribution list below but this is not an exhaustive list of all projects used within BookStack. ## 👪 Attribution -The great people that have worked to build and improve BookStack can [be seen here](https://github.com/BookStackApp/BookStack/graphs/contributors). - -The wonderful people that have provided translations, either through GitHub or via Crowdin [can be seen here](https://github.com/BookStackApp/BookStack/blob/development/.github/translators.txt). +The great people that have worked to build and improve BookStack can [be seen here](https://github.com/BookStackApp/BookStack/graphs/contributors). The wonderful people that have provided translations, either through GitHub or via Crowdin [can be seen here](https://github.com/BookStackApp/BookStack/blob/development/.github/translators.txt). Below are the great open-source projects used to help build BookStack. Note: This is not an exhaustive list of all libraries and projects that would be used in an active BookStack instance. diff --git a/resources/js/code.mjs b/resources/js/code.mjs index eca941f1c..5881e2512 100644 --- a/resources/js/code.mjs +++ b/resources/js/code.mjs @@ -15,6 +15,7 @@ import 'codemirror/mode/lua/lua'; import 'codemirror/mode/markdown/markdown'; import 'codemirror/mode/mllike/mllike'; import 'codemirror/mode/nginx/nginx'; +import 'codemirror/mode/octave/octave'; import 'codemirror/mode/perl/perl'; import 'codemirror/mode/pascal/pascal'; import 'codemirror/mode/php/php'; @@ -65,11 +66,13 @@ const modeMap = { julia: 'text/x-julia', latex: 'text/x-stex', lua: 'lua', + matlab: 'text/x-octave', md: 'markdown', mdown: 'markdown', markdown: 'markdown', ml: 'mllike', nginx: 'nginx', + octave: 'text/x-octave', perl: 'perl', pl: 'perl', powershell: 'powershell', diff --git a/resources/js/wysiwyg/config.js b/resources/js/wysiwyg/config.js index 52c52592c..8c85f60e2 100644 --- a/resources/js/wysiwyg/config.js +++ b/resources/js/wysiwyg/config.js @@ -255,7 +255,7 @@ export function build(options) { statusbar: false, menubar: false, paste_data_images: false, - extended_valid_elements: 'pre[*],svg[*],div[drawio-diagram],details[*],summary[*],div[*],li[class|checked]', + extended_valid_elements: 'pre[*],svg[*],div[drawio-diagram],details[*],summary[*],div[*],li[class|checked|style]', automatic_uploads: false, custom_elements: 'doc-root,code-block', valid_children: [ diff --git a/resources/js/wysiwyg/plugin-codeeditor.js b/resources/js/wysiwyg/plugin-codeeditor.js index b9fc355e1..5377f564e 100644 --- a/resources/js/wysiwyg/plugin-codeeditor.js +++ b/resources/js/wysiwyg/plugin-codeeditor.js @@ -39,16 +39,16 @@ function defineCodeBlockCustomElement(editor) { constructor() { super(); this.attachShadow({mode: 'open'}); - const linkElem = document.createElement('link'); - linkElem.setAttribute('rel', 'stylesheet'); - linkElem.setAttribute('href', window.baseUrl('/dist/styles.css')); + + const stylesToCopy = document.querySelectorAll('link[rel="stylesheet"]:not([media="print"])'); + const copiedStyles = Array.from(stylesToCopy).map(styleEl => styleEl.cloneNode(false)); const cmContainer = document.createElement('div'); cmContainer.style.pointerEvents = 'none'; cmContainer.contentEditable = 'false'; cmContainer.classList.add('CodeMirrorContainer'); - this.shadowRoot.append(linkElem, cmContainer); + this.shadowRoot.append(...copiedStyles, cmContainer); } getLanguage() { diff --git a/resources/views/pages/parts/code-editor.blade.php b/resources/views/pages/parts/code-editor.blade.php index e86282d73..770ed4840 100644 --- a/resources/views/pages/parts/code-editor.blade.php +++ b/resources/views/pages/parts/code-editor.blade.php @@ -24,8 +24,8 @@ @php $languages = [ 'Bash', 'CSS', 'C', 'C++', 'C#', 'Diff', 'Fortran', 'F#', 'Go', 'Haskell', 'HTML', 'INI', - 'Java', 'JavaScript', 'JSON', 'Julia', 'Kotlin', 'LaTeX', 'Lua', 'MarkDown', 'Nginx', 'OCaml', - 'Pascal', 'Perl', 'PHP', 'Powershell', 'Python', 'Ruby', 'Rust', 'Shell', 'SQL', 'TypeScript', + 'Java', 'JavaScript', 'JSON', 'Julia', 'Kotlin', 'LaTeX', 'Lua', 'MarkDown', 'MATLAB', 'Nginx', 'OCaml', + 'Octave', 'Pascal', 'Perl', 'PHP', 'Powershell', 'Python', 'Ruby', 'Rust', 'Shell', 'SQL', 'TypeScript', 'VBScript', 'VB.NET', 'XML', 'YAML', ]; @endphp diff --git a/tests/TestCase.php b/tests/TestCase.php index f17d27a1a..594194168 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -22,10 +22,12 @@ use GuzzleHttp\Client; use GuzzleHttp\Handler\MockHandler; use GuzzleHttp\HandlerStack; use GuzzleHttp\Middleware; +use Illuminate\Contracts\Console\Kernel; use Illuminate\Foundation\Testing\DatabaseTransactions; use Illuminate\Foundation\Testing\TestCase as BaseTestCase; use Illuminate\Http\JsonResponse; use Illuminate\Support\Env; +use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Log; use Illuminate\Testing\Assert as PHPUnit; use Monolog\Handler\TestHandler; @@ -47,6 +49,21 @@ abstract class TestCase extends BaseTestCase */ protected string $baseUrl = 'http://localhost'; + /** + * Creates the application. + * + * @return \Illuminate\Foundation\Application + */ + public function createApplication() + { + /** @var \Illuminate\Foundation\Application $app */ + $app = require __DIR__ . '/../bootstrap/app.php'; + $app->register(TestServiceProvider::class); + $app->make(Kernel::class)->bootstrap(); + + return $app; + } + /** * Set the current user context to be an admin. */ @@ -299,6 +316,8 @@ abstract class TestCase extends BaseTestCase /** * Run a set test with the given env variable. * Remembers the original and resets the value after test. + * Database config is juggled so the value can be restored when + * parallel testing are used, where multiple databases exist. */ protected function runWithEnv(string $name, $value, callable $callback) { @@ -311,7 +330,12 @@ abstract class TestCase extends BaseTestCase $_SERVER[$name] = $value; } + $database = config('database.connections.mysql_testing.database'); $this->refreshApplication(); + + DB::purge(); + config()->set('database.connections.mysql_testing.database', $database); + $callback(); if (is_null($originalVal)) { diff --git a/tests/TestServiceProvider.php b/tests/TestServiceProvider.php new file mode 100644 index 000000000..9ad48c442 --- /dev/null +++ b/tests/TestServiceProvider.php @@ -0,0 +1,26 @@ +first(); @@ -342,18 +342,18 @@ class ThemeTest extends TestCase protected function usingThemeFolder(callable $callback) { // Create a folder and configure a theme - $themeFolderName = 'testing_theme_' . rtrim(base64_encode(time()), '='); + $themeFolderName = 'testing_theme_' . str_shuffle(rtrim(base64_encode(time()), '=')); config()->set('view.theme', $themeFolderName); $themeFolderPath = theme_path(''); + + // Create theme folder and clean it up on application tear-down File::makeDirectory($themeFolderPath); + $this->beforeApplicationDestroyed(fn() => File::deleteDirectory($themeFolderPath)); // Run provided callback with theme env option set $this->runWithEnv('APP_THEME', $themeFolderName, function () use ($callback, $themeFolderName) { call_user_func($callback, $themeFolderName); }); - - // Cleanup the custom theme folder we created - File::deleteDirectory($themeFolderPath); } } diff --git a/version b/version index 1edf07d8a..3dbb8ff33 100644 --- a/version +++ b/version @@ -1 +1 @@ -v22.07-dev +v22.10-dev