-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proper autoloading for composer, PSR-4 compliant, Cleanup #130
base: master
Are you sure you want to change the base?
Conversation
@@ -115,16 +109,16 @@ public function getBBox() { | |||
$i++; | |||
} | |||
|
|||
return array( | |||
return [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
careful... the shorthand notation for array was only introduced in 5.4. The composer minimum php versions should be updated or keep it as array()
else return FALSE; | ||
protected function beginsWith($str, $char) | ||
{ | ||
return (substr($str,0,strlen($char)) == $char) ? true : false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these changes automatically generated by your ide? Or are you doing them manually?
If manually - can we replace w/ ===
?
@gholol Chris, great work! This is a huge milestone for this project. @phayes - Patrick can we please put this on the roadmap? I am happy to personally oversee the transition and rewriting the tests at some point. I am thinking we should:
While this approach isn't perfect -it does offers pretty good backwards compatibility. Tests are very much important. But given how important namespacing is for a proper PHP project - I would be okay w/ making a one-off exception. I am currently using a namespaced version of this repo in production and all works 👍 . |
What's the waiting for? ;-) |
Will this be merged? |
@@ -35,10 +35,11 @@ Example usage | |||
|
|||
```php | |||
<?php | |||
include_once('geoPHP.inc'); | |||
|
|||
using Phayser\GeoPHP\GeoPHP; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using Phayser\GeoPHP\GeoPHP; | |
using Phayes\GeoPHP\GeoPHP; |
there's a typo there
Hi, I was little pissed off with using include directive each time I wanted to use this library, so I rewrote it.
It works the same way as before, but instead of include you have to use the
use
directive.Tests are gonna fail (obviously). I don't found the time to rewrite them.