Countries
Countries copied to clipboard
Validate PHP / Composer / Tests with new file structure
The new file/dir structure can potentially break things on PHP / Composer package. Need to check it out.
Hey @Radiergummi do you still use PHP & this lib? I've got a new file/dir structure, would be great if someone checked it out. Also, maybe there are some suggestions etc, would really appreciate it. You did great input on this previously :)
I'd move composer.json
and phpunit.xml
inside respected dirs (dist
, packages/test-php
). And preferably ignore everything unrelated to PHP (like .npmignore
file does for NPM publishing).
Suppose, at least need to update composer.json
— autoload
section as I see, in order to make it work when installed.
PHPUnit didn't support monorepos as I've checked so I updated it a bit to work like it is now.
Actually, yeah! It’s happily chugging along and has processed about 4 billion records as of today :)
I’ll try to get to this this week, alright?
Actually, yeah! It’s happily chugging along and has processed about 4 billion records as of today :)
Sounds awesome, @Radiergummi!
I’ll try to get to this this week, alright?
That would be great! Wanna release v3 soon. Will prepare a changelog in README as well so you could align everything including your projects.
Overall, it has changed some data structures (mainly, no comma-separated strings anymore — arrays instead), and some important country data updates reported. Added support for transcontinental countries etc.
If we could optimise the composer package to contain only the required files would be awesome!
Hey @Radiergummi, did you have the time to check it out? I've also been busy, but would be great if I could release v3 this week. It took way too long already :) And I'd be super happy if you could check it out from PHP side. Maybe extend PHP class with new utils similar to NPM module exports: getCountryCode(countryName: string): TCountryCode | false
, getCountryData(iso2: TCountryCode): ICountryData
, getCountryDataList()
, getEmojiFlag(countryCode: TCountryCode): string
.
Well, from the list I guess getEmojiFlag()
might get tricky, but for PHP you can easily use data from dist/more/countries.emoji.min.json
.
I'm not into PHP anymore, so there's a good chance I can mess it up now, especially in terms of newer PHP versions.
P.S. Please ask me anything you need and I'll try to reply ASAP.
Hey @Radiergummi, I submitted a PR with structural changes: #124. It should work as expected. Well, according to docs :) Tests pass, added some coverage check as well.
It would be great if you'd have a look. Wondering if "archive.exclude"
change will help with not packaging unnecessary files to PHP or need to use .gitattributes
— export-ignore
feature.
Wondering if we need additional class methods I mentioned above, but can be a separate PR/update.
Hey @Radiergummi, I've released v3.0 for NPM. In case you have something to add from PHP side let's do it, otherwise I'll probably bump the version as is to at least include all data/structure updates.