oliverde8 /
comfyBundle
| 1 | <?php |
||
| 2 | |||
| 3 | namespace oliverde8\ComfyBundle\Security; |
||
| 4 | |||
| 5 | use oliverde8\ComfyBundle\Model\Scope; |
||
| 6 | use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; |
||
|
0 ignored issues
–
show
|
|||
| 7 | use Symfony\Component\Security\Core\Authorization\Voter\Voter; |
||
|
0 ignored issues
–
show
The type
Symfony\Component\Securi...thorization\Voter\Voter was not found. Maybe you did not declare it correctly or list all dependencies?
The issue could also be caused by a filter entry in the build configuration.
If the path has been excluded in your configuration, e.g. filter:
dependency_paths: ["lib/*"]
For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths Loading history...
|
|||
| 8 | |||
| 9 | class ScopeVoter extends Voter |
||
| 10 | { |
||
| 11 | public const ACTION_VIEW = 'view'; |
||
| 12 | public const ACTION_EDIT = 'edit'; |
||
| 13 | |||
| 14 | protected function supports(string $attribute, mixed $subject): bool |
||
| 15 | { |
||
| 16 | if ($subject == Scope::class) { |
||
| 17 | return true; |
||
| 18 | } |
||
| 19 | |||
| 20 | if ($subject instanceof Scope) { |
||
| 21 | return true; |
||
| 22 | } |
||
| 23 | |||
| 24 | return false; |
||
| 25 | } |
||
| 26 | |||
| 27 | protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token): bool |
||
| 28 | { |
||
| 29 | return true; |
||
| 30 | } |
||
| 31 | } |
||
| 32 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths