Webmozart\Assert\InvalidArgumentException {#1733
#message: "The content "430d549b-003f-4a11-b41a-318f9d3e502d" has an unexpected status ("published"); expected status is "pack""
#code: 0
#file: "/opt/project/vendor/webmozart/assert/src/Assert.php"
#line: 2338
trace: {
/opt/project/vendor/webmozart/assert/src/Assert.php:2338 {
Webmozart\Assert\Assert::reportInvalidArgument($message) …
› {
› throw new InvalidArgumentException($message);
› }
}
/opt/project/vendor/webmozart/assert/src/Assert.php:891 {
Webmozart\Assert\Assert::eq($value, $expect, $message = '') …
› if ($expect != $value) {
› static::reportInvalidArgument(\sprintf(
› $message ?: 'Expected a value equal to %2$s. Got: %s',
arguments: {
$message: "The content "430d549b-003f-4a11-b41a-318f9d3e502d" has an unexpected status ("published"); expected status is "pack""
}
}
/opt/project/src/Security/Voter/ContentEntity/ContentIsAccessibleVoter.php:68 {
App\Security\Voter\ContentEntity\ContentIsAccessibleVoter->voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token): bool …
› $loggerContext['voter_content_status_expected'] = $expectedStatus;
› Assert::eq($contentStatus, $expectedStatus, sprintf('The content "%s" has an unexpected status ("%s"); expected status is "%s"', $contentUuid, $contentStatus, $expectedStatus));
›
arguments: {
$value: "published"
$expect: "pack"
$message: "The content "430d549b-003f-4a11-b41a-318f9d3e502d" has an unexpected status ("published"); expected status is "pack""
}
}
/opt/project/vendor/symfony/security-core/Authorization/Voter/Voter.php:56 {
Symfony\Component\Security\Core\Authorization\Voter\Voter->vote(TokenInterface $token, mixed $subject, array $attributes): int …
›
› if ($this->voteOnAttribute($attribute, $subject, $token, $vote)) {
› // grant access as soon as at least one attribute returns a positive response
arguments: {
$attribute: "App\Security\Voter\ContentEntity\ContentIsAccessibleVoter"
$subject: App\Entity\ContentIllustrationEntity {#1238 …}
$token: Symfony\Component\Security\Core\Authentication\Token\NullToken {#729 …}
...: {
Symfony\Component\Security\Core\Authorization\Voter\Vote {#1732 …}
}
}
}
/opt/project/vendor/symfony/security-core/Authorization/AccessDecisionManager.php:89 {
Symfony\Component\Security\Core\Authorization\AccessDecisionManager->collectResults(TokenInterface $token, array $attributes, mixed $object, AccessDecision $accessDecision): Traversable …
› $vote = new Vote();
› $result = $voter->vote($token, $object, $attributes, $vote);
›
arguments: {
$token: Symfony\Component\Security\Core\Authentication\Token\NullToken {#729 …}
$subject: App\Entity\ContentIllustrationEntity {#1238 …}
$attributes: array:1 [ …1]
...: {
Symfony\Component\Security\Core\Authorization\Voter\Vote {#1732 …}
}
}
}
/opt/project/vendor/symfony/security-core/Authorization/Strategy/UnanimousStrategy.php:36 {
Symfony\Component\Security\Core\Authorization\Strategy\UnanimousStrategy->decide(Traversable $results, ?AccessDecision $accessDecision = null): bool …
› $grant = 0;
› foreach ($results as $result) {
› if (VoterInterface::ACCESS_DENIED === $result) {
arguments: {
$token: Symfony\Component\Security\Core\Authentication\Token\NullToken {#729 …}
$attributes: array:1 [ …1]
$object: App\Entity\ContentIllustrationEntity {#1238 …}
$accessDecision: Symfony\Component\Security\Core\Authorization\AccessDecision {#1661 …}
}
}
/opt/project/vendor/symfony/security-core/Authorization/AccessDecisionManager.php:73 {
Symfony\Component\Security\Core\Authorization\AccessDecisionManager->decide(TokenInterface $token, array $attributes, mixed $object = null, Symfony\Component\Security\Core\Authorization\AccessDecision|bool|null $accessDecision = null, bool $allowMultipleAttributes = false): bool …
› try {
› return $accessDecision->isGranted = $this->strategy->decide(
› $this->collectResults($token, $attributes, $object, $accessDecision),
arguments: {
$results: Generator {#1662 …}
$accessDecision: Symfony\Component\Security\Core\Authorization\AccessDecision {#1661 …}
}
}
/opt/project/vendor/symfony/security-core/Authorization/AuthorizationChecker.php:54 {
Symfony\Component\Security\Core\Authorization\AuthorizationChecker->isGranted(mixed $attribute, mixed $subject = null, ?AccessDecision $accessDecision = null): bool …
› try {
› return $accessDecision->isGranted = $this->accessDecisionManager->decide($token, [$attribute], $subject, $accessDecision);
› } finally {
arguments: {
$token: Symfony\Component\Security\Core\Authentication\Token\NullToken {#729 …}
$attributes: array:1 [ …1]
$object: App\Entity\ContentIllustrationEntity {#1238 …}
$accessDecision: Symfony\Component\Security\Core\Authorization\AccessDecision {#1661 …}
}
}
/opt/project/vendor/symfony/framework-bundle/Controller/AbstractController.php:209 {
Symfony\Bundle\FrameworkBundle\Controller\AbstractController->isGranted(mixed $attribute, mixed $subject = null): bool …
›
› return $this->container->get('security.authorization_checker')->isGranted($attribute, $subject);
› }
arguments: {
$attribute: "App\Security\Voter\ContentEntity\ContentIsAccessibleVoter"
$subject: App\Entity\ContentIllustrationEntity {#1238 …}
}
}
/opt/project/src/Controller/Web/Content/ContentController.php:114 {
App\Controller\Web\Content\ContentController->__invoke(Request $request, ?UserEntity $loggedInUser, ?ContentAbstractEntity $contentEntity, string $_route, int $page = 1): RedirectResponse|array …
› foreach ($contentsToCheck as $contentToCheck) {
› $contentIsAccessible = $this->isGranted(ContentIsAccessibleVoter::class, $contentToCheck);
› $contentNotDeletedOrDeletedButPurchased = $this->isGranted(ContentWasDeletedButPurchasedVoter::class, $contentToCheck);
arguments: {
$attribute: "App\Security\Voter\ContentEntity\ContentIsAccessibleVoter"
$subject: App\Entity\ContentIllustrationEntity {#1238 …}
}
}
/opt/project/vendor/symfony/http-kernel/HttpKernel.php:185 {
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Request $request, int $type = self::MAIN_REQUEST): Response …
› // call controller
› $response = $controller(...$arguments);
›
arguments: {
$request: Symfony\Component\HttpFoundation\Request {#5 …}
$loggedInUser: null
$contentEntity: App\Entity\ContentIllustrationEntity {#1238 …}
$_route: "content"
$page: 1
}
}
/opt/project/vendor/symfony/http-kernel/HttpKernel.php:76 {
Symfony\Component\HttpKernel\HttpKernel->handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true): Response …
› try {
› return $response = $this->handleRaw($request, $type);
› } catch (\Throwable $e) {
arguments: {
$request: Symfony\Component\HttpFoundation\Request {#5 …}
$type: 1
}
}
/opt/project/vendor/symfony/http-kernel/Kernel.php:193 {
Symfony\Component\HttpKernel\Kernel->handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true): Response …
› try {
› return $this->getHttpKernel()->handle($request, $type, $catch);
› } finally {
arguments: {
$request: Symfony\Component\HttpFoundation\Request {#5 …}
$type: 1
$catch: true
}
}
/opt/project/public/index.php:23 {
› $request = Request::createFromGlobals();
› $response = $kernel->handle($request);
› $response->send();
arguments: {
$request: Symfony\Component\HttpFoundation\Request {#5 …}
}
}
}
}
Redirecting to /
Redirecting to /.