Skip to content

Conversation

@Adnan-cds
Copy link
Contributor

@Adnan-cds Adnan-cds commented Feb 24, 2022

The LocalgovDrupal\OsPlacesGeocoder\Model\LocationUprnInterface interface has been renamed to LocalgovDrupal\OsPlacesGeocoder\Model\AddressUprnInterface during recent refactoring. But the AddressLookup service here was still using the old interface name.

Similarly, the LocalgovDrupal\OsPlacesGeocoder\Model\UprnAddress class has been renamed to LocalgovDrupal\OsPlacesGeocoder\Model\OsPlacesAddress. The mock Geocoder used for testing was using the old class.

These were not picked up by the test earlier because I missed the "Test" suffix from the test classname and as a result the test wasn't running at all! All fixed now :)

Also some coding standards fixes.

The LocalgovDrupal\OsPlacesGeocoder\Model\LocationUprnInterface interface got
renamed to LocalgovDrupal\OsPlacesGeocoder\Model\AddressUprnInterface during the
recent round of great refactoring.  But the AddressLookup service here was still
using the old interface name.  Fixed now.
Fixed usage of renamed class.  Added associated tests.
@Adnan-cds Adnan-cds changed the title Bug fix: Nonexistent PHP interface. Bug fix: Use renamed PHP interface and class names Feb 25, 2022
@finnlewis
Copy link
Member

Discussing this with @ekes and @Adnan-cds at our Merge Monday meeting.

@ekes is happy that if the tests are now passing, we should merge this in.

@Adnan-cds points out that the OS API returns UPRN number without leading zeros.

See: https://github.com/localgovdrupal/localgov_forms/pull/14/files#diff-8a4bec655de40154ebc5ae674a7ebcac96d9dc9b167f8411846bb5727abab839L161

This change avoids the 'parseInt' problem of trying to parse an empty string as a number.

Leaving it as a string makes sense.

For the record:

  • A unique identifier assigned to each BLPU within an LLPG. Also see also BS 7666-2:2006, page 6, section 6.1 for description.

In summary, we're happy to approve this pull request.

@Adnan-cds
Copy link
Contributor Author

Thanks. I am merging...

@Adnan-cds Adnan-cds merged commit 5f0885a into 1.x Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants