alcohol / iso4217

ISO 4217 PHP Library
MIT License
142 stars 21 forks source link

Using six-group.com as source for automatic updates #30

Open courtney-miles opened 2 years ago

courtney-miles commented 2 years ago

Would the package maintainers be interested in a PR that scripts the updating of the codes in this package?

The idea would be to use SIX Financial Information as the source.

SIX Financial Information AG is the official Maintenance Agency of these currency codes under ISO 4217 and as such the only recognized, authoritative source on currency code designations.

They offer and XML copy of all the code current codes at https://www.six-group.com/dam/download/financial-information/data-center/iso-currrency/lists/list_one.xml moved to: https://www.six-group.com/dam/download/financial-information/data-center/iso-currrency/lists/list-one.xml

In regards to #4, they also offer a list of historic denominations at https://www.six-group.com/dam/download/financial-information/data-center/iso-currrency/lists/list_three.xml moved to: https://www.six-group.com/dam/download/financial-information/data-center/iso-currrency/lists/list-three.xml

(I have taken an interest because this package lists ZWL as deprecated when it's otherwise still in the official list, including on Wikipedia -- so it seems less ambiguity is needed)

alcohol commented 2 years ago

Yes, though I can't quite say what I would like this to look like. But I am definitely open to scripted updating. If you can start with a PR with some very basic things, I can perhaps provide early feedback.

alcohol commented 2 years ago

I also am still not sure if I want to make this library more in line with how I setup https://github.com/thephpleague/iso3166 or not (I sometimes prefer the more "simple" approach I still have here).

alcohol commented 1 year ago

It would probably be best if the update script could dump the parsed xml contents into a generated file with php code (e.g. <?php return [...];) to allow for opcode caching.