jdorn / sql-formatter

A lightweight php class for formatting sql statements. Handles automatic indentation and syntax highlighting.
http://jdorn.github.com/sql-formatter/
MIT License
3.89k stars 186 forks source link

Converted all self to static #15

Closed dlsniper closed 11 years ago

dlsniper commented 11 years ago

This allows for extension of the library as any extending implementation won't be able to be used by the library.

For additional details please see: doctrine/DoctrineBundle#139 and doctrine/DoctrineBundle#140

Also, please tag this with 1.2 after merging so that we have a stable reference for the future commits.

Maybe @stof can help you out with Composer and making it stable for it.

Thank you very much.

stloyd commented 11 years ago

This PR is not valid as this lib supports php: >=5.2.4 and LTB was added (IIRC) in version: 5.3.

dlsniper commented 11 years ago

Good point @stloyd LSB was introduced in PHP 5.3, I should have pointed this out. If this is not an option for the library, I'll search another path of optimizing this.

stof commented 11 years ago

@dlsniper I see an easy way to avoid needing LSB here: do the performance improvement directly in this library instead of doing it in a child class in DoctrinBundle

dlsniper commented 11 years ago

Ok, I can add the caching for tokenizing function here.