Compare commits

..

No commits in common. "a9d0caad5f97530538059c913144c7520bb43399" and "919bf49ec111fbc3b848c6ed431603032638b99c" have entirely different histories.

8 changed files with 811 additions and 860 deletions

38
composer.lock generated
View file

@ -5000,16 +5000,16 @@
}, },
{ {
"name": "jbtronics/settings-bundle", "name": "jbtronics/settings-bundle",
"version": "v3.1.0", "version": "v3.0.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/jbtronics/settings-bundle.git", "url": "https://github.com/jbtronics/settings-bundle.git",
"reference": "7f19bac5a66533c6974948a484871087301b2a2e" "reference": "9103bd7f78f0b223d1c7167feb824004fc2a9f07"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/jbtronics/settings-bundle/zipball/7f19bac5a66533c6974948a484871087301b2a2e", "url": "https://api.github.com/repos/jbtronics/settings-bundle/zipball/9103bd7f78f0b223d1c7167feb824004fc2a9f07",
"reference": "7f19bac5a66533c6974948a484871087301b2a2e", "reference": "9103bd7f78f0b223d1c7167feb824004fc2a9f07",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -5070,7 +5070,7 @@
], ],
"support": { "support": {
"issues": "https://github.com/jbtronics/settings-bundle/issues", "issues": "https://github.com/jbtronics/settings-bundle/issues",
"source": "https://github.com/jbtronics/settings-bundle/tree/v3.1.0" "source": "https://github.com/jbtronics/settings-bundle/tree/v3.0.1"
}, },
"funding": [ "funding": [
{ {
@ -5082,7 +5082,7 @@
"type": "github" "type": "github"
} }
], ],
"time": "2025-09-19T06:54:58+00:00" "time": "2025-08-24T21:20:15+00:00"
}, },
{ {
"name": "jfcherng/php-color-output", "name": "jfcherng/php-color-output",
@ -20473,16 +20473,16 @@
}, },
{ {
"name": "sebastian/exporter", "name": "sebastian/exporter",
"version": "6.3.1", "version": "6.3.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git", "url": "https://github.com/sebastianbergmann/exporter.git",
"reference": "8f67e53d3fcaf53105f95cc14f1630493d0fa2e6" "reference": "3473f61172093b2da7de1fb5782e1f24cc036dc3"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/8f67e53d3fcaf53105f95cc14f1630493d0fa2e6", "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/3473f61172093b2da7de1fb5782e1f24cc036dc3",
"reference": "8f67e53d3fcaf53105f95cc14f1630493d0fa2e6", "reference": "3473f61172093b2da7de1fb5782e1f24cc036dc3",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -20496,7 +20496,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-main": "6.3-dev" "dev-main": "6.1-dev"
} }
}, },
"autoload": { "autoload": {
@ -20539,27 +20539,15 @@
"support": { "support": {
"issues": "https://github.com/sebastianbergmann/exporter/issues", "issues": "https://github.com/sebastianbergmann/exporter/issues",
"security": "https://github.com/sebastianbergmann/exporter/security/policy", "security": "https://github.com/sebastianbergmann/exporter/security/policy",
"source": "https://github.com/sebastianbergmann/exporter/tree/6.3.1" "source": "https://github.com/sebastianbergmann/exporter/tree/6.3.0"
}, },
"funding": [ "funding": [
{ {
"url": "https://github.com/sebastianbergmann", "url": "https://github.com/sebastianbergmann",
"type": "github" "type": "github"
},
{
"url": "https://liberapay.com/sebastianbergmann",
"type": "liberapay"
},
{
"url": "https://thanks.dev/u/gh/sebastianbergmann",
"type": "thanks_dev"
},
{
"url": "https://tidelift.com/funding/github/packagist/sebastian/exporter",
"type": "tidelift"
} }
], ],
"time": "2025-09-22T05:34:00+00:00" "time": "2024-12-05T09:17:50+00:00"
}, },
{ {
"name": "sebastian/global-state", "name": "sebastian/global-state",

View file

@ -1,33 +0,0 @@
<?php
/*
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
*
* Copyright (C) 2019 - 2025 Jan Böhmer (https://github.com/jbtronics)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
declare(strict_types=1);
/**
* This class extends the default doctrine ORM configuration to enable native lazy objects on PHP 8.4+.
* We have to do this in a PHP file, because the yaml file does not support conditionals on PHP version.
*/
return static function(\Symfony\Config\DoctrineConfig $doctrine) {
//On PHP 8.4+ we can use native lazy objects, which are much more efficient than proxies.
if (PHP_VERSION_ID >= 80400) {
$doctrine->orm()->enableNativeLazyObjects(true);
}
};

View file

@ -38,7 +38,7 @@ class EnforceEventCommentTypesType extends AbstractType
return EnumType::class; return EnumType::class;
} }
public function configureOptions(OptionsResolver $resolver): void public function configureOptions(OptionsResolver $resolver)
{ {
$resolver->setDefaults([ $resolver->setDefaults([
'multiple' => true, 'multiple' => true,
@ -46,4 +46,4 @@ class EnforceEventCommentTypesType extends AbstractType
'empty_data' => [], 'empty_data' => [],
]); ]);
} }
} }

View file

@ -44,10 +44,10 @@ class LocaleSelectType extends AbstractType
return LocaleType::class; return LocaleType::class;
} }
public function configureOptions(OptionsResolver $resolver): void public function configureOptions(OptionsResolver $resolver)
{ {
$resolver->setDefaults([ $resolver->setDefaults([
'preferred_choices' => $this->preferred_languages, 'preferred_choices' => $this->preferred_languages,
]); ]);
} }
} }

View file

@ -23,7 +23,6 @@ declare(strict_types=1);
namespace App\Security; namespace App\Security;
use App\Entity\UserSystem\User; use App\Entity\UserSystem\User;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Exception\AccountStatusException; use Symfony\Component\Security\Core\Exception\AccountStatusException;
use Symfony\Component\Security\Core\Exception\CustomUserMessageAccountStatusException; use Symfony\Component\Security\Core\Exception\CustomUserMessageAccountStatusException;
use Symfony\Component\Security\Core\User\UserCheckerInterface; use Symfony\Component\Security\Core\User\UserCheckerInterface;
@ -52,7 +51,7 @@ final class UserChecker implements UserCheckerInterface
* *
* @throws AccountStatusException * @throws AccountStatusException
*/ */
public function checkPostAuth(UserInterface $user, ?TokenInterface $token = null): void public function checkPostAuth(UserInterface $user): void
{ {
if (!$user instanceof User) { if (!$user instanceof User) {
return; return;

View file

@ -27,7 +27,6 @@ use App\Entity\ProjectSystem\Project;
use App\Entity\ProjectSystem\ProjectBOMEntry; use App\Entity\ProjectSystem\ProjectBOMEntry;
use Symfony\Bundle\SecurityBundle\Security; use Symfony\Bundle\SecurityBundle\Security;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Authorization\Voter\Vote;
use Symfony\Component\Security\Core\Authorization\Voter\Voter; use Symfony\Component\Security\Core\Authorization\Voter\Voter;
/** /**
@ -47,7 +46,7 @@ class BOMEntryVoter extends Voter
return $this->supportsAttribute($attribute) && is_a($subject, ProjectBOMEntry::class, true); return $this->supportsAttribute($attribute) && is_a($subject, ProjectBOMEntry::class, true);
} }
protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token, ?Vote $vote = null): bool protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token): bool
{ {
if (!is_a($subject, ProjectBOMEntry::class, true)) { if (!is_a($subject, ProjectBOMEntry::class, true)) {
return false; return false;
@ -88,4 +87,4 @@ class BOMEntryVoter extends Voter
{ {
return $subjectType === 'string' || is_a($subjectType, ProjectBOMEntry::class, true); return $subjectType === 'string' || is_a($subjectType, ProjectBOMEntry::class, true);
} }
} }

View file

@ -26,7 +26,6 @@ namespace App\Security\Voter;
use App\Services\UserSystem\PermissionManager; use App\Services\UserSystem\PermissionManager;
use App\Services\UserSystem\VoterHelper; use App\Services\UserSystem\VoterHelper;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Authorization\Voter\Vote;
use Symfony\Component\Security\Core\Authorization\Voter\Voter; use Symfony\Component\Security\Core\Authorization\Voter\Voter;
/** /**
@ -42,7 +41,7 @@ final class HasAccessPermissionsVoter extends Voter
{ {
} }
protected function voteOnAttribute(string $attribute, $subject, TokenInterface $token, ?Vote $vote = null): bool protected function voteOnAttribute(string $attribute, $subject, TokenInterface $token): bool
{ {
$user = $this->helper->resolveUser($token); $user = $this->helper->resolveUser($token);
return $this->permissionManager->hasAnyPermissionSetToAllowInherited($user); return $this->permissionManager->hasAnyPermissionSetToAllowInherited($user);
@ -57,4 +56,4 @@ final class HasAccessPermissionsVoter extends Voter
{ {
return $attribute === self::ROLE; return $attribute === self::ROLE;
} }
} }

1579
yarn.lock

File diff suppressed because it is too large Load diff