diff --git a/.gitignore b/.gitignore index 8bd9130..69b474f 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ /.php-cs-fixer.cache /auth.json /composer.lock +/composer.json.testing /Documentation-GENERATED-temp diff --git a/Build/phpstan/Core11/phpstan.neon b/Build/phpstan/Core11/phpstan.neon index 2d62156..dba2186 100644 --- a/Build/phpstan/Core11/phpstan.neon +++ b/Build/phpstan/Core11/phpstan.neon @@ -15,3 +15,9 @@ parameters: - ../../../.Build - ../../../.cache - ../../../Build + + typo3: + contextApiGetAspectMapping: + frontend.profile: Fgtclb\AcademicPersonsEdit\Context\ProfileAspect + requestGetAttributeMapping: + frontend.profileUid: int diff --git a/Build/phpstan/Core12/phpstan.neon b/Build/phpstan/Core12/phpstan.neon index d636a12..2aa84a4 100644 --- a/Build/phpstan/Core12/phpstan.neon +++ b/Build/phpstan/Core12/phpstan.neon @@ -16,3 +16,9 @@ parameters: - ../../../.Build - ../../../Tests/Functional/Updates/Fixtures/Extension/test_extension/ext_emconf.php - ../../../Classes/Override/Core11 + + typo3: + contextApiGetAspectMapping: + frontend.profile: Fgtclb\AcademicPersonsEdit\Context\ProfileAspect + requestGetAttributeMapping: + frontend.profileUid: int diff --git a/Classes/Domain/Repository/AddressRepository.php b/Classes/Domain/Repository/AddressRepository.php index 7b8613f..056de42 100644 --- a/Classes/Domain/Repository/AddressRepository.php +++ b/Classes/Domain/Repository/AddressRepository.php @@ -39,11 +39,11 @@ public function getAddressFromOrganisation( $query->equals('employeeType', $employeeType), $query->equals('organisationalLevel1', $organizationalLevel1), $query->equals('organisationalLevel2', $organizationalLevel2), - $query->equals('organisationalLevel3', $organizationalLevel3) + $query->equals('organisationalLevel3', $organizationalLevel3), ]) ); $query->setOrderings([ - 'zip' => QueryInterface::ORDER_ASCENDING + 'zip' => QueryInterface::ORDER_ASCENDING, ]); return $query->execute(); diff --git a/Classes/Domain/Repository/ProfileRepository.php b/Classes/Domain/Repository/ProfileRepository.php index 3e2c9e5..fbea54a 100644 --- a/Classes/Domain/Repository/ProfileRepository.php +++ b/Classes/Domain/Repository/ProfileRepository.php @@ -34,7 +34,7 @@ public function findByUids(array $uids): QueryResultInterface $query->in('uid', $uids) ) ->setOrderings([ - 'lastName' => QueryInterface::ORDER_ASCENDING + 'lastName' => QueryInterface::ORDER_ASCENDING, ]) ->execute(); } diff --git a/Classes/EventListener/GenerateSlugForProfile.php b/Classes/EventListener/GenerateSlugForProfile.php index fd14371..4994967 100644 --- a/Classes/EventListener/GenerateSlugForProfile.php +++ b/Classes/EventListener/GenerateSlugForProfile.php @@ -55,7 +55,7 @@ public function __invoke(AfterProfileUpdateEvent $event): void 'slug' => $profileSlug, ], [ - 'uid' => $profileUid + 'uid' => $profileUid, ] ); } diff --git a/Migrations/Mysql/Version20230720082500.php b/Migrations/Mysql/Version20230720082500.php index e402529..7efc241 100644 --- a/Migrations/Mysql/Version20230720082500.php +++ b/Migrations/Mysql/Version20230720082500.php @@ -46,7 +46,7 @@ public function up(Schema $schema): void 'sDEF' => [ 'lDEF' => [ 'settings.pages' => [ - 'vDEF' => sprintf('pages_%d', $userStorageUid) + 'vDEF' => sprintf('pages_%d', $userStorageUid), ], ], ], diff --git a/Tests/Unit/Context/ProfileAspectTest.php b/Tests/Unit/Context/ProfileAspectTest.php index 7468edc..647d9ae 100644 --- a/Tests/Unit/Context/ProfileAspectTest.php +++ b/Tests/Unit/Context/ProfileAspectTest.php @@ -27,7 +27,7 @@ public function emptyProfileUidsWillResultInNotHavingProfile(): void { $subject = new ProfileAspect([], 1); - self::assertFalse($subject->get('hasProfile')); + static::assertFalse($subject->get('hasProfile')); } /** @@ -37,7 +37,7 @@ public function givenProfileUidsWillResultInHavingProfile(): void { $subject = new ProfileAspect([1], 1); - self::assertTrue($subject->get('hasProfile')); + static::assertTrue($subject->get('hasProfile')); } /** @@ -47,7 +47,7 @@ public function emptyProfileUidsWillReturnEmptyArray(): void { $subject = new ProfileAspect([], 1); - self::assertSame([], $subject->get('allProfileUids')); + static::assertSame([], $subject->get('allProfileUids')); } /** @@ -57,7 +57,7 @@ public function givenProfileUidsWillReturnUids(): void { $subject = new ProfileAspect([1, 2], 1); - self::assertSame([1, 2], $subject->get('allProfileUids')); + static::assertSame([1, 2], $subject->get('allProfileUids')); } /** @@ -67,7 +67,7 @@ public function emptyProfileUidsAndGivenActiveProfileUidWillReturnZero(): void { $subject = new ProfileAspect([], 1); - self::assertSame(0, $subject->get('activeProfileUid')); + static::assertSame(0, $subject->get('activeProfileUid')); } /** @@ -77,7 +77,7 @@ public function givenProfileUidsAndGivenActiveProfileUidWillReturnActiveProfileU { $subject = new ProfileAspect([1], 1); - self::assertSame(1, $subject->get('activeProfileUid')); + static::assertSame(1, $subject->get('activeProfileUid')); } /** @@ -87,7 +87,7 @@ public function givenProfileUidsAndNoActiveProfileUidWillReturnZero(): void { $subject = new ProfileAspect([1], 0); - self::assertSame(0, $subject->get('activeProfileUid')); + static::assertSame(0, $subject->get('activeProfileUid')); } /** diff --git a/composer.json b/composer.json index 58f9879..84a5898 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,7 @@ "require": { "php": "^8.0", "typo3/cms-core": "^11.5", - "fgtclb/academic-persons": "^0.1" + "fgtclb/academic-persons": "^0.1 | dev-main" }, "require-dev": { "typo3/minimal": "v11.5.0", @@ -55,6 +55,7 @@ }, "config": { "vendor-dir": ".Build/vendor", + "bin-dir": ".Build/bin", "allow-plugins": true }, "scripts": { @@ -65,6 +66,7 @@ "extra": { "typo3/cms": { "web-dir": ".Build/public", + "app-dir": ".Build", "extension-key": "academic_persons_edit" }, "patches": { diff --git a/ext_emconf.php b/ext_emconf.php index c9903b8..1797f5d 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -1,5 +1,6 @@ 'FGTCLB: Academic Persons Edit', 'description' => 'dds the option to assign frontend users to academic persons and allow editing the profiles in frontend.', 'category' => 'plugin', @@ -12,7 +13,7 @@ 'constraints' => [ 'depends' => [ 'typo3' => '11.5.0-11.5.99', - "academic_persons" => "0.1.0 - 0.1.99", + 'academic_persons' => '0.1.0 - 0.1.99', ], 'conflicts' => [ ],