Repository navigation
Add support for Nigeria's 11-character postcodes - #25
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #25 +/- ##
=========================================
Coverage 99.21% 99.21%
- Complexity 502 503 +1
=========================================
Files 186 186
Lines 1019 1022 +3
=========================================
+ Hits 1011 1014 +3
Misses 8 8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
The Coding Standard job fails at |
|
@BenMorel, I would be grateful if you could look at this whenever your time allows. Nigeria launched a new national postcode on 1 October, and the NG formatter still accepts only the six-digit code it replaces, so every new code is rejected. The format and its source are in the description, and the tests cover each segment. I am glad to change anything that would make this easier to merge. Thank you for maintaining this library, and please take it at your own pace. |
|
A short update on the failing Coding Standard job: I ran |
|
Thank you, @Adeniyikayodee! The coding standard job has been fixed on |
|
Released as 0.6.3. |
|
Thank you, @BenMorel, for the merge and the quick release. |
NIPOST launched a new postcode for Nigeria in October 2026. It has 11 characters in five segments, for example
EK-01-A03-FK-01: two letters, two digits, three letters or digits, two letters, and two digits. The two numeric segments run from 01 to 99.NGFormatteraccepted six digits only, so every new code was rejected. It now accepts both and formats the new code with hyphens, which is how NIPOST writes it. Six-digit codes are unchanged.Format reference: https://docs.postcode.gov.ng/concepts/postcode-format
PHPUnit and PHPStan pass locally.