Skip to content

Commit

Permalink
Fix backend access voter and build tools (#269)
Browse files Browse the repository at this point in the history
  • Loading branch information
aschempp committed Aug 17, 2024
1 parent 150cab2 commit c7ab3a6
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 2 deletions.
10 changes: 10 additions & 0 deletions composer-dependency-analyser.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

use ShipMonk\ComposerDependencyAnalyser\Config\Configuration;
use ShipMonk\ComposerDependencyAnalyser\Config\ErrorType;

return (new Configuration())
// Optional integrations
->ignoreErrorsOnPackage('terminal42/contao-changelanguage', [ErrorType::DEV_DEPENDENCY_IN_PROD])
->ignoreErrorsOnPackage('terminal42/dc_multilingual', [ErrorType::DEV_DEPENDENCY_IN_PROD])
;
12 changes: 11 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,17 @@
"php": "^8.1",
"contao/core-bundle": "^5.1.9",
"contao/news-bundle": "^5.1.9",
"codefog/contao-haste": "^5.0"
"codefog/contao-haste": "^5.0",
"doctrine/dbal": "^3.0",
"symfony/config": "^6.0 || ^7.0",
"symfony/dependency-injection": "^6.0 || ^7.0",
"symfony/event-dispatcher": "^6.0 || ^7.0",
"symfony/http-foundation": "^6.0 || ^7.0",
"symfony/http-kernel": "^6.0 || ^7.0",
"symfony/security-bundle": "^6.0 || ^7.0",
"symfony/security-core": "^6.0 || ^7.0",
"symfony/service-contracts": "^3.0",
"symfony/translation-contracts": "^3.0"
},
"require-dev": {
"contao/manager-plugin": "^2.0",
Expand Down
3 changes: 3 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
parameters:
ignoreErrors:
- '#no value type specified in iterable type array#'
2 changes: 1 addition & 1 deletion src/Security/Voter/BackendAccessVoter.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function supportsType(string $subjectType): bool
return true;
}

public function vote(TokenInterface $token, mixed $subject, array $attributes)
public function vote(TokenInterface $token, mixed $subject, array $attributes): int
{
$user = $token->getUser();

Expand Down

0 comments on commit c7ab3a6

Please sign in to comment.