2.0 release candidate (#3808)

* use SAML interface instead of implementation
* moved implementation of SAML configs to system-configuration base class
* bump composer packages
* simplify configuration for different env
This commit is contained in:
Kevin Papst
2023-02-02 00:45:50 +01:00
committed by GitHub
parent 5711c15eac
commit 63a3ae1147
21 changed files with 272 additions and 395 deletions

301
composer.lock generated
View File

@@ -312,30 +312,30 @@
},
{
"name": "doctrine/annotations",
"version": "1.14.2",
"version": "2.0.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/annotations.git",
"reference": "ad785217c1e9555a7d6c6c8c9f406395a5e2882b"
"reference": "d02c9f3742044e17d5fa8d28d8402a2d95c33302"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/annotations/zipball/ad785217c1e9555a7d6c6c8c9f406395a5e2882b",
"reference": "ad785217c1e9555a7d6c6c8c9f406395a5e2882b",
"url": "https://api.github.com/repos/doctrine/annotations/zipball/d02c9f3742044e17d5fa8d28d8402a2d95c33302",
"reference": "d02c9f3742044e17d5fa8d28d8402a2d95c33302",
"shasum": ""
},
"require": {
"doctrine/lexer": "^1 || ^2",
"doctrine/lexer": "^2 || ^3",
"ext-tokenizer": "*",
"php": "^7.1 || ^8.0",
"php": "^7.2 || ^8.0",
"psr/cache": "^1 || ^2 || ^3"
},
"require-dev": {
"doctrine/cache": "^1.11 || ^2.0",
"doctrine/coding-standard": "^9 || ^10",
"phpstan/phpstan": "~1.4.10 || ^1.8.0",
"doctrine/cache": "^2.0",
"doctrine/coding-standard": "^10",
"phpstan/phpstan": "^1.8.0",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
"symfony/cache": "^4.4 || ^5.4 || ^6",
"symfony/cache": "^5.4 || ^6",
"vimeo/psalm": "^4.10"
},
"suggest": {
@@ -382,9 +382,9 @@
],
"support": {
"issues": "https://github.com/doctrine/annotations/issues",
"source": "https://github.com/doctrine/annotations/tree/1.14.2"
"source": "https://github.com/doctrine/annotations/tree/2.0.0"
},
"time": "2022-12-15T06:48:22+00:00"
"time": "2022-12-19T18:17:20+00:00"
},
{
"name": "doctrine/cache",
@@ -481,32 +481,34 @@
},
{
"name": "doctrine/collections",
"version": "1.8.0",
"version": "2.1.2",
"source": {
"type": "git",
"url": "https://github.com/doctrine/collections.git",
"reference": "2b44dd4cbca8b5744327de78bafef5945c7e7b5e"
"reference": "db8cda536a034337f7dd63febecc713d4957f9ee"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/collections/zipball/2b44dd4cbca8b5744327de78bafef5945c7e7b5e",
"reference": "2b44dd4cbca8b5744327de78bafef5945c7e7b5e",
"url": "https://api.github.com/repos/doctrine/collections/zipball/db8cda536a034337f7dd63febecc713d4957f9ee",
"reference": "db8cda536a034337f7dd63febecc713d4957f9ee",
"shasum": ""
},
"require": {
"doctrine/deprecations": "^0.5.3 || ^1",
"php": "^7.1.3 || ^8.0"
"doctrine/deprecations": "^1",
"php": "^8.1"
},
"require-dev": {
"doctrine/coding-standard": "^9.0 || ^10.0",
"phpstan/phpstan": "^1.4.8",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.1.5",
"doctrine/coding-standard": "^10.0",
"ext-json": "*",
"phpstan/phpstan": "^1.8",
"phpstan/phpstan-phpunit": "^1.0",
"phpunit/phpunit": "^9.5",
"vimeo/psalm": "^4.22"
},
"type": "library",
"autoload": {
"psr-4": {
"Doctrine\\Common\\Collections\\": "lib/Doctrine/Common/Collections"
"Doctrine\\Common\\Collections\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -545,9 +547,23 @@
],
"support": {
"issues": "https://github.com/doctrine/collections/issues",
"source": "https://github.com/doctrine/collections/tree/1.8.0"
"source": "https://github.com/doctrine/collections/tree/2.1.2"
},
"time": "2022-09-01T20:12:10+00:00"
"funding": [
{
"url": "https://www.doctrine-project.org/sponsorship.html",
"type": "custom"
},
{
"url": "https://www.patreon.com/phpdoctrine",
"type": "patreon"
},
{
"url": "https://tidelift.com/funding/github/packagist/doctrine%2Fcollections",
"type": "tidelift"
}
],
"time": "2022-12-27T23:41:38+00:00"
},
{
"name": "doctrine/common",
@@ -996,30 +1012,29 @@
},
{
"name": "doctrine/event-manager",
"version": "1.2.0",
"version": "2.0.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/event-manager.git",
"reference": "95aa4cb529f1e96576f3fda9f5705ada4056a520"
"reference": "750671534e0241a7c50ea5b43f67e23eb5c96f32"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine/event-manager/zipball/95aa4cb529f1e96576f3fda9f5705ada4056a520",
"reference": "95aa4cb529f1e96576f3fda9f5705ada4056a520",
"url": "https://api.github.com/repos/doctrine/event-manager/zipball/750671534e0241a7c50ea5b43f67e23eb5c96f32",
"reference": "750671534e0241a7c50ea5b43f67e23eb5c96f32",
"shasum": ""
},
"require": {
"doctrine/deprecations": "^0.5.3 || ^1",
"php": "^7.1 || ^8.0"
"php": "^8.1"
},
"conflict": {
"doctrine/common": "<2.9"
},
"require-dev": {
"doctrine/coding-standard": "^9 || ^10",
"phpstan/phpstan": "~1.4.10 || ^1.8.8",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
"vimeo/psalm": "^4.24"
"doctrine/coding-standard": "^10",
"phpstan/phpstan": "^1.8.8",
"phpunit/phpunit": "^9.5",
"vimeo/psalm": "^4.28"
},
"type": "library",
"autoload": {
@@ -1068,7 +1083,7 @@
],
"support": {
"issues": "https://github.com/doctrine/event-manager/issues",
"source": "https://github.com/doctrine/event-manager/tree/1.2.0"
"source": "https://github.com/doctrine/event-manager/tree/2.0.0"
},
"funding": [
{
@@ -1084,7 +1099,7 @@
"type": "tidelift"
}
],
"time": "2022-10-12T20:51:15+00:00"
"time": "2022-10-12T20:59:15+00:00"
},
{
"name": "doctrine/inflector",
@@ -1933,16 +1948,16 @@
},
{
"name": "friendsofphp/proxy-manager-lts",
"version": "v1.0.13",
"version": "v1.0.14",
"source": {
"type": "git",
"url": "https://github.com/FriendsOfPHP/proxy-manager-lts.git",
"reference": "88354616f4cf4f6620910fd035e282173ba453e8"
"reference": "a527c9d9d5348e012bd24482d83a5cd643bcbc9e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/FriendsOfPHP/proxy-manager-lts/zipball/88354616f4cf4f6620910fd035e282173ba453e8",
"reference": "88354616f4cf4f6620910fd035e282173ba453e8",
"url": "https://api.github.com/repos/FriendsOfPHP/proxy-manager-lts/zipball/a527c9d9d5348e012bd24482d83a5cd643bcbc9e",
"reference": "a527c9d9d5348e012bd24482d83a5cd643bcbc9e",
"shasum": ""
},
"require": {
@@ -1999,7 +2014,7 @@
],
"support": {
"issues": "https://github.com/FriendsOfPHP/proxy-manager-lts/issues",
"source": "https://github.com/FriendsOfPHP/proxy-manager-lts/tree/v1.0.13"
"source": "https://github.com/FriendsOfPHP/proxy-manager-lts/tree/v1.0.14"
},
"funding": [
{
@@ -2011,7 +2026,7 @@
"type": "tidelift"
}
],
"time": "2022-10-17T19:48:16+00:00"
"time": "2023-01-30T10:40:19+00:00"
},
{
"name": "friendsofsymfony/rest-bundle",
@@ -2121,28 +2136,29 @@
},
{
"name": "gedmo/doctrine-extensions",
"version": "v3.10.0",
"version": "v3.11.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine-extensions/DoctrineExtensions.git",
"reference": "5a956a448f67b917b05958429b224e8955dc9b8c"
"reference": "a2364710d2f367f74d9f041c3356f2929b8c6690"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/doctrine-extensions/DoctrineExtensions/zipball/5a956a448f67b917b05958429b224e8955dc9b8c",
"reference": "5a956a448f67b917b05958429b224e8955dc9b8c",
"url": "https://api.github.com/repos/doctrine-extensions/DoctrineExtensions/zipball/a2364710d2f367f74d9f041c3356f2929b8c6690",
"reference": "a2364710d2f367f74d9f041c3356f2929b8c6690",
"shasum": ""
},
"require": {
"behat/transliterator": "~1.2",
"doctrine/annotations": "^1.13",
"doctrine/collections": "^1.0",
"doctrine/annotations": "^1.13 || ^2.0",
"doctrine/collections": "^1.2 || ^2.0",
"doctrine/common": "^2.13 || ^3.0",
"doctrine/event-manager": "^1.2",
"doctrine/event-manager": "^1.2 || ^2.0",
"doctrine/persistence": "^2.2 || ^3.0",
"php": "^7.2 || ^8.0",
"psr/cache": "^1 || ^2 || ^3",
"symfony/cache": "^4.4 || ^5.3 || ^6.0"
"symfony/cache": "^4.4 || ^5.3 || ^6.0",
"symfony/deprecation-contracts": "^2.1 || ^3.0"
},
"conflict": {
"doctrine/cache": "<1.11",
@@ -2159,7 +2175,7 @@
"doctrine/orm": "^2.10.2",
"friendsofphp/php-cs-fixer": "^3.4.0,<3.10",
"nesbot/carbon": "^2.55",
"phpstan/phpstan": "^1.1",
"phpstan/phpstan": "^1.9",
"phpstan/phpstan-doctrine": "^1.0",
"phpstan/phpstan-phpunit": "^1.0",
"phpunit/phpunit": "^8.5 || ^9.5",
@@ -2175,7 +2191,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "3.11-dev"
"dev-main": "3.12-dev"
}
},
"autoload": {
@@ -2221,10 +2237,10 @@
"support": {
"email": "gediminas.morkevicius@gmail.com",
"issues": "https://github.com/doctrine-extensions/DoctrineExtensions/issues",
"source": "https://github.com/doctrine-extensions/DoctrineExtensions/tree/v3.10.0",
"source": "https://github.com/doctrine-extensions/DoctrineExtensions/tree/v3.11.0",
"wiki": "https://github.com/Atlantic18/DoctrineExtensions/tree/main/doc"
},
"time": "2022-11-14T20:25:40+00:00"
"time": "2023-01-26T00:14:07+00:00"
},
{
"name": "jeroendesloovere/vcard",
@@ -3349,20 +3365,20 @@
},
{
"name": "nelmio/api-doc-bundle",
"version": "v4.11.0",
"version": "v4.11.1",
"source": {
"type": "git",
"url": "https://github.com/nelmio/NelmioApiDocBundle.git",
"reference": "da9fd01e49b38a8cecefbf5628280e15538b32c7"
"reference": "d40c4eb0c090675f3685f75712af331f02924462"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/nelmio/NelmioApiDocBundle/zipball/da9fd01e49b38a8cecefbf5628280e15538b32c7",
"reference": "da9fd01e49b38a8cecefbf5628280e15538b32c7",
"url": "https://api.github.com/repos/nelmio/NelmioApiDocBundle/zipball/d40c4eb0c090675f3685f75712af331f02924462",
"reference": "d40c4eb0c090675f3685f75712af331f02924462",
"shasum": ""
},
"require": {
"doctrine/annotations": "^1.11",
"doctrine/annotations": "^1.11|^2.0",
"ext-json": "*",
"php": ">=7.2",
"phpdocumentor/reflection-docblock": "^3.1|^4.0|^5.0",
@@ -3455,9 +3471,9 @@
],
"support": {
"issues": "https://github.com/nelmio/NelmioApiDocBundle/issues",
"source": "https://github.com/nelmio/NelmioApiDocBundle/tree/v4.11.0"
"source": "https://github.com/nelmio/NelmioApiDocBundle/tree/v4.11.1"
},
"time": "2023-01-25T17:11:02+00:00"
"time": "2023-02-01T07:18:39+00:00"
},
{
"name": "nelmio/cors-bundle",
@@ -4236,16 +4252,16 @@
},
{
"name": "phpstan/phpdoc-parser",
"version": "1.15.3",
"version": "1.16.0",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpdoc-parser.git",
"reference": "61800f71a5526081d1b5633766aa88341f1ade76"
"reference": "57090cfccbfaa639e703c007486d605a6e80f56d"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/61800f71a5526081d1b5633766aa88341f1ade76",
"reference": "61800f71a5526081d1b5633766aa88341f1ade76",
"url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/57090cfccbfaa639e703c007486d605a6e80f56d",
"reference": "57090cfccbfaa639e703c007486d605a6e80f56d",
"shasum": ""
},
"require": {
@@ -4275,9 +4291,9 @@
"description": "PHPDoc parser with support for nullable, intersection and generic types",
"support": {
"issues": "https://github.com/phpstan/phpdoc-parser/issues",
"source": "https://github.com/phpstan/phpdoc-parser/tree/1.15.3"
"source": "https://github.com/phpstan/phpdoc-parser/tree/1.16.0"
},
"time": "2022-12-20T20:56:55+00:00"
"time": "2023-01-29T14:41:23+00:00"
},
{
"name": "psr/cache",
@@ -4736,7 +4752,7 @@
},
{
"name": "scheb/2fa-backup-code",
"version": "v6.5.0",
"version": "v6.6.0",
"source": {
"type": "git",
"url": "https://github.com/scheb/2fa-backup-code.git",
@@ -4779,22 +4795,22 @@
"two-step"
],
"support": {
"source": "https://github.com/scheb/2fa-backup-code/tree/v6.5.0"
"source": "https://github.com/scheb/2fa-backup-code/tree/v6.6.0"
},
"time": "2022-12-10T15:20:09+00:00"
},
{
"name": "scheb/2fa-bundle",
"version": "v6.5.0",
"version": "v6.6.0",
"source": {
"type": "git",
"url": "https://github.com/scheb/2fa-bundle.git",
"reference": "83723df99a429e2ab42b6e821e5e6fc5b52bd7a6"
"reference": "4f8e9e87f90cf50c72b0857ea2b88453cf1d2446"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/scheb/2fa-bundle/zipball/83723df99a429e2ab42b6e821e5e6fc5b52bd7a6",
"reference": "83723df99a429e2ab42b6e821e5e6fc5b52bd7a6",
"url": "https://api.github.com/repos/scheb/2fa-bundle/zipball/4f8e9e87f90cf50c72b0857ea2b88453cf1d2446",
"reference": "4f8e9e87f90cf50c72b0857ea2b88453cf1d2446",
"shasum": ""
},
"require": {
@@ -4846,13 +4862,13 @@
"two-step"
],
"support": {
"source": "https://github.com/scheb/2fa-bundle/tree/v6.5.0"
"source": "https://github.com/scheb/2fa-bundle/tree/v6.6.0"
},
"time": "2022-12-10T15:20:09+00:00"
"time": "2023-01-26T18:47:22+00:00"
},
{
"name": "scheb/2fa-totp",
"version": "v6.5.0",
"version": "v6.6.0",
"source": {
"type": "git",
"url": "https://github.com/scheb/2fa-totp.git",
@@ -4897,7 +4913,7 @@
"two-step"
],
"support": {
"source": "https://github.com/scheb/2fa-totp/tree/v6.5.0"
"source": "https://github.com/scheb/2fa-totp/tree/v6.6.0"
},
"time": "2022-12-10T15:20:09+00:00"
},
@@ -5540,16 +5556,16 @@
},
{
"name": "symfony/dependency-injection",
"version": "v6.2.5",
"version": "v6.2.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/dependency-injection.git",
"reference": "6abd5658d0f7fea98f882a911bfdb8795d189509"
"reference": "2a6dd148589b9db59717db8b75f8d9fbb2ae714f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/dependency-injection/zipball/6abd5658d0f7fea98f882a911bfdb8795d189509",
"reference": "6abd5658d0f7fea98f882a911bfdb8795d189509",
"url": "https://api.github.com/repos/symfony/dependency-injection/zipball/2a6dd148589b9db59717db8b75f8d9fbb2ae714f",
"reference": "2a6dd148589b9db59717db8b75f8d9fbb2ae714f",
"shasum": ""
},
"require": {
@@ -5607,7 +5623,7 @@
"description": "Allows you to standardize and centralize the way objects are constructed in your application",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/dependency-injection/tree/v6.2.5"
"source": "https://github.com/symfony/dependency-injection/tree/v6.2.6"
},
"funding": [
{
@@ -5623,7 +5639,7 @@
"type": "tidelift"
}
],
"time": "2023-01-23T15:50:11+00:00"
"time": "2023-01-30T15:46:28+00:00"
},
{
"name": "symfony/deprecation-contracts",
@@ -6626,16 +6642,16 @@
},
{
"name": "symfony/http-client",
"version": "v6.2.5",
"version": "v6.2.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-client.git",
"reference": "c5e5b772033eae96ae82f2190546399ad18c1373"
"reference": "6efa9a7521ab7d031a82cf0a759484d1b02a6ad9"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-client/zipball/c5e5b772033eae96ae82f2190546399ad18c1373",
"reference": "c5e5b772033eae96ae82f2190546399ad18c1373",
"url": "https://api.github.com/repos/symfony/http-client/zipball/6efa9a7521ab7d031a82cf0a759484d1b02a6ad9",
"reference": "6efa9a7521ab7d031a82cf0a759484d1b02a6ad9",
"shasum": ""
},
"require": {
@@ -6691,7 +6707,7 @@
"description": "Provides powerful methods to fetch HTTP resources synchronously or asynchronously",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/http-client/tree/v6.2.5"
"source": "https://github.com/symfony/http-client/tree/v6.2.6"
},
"funding": [
{
@@ -6707,7 +6723,7 @@
"type": "tidelift"
}
],
"time": "2023-01-13T08:35:57+00:00"
"time": "2023-01-30T15:46:28+00:00"
},
{
"name": "symfony/http-client-contracts",
@@ -6792,16 +6808,16 @@
},
{
"name": "symfony/http-foundation",
"version": "v6.2.5",
"version": "v6.2.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-foundation.git",
"reference": "9d081ead9d3432e2e8002178d14c4c9dd4b8ffbf"
"reference": "e8dd1f502bc2b3371d05092aa233b064b03ce7ed"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/9d081ead9d3432e2e8002178d14c4c9dd4b8ffbf",
"reference": "9d081ead9d3432e2e8002178d14c4c9dd4b8ffbf",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/e8dd1f502bc2b3371d05092aa233b064b03ce7ed",
"reference": "e8dd1f502bc2b3371d05092aa233b064b03ce7ed",
"shasum": ""
},
"require": {
@@ -6850,7 +6866,7 @@
"description": "Defines an object-oriented layer for the HTTP specification",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/http-foundation/tree/v6.2.5"
"source": "https://github.com/symfony/http-foundation/tree/v6.2.6"
},
"funding": [
{
@@ -6866,20 +6882,20 @@
"type": "tidelift"
}
],
"time": "2023-01-01T08:38:09+00:00"
"time": "2023-01-30T15:46:28+00:00"
},
{
"name": "symfony/http-kernel",
"version": "v6.2.5",
"version": "v6.2.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/http-kernel.git",
"reference": "f68aaa11eee6b21c99bce0f3d98815924888fe62"
"reference": "7122db07b0d8dbf0de682267c84217573aee3ea7"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/f68aaa11eee6b21c99bce0f3d98815924888fe62",
"reference": "f68aaa11eee6b21c99bce0f3d98815924888fe62",
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/7122db07b0d8dbf0de682267c84217573aee3ea7",
"reference": "7122db07b0d8dbf0de682267c84217573aee3ea7",
"shasum": ""
},
"require": {
@@ -6961,7 +6977,7 @@
"description": "Provides a structured process for converting a Request into a Response",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/http-kernel/tree/v6.2.5"
"source": "https://github.com/symfony/http-kernel/tree/v6.2.6"
},
"funding": [
{
@@ -6977,7 +6993,7 @@
"type": "tidelift"
}
],
"time": "2023-01-24T15:33:24+00:00"
"time": "2023-02-01T08:32:25+00:00"
},
{
"name": "symfony/intl",
@@ -8281,16 +8297,16 @@
},
{
"name": "symfony/security-bundle",
"version": "v6.2.5",
"version": "v6.2.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/security-bundle.git",
"reference": "2f7f0b79b2acb6f497e8a8f24ff86a5d7e36170f"
"reference": "f3feb140c13015adecbeb51d49e45256aaf8a140"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/security-bundle/zipball/2f7f0b79b2acb6f497e8a8f24ff86a5d7e36170f",
"reference": "2f7f0b79b2acb6f497e8a8f24ff86a5d7e36170f",
"url": "https://api.github.com/repos/symfony/security-bundle/zipball/f3feb140c13015adecbeb51d49e45256aaf8a140",
"reference": "f3feb140c13015adecbeb51d49e45256aaf8a140",
"shasum": ""
},
"require": {
@@ -8305,7 +8321,7 @@
"symfony/password-hasher": "^5.4|^6.0",
"symfony/security-core": "^6.2",
"symfony/security-csrf": "^5.4|^6.0",
"symfony/security-http": "^6.2"
"symfony/security-http": "^6.2.6"
},
"conflict": {
"symfony/browser-kit": "<5.4",
@@ -8361,7 +8377,7 @@
"description": "Provides a tight integration of the Security component into the Symfony full-stack framework",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/security-bundle/tree/v6.2.5"
"source": "https://github.com/symfony/security-bundle/tree/v6.2.6"
},
"funding": [
{
@@ -8377,7 +8393,7 @@
"type": "tidelift"
}
],
"time": "2023-01-13T09:31:36+00:00"
"time": "2023-01-30T15:46:28+00:00"
},
{
"name": "symfony/security-core",
@@ -8543,16 +8559,16 @@
},
{
"name": "symfony/security-http",
"version": "v6.2.5",
"version": "v6.2.6",
"source": {
"type": "git",
"url": "https://github.com/symfony/security-http.git",
"reference": "5c8f064e34f3a320ab02874bdc4591197ba05b20"
"reference": "77c95eada3e3f0bf3a50f89817a18819b357376e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/security-http/zipball/5c8f064e34f3a320ab02874bdc4591197ba05b20",
"reference": "5c8f064e34f3a320ab02874bdc4591197ba05b20",
"url": "https://api.github.com/repos/symfony/security-http/zipball/77c95eada3e3f0bf3a50f89817a18819b357376e",
"reference": "77c95eada3e3f0bf3a50f89817a18819b357376e",
"shasum": ""
},
"require": {
@@ -8608,7 +8624,7 @@
"description": "Symfony Security Component - HTTP Integration",
"homepage": "https://symfony.com",
"support": {
"source": "https://github.com/symfony/security-http/tree/v6.2.5"
"source": "https://github.com/symfony/security-http/tree/v6.2.6"
},
"funding": [
{
@@ -8624,7 +8640,7 @@
"type": "tidelift"
}
],
"time": "2023-01-24T13:16:10+00:00"
"time": "2023-01-30T15:46:28+00:00"
},
{
"name": "symfony/serializer",
@@ -10931,22 +10947,23 @@
},
{
"name": "friendsofphp/php-cs-fixer",
"version": "v3.13.2",
"version": "v3.14.3",
"source": {
"type": "git",
"url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git",
"reference": "3952f08a81bd3b1b15e11c3de0b6bf037faa8496"
"reference": "b418036b95b4936a33fe906245d3044395935e73"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/3952f08a81bd3b1b15e11c3de0b6bf037faa8496",
"reference": "3952f08a81bd3b1b15e11c3de0b6bf037faa8496",
"url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/b418036b95b4936a33fe906245d3044395935e73",
"reference": "b418036b95b4936a33fe906245d3044395935e73",
"shasum": ""
},
"require": {
"composer/semver": "^3.2",
"composer/semver": "^3.3",
"composer/xdebug-handler": "^3.0.3",
"doctrine/annotations": "^1.13",
"doctrine/annotations": "^2",
"doctrine/lexer": "^2 || ^3",
"ext-json": "*",
"ext-tokenizer": "*",
"php": "^7.4 || ^8.0",
@@ -10956,26 +10973,26 @@
"symfony/filesystem": "^5.4 || ^6.0",
"symfony/finder": "^5.4 || ^6.0",
"symfony/options-resolver": "^5.4 || ^6.0",
"symfony/polyfill-mbstring": "^1.23",
"symfony/polyfill-php80": "^1.25",
"symfony/polyfill-php81": "^1.25",
"symfony/polyfill-mbstring": "^1.27",
"symfony/polyfill-php80": "^1.27",
"symfony/polyfill-php81": "^1.27",
"symfony/process": "^5.4 || ^6.0",
"symfony/stopwatch": "^5.4 || ^6.0"
},
"require-dev": {
"justinrainbow/json-schema": "^5.2",
"keradus/cli-executor": "^2.0",
"mikey179/vfsstream": "^1.6.10",
"php-coveralls/php-coveralls": "^2.5.2",
"mikey179/vfsstream": "^1.6.11",
"php-coveralls/php-coveralls": "^2.5.3",
"php-cs-fixer/accessible-object": "^1.1",
"php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2",
"php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1",
"phpspec/prophecy": "^1.15",
"phpspec/prophecy": "^1.16",
"phpspec/prophecy-phpunit": "^2.0",
"phpunit/phpunit": "^9.5",
"phpunitgoodpractices/polyfill": "^1.6",
"phpunitgoodpractices/traits": "^1.9.2",
"symfony/phpunit-bridge": "^6.0",
"symfony/phpunit-bridge": "^6.2.3",
"symfony/yaml": "^5.4 || ^6.0"
},
"suggest": {
@@ -11008,7 +11025,7 @@
"description": "A tool to automatically fix PHP code style",
"support": {
"issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues",
"source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.13.2"
"source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.14.3"
},
"funding": [
{
@@ -11016,7 +11033,7 @@
"type": "github"
}
],
"time": "2023-01-02T23:53:50+00:00"
"time": "2023-01-30T00:24:29+00:00"
},
{
"name": "masterminds/html5",
@@ -11485,22 +11502,22 @@
},
{
"name": "phpstan/phpstan-symfony",
"version": "1.2.20",
"version": "1.2.22",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan-symfony.git",
"reference": "d89a521e7e31822409bf37f70691f7a12a6e7d76"
"reference": "cbf5b9ceadab8365ed46db42dcd23db1a4c26c93"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan-symfony/zipball/d89a521e7e31822409bf37f70691f7a12a6e7d76",
"reference": "d89a521e7e31822409bf37f70691f7a12a6e7d76",
"url": "https://api.github.com/repos/phpstan/phpstan-symfony/zipball/cbf5b9ceadab8365ed46db42dcd23db1a4c26c93",
"reference": "cbf5b9ceadab8365ed46db42dcd23db1a4c26c93",
"shasum": ""
},
"require": {
"ext-simplexml": "*",
"php": "^7.2 || ^8.0",
"phpstan/phpstan": "^1.9.1"
"phpstan/phpstan": "^1.9.4"
},
"conflict": {
"symfony/framework-bundle": "<3.0"
@@ -11550,22 +11567,22 @@
"description": "Symfony Framework extensions and rules for PHPStan",
"support": {
"issues": "https://github.com/phpstan/phpstan-symfony/issues",
"source": "https://github.com/phpstan/phpstan-symfony/tree/1.2.20"
"source": "https://github.com/phpstan/phpstan-symfony/tree/1.2.22"
},
"time": "2023-01-15T12:28:31+00:00"
"time": "2023-02-01T13:26:41+00:00"
},
{
"name": "phpunit/php-code-coverage",
"version": "9.2.23",
"version": "9.2.24",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
"reference": "9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c"
"reference": "2cf940ebc6355a9d430462811b5aaa308b174bed"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c",
"reference": "9f1f0f9a2fbb680b26d1cf9b61b6eac43a6e4e9c",
"url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2cf940ebc6355a9d430462811b5aaa308b174bed",
"reference": "2cf940ebc6355a9d430462811b5aaa308b174bed",
"shasum": ""
},
"require": {
@@ -11621,7 +11638,7 @@
],
"support": {
"issues": "https://github.com/sebastianbergmann/php-code-coverage/issues",
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.23"
"source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.24"
},
"funding": [
{
@@ -11629,7 +11646,7 @@
"type": "github"
}
],
"time": "2022-12-28T12:41:10+00:00"
"time": "2023-01-26T08:26:55+00:00"
},
{
"name": "phpunit/php-file-iterator",

View File

@@ -19,16 +19,17 @@ framework:
log: true
mailer:
# prevent that emails are sent out in dev systems
dsn: 'null://null'
dsn: '%env(MAILER_URL)%'
when@prod:
when@dev:
framework:
mailer:
dsn: '%env(MAILER_URL)%'
dsn: 'null://null'
when@test:
framework:
test: true
session:
storage_factory_id: session.storage.factory.mock_file
mailer:
dsn: 'null://null'

View File

@@ -29,14 +29,6 @@ when@dev:
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: info
channels: ["!event"]
# uncomment to get logging in your browser
# you may have to allow bigger header sizes in your Web server configuration
#firephp:
# type: firephp
# level: info
#chromephp:
# type: chromephp
# level: info
console:
type: console
process_psr_3_messages: false

View File

@@ -1,12 +1,18 @@
framework:
router:
utf8: true
strict_requirements: null
# Configure how to generate URLs in non-HTTP contexts, such as CLI commands.
# See https://symfony.com/doc/current/routing.html#generating-urls-in-commands
#default_uri: http://localhost
when@prod:
when@test:
framework:
router:
strict_requirements: null
strict_requirements: true
when@dev:
framework:
router:
strict_requirements: true

View File

@@ -8055,76 +8055,6 @@ parameters:
count: 1
path: src/Validator/Constraints/UserValidator.php
-
message: "#^Parameter \\#2 \\$subject \\(App\\\\Entity\\\\Activity\\) of method App\\\\Voter\\\\ActivityVoter\\:\\:supports\\(\\) should be contravariant with parameter \\$subject \\(mixed\\) of method Symfony\\\\Component\\\\Security\\\\Core\\\\Authorization\\\\Voter\\\\Voter\\:\\:supports\\(\\)$#"
count: 1
path: src/Voter/ActivityVoter.php
-
message: "#^Parameter \\#2 \\$subject \\(App\\\\Entity\\\\Activity\\) of method App\\\\Voter\\\\ActivityVoter\\:\\:voteOnAttribute\\(\\) should be contravariant with parameter \\$subject \\(mixed\\) of method Symfony\\\\Component\\\\Security\\\\Core\\\\Authorization\\\\Voter\\\\Voter\\:\\:voteOnAttribute\\(\\)$#"
count: 1
path: src/Voter/ActivityVoter.php
-
message: "#^Parameter \\#2 \\$subject \\(App\\\\Entity\\\\Customer\\) of method App\\\\Voter\\\\CustomerVoter\\:\\:supports\\(\\) should be contravariant with parameter \\$subject \\(mixed\\) of method Symfony\\\\Component\\\\Security\\\\Core\\\\Authorization\\\\Voter\\\\Voter\\:\\:supports\\(\\)$#"
count: 1
path: src/Voter/CustomerVoter.php
-
message: "#^Parameter \\#2 \\$subject \\(App\\\\Entity\\\\Customer\\) of method App\\\\Voter\\\\CustomerVoter\\:\\:voteOnAttribute\\(\\) should be contravariant with parameter \\$subject \\(mixed\\) of method Symfony\\\\Component\\\\Security\\\\Core\\\\Authorization\\\\Voter\\\\Voter\\:\\:voteOnAttribute\\(\\)$#"
count: 1
path: src/Voter/CustomerVoter.php
-
message: "#^Parameter \\#2 \\$subject \\(App\\\\Entity\\\\Activity\\|App\\\\Entity\\\\Customer\\|App\\\\Entity\\\\Project\\|string\\) of method App\\\\Voter\\\\EntityMultiRoleVoter\\:\\:supports\\(\\) should be contravariant with parameter \\$subject \\(mixed\\) of method Symfony\\\\Component\\\\Security\\\\Core\\\\Authorization\\\\Voter\\\\Voter\\:\\:supports\\(\\)$#"
count: 1
path: src/Voter/EntityMultiRoleVoter.php
-
message: "#^Parameter \\#2 \\$subject \\(App\\\\Entity\\\\Activity\\|App\\\\Entity\\\\Customer\\|App\\\\Entity\\\\Project\\|string\\) of method App\\\\Voter\\\\EntityMultiRoleVoter\\:\\:voteOnAttribute\\(\\) should be contravariant with parameter \\$subject \\(mixed\\) of method Symfony\\\\Component\\\\Security\\\\Core\\\\Authorization\\\\Voter\\\\Voter\\:\\:voteOnAttribute\\(\\)$#"
count: 1
path: src/Voter/EntityMultiRoleVoter.php
-
message: "#^Parameter \\#2 \\$subject \\(App\\\\Entity\\\\Project\\) of method App\\\\Voter\\\\ProjectVoter\\:\\:supports\\(\\) should be contravariant with parameter \\$subject \\(mixed\\) of method Symfony\\\\Component\\\\Security\\\\Core\\\\Authorization\\\\Voter\\\\Voter\\:\\:supports\\(\\)$#"
count: 1
path: src/Voter/ProjectVoter.php
-
message: "#^Parameter \\#2 \\$subject \\(App\\\\Entity\\\\Project\\) of method App\\\\Voter\\\\ProjectVoter\\:\\:voteOnAttribute\\(\\) should be contravariant with parameter \\$subject \\(mixed\\) of method Symfony\\\\Component\\\\Security\\\\Core\\\\Authorization\\\\Voter\\\\Voter\\:\\:voteOnAttribute\\(\\)$#"
count: 1
path: src/Voter/ProjectVoter.php
-
message: "#^Parameter \\#2 \\$subject \\(App\\\\Entity\\\\User\\) of method App\\\\Voter\\\\QuickEntryVoter\\:\\:voteOnAttribute\\(\\) should be contravariant with parameter \\$subject \\(mixed\\) of method Symfony\\\\Component\\\\Security\\\\Core\\\\Authorization\\\\Voter\\\\Voter\\:\\:voteOnAttribute\\(\\)$#"
count: 1
path: src/Voter/QuickEntryVoter.php
-
message: "#^Parameter \\#2 \\$subject \\(null\\) of method App\\\\Voter\\\\ReportingVoter\\:\\:supports\\(\\) should be contravariant with parameter \\$subject \\(mixed\\) of method Symfony\\\\Component\\\\Security\\\\Core\\\\Authorization\\\\Voter\\\\Voter\\:\\:supports\\(\\)$#"
count: 1
path: src/Voter/ReportingVoter.php
-
message: "#^Parameter \\#2 \\$subject \\(null\\) of method App\\\\Voter\\\\ReportingVoter\\:\\:voteOnAttribute\\(\\) should be contravariant with parameter \\$subject \\(mixed\\) of method Symfony\\\\Component\\\\Security\\\\Core\\\\Authorization\\\\Voter\\\\Voter\\:\\:voteOnAttribute\\(\\)$#"
count: 1
path: src/Voter/ReportingVoter.php
-
message: "#^Parameter \\#2 \\$subject \\(App\\\\Entity\\\\Activity\\) of method App\\\\Voter\\\\RolePermissionVoter\\:\\:voteOnAttribute\\(\\) should be contravariant with parameter \\$subject \\(mixed\\) of method Symfony\\\\Component\\\\Security\\\\Core\\\\Authorization\\\\Voter\\\\Voter\\:\\:voteOnAttribute\\(\\)$#"
count: 1
path: src/Voter/RolePermissionVoter.php
-
message: "#^Parameter \\#2 \\$subject \\(App\\\\Entity\\\\Team\\) of method App\\\\Voter\\\\TeamVoter\\:\\:supports\\(\\) should be contravariant with parameter \\$subject \\(mixed\\) of method Symfony\\\\Component\\\\Security\\\\Core\\\\Authorization\\\\Voter\\\\Voter\\:\\:supports\\(\\)$#"
count: 1
path: src/Voter/TeamVoter.php
-
message: "#^Parameter \\#2 \\$subject \\(App\\\\Entity\\\\Team\\) of method App\\\\Voter\\\\TeamVoter\\:\\:voteOnAttribute\\(\\) should be contravariant with parameter \\$subject \\(mixed\\) of method Symfony\\\\Component\\\\Security\\\\Core\\\\Authorization\\\\Voter\\\\Voter\\:\\:voteOnAttribute\\(\\)$#"
count: 1
path: src/Voter/TeamVoter.php
-
message: "#^Cannot call method getId\\(\\) on App\\\\Entity\\\\User\\|null\\.$#"
count: 1
@@ -8135,16 +8065,6 @@ parameters:
count: 1
path: src/Voter/TimesheetVoter.php
-
message: "#^Parameter \\#2 \\$subject \\(App\\\\Entity\\\\Timesheet\\) of method App\\\\Voter\\\\TimesheetVoter\\:\\:voteOnAttribute\\(\\) should be contravariant with parameter \\$subject \\(mixed\\) of method Symfony\\\\Component\\\\Security\\\\Core\\\\Authorization\\\\Voter\\\\Voter\\:\\:voteOnAttribute\\(\\)$#"
count: 1
path: src/Voter/TimesheetVoter.php
-
message: "#^Parameter \\#2 \\$subject \\(App\\\\Entity\\\\User\\) of method App\\\\Voter\\\\UserVoter\\:\\:voteOnAttribute\\(\\) should be contravariant with parameter \\$subject \\(mixed\\) of method Symfony\\\\Component\\\\Security\\\\Core\\\\Authorization\\\\Voter\\\\Voter\\:\\:voteOnAttribute\\(\\)$#"
count: 1
path: src/Voter/UserVoter.php
-
message: "#^Cannot access offset 'billable' on mixed\\.$#"
count: 1

View File

@@ -9,9 +9,6 @@
namespace App\Configuration;
/**
* @CloudRequired
*/
final class SamlConfiguration implements SamlConfigurationInterface
{
public function __construct(private SystemConfiguration $configuration)
@@ -35,22 +32,17 @@ final class SamlConfiguration implements SamlConfigurationInterface
public function getAttributeMapping(): array
{
return $this->configuration->findArray('saml.mapping');
return $this->configuration->getSamlAttributeMapping();
}
public function getRolesAttribute(): ?string
{
$attr = $this->configuration->find('saml.roles.attribute');
if (empty($attr)) {
return null;
}
return (string) $attr;
return $this->configuration->getSamlRolesAttribute();
}
public function getRolesMapping(): array
{
return $this->configuration->findArray('saml.roles.mapping');
return $this->configuration->getSamlRolesMapping();
}
public function isRolesResetOnLogin(): bool
@@ -60,6 +52,6 @@ final class SamlConfiguration implements SamlConfigurationInterface
public function getConnection(): array
{
return $this->configuration->findArray('saml.connection');
return $this->configuration->getSamlConnection();
}
}

View File

@@ -9,12 +9,32 @@
namespace App\Configuration;
/**
* @CloudRequired
*/
interface SamlConfigurationInterface
{
/**
* Whether SAML login is activated.
*
* @return bool
*/
public function isActivated(): bool;
/**
* Returns the title that is exclusively used in the frontend.
* Currently, used to display the button in the login screen.
*
* @return string
*/
public function getTitle(): string;
/**
* Returns the provider name that is exclusively used in the frontend.
* Currently, used to display an icon in the login screen.
*
* @return string
*/
public function getProvider(): string;
public function getAttributeMapping(): array;

View File

@@ -218,6 +218,40 @@ final class SystemConfiguration
return (bool) $this->find('saml.roles.resetOnLogin');
}
/**
* @return array<mixed>
*/
public function getSamlRolesMapping(): array
{
return $this->findArray('saml.roles.mapping');
}
/**
* @return array<mixed>
*/
public function getSamlConnection(): array
{
return $this->findArray('saml.connection');
}
/**
* @return array<mixed>
*/
public function getSamlAttributeMapping(): array
{
return $this->findArray('saml.mapping');
}
public function getSamlRolesAttribute(): ?string
{
$attr = $this->find('saml.roles.attribute');
if (empty($attr)) {
return null;
}
return (string) $attr;
}
public function isLdapActive(): bool
{
return (bool) $this->find('ldap.activate');

View File

@@ -9,7 +9,7 @@
namespace App\Saml;
use App\Configuration\SamlConfiguration;
use App\Configuration\SamlConfigurationInterface;
use App\Saml\Security\SamlAuthenticationFailureHandler;
use App\Saml\Security\SamlAuthenticationSuccessHandler;
use Symfony\Component\HttpFoundation\Request;
@@ -40,7 +40,7 @@ class SamlAuthenticator extends AbstractAuthenticator
private SamlAuthenticationFailureHandler $failureHandler,
private SamlAuthFactory $samlAuthFactory,
private SamlProvider $samlProvider,
private SamlConfiguration $configuration
private SamlConfigurationInterface $configuration
) {
}

View File

@@ -18,6 +18,8 @@ use Symfony\Component\Security\Core\Authorization\Voter\Voter;
/**
* A voter to check permissions on Activities.
*
* @extends Voter<string, Activity>
*/
final class ActivityVoter extends Voter
{
@@ -37,11 +39,6 @@ final class ActivityVoter extends Voter
{
}
/**
* @param string $attribute
* @param Activity $subject
* @return bool
*/
protected function supports(string $attribute, mixed $subject): bool
{
if (!($subject instanceof Activity)) {
@@ -55,12 +52,6 @@ final class ActivityVoter extends Voter
return true;
}
/**
* @param string $attribute
* @param Activity $subject
* @param TokenInterface $token
* @return bool
*/
protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token): bool
{
$user = $token->getUser();

View File

@@ -18,6 +18,8 @@ use Symfony\Component\Security\Core\Authorization\Voter\Voter;
/**
* A voter to check authorization on Customers.
*
* @extends Voter<string, Customer>
*/
final class CustomerVoter extends Voter
{
@@ -41,11 +43,6 @@ final class CustomerVoter extends Voter
{
}
/**
* @param string $attribute
* @param Customer $subject
* @return bool
*/
protected function supports(string $attribute, mixed $subject): bool
{
if (!($subject instanceof Customer)) {
@@ -59,12 +56,6 @@ final class CustomerVoter extends Voter
return true;
}
/**
* @param string $attribute
* @param Customer $subject
* @param TokenInterface $token
* @return bool
*/
protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token): bool
{
$user = $token->getUser();

View File

@@ -17,6 +17,9 @@ use App\Security\RolePermissionManager;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Authorization\Voter\Voter;
/**
* @extends Voter<string, Activity|Project|Customer|string>
*/
final class EntityMultiRoleVoter extends Voter
{
/**
@@ -38,11 +41,6 @@ final class EntityMultiRoleVoter extends Voter
{
}
/**
* @param string $attribute
* @param Activity|Project|Customer|string $subject
* @return bool
*/
protected function supports(string $attribute, mixed $subject): bool
{
if (!\in_array($attribute, self::ALLOWED_ATTRIBUTES)) {
@@ -60,12 +58,6 @@ final class EntityMultiRoleVoter extends Voter
return false;
}
/**
* @param string $attribute
* @param Activity|Project|Customer|string $subject
* @param TokenInterface $token
* @return bool
*/
protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token): bool
{
$user = $token->getUser();

View File

@@ -18,6 +18,8 @@ use Symfony\Component\Security\Core\Authorization\Voter\Voter;
/**
* A voter to check permissions on Projects.
*
* @extends Voter<string, Project>
*/
final class ProjectVoter extends Voter
{
@@ -39,11 +41,6 @@ final class ProjectVoter extends Voter
{
}
/**
* @param string $attribute
* @param Project $subject
* @return bool
*/
protected function supports(string $attribute, mixed $subject): bool
{
if (!($subject instanceof Project)) {
@@ -57,12 +54,6 @@ final class ProjectVoter extends Voter
return true;
}
/**
* @param string $attribute
* @param Project $subject
* @param TokenInterface $token
* @return bool
*/
protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token): bool
{
$user = $token->getUser();

View File

@@ -15,28 +15,20 @@ use App\Timesheet\TrackingModeService;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Authorization\Voter\Voter;
/**
* @extends Voter<string, mixed>
*/
final class QuickEntryVoter extends Voter
{
public function __construct(private RolePermissionManager $permissionManager, private TrackingModeService $trackingModeService)
{
}
/**
* @param string $attribute
* @param mixed $subject
* @return bool
*/
protected function supports(string $attribute, mixed $subject): bool
{
return 'quick-entry' === $attribute;
}
/**
* @param string $attribute
* @param User $subject
* @param TokenInterface $token
* @return bool
*/
protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token): bool
{
$user = $token->getUser();

View File

@@ -14,6 +14,9 @@ use App\Security\RolePermissionManager;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Authorization\Voter\Voter;
/**
* @extends Voter<string, null>
*/
final class ReportingVoter extends Voter
{
private const ALLOWED_ATTRIBUTES = [
@@ -27,22 +30,11 @@ final class ReportingVoter extends Voter
{
}
/**
* @param string $attribute
* @param null $subject
* @return bool
*/
protected function supports(string $attribute, mixed $subject): bool
{
return $subject === null && \in_array($attribute, self::ALLOWED_ATTRIBUTES);
}
/**
* @param string $attribute
* @param null $subject
* @param TokenInterface $token
* @return bool
*/
protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token): bool
{
$user = $token->getUser();

View File

@@ -9,7 +9,6 @@
namespace App\Voter;
use App\Entity\Activity;
use App\Entity\User;
use App\Security\RolePermissionManager;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
@@ -17,6 +16,8 @@ use Symfony\Component\Security\Core\Authorization\Voter\Voter;
/**
* A voter to check the free-configurable permission from "kimai.permissions".
*
* @extends Voter<string, null>
*/
final class RolePermissionVoter extends Voter
{
@@ -24,11 +25,6 @@ final class RolePermissionVoter extends Voter
{
}
/**
* @param string $attribute
* @param mixed $subject
* @return bool
*/
protected function supports(string $attribute, mixed $subject): bool
{
// we only work on single strings that have no subject
@@ -39,12 +35,6 @@ final class RolePermissionVoter extends Voter
return $this->permissionManager->isRegisteredPermission($attribute);
}
/**
* @param string $attribute
* @param Activity $subject
* @param TokenInterface $token
* @return bool
*/
protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token): bool
{
$user = $token->getUser();

View File

@@ -15,6 +15,9 @@ use App\Security\RolePermissionManager;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Authorization\Voter\Voter;
/**
* @extends Voter<string, Team>
*/
final class TeamVoter extends Voter
{
/**
@@ -30,11 +33,6 @@ final class TeamVoter extends Voter
{
}
/**
* @param string $attribute
* @param Team $subject
* @return bool
*/
protected function supports(string $attribute, mixed $subject): bool
{
if (!($subject instanceof Team)) {
@@ -48,12 +46,6 @@ final class TeamVoter extends Voter
return true;
}
/**
* @param string $attribute
* @param Team $subject
* @param TokenInterface $token
* @return bool
*/
protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token): bool
{
$user = $token->getUser();

View File

@@ -18,6 +18,8 @@ use Symfony\Component\Security\Core\Authorization\Voter\Voter;
/**
* A voter to check permissions on Timesheets.
*
* @extends Voter<string, Timesheet>
*/
final class TimesheetVoter extends Voter
{
@@ -57,11 +59,6 @@ final class TimesheetVoter extends Voter
{
}
/**
* @param string $attribute
* @param mixed $subject
* @return bool
*/
protected function supports(string $attribute, mixed $subject): bool
{
if (!($subject instanceof Timesheet)) {
@@ -75,12 +72,6 @@ final class TimesheetVoter extends Voter
return true;
}
/**
* @param string $attribute
* @param Timesheet $subject
* @param TokenInterface $token
* @return bool
*/
protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token): bool
{
$user = $token->getUser();

View File

@@ -16,6 +16,8 @@ use Symfony\Component\Security\Core\Authorization\Voter\Voter;
/**
* A voter to check permissions on user profiles.
*
* @extends Voter<string, User>
*/
final class UserVoter extends Voter
{
@@ -37,11 +39,6 @@ final class UserVoter extends Voter
{
}
/**
* @param string $attribute
* @param mixed $subject
* @return bool
*/
protected function supports(string $attribute, mixed $subject): bool
{
if (!($subject instanceof User)) {
@@ -55,12 +52,6 @@ final class UserVoter extends Voter
return true;
}
/**
* @param string $attribute
* @param User $subject
* @param TokenInterface $token
* @return bool
*/
protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token): bool
{
$user = $token->getUser();

View File

@@ -110,38 +110,25 @@ abstract class ControllerBaseTest extends WebTestCase
protected function getClientForAuthenticatedUser(string $role = User::ROLE_USER): HttpKernelBrowser
{
switch ($role) {
case User::ROLE_SUPER_ADMIN:
$client = self::createClient([], [
'PHP_AUTH_USER' => UserFixtures::USERNAME_SUPER_ADMIN,
'PHP_AUTH_PW' => UserFixtures::DEFAULT_PASSWORD,
]);
break;
$username = match ($role) {
User::ROLE_SUPER_ADMIN => UserFixtures::USERNAME_SUPER_ADMIN,
User::ROLE_ADMIN => UserFixtures::USERNAME_ADMIN,
User::ROLE_TEAMLEAD => UserFixtures::USERNAME_TEAMLEAD,
User::ROLE_USER => UserFixtures::USERNAME_USER,
default => null,
};
case User::ROLE_ADMIN:
$client = self::createClient([], [
'PHP_AUTH_USER' => UserFixtures::USERNAME_ADMIN,
'PHP_AUTH_PW' => UserFixtures::DEFAULT_PASSWORD,
]);
break;
$client = static::createClient();
case User::ROLE_TEAMLEAD:
$client = self::createClient([], [
'PHP_AUTH_USER' => UserFixtures::USERNAME_TEAMLEAD,
'PHP_AUTH_PW' => UserFixtures::DEFAULT_PASSWORD,
]);
break;
if ($username !== null) {
/** @var UserRepository $userRepository */
$userRepository = $this->getPrivateService(UserRepository::class);
$user = $userRepository->findByUsername($username);
if ($user === null) {
throw new \Exception('Unknown user: ' . $username);
}
case User::ROLE_USER:
$client = self::createClient([], [
'PHP_AUTH_USER' => UserFixtures::USERNAME_USER,
'PHP_AUTH_PW' => UserFixtures::DEFAULT_PASSWORD,
]);
break;
default:
$client = null;
break;
$client->loginUser($user, 'secured_area');
}
return $client;

View File

@@ -3047,11 +3047,6 @@ parameters:
count: 1
path: Controller/ControllerBaseTest.php
-
message: "#^Method App\\\\Tests\\\\Controller\\\\ControllerBaseTest\\:\\:getClientForAuthenticatedUser\\(\\) should return Symfony\\\\Component\\\\HttpKernel\\\\HttpKernelBrowser but returns Symfony\\\\Bundle\\\\FrameworkBundle\\\\KernelBrowser\\|null\\.$#"
count: 1
path: Controller/ControllerBaseTest.php
-
message: "#^Method App\\\\Tests\\\\Controller\\\\ControllerBaseTest\\:\\:importFixture\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1