google-maps-services-php
google-maps-services-php copied to clipboard
Alexkalanis/refactoring for php7 oop
Update nearly the complete code, possible to use as v2, minimal php7
- added service to access Nearby endpoint (my inital reason)
- enabled extending of some parts (extended service factory, other query libraries)
- added tests (phpunit, phpstan, codestyle)
- added comments and property descriptions
Wow, this looks super useful I love that you also added tests
Would you be interested in re-added this to the maintained fork @ https://github.com/php-collective/google-maps-services ?
- CI
- tests
- new functionality
Note:
- CS is already added, so this can be skipped.
- We can rename the namespace from yidas\googleMaps to
PhpCollective\GoogleMaps
There are two issues I'd like to discuss:
- Modifying the mininal PHP version to 7.4 is embarrassing, I suggest to keep supporting 7.0 as the current one.
- Modifying the namespace from lower to upper camel case is the same as above.
Thanks!
7.4 is definitly the best min version possible at this point (2024). Even 8.0 is already EOL - https://www.php.net/supported-versions.php Whats the reason to support versions from like 4 years ago?
I agree that the namespace change looks like a BC break and as such should not be done without majoring, so probably not in this PR.
7.1 is minimum due type control over null. "?string" etc... Even PSR already have problems with php7 (here http message).
API in src\Client stays the same.
Also I do not expect that this pull request will rot here for 2 years. I set major version in mine repo as 2 - breaking change is then expected.
The idea is to take care of users of the ancient system who want to use new services as possible.
How about to keep the mininal PHP version at 7.1 so far with the same namespace.
There should be no one anymore: https://stitcher.io/blog/php-version-stats-january-2024 Ancient is basically 7.4 (LTS for 7.x)
I also referred to that article which revealed the number of 7.1 releases until January 2024.
from my perspective, the priority we can work on right now is to check which code changes are using the 7.4 version restrictions.
Namespaces rewritten.
@yidas I recommend changing the github setting so only "new github contributors" require a manual workflow run init. This way, the tests will run right away for PRs.
We should probably wrap this up :)
@yidas you still would want to change the github action run setting as per my suggestion