geoPHP icon indicating copy to clipboard operation
geoPHP copied to clipboard

Proper autoloading for composer, PSR-4 compliant, Cleanup

Open gholol opened this issue 9 years ago • 3 comments

Hi, I was little pissed off with using include directive each time I wanted to use this library, so I rewrote it.

  • PSR-4 Compliant (I know there's phayes/geoPHP#125 but - it doesn't have fully qualified class names)
  • Autoloading
  • Minor coder cleanup

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.

gholol avatar May 15 '16 16:05 gholol

@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:

  1. Create a new tag and lock the current codebase at the current version (pre namespacing)
  2. Merge pull request
  3. Increment the major version and create a new tag w/ the namespaces.
  4. Update the README.md file w/ instructions how to install pre-namespaced code vs. new namespaced version.

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 👍 .

gsolak avatar Nov 02 '17 05:11 gsolak

What's the waiting for? ;-)

Soetens avatar May 21 '19 13:05 Soetens

Will this be merged?

martsie avatar Dec 13 '19 08:12 martsie