Fix technical endpoints bug & mozart dependency

Also fix linter issues
This commit is contained in:
Julien Schneider 2023-01-26 17:23:23 +01:00
parent b509a277d5
commit 43c0cf0e7a
6 changed files with 639 additions and 910 deletions

View file

@ -29,7 +29,7 @@ lint:
composer install --prefer-dist
# Lint with CodeSniffer
vendor/bin/phpcs --standard=phpcs.xml src/
vendor/bin/phpcs --standard=phpcs.xml src/ --ignore=src/Vendor
.PHONY: api_test
api_test:

View file

@ -11,7 +11,8 @@
"ramsey/uuid": "^4.2",
"slim/psr7": "^1.5",
"php-di/php-di": "^6.3",
"firebase/php-jwt": "^6.3"
"firebase/php-jwt": "^6.3",
"coenjacobs/mozart": "^0.7.1"
},
"autoload": {
"psr-4": {
@ -36,8 +37,7 @@
],
"require-dev": {
"phpunit/phpunit": "^9.5",
"squizlabs/php_codesniffer": "^3.6",
"coenjacobs/mozart": "^0.7.1"
"squizlabs/php_codesniffer": "^3.6"
},
"extra": {
"mozart": {

1533
composer.lock generated

File diff suppressed because it is too large Load diff

View file

@ -29,7 +29,7 @@ class FilterParser
if (!isset($splitAttributePathFromFilterExpression[1]) || empty($splitAttributePathFromFilterExpression[1])) {
throw new FilterException("Incorrectly formatted AttributeExpression");
} else if (strcmp($splitAttributePathFromFilterExpression[1], "pr") === 0) {
} elseif (strcmp($splitAttributePathFromFilterExpression[1], "pr") === 0) {
$attributeExpression = new AttributeExpression(
$splitAttributePathFromFilterExpression[0], // The attribute path
"pr", // The comparison operator (which must be "pr" in this case)

View file

@ -10,7 +10,7 @@ use PDO;
abstract class Util
{
private static string $defaultConfigFilePath = __DIR__ . '/../../config/config.default.php';
private static string $customConfigFilePath;
private static string $customConfigFilePath = '';
public const USER_SCHEMA = "urn:ietf:params:scim:schemas:core:2.0:User";
public const ENTERPRISE_USER_SCHEMA = "urn:ietf:params:scim:schemas:extension:enterprise:2.0:User";
@ -353,6 +353,6 @@ abstract class Util
return null;
}
return $scimServiceProviderConfigurationFile;
return json_decode($scimServiceProviderConfigurationFile);
}
}