Skip to content

Commit

Permalink
Core update to searchobjects en countobjects, requires CoreBundle:1.4.13
Browse files Browse the repository at this point in the history
  • Loading branch information
WilcoLouwerse committed Jul 2, 2024
1 parent 69d9068 commit 544539d
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"minimum-stability" : "dev",
"require": {
"php": ">=7.4",
"commongateway/corebundle": "^1.1.30 | <2.0",
"commongateway/corebundle": "^1.4.13 | <2.0",
"common-gateway/brp-bundle": "^0.1.4 | <1.0",
"common-gateway/klanten-bundle": "^0.1.3 | <1.0",
"common-gateway/zgw-bundle": "^0.1.34 | <2.0",
Expand Down
12 changes: 6 additions & 6 deletions publiccode.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,14 @@ localisation:
dependsOn:
open:
- name: CommonGateway
versionMin: 1.2
versionMax: 1.3
version: 1.2.47
versionMin: 1.4
versionMax: 1.5
version: 1.4.13
optional: false
- name: CoreBundle
versionMin: 1.2
versionMax: 1.3
version: 1.2.47
versionMin: 1.4
versionMax: 1.5
version: 1.4.13
optional: false
- name: BRPBundle
versionMin: 0.1
Expand Down
2 changes: 1 addition & 1 deletion src/Service/AssentService.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public function updateAssentHandler(array $data, array $config)
|| $assentData['contact']['klantnummer'] === false)
) {
// get brp person from the logged in user
$brpPersons = $this->cacheService->searchObjects(null, ['burgerservicenummer' => $this->security->getUser()->getPerson()], [$brpSchema->getId()->toString()])['results'];
$brpPersons = $this->cacheService->searchObjects(['burgerservicenummer' => $this->security->getUser()->getPerson()], [$brpSchema->getId()->toString()])['results'];
$brpPerson = null;
if (count($brpPersons) === 1) {
$brpPerson = $this->entityManager->find('App:ObjectEntity', $brpPersons[0]['_self']['id']);
Expand Down
4 changes: 2 additions & 2 deletions src/Service/CreateMarriageService.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ private function getPerson(array $huwelijk): ObjectEntity
$personSchema = $this->gatewayResourceService->getSchema('https://klantenBundle.commonground.nu/klant.klant.schema.json', 'common-gateway/huwelijksplanner-bundle');

// get brp person from the logged in user
$brpPersons = $this->cacheService->searchObjects(null, ['burgerservicenummer' => $this->security->getUser()->getPerson()], [$brpSchema->getId()->toString()])['results'];
$brpPersons = $this->cacheService->searchObjects(['burgerservicenummer' => $this->security->getUser()->getPerson()], [$brpSchema->getId()->toString()])['results'];
$brpPerson = null;
if (count($brpPersons) === 1) {
$brpPerson = $this->entityManager->find('App:ObjectEntity', $brpPersons[0]['_self']['id']);
Expand All @@ -130,7 +130,7 @@ private function getPerson(array $huwelijk): ObjectEntity
}

if ($brpPerson->getValue('burgerservicenummer') !== false) {
$persons = $this->cacheService->searchObjects(null, ['subjectIdentificatie.inpBsn' => $brpPerson->getValue('burgerservicenummer')], [$personSchema->getId()->toString()])['results'];
$persons = $this->cacheService->searchObjects(['subjectIdentificatie.inpBsn' => $brpPerson->getValue('burgerservicenummer')], [$personSchema->getId()->toString()])['results'];
if (count($persons) === 1) {
$person = $this->entityManager->find('App:ObjectEntity', $persons[0]['_self']['id']);
}//end if
Expand Down
2 changes: 1 addition & 1 deletion src/Service/InvitePartnerService.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ private function invitePartnerLogin(ObjectEntity $huwelijkObject, array $huwelij
$brpSchema = $this->gatewayResourceService->getSchema('https://vng.brp.nl/schemas/brp.ingeschrevenPersoon.schema.json', 'common-gateway/huwelijksplanner-bundle');
$partnerDetails = [];

$brpPersons = $this->cacheService->searchObjects(null, ['burgerservicenummer' => $bsn], [$brpSchema->getId()->toString()])['results'];
$brpPersons = $this->cacheService->searchObjects(['burgerservicenummer' => $bsn], [$brpSchema->getId()->toString()])['results'];
if (count($brpPersons) === 1) {
$partnerDetails['brpPerson'] = $this->entityManager->find('App:ObjectEntity', $brpPersons[0]['_self']['id']);
}//end if
Expand Down

0 comments on commit 544539d

Please sign in to comment.