diff --git a/src/Controller/AttachmentFileController.php b/src/Controller/AttachmentFileController.php index 952237d8..3d97efbd 100644 --- a/src/Controller/AttachmentFileController.php +++ b/src/Controller/AttachmentFileController.php @@ -106,10 +106,8 @@ class AttachmentFileController extends AbstractController /** * @Route("/attachment/list", name="attachment_list") - * - * @return JsonResponse|Response */ - public function attachmentsTable(Request $request, DataTableFactory $dataTableFactory, NodesListBuilder $nodesListBuilder) + public function attachmentsTable(Request $request, DataTableFactory $dataTableFactory, NodesListBuilder $nodesListBuilder): Response { $this->denyAccessUnlessGranted('@attachments.list_attachments'); diff --git a/src/Controller/LogController.php b/src/Controller/LogController.php index 91b37269..de5d3c17 100644 --- a/src/Controller/LogController.php +++ b/src/Controller/LogController.php @@ -64,9 +64,9 @@ class LogController extends AbstractController /** * @Route("/", name="log_view") * - * @return JsonResponse|Response + * @return Response */ - public function showLogs(Request $request, DataTableFactory $dataTable) + public function showLogs(Request $request, DataTableFactory $dataTable): Response { $this->denyAccessUnlessGranted('@system.show_logs'); diff --git a/src/Controller/PartListsController.php b/src/Controller/PartListsController.php index ab23c0f2..6e9bafdb 100644 --- a/src/Controller/PartListsController.php +++ b/src/Controller/PartListsController.php @@ -158,7 +158,7 @@ class PartListsController extends AbstractController * * @return JsonResponse|Response */ - public function showCategory(Category $category, Request $request) + public function showCategory(Category $category, Request $request): Response { $this->denyAccessUnlessGranted('@categories.read'); @@ -180,7 +180,7 @@ class PartListsController extends AbstractController * * @return JsonResponse|Response */ - public function showFootprint(Footprint $footprint, Request $request) + public function showFootprint(Footprint $footprint, Request $request): Response { $this->denyAccessUnlessGranted('@footprints.read'); @@ -202,7 +202,7 @@ class PartListsController extends AbstractController * * @return JsonResponse|Response */ - public function showManufacturer(Manufacturer $manufacturer, Request $request) + public function showManufacturer(Manufacturer $manufacturer, Request $request): Response { $this->denyAccessUnlessGranted('@manufacturers.read'); @@ -224,7 +224,7 @@ class PartListsController extends AbstractController * * @return JsonResponse|Response */ - public function showStorelocation(Storelocation $storelocation, Request $request) + public function showStorelocation(Storelocation $storelocation, Request $request): Response { $this->denyAccessUnlessGranted('@storelocations.read'); @@ -246,7 +246,7 @@ class PartListsController extends AbstractController * * @return JsonResponse|Response */ - public function showSupplier(Supplier $supplier, Request $request) + public function showSupplier(Supplier $supplier, Request $request): Response { $this->denyAccessUnlessGranted('@suppliers.read'); @@ -268,7 +268,7 @@ class PartListsController extends AbstractController * * @return JsonResponse|Response */ - public function showTag(string $tag, Request $request, DataTableFactory $dataTable) + public function showTag(string $tag, Request $request): Response { $tag = trim($tag); @@ -310,7 +310,7 @@ class PartListsController extends AbstractController * * @return JsonResponse|Response */ - public function showSearch(Request $request, DataTableFactory $dataTable) + public function showSearch(Request $request, DataTableFactory $dataTable): Response { $searchFilter = $this->searchRequestToFilter($request); @@ -331,9 +331,9 @@ class PartListsController extends AbstractController /** * @Route("/parts", name="parts_show_all") * - * @return JsonResponse|Response + * @return Response */ - public function showAll(Request $request, DataTableFactory $dataTable) + public function showAll(Request $request): Response { return $this->showListWithFilter($request,'parts/lists/all_list.html.twig'); } diff --git a/src/Controller/UserSettingsController.php b/src/Controller/UserSettingsController.php index 80353ac9..b4ac5953 100644 --- a/src/Controller/UserSettingsController.php +++ b/src/Controller/UserSettingsController.php @@ -225,7 +225,7 @@ class UserSettingsController extends AbstractController */ public function userSettings(Request $request, EntityManagerInterface $em, UserPasswordHasherInterface $passwordEncoder, GoogleAuthenticator $googleAuthenticator, BackupCodeManager $backupCodeManager, FormFactoryInterface $formFactory, UserAvatarHelper $avatarHelper) { - /** @var User */ + /** @var User $user */ $user = $this->getUser(); $page_need_reload = false; diff --git a/src/DataTables/Filters/Constraints/NumberConstraint.php b/src/DataTables/Filters/Constraints/NumberConstraint.php index e8382723..2f3bbda0 100644 --- a/src/DataTables/Filters/Constraints/NumberConstraint.php +++ b/src/DataTables/Filters/Constraints/NumberConstraint.php @@ -42,7 +42,7 @@ class NumberConstraint extends AbstractConstraint protected $value2; /** - * @var string The operator to use + * @var string|null The operator to use */ protected ?string $operator; diff --git a/src/DataTables/Filters/PartFilter.php b/src/DataTables/Filters/PartFilter.php index 14ab1a9c..bc925809 100644 --- a/src/DataTables/Filters/PartFilter.php +++ b/src/DataTables/Filters/PartFilter.php @@ -148,9 +148,9 @@ class PartFilter implements FilterInterface /** - * @return BooleanConstraint|false + * @return BooleanConstraint */ - public function getFavorite() + public function getFavorite(): BooleanConstraint { return $this->favorite; } diff --git a/src/Entity/Attachments/Attachment.php b/src/Entity/Attachments/Attachment.php index 98565fe9..442e1caf 100644 --- a/src/Entity/Attachments/Attachment.php +++ b/src/Entity/Attachments/Attachment.php @@ -116,7 +116,7 @@ abstract class Attachment extends AbstractNamedDBElement protected bool $show_in_table = false; /** - * @var AttachmentType + * @var AttachmentType|null * @ORM\ManyToOne(targetEntity="AttachmentType", inversedBy="attachments_with_type") * @ORM\JoinColumn(name="type_id", referencedColumnName="id", nullable=false) * @Selectable() diff --git a/src/Entity/Attachments/AttachmentTypeAttachment.php b/src/Entity/Attachments/AttachmentTypeAttachment.php index 2a21405c..8cc3e5d6 100644 --- a/src/Entity/Attachments/AttachmentTypeAttachment.php +++ b/src/Entity/Attachments/AttachmentTypeAttachment.php @@ -35,7 +35,7 @@ class AttachmentTypeAttachment extends Attachment { public const ALLOWED_ELEMENT_CLASS = AttachmentType::class; /** - * @var AttachmentType the element this attachment is associated with + * @var AttachmentContainingDBElement|null the element this attachment is associated with * @ORM\ManyToOne(targetEntity="App\Entity\Attachments\AttachmentType", inversedBy="attachments") * @ORM\JoinColumn(name="element_id", referencedColumnName="id", nullable=false, onDelete="CASCADE"). */ diff --git a/src/Entity/Attachments/CategoryAttachment.php b/src/Entity/Attachments/CategoryAttachment.php index e4d38137..b9945211 100644 --- a/src/Entity/Attachments/CategoryAttachment.php +++ b/src/Entity/Attachments/CategoryAttachment.php @@ -36,7 +36,7 @@ class CategoryAttachment extends Attachment { public const ALLOWED_ELEMENT_CLASS = Category::class; /** - * @var Category the element this attachment is associated with + * @var AttachmentContainingDBElement|null the element this attachment is associated with * @ORM\ManyToOne(targetEntity="App\Entity\Parts\Category", inversedBy="attachments") * @ORM\JoinColumn(name="element_id", referencedColumnName="id", nullable=false, onDelete="CASCADE"). */ diff --git a/src/Entity/Attachments/CurrencyAttachment.php b/src/Entity/Attachments/CurrencyAttachment.php index 73ad1145..ebfef170 100644 --- a/src/Entity/Attachments/CurrencyAttachment.php +++ b/src/Entity/Attachments/CurrencyAttachment.php @@ -36,7 +36,7 @@ class CurrencyAttachment extends Attachment { public const ALLOWED_ELEMENT_CLASS = Currency::class; /** - * @var Currency the element this attachment is associated with + * @var Currency|null the element this attachment is associated with * @ORM\ManyToOne(targetEntity="App\Entity\PriceInformations\Currency", inversedBy="attachments") * @ORM\JoinColumn(name="element_id", referencedColumnName="id", nullable=false, onDelete="CASCADE"). */ diff --git a/src/Entity/Attachments/FootprintAttachment.php b/src/Entity/Attachments/FootprintAttachment.php index 84ba3fb7..6d0e4608 100644 --- a/src/Entity/Attachments/FootprintAttachment.php +++ b/src/Entity/Attachments/FootprintAttachment.php @@ -36,7 +36,7 @@ class FootprintAttachment extends Attachment { public const ALLOWED_ELEMENT_CLASS = Footprint::class; /** - * @var Footprint the element this attachment is associated with + * @var Footprint|null the element this attachment is associated with * @ORM\ManyToOne(targetEntity="App\Entity\Parts\Footprint", inversedBy="attachments") * @ORM\JoinColumn(name="element_id", referencedColumnName="id", nullable=false, onDelete="CASCADE"). */ diff --git a/src/Entity/Attachments/GroupAttachment.php b/src/Entity/Attachments/GroupAttachment.php index e64c5745..babe85cf 100644 --- a/src/Entity/Attachments/GroupAttachment.php +++ b/src/Entity/Attachments/GroupAttachment.php @@ -35,8 +35,9 @@ use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; class GroupAttachment extends Attachment { public const ALLOWED_ELEMENT_CLASS = Group::class; + /** - * @var Group the element this attachment is associated with + * @var Group|null the element this attachment is associated with * @ORM\ManyToOne(targetEntity="App\Entity\UserSystem\Group", inversedBy="attachments") * @ORM\JoinColumn(name="element_id", referencedColumnName="id", nullable=false, onDelete="CASCADE"). */ diff --git a/src/Entity/Attachments/ManufacturerAttachment.php b/src/Entity/Attachments/ManufacturerAttachment.php index 0d113977..09aa79e7 100644 --- a/src/Entity/Attachments/ManufacturerAttachment.php +++ b/src/Entity/Attachments/ManufacturerAttachment.php @@ -35,8 +35,9 @@ use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; class ManufacturerAttachment extends Attachment { public const ALLOWED_ELEMENT_CLASS = Manufacturer::class; + /** - * @var Manufacturer the element this attachment is associated with + * @var Manufacturer|null the element this attachment is associated with * @ORM\ManyToOne(targetEntity="App\Entity\Parts\Manufacturer", inversedBy="attachments") * @ORM\JoinColumn(name="element_id", referencedColumnName="id", nullable=false, onDelete="CASCADE"). */ diff --git a/src/Entity/Attachments/MeasurementUnitAttachment.php b/src/Entity/Attachments/MeasurementUnitAttachment.php index 0c24f649..a0e9465c 100644 --- a/src/Entity/Attachments/MeasurementUnitAttachment.php +++ b/src/Entity/Attachments/MeasurementUnitAttachment.php @@ -37,7 +37,7 @@ class MeasurementUnitAttachment extends Attachment { public const ALLOWED_ELEMENT_CLASS = MeasurementUnit::class; /** - * @var Manufacturer the element this attachment is associated with + * @var Manufacturer|null the element this attachment is associated with * @ORM\ManyToOne(targetEntity="App\Entity\Parts\MeasurementUnit", inversedBy="attachments") * @ORM\JoinColumn(name="element_id", referencedColumnName="id", nullable=false, onDelete="CASCADE"). */ diff --git a/src/Entity/Attachments/ProjectAttachment.php b/src/Entity/Attachments/ProjectAttachment.php index 1fab6bc8..3f2d36d9 100644 --- a/src/Entity/Attachments/ProjectAttachment.php +++ b/src/Entity/Attachments/ProjectAttachment.php @@ -36,7 +36,7 @@ class ProjectAttachment extends Attachment { public const ALLOWED_ELEMENT_CLASS = Project::class; /** - * @var Project the element this attachment is associated with + * @var Project|null the element this attachment is associated with * @ORM\ManyToOne(targetEntity="App\Entity\ProjectSystem\Project", inversedBy="attachments") * @ORM\JoinColumn(name="element_id", referencedColumnName="id", nullable=false, onDelete="CASCADE"). */ diff --git a/src/Entity/Attachments/StorelocationAttachment.php b/src/Entity/Attachments/StorelocationAttachment.php index e2b9025a..53926156 100644 --- a/src/Entity/Attachments/StorelocationAttachment.php +++ b/src/Entity/Attachments/StorelocationAttachment.php @@ -35,8 +35,9 @@ use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; class StorelocationAttachment extends Attachment { public const ALLOWED_ELEMENT_CLASS = Storelocation::class; + /** - * @var Storelocation the element this attachment is associated with + * @var Storelocation|null the element this attachment is associated with * @ORM\ManyToOne(targetEntity="App\Entity\Parts\Storelocation", inversedBy="attachments") * @ORM\JoinColumn(name="element_id", referencedColumnName="id", nullable=false, onDelete="CASCADE"). */ diff --git a/src/Entity/Attachments/SupplierAttachment.php b/src/Entity/Attachments/SupplierAttachment.php index 59893b74..a6058ccc 100644 --- a/src/Entity/Attachments/SupplierAttachment.php +++ b/src/Entity/Attachments/SupplierAttachment.php @@ -35,8 +35,9 @@ use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; class SupplierAttachment extends Attachment { public const ALLOWED_ELEMENT_CLASS = Supplier::class; + /** - * @var Supplier the element this attachment is associated with + * @var Supplier|null the element this attachment is associated with * @ORM\ManyToOne(targetEntity="App\Entity\Parts\Supplier", inversedBy="attachments") * @ORM\JoinColumn(name="element_id", referencedColumnName="id", nullable=false, onDelete="CASCADE"). */ diff --git a/src/Entity/Attachments/UserAttachment.php b/src/Entity/Attachments/UserAttachment.php index 84a04c17..eeeff0b8 100644 --- a/src/Entity/Attachments/UserAttachment.php +++ b/src/Entity/Attachments/UserAttachment.php @@ -35,8 +35,9 @@ use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; class UserAttachment extends Attachment { public const ALLOWED_ELEMENT_CLASS = User::class; + /** - * @var User the element this attachment is associated with + * @var User|null the element this attachment is associated with * @ORM\ManyToOne(targetEntity="App\Entity\UserSystem\User", inversedBy="attachments") * @ORM\JoinColumn(name="element_id", referencedColumnName="id", nullable=false, onDelete="CASCADE"). */ diff --git a/src/Entity/Base/MasterAttachmentTrait.php b/src/Entity/Base/MasterAttachmentTrait.php index f9dd26aa..96890a8f 100644 --- a/src/Entity/Base/MasterAttachmentTrait.php +++ b/src/Entity/Base/MasterAttachmentTrait.php @@ -32,7 +32,7 @@ use Symfony\Component\Validator\Constraints as Assert; trait MasterAttachmentTrait { /** - * @var Attachment + * @var Attachment|null * @ORM\ManyToOne(targetEntity="App\Entity\Attachments\Attachment") * @ORM\JoinColumn(name="id_preview_attachment", referencedColumnName="id", onDelete="SET NULL", nullable=true) * @Assert\Expression("value == null or value.isPicture()", message="part.master_attachment.must_be_picture") diff --git a/src/Entity/LogSystem/AbstractLogEntry.php b/src/Entity/LogSystem/AbstractLogEntry.php index 13906da3..8055a383 100644 --- a/src/Entity/LogSystem/AbstractLogEntry.php +++ b/src/Entity/LogSystem/AbstractLogEntry.php @@ -142,7 +142,7 @@ abstract class AbstractLogEntry extends AbstractDBElement self::TARGET_TYPE_LABEL_PROFILE => LabelProfile::class, ]; - /** @var User The user which has caused this log entry + /** @var User|null The user which has caused this log entry * @ORM\ManyToOne(targetEntity="App\Entity\UserSystem\User", fetch="EAGER") * @ORM\JoinColumn(name="id_user", nullable=true, onDelete="SET NULL") */ diff --git a/src/Entity/Parts/Part.php b/src/Entity/Parts/Part.php index c345302c..4cbdb7a0 100644 --- a/src/Entity/Parts/Part.php +++ b/src/Entity/Parts/Part.php @@ -103,13 +103,13 @@ class Part extends AttachmentContainingDBElement protected $attachments; /** - * @var DateTime the date when this element was modified the last time + * @var DateTime|null the date when this element was modified the last time * @ORM\Column(type="datetime", name="last_modified", options={"default":"CURRENT_TIMESTAMP"}) */ protected ?DateTime $lastModified = null; /** - * @var Attachment + * @var Attachment|null * @ORM\ManyToOne(targetEntity="App\Entity\Attachments\Attachment") * @ORM\JoinColumn(name="id_preview_attachment", referencedColumnName="id", onDelete="SET NULL", nullable=true) * @Assert\Expression("value == null or value.isPicture()", message="part.master_attachment.must_be_picture") diff --git a/src/Entity/Parts/PartTraits/AdvancedPropertyTrait.php b/src/Entity/Parts/PartTraits/AdvancedPropertyTrait.php index 482004b0..50935fd3 100644 --- a/src/Entity/Parts/PartTraits/AdvancedPropertyTrait.php +++ b/src/Entity/Parts/PartTraits/AdvancedPropertyTrait.php @@ -55,7 +55,7 @@ trait AdvancedPropertyTrait protected ?float $mass = null; /** - * @var string The internal part number of the part + * @var string|null The internal part number of the part * @ORM\Column(type="string", length=100, nullable=true, unique=true) * @Assert\Length(max="100") * @Groups({"extended", "full", "import"}) diff --git a/src/Entity/Parts/PartTraits/BasicPropertyTrait.php b/src/Entity/Parts/PartTraits/BasicPropertyTrait.php index 0f88787f..32d364d6 100644 --- a/src/Entity/Parts/PartTraits/BasicPropertyTrait.php +++ b/src/Entity/Parts/PartTraits/BasicPropertyTrait.php @@ -59,7 +59,7 @@ trait BasicPropertyTrait protected bool $favorite = false; /** - * @var Category The category this part belongs too (e.g. Resistors). Use tags, for more complex grouping. + * @var Category|null The category this part belongs too (e.g. Resistors). Use tags, for more complex grouping. * Every part must have a category. * @ORM\ManyToOne(targetEntity="Category") * @ORM\JoinColumn(name="id_category", referencedColumnName="id", nullable=false) diff --git a/src/Entity/Parts/PartTraits/ManufacturerTrait.php b/src/Entity/Parts/PartTraits/ManufacturerTrait.php index d87e11cc..de4bd940 100644 --- a/src/Entity/Parts/PartTraits/ManufacturerTrait.php +++ b/src/Entity/Parts/PartTraits/ManufacturerTrait.php @@ -59,7 +59,7 @@ trait ManufacturerTrait protected string $manufacturer_product_number = ''; /** - * @var string The production status of this part. Can be one of the specified ones. + * @var string|null The production status of this part. Can be one of the specified ones. * @ORM\Column(type="string", length=255, nullable=true) * @Assert\Choice({"announced", "active", "nrfnd", "eol", "discontinued", ""}) * @Groups({"extended", "full", "import"}) diff --git a/src/Entity/Parts/PartTraits/OrderTrait.php b/src/Entity/Parts/PartTraits/OrderTrait.php index 79721443..c31d86f4 100644 --- a/src/Entity/Parts/PartTraits/OrderTrait.php +++ b/src/Entity/Parts/PartTraits/OrderTrait.php @@ -57,7 +57,7 @@ trait OrderTrait protected bool $manual_order = false; /** - * @var Orderdetail + * @var Orderdetail|null * @ORM\OneToOne(targetEntity="App\Entity\PriceInformations\Orderdetail") * @ORM\JoinColumn(name="order_orderdetails_id", referencedColumnName="id") */ diff --git a/src/Entity/PriceInformations/Orderdetail.php b/src/Entity/PriceInformations/Orderdetail.php index 82b59b1f..60f43ee9 100644 --- a/src/Entity/PriceInformations/Orderdetail.php +++ b/src/Entity/PriceInformations/Orderdetail.php @@ -82,7 +82,7 @@ class Orderdetail extends AbstractDBElement implements TimeStampableInterface, N protected string $supplier_product_url = ''; /** - * @var Part + * @var Part|null * @ORM\ManyToOne(targetEntity="App\Entity\Parts\Part", inversedBy="orderdetails") * @ORM\JoinColumn(name="part_id", referencedColumnName="id", nullable=false, onDelete="CASCADE") * @Assert\NotNull() @@ -90,7 +90,7 @@ class Orderdetail extends AbstractDBElement implements TimeStampableInterface, N protected ?Part $part = null; /** - * @var Supplier + * @var Supplier|null * @ORM\ManyToOne(targetEntity="App\Entity\Parts\Supplier", inversedBy="orderdetails") * @ORM\JoinColumn(name="id_supplier", referencedColumnName="id") * @Assert\NotNull(message="validator.orderdetail.supplier_must_not_be_null") diff --git a/src/Entity/ProjectSystem/Project.php b/src/Entity/ProjectSystem/Project.php index f6089687..8c8192f8 100644 --- a/src/Entity/ProjectSystem/Project.php +++ b/src/Entity/ProjectSystem/Project.php @@ -68,7 +68,7 @@ class Project extends AbstractStructuralDBElement protected int $order_quantity = 0; /** - * @var string The current status of the project + * @var string|null The current status of the project * @ORM\Column(type="string", length=64, nullable=true) * @Assert\Choice({"draft","planning","in_production","finished","archived"}) * @Groups({"extended", "full"}) diff --git a/src/Entity/ProjectSystem/ProjectBOMEntry.php b/src/Entity/ProjectSystem/ProjectBOMEntry.php index b48b3f50..a14f5f2d 100644 --- a/src/Entity/ProjectSystem/ProjectBOMEntry.php +++ b/src/Entity/ProjectSystem/ProjectBOMEntry.php @@ -61,7 +61,7 @@ class ProjectBOMEntry extends AbstractDBElement protected string $mountnames = ''; /** - * @var string An optional name describing this BOM entry (useful for non-part entries) + * @var string|null An optional name describing this BOM entry (useful for non-part entries) * @ORM\Column(type="string", nullable=true) * @Assert\Expression( * "this.getPart() !== null or this.getName() !== null", @@ -77,7 +77,7 @@ class ProjectBOMEntry extends AbstractDBElement protected string $comment; /** - * @var Project + * @var Project|null * @ORM\ManyToOne(targetEntity="Project", inversedBy="bom_entries") * @ORM\JoinColumn(name="id_device", referencedColumnName="id") */ @@ -91,7 +91,7 @@ class ProjectBOMEntry extends AbstractDBElement protected ?Part $part = null; /** - * @var BigDecimal The price of this non-part BOM entry + * @var BigDecimal|null The price of this non-part BOM entry * @ORM\Column(type="big_decimal", precision=11, scale=5, nullable=true) * @Assert\AtLeastOneOf({ * @BigDecimalPositive(), diff --git a/src/Entity/UserSystem/PermissionData.php b/src/Entity/UserSystem/PermissionData.php index 0de8dd55..2c84c6e3 100644 --- a/src/Entity/UserSystem/PermissionData.php +++ b/src/Entity/UserSystem/PermissionData.php @@ -43,7 +43,7 @@ final class PermissionData implements \JsonSerializable public const CURRENT_SCHEMA_VERSION = 2; /** - * @var array This array contains the permission values for each permission + * @var array|null This array contains the permission values for each permission * This array contains the permission values for each permission, in the form of: * permission => [ * operation => value, diff --git a/src/Entity/UserSystem/User.php b/src/Entity/UserSystem/User.php index 6c8aef60..1850d9f7 100644 --- a/src/Entity/UserSystem/User.php +++ b/src/Entity/UserSystem/User.php @@ -216,7 +216,7 @@ class User extends AttachmentContainingDBElement implements UserInterface, HasPe protected string $name = ''; /** - * @var array + * @var array|null * @ORM\Column(type="json") */ protected ?array $settings = []; diff --git a/src/EntityListeners/AttachmentDeleteListener.php b/src/EntityListeners/AttachmentDeleteListener.php index edf68e25..e3051342 100644 --- a/src/EntityListeners/AttachmentDeleteListener.php +++ b/src/EntityListeners/AttachmentDeleteListener.php @@ -27,7 +27,6 @@ use App\Services\Attachments\AttachmentManager; use App\Services\Attachments\AttachmentPathResolver; use App\Services\Attachments\AttachmentReverseSearch; use Doctrine\ORM\EntityManagerInterface; -use Doctrine\ORM\Event\LifecycleEventArgs; use Doctrine\ORM\Event\PostRemoveEventArgs; use Doctrine\ORM\Event\PreRemoveEventArgs; use Doctrine\ORM\Event\PreUpdateEventArgs; diff --git a/src/EventSubscriber/LogSystem/EventLoggerSubscriber.php b/src/EventSubscriber/LogSystem/EventLoggerSubscriber.php index 1f38c66c..29a1af07 100644 --- a/src/EventSubscriber/LogSystem/EventLoggerSubscriber.php +++ b/src/EventSubscriber/LogSystem/EventLoggerSubscriber.php @@ -97,7 +97,7 @@ class EventLoggerSubscriber implements EventSubscriber public function onFlush(OnFlushEventArgs $eventArgs): void { - $em = $eventArgs->getEntityManager(); + $em = $eventArgs->getObjectManager(); $uow = $em->getUnitOfWork(); /* @@ -156,7 +156,7 @@ class EventLoggerSubscriber implements EventSubscriber public function postFlush(PostFlushEventArgs $args): void { - $em = $args->getEntityManager(); + $em = $args->getObjectManager(); $uow = $em->getUnitOfWork(); // If the we have added any ElementCreatedLogEntries added in postPersist, we flush them here. $uow->computeChangeSets(); diff --git a/tests/Services/LabelSystem/BarcodeGeneratorTest.php b/tests/Services/LabelSystem/BarcodeGeneratorTest.php index a82b630b..844cae90 100644 --- a/tests/Services/LabelSystem/BarcodeGeneratorTest.php +++ b/tests/Services/LabelSystem/BarcodeGeneratorTest.php @@ -56,7 +56,7 @@ final class BarcodeGeneratorTest extends WebTestCase protected function setUp(): void { self::bootKernel(); - $this->services = self::$container->get(BarcodeGenerator::class); + $this->services = self::getContainer()->get(BarcodeGenerator::class); } public function testGetContent(): void diff --git a/tests/Services/LabelSystem/PlaceholderProviders/PartLotProviderTest.php b/tests/Services/LabelSystem/PlaceholderProviders/PartLotProviderTest.php index fda06053..cd9e2c23 100644 --- a/tests/Services/LabelSystem/PlaceholderProviders/PartLotProviderTest.php +++ b/tests/Services/LabelSystem/PlaceholderProviders/PartLotProviderTest.php @@ -61,7 +61,7 @@ class PartLotProviderTest extends WebTestCase { self::bootKernel(); \Locale::setDefault('en'); - $this->service = self::$container->get(PartLotProvider::class); + $this->service = self::getContainer()->get(PartLotProvider::class); $this->target = new PartLot(); $this->target->setDescription('Lot description'); $this->target->setComment('Lot comment'); diff --git a/tests/Services/LabelSystem/SandboxedTwigProviderTest.php b/tests/Services/LabelSystem/SandboxedTwigProviderTest.php index 92a6cd54..4716f8ec 100644 --- a/tests/Services/LabelSystem/SandboxedTwigProviderTest.php +++ b/tests/Services/LabelSystem/SandboxedTwigProviderTest.php @@ -59,7 +59,7 @@ class SandboxedTwigProviderTest extends WebTestCase protected function setUp(): void { self::bootKernel(); - $this->service = self::$container->get(SandboxedTwigProvider::class); + $this->service = self::getContainer()->get(SandboxedTwigProvider::class); } public function twigDataProvider(): array diff --git a/tests/Services/UserSystem/PermissionSchemaUpdaterTest.php b/tests/Services/UserSystem/PermissionSchemaUpdaterTest.php index 44ad88a7..54c27929 100644 --- a/tests/Services/UserSystem/PermissionSchemaUpdaterTest.php +++ b/tests/Services/UserSystem/PermissionSchemaUpdaterTest.php @@ -53,7 +53,7 @@ class PermissionSchemaUpdaterTest extends WebTestCase parent::setUp(); self::bootKernel(); - $this->service = self::$container->get(PermissionSchemaUpdater::class); + $this->service = self::getContainer()->get(PermissionSchemaUpdater::class); } public function testIsSchemaUpdateNeeded(): void