0
0
Fork 0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-04-15 17:24:11 +00:00

Updated composer deps, applied StyleCI changes

This commit is contained in:
Dan Brown 2022-07-27 11:07:41 +01:00
parent 4fa73be80e
commit 0bb5654f80
No known key found for this signature in database
GPG key ID: 46D9F943C24A2EF9
5 changed files with 52 additions and 55 deletions

View file

@ -4,7 +4,6 @@ namespace BookStack\Actions;
class TagClassGenerator class TagClassGenerator
{ {
protected array $tags; protected array $tags;
/** /**
@ -44,7 +43,7 @@ class TagClassGenerator
{ {
$value = str_replace(' ', '', strtolower($value)); $value = str_replace(' ', '', strtolower($value));
$value = str_replace('-', '', strtolower($value)); $value = str_replace('-', '', strtolower($value));
return $value; return $value;
} }
}
}

View file

@ -293,7 +293,7 @@ class UserController extends Controller
{ {
$validated = $this->validate($request, [ $validated = $this->validate($request, [
'language' => ['required', 'string', 'max:20'], 'language' => ['required', 'string', 'max:20'],
'active' => ['required', 'bool'], 'active' => ['required', 'bool'],
]); ]);
$currentFavoritesStr = setting()->getForCurrentUser('code-language-favourites', ''); $currentFavoritesStr = setting()->getForCurrentUser('code-language-favourites', '');
@ -302,7 +302,7 @@ class UserController extends Controller
$isFav = in_array($validated['language'], $currentFavorites); $isFav = in_array($validated['language'], $currentFavorites);
if (!$isFav && $validated['active']) { if (!$isFav && $validated['active']) {
$currentFavorites[] = $validated['language']; $currentFavorites[] = $validated['language'];
} else if ($isFav && !$validated['active']) { } elseif ($isFav && !$validated['active']) {
$index = array_search($validated['language'], $currentFavorites); $index = array_search($validated['language'], $currentFavorites);
array_splice($currentFavorites, $index, 1); array_splice($currentFavorites, $index, 1);
} }

90
composer.lock generated
View file

@ -58,16 +58,16 @@
}, },
{ {
"name": "aws/aws-sdk-php", "name": "aws/aws-sdk-php",
"version": "3.231.7", "version": "3.231.14",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/aws/aws-sdk-php.git", "url": "https://github.com/aws/aws-sdk-php.git",
"reference": "25f7cf72a1d7cf3075436cfbfdc4caed201df3ec" "reference": "6b79b9c8204813d9674ffa7badcd567d7f608165"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/25f7cf72a1d7cf3075436cfbfdc4caed201df3ec", "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/6b79b9c8204813d9674ffa7badcd567d7f608165",
"reference": "25f7cf72a1d7cf3075436cfbfdc4caed201df3ec", "reference": "6b79b9c8204813d9674ffa7badcd567d7f608165",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -144,9 +144,9 @@
"support": { "support": {
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
"issues": "https://github.com/aws/aws-sdk-php/issues", "issues": "https://github.com/aws/aws-sdk-php/issues",
"source": "https://github.com/aws/aws-sdk-php/tree/3.231.7" "source": "https://github.com/aws/aws-sdk-php/tree/3.231.14"
}, },
"time": "2022-07-15T18:16:42+00:00" "time": "2022-07-26T18:20:14+00:00"
}, },
{ {
"name": "bacon/bacon-qr-code", "name": "bacon/bacon-qr-code",
@ -1787,16 +1787,16 @@
}, },
{ {
"name": "laravel/framework", "name": "laravel/framework",
"version": "v8.83.19", "version": "v8.83.23",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laravel/framework.git", "url": "https://github.com/laravel/framework.git",
"reference": "4264f2ee12330bdb1be050998f58ba7271236395" "reference": "bdc707f8b9bcad289b24cd182d98ec7480ac4491"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laravel/framework/zipball/4264f2ee12330bdb1be050998f58ba7271236395", "url": "https://api.github.com/repos/laravel/framework/zipball/bdc707f8b9bcad289b24cd182d98ec7480ac4491",
"reference": "4264f2ee12330bdb1be050998f58ba7271236395", "reference": "bdc707f8b9bcad289b24cd182d98ec7480ac4491",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -1956,7 +1956,7 @@
"issues": "https://github.com/laravel/framework/issues", "issues": "https://github.com/laravel/framework/issues",
"source": "https://github.com/laravel/framework" "source": "https://github.com/laravel/framework"
}, },
"time": "2022-07-13T13:23:09+00:00" "time": "2022-07-26T13:30:00+00:00"
}, },
{ {
"name": "laravel/serializable-closure", "name": "laravel/serializable-closure",
@ -2019,28 +2019,28 @@
}, },
{ {
"name": "laravel/socialite", "name": "laravel/socialite",
"version": "v5.5.2", "version": "v5.5.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laravel/socialite.git", "url": "https://github.com/laravel/socialite.git",
"reference": "68afb03259b82d898c68196cbcacd48596a9dd72" "reference": "9dfc76b31ee041c45a7cae86f23339784abde46d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laravel/socialite/zipball/68afb03259b82d898c68196cbcacd48596a9dd72", "url": "https://api.github.com/repos/laravel/socialite/zipball/9dfc76b31ee041c45a7cae86f23339784abde46d",
"reference": "68afb03259b82d898c68196cbcacd48596a9dd72", "reference": "9dfc76b31ee041c45a7cae86f23339784abde46d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"ext-json": "*", "ext-json": "*",
"guzzlehttp/guzzle": "^6.0|^7.0", "guzzlehttp/guzzle": "^6.0|^7.0",
"illuminate/contracts": "^6.0|^7.0|^8.0|^9.0",
"illuminate/http": "^6.0|^7.0|^8.0|^9.0", "illuminate/http": "^6.0|^7.0|^8.0|^9.0",
"illuminate/support": "^6.0|^7.0|^8.0|^9.0", "illuminate/support": "^6.0|^7.0|^8.0|^9.0",
"league/oauth1-client": "^1.0", "league/oauth1-client": "^1.10.1",
"php": "^7.2|^8.0" "php": "^7.2|^8.0"
}, },
"require-dev": { "require-dev": {
"illuminate/contracts": "^6.0|^7.0|^8.0|^9.0",
"mockery/mockery": "^1.0", "mockery/mockery": "^1.0",
"orchestra/testbench": "^4.0|^5.0|^6.0|^7.0", "orchestra/testbench": "^4.0|^5.0|^6.0|^7.0",
"phpunit/phpunit": "^8.0|^9.3" "phpunit/phpunit": "^8.0|^9.3"
@ -2084,7 +2084,7 @@
"issues": "https://github.com/laravel/socialite/issues", "issues": "https://github.com/laravel/socialite/issues",
"source": "https://github.com/laravel/socialite" "source": "https://github.com/laravel/socialite"
}, },
"time": "2022-03-10T15:26:19+00:00" "time": "2022-07-18T13:51:19+00:00"
}, },
{ {
"name": "laravel/tinker", "name": "laravel/tinker",
@ -2829,16 +2829,16 @@
}, },
{ {
"name": "monolog/monolog", "name": "monolog/monolog",
"version": "2.7.0", "version": "2.8.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/Seldaek/monolog.git", "url": "https://github.com/Seldaek/monolog.git",
"reference": "5579edf28aee1190a798bfa5be8bc16c563bd524" "reference": "720488632c590286b88b80e62aa3d3d551ad4a50"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/5579edf28aee1190a798bfa5be8bc16c563bd524", "url": "https://api.github.com/repos/Seldaek/monolog/zipball/720488632c590286b88b80e62aa3d3d551ad4a50",
"reference": "5579edf28aee1190a798bfa5be8bc16c563bd524", "reference": "720488632c590286b88b80e62aa3d3d551ad4a50",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -2858,11 +2858,10 @@
"guzzlehttp/psr7": "^2.2", "guzzlehttp/psr7": "^2.2",
"mongodb/mongodb": "^1.8", "mongodb/mongodb": "^1.8",
"php-amqplib/php-amqplib": "~2.4 || ^3", "php-amqplib/php-amqplib": "~2.4 || ^3",
"php-console/php-console": "^3.1.3",
"phpspec/prophecy": "^1.15", "phpspec/prophecy": "^1.15",
"phpstan/phpstan": "^0.12.91", "phpstan/phpstan": "^0.12.91",
"phpunit/phpunit": "^8.5.14", "phpunit/phpunit": "^8.5.14",
"predis/predis": "^1.1", "predis/predis": "^1.1 || ^2.0",
"rollbar/rollbar": "^1.3 || ^2 || ^3", "rollbar/rollbar": "^1.3 || ^2 || ^3",
"ruflin/elastica": "^7", "ruflin/elastica": "^7",
"swiftmailer/swiftmailer": "^5.3|^6.0", "swiftmailer/swiftmailer": "^5.3|^6.0",
@ -2882,7 +2881,6 @@
"graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server",
"mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)",
"php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib",
"php-console/php-console": "Allow sending log messages to Google Chrome",
"rollbar/rollbar": "Allow sending log messages to Rollbar", "rollbar/rollbar": "Allow sending log messages to Rollbar",
"ruflin/elastica": "Allow sending log messages to an Elastic Search server" "ruflin/elastica": "Allow sending log messages to an Elastic Search server"
}, },
@ -2917,7 +2915,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/Seldaek/monolog/issues", "issues": "https://github.com/Seldaek/monolog/issues",
"source": "https://github.com/Seldaek/monolog/tree/2.7.0" "source": "https://github.com/Seldaek/monolog/tree/2.8.0"
}, },
"funding": [ "funding": [
{ {
@ -2929,7 +2927,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2022-06-09T08:59:12+00:00" "time": "2022-07-24T11:55:47+00:00"
}, },
{ {
"name": "mtdowling/jmespath.php", "name": "mtdowling/jmespath.php",
@ -7513,16 +7511,16 @@
"packages-dev": [ "packages-dev": [
{ {
"name": "composer/ca-bundle", "name": "composer/ca-bundle",
"version": "1.3.2", "version": "1.3.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/composer/ca-bundle.git", "url": "https://github.com/composer/ca-bundle.git",
"reference": "fd5dd441932a7e10ca6e5b490e272d34c8430640" "reference": "30897edbfb15e784fe55587b4f73ceefd3c4d98c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/composer/ca-bundle/zipball/fd5dd441932a7e10ca6e5b490e272d34c8430640", "url": "https://api.github.com/repos/composer/ca-bundle/zipball/30897edbfb15e784fe55587b4f73ceefd3c4d98c",
"reference": "fd5dd441932a7e10ca6e5b490e272d34c8430640", "reference": "30897edbfb15e784fe55587b4f73ceefd3c4d98c",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -7569,7 +7567,7 @@
"support": { "support": {
"irc": "irc://irc.freenode.org/composer", "irc": "irc://irc.freenode.org/composer",
"issues": "https://github.com/composer/ca-bundle/issues", "issues": "https://github.com/composer/ca-bundle/issues",
"source": "https://github.com/composer/ca-bundle/tree/1.3.2" "source": "https://github.com/composer/ca-bundle/tree/1.3.3"
}, },
"funding": [ "funding": [
{ {
@ -7585,7 +7583,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2022-05-24T11:56:16+00:00" "time": "2022-07-20T07:14:26+00:00"
}, },
{ {
"name": "composer/composer", "name": "composer/composer",
@ -8189,16 +8187,16 @@
}, },
{ {
"name": "fakerphp/faker", "name": "fakerphp/faker",
"version": "v1.19.0", "version": "v1.20.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/FakerPHP/Faker.git", "url": "https://github.com/FakerPHP/Faker.git",
"reference": "d7f08a622b3346766325488aa32ddc93ccdecc75" "reference": "37f751c67a5372d4e26353bd9384bc03744ec77b"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/FakerPHP/Faker/zipball/d7f08a622b3346766325488aa32ddc93ccdecc75", "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/37f751c67a5372d4e26353bd9384bc03744ec77b",
"reference": "d7f08a622b3346766325488aa32ddc93ccdecc75", "reference": "37f751c67a5372d4e26353bd9384bc03744ec77b",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -8225,7 +8223,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-main": "v1.19-dev" "dev-main": "v1.20-dev"
} }
}, },
"autoload": { "autoload": {
@ -8250,9 +8248,9 @@
], ],
"support": { "support": {
"issues": "https://github.com/FakerPHP/Faker/issues", "issues": "https://github.com/FakerPHP/Faker/issues",
"source": "https://github.com/FakerPHP/Faker/tree/v1.19.0" "source": "https://github.com/FakerPHP/Faker/tree/v1.20.0"
}, },
"time": "2022-02-02T17:38:57+00:00" "time": "2022-07-20T13:12:54+00:00"
}, },
{ {
"name": "hamcrest/hamcrest-php", "name": "hamcrest/hamcrest-php",
@ -9099,16 +9097,16 @@
}, },
{ {
"name": "phpstan/phpstan", "name": "phpstan/phpstan",
"version": "1.8.1", "version": "1.8.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpstan/phpstan.git", "url": "https://github.com/phpstan/phpstan.git",
"reference": "8dbba631fa32f4b289404469c2afd6122fd61d67" "reference": "c53312ecc575caf07b0e90dee43883fdf90ca67c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/8dbba631fa32f4b289404469c2afd6122fd61d67", "url": "https://api.github.com/repos/phpstan/phpstan/zipball/c53312ecc575caf07b0e90dee43883fdf90ca67c",
"reference": "8dbba631fa32f4b289404469c2afd6122fd61d67", "reference": "c53312ecc575caf07b0e90dee43883fdf90ca67c",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -9134,7 +9132,7 @@
"description": "PHPStan - PHP Static Analysis Tool", "description": "PHPStan - PHP Static Analysis Tool",
"support": { "support": {
"issues": "https://github.com/phpstan/phpstan/issues", "issues": "https://github.com/phpstan/phpstan/issues",
"source": "https://github.com/phpstan/phpstan/tree/1.8.1" "source": "https://github.com/phpstan/phpstan/tree/1.8.2"
}, },
"funding": [ "funding": [
{ {
@ -9154,7 +9152,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2022-07-12T16:08:06+00:00" "time": "2022-07-20T09:57:31+00:00"
}, },
{ {
"name": "phpunit/php-code-coverage", "name": "phpunit/php-code-coverage",

View file

@ -435,9 +435,9 @@ abstract class TestCase extends BaseTestCase
protected function getEachEntityType(): array protected function getEachEntityType(): array
{ {
return [ return [
'page' => Page::query()->first(), 'page' => Page::query()->first(),
'chapter' => Chapter::query()->first(), 'chapter' => Chapter::query()->first(),
'book' => Book::query()->first(), 'book' => Book::query()->first(),
'bookshelf' => Bookshelf::query()->first(), 'bookshelf' => Bookshelf::query()->first(),
]; ];
} }

View file

@ -86,7 +86,7 @@ class AvatarTest extends TestCase
{ {
config()->set([ config()->set([
'services.disable_services' => false, 'services.disable_services' => false,
'services.avatar_url' => false, 'services.avatar_url' => false,
]); ]);
$user = User::factory()->make(); $user = User::factory()->make();