-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UML-3460 Return LPA store LPAs via the new endpoint in the new format #2754
UML-3460 Return LPA store LPAs via the new endpoint in the new format #2754
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2754 +/- ##
============================================
+ Coverage 91.25% 91.45% +0.20%
- Complexity 1504 1537 +33
============================================
Files 309 326 +17
Lines 6393 6543 +150
============================================
+ Hits 5834 5984 +150
Misses 542 542
Partials 17 17
|
…-endpoint-in-new-format
…heritance for the entities to help structure datastore and for future sirius implementation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good but I think the dates need a change.
service-api/app/src/App/src/Entity/Casters/DateToStringSerializer.php
Outdated
Show resolved
Hide resolved
*/ | ||
public function __invoke(array $lpa) | ||
{ | ||
$defaultSerializerRepository = new DefaultSerializerRepository([ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using interfaces for the dates might make this bit redundant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the DateTimeInterface setup is needed now?
service-api/app/src/App/src/Entity/Casters/DateToStringSerializer.php
Outdated
Show resolved
Hide resolved
…-endpoint-in-new-format
created new files for dedicated tests
…-endpoint-in-new-format
#[Test] | ||
public function can_serialise_datastore_lpa_to_modernise_format(): void | ||
{ | ||
$lpa = json_decode(file_get_contents(__DIR__ . '../../../../test/fixtures/test_lpa.json'), true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a Sirius LPA I think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ahh yeah it is.. my bad
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be better to just link directly to one from the mock. If tests breaks because someone changes those in development thats a good thing.
@@ -4,14 +4,34 @@ | |||
|
|||
namespace AppTest\Service\Lpa; | |||
|
|||
use App\Entity\Casters\{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these imports used anymore?
Just realised the Person entity appears to be missing the uid field? |
…tests, and removed unused imports
…-endpoint-in-new-format # Conflicts: # service-api/app/test/AppTest/Service/Lpa/LpaServiceTest.php
class Person | ||
{ | ||
public function __construct( | ||
public readonly ?string $uId, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The LPA seems to have properties in alphabetical order but this one (and it's extensions) don't?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice
Purpose
Returning LPA store LPAs via the new endpoint in the new format
Learning
The use of a new library to map incoming data store LPA array using https://github.com/EventSaucePHP/ObjectHydrator
Checklist