Skip to content
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 3459 return sirius data via new endpoint in new format #2770

Merged

Conversation

allenannom
Copy link
Contributor

@allenannom allenannom commented Sep 9, 2024

Purpose

Returning Sirius 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

  • I have performed a self-review of my own code
  • I have added relevant logging with appropriate levels to my code
  • New event_codes have been documented on the wiki page
  • I have updated documentation (Confluence/GitHub wiki/tech debt doc) where relevant
  • I have added tests to prove my work
  • I have added welsh translation tags and updated translation files
  • I have run an accessibility tool on any pages I have made changes to and fixed any issues found
  • I have notified the Interaction Designer of any content changes so that appropriate screenshots/flow diagram changes can be made
  • The product team have tested these changes

allenannom and others added 28 commits August 21, 2024 20:17
…heritance for the entities to help structure datastore and for future sirius implementation
created new files for dedicated tests
…n-new-format' into UML-3459-return-sirius-data-via-new-endpoint-in-new-format
…-endpoint-in-new-format

# Conflicts:
#	service-api/app/test/AppTest/Service/Lpa/LpaServiceTest.php
…n-new-format' into UML-3459-return-sirius-data-via-new-endpoint-in-new-format

# Conflicts:
#	service-api/app/src/App/src/Service/Lpa/LpaDataFormatter.php
@github-actions github-actions bot added dependencies Pull requests that update a dependency file php Pull requests that update Php code labels Sep 9, 2024
@allenannom allenannom changed the base branch from main to UML-3460-return-lpa-store-via-new-endpoint-in-new-format September 9, 2024 09:30
Copy link

codecov bot commented Sep 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.52%. Comparing base (f00760a) to head (ba01ad3).
Report is 27 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #2770      +/-   ##
============================================
+ Coverage     91.25%   91.52%   +0.27%     
- Complexity     1504     1570      +66     
============================================
  Files           309      344      +35     
  Lines          6393     6657     +264     
============================================
+ Hits           5834     6093     +259     
- Misses          542      547       +5     
  Partials         17       17              
Flag Coverage Δ
use-an-lpa-admin 79.26% <ø> (ø)
use-an-lpa-api 97.44% <100.00%> (+0.07%) ⬆️
use-an-lpa-front 89.54% <ø> (ø)
Files with missing lines Coverage Δ
.../App/src/Entity/Sirius/Casters/CastSiriusDonor.php 100.00% <100.00%> (ø)
...us/Casters/CastToSiriusLifeSustainingTreatment.php 100.00% <100.00%> (ø)
...irius/Casters/ExtractAddressLine1FromSiriusLpa.php 100.00% <100.00%> (ø)
...irius/Casters/ExtractAddressLine2FromSiriusLpa.php 100.00% <100.00%> (ø)
...irius/Casters/ExtractAddressLine3FromSiriusLpa.php 100.00% <100.00%> (ø)
...ity/Sirius/Casters/ExtractCountryFromSiriusLpa.php 100.00% <100.00%> (ø)
...tity/Sirius/Casters/ExtractCountyFromSiriusLpa.php 100.00% <100.00%> (ø)
...ty/Sirius/Casters/ExtractPostcodeFromSiriusLpa.php 100.00% <100.00%> (ø)
...Entity/Sirius/Casters/ExtractTownFromSiriusLpa.php 100.00% <100.00%> (ø)
...Entity/Sirius/Casters/ExtractTypeFromSiriusLpa.php 100.00% <100.00%> (ø)
... and 7 more

@allenannom allenannom marked this pull request as ready for review September 10, 2024 15:28
@allenannom allenannom requested a review from a team as a code owner September 10, 2024 15:28
Base automatically changed from UML-3460-return-lpa-store-via-new-endpoint-in-new-format to main September 11, 2024 08:25
allenannom and others added 2 commits September 11, 2024 09:57
…ew-endpoint-in-new-format

# Conflicts:
#	service-api/app/src/App/src/Enum/LifeSustainingTreatment.php
#	service-api/app/src/App/src/Service/Lpa/LpaDataFormatter.php
Copy link
Contributor

@cooperaj cooperaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of minor tweaks in tests and it's good to go from me.

),
$lpaObject = $this->hydrateObject($lpa);

return $this->mapper->serializeObject(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need this to return the hydrated object for use in our service classes.

The serialisation part will happen just before we return so we'll want to ensure that either a) the objects themselves can use their own mapper via a jsonSerialize method or b) a service is available to be called. I personally would go with a)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact. I'm going to approve this but the above work will need to be done before the combined stuff starts to happen.

@allenannom allenannom merged commit a4273b6 into main Sep 23, 2024
34 checks passed
@allenannom allenannom deleted the UML-3459-return-sirius-data-via-new-endpoint-in-new-format branch September 23, 2024 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file php Pull requests that update Php code service-api
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants