Make lessphp a Composer package #216

Closed
JanJakes opened this Issue Mar 27, 2012 · 10 comments

Comments

Projects
None yet

Please make lessphp a Composer package (http://getcomposer.org/) and put it on http://packagist.org/.

TomAdam commented Apr 2, 2012

I second this, but really before this is done it needs to be made PSR-0 compliant. At the moment I am using the following repository definition:

"repositories": [
    {
        "type": "package",
        "package": {
            "name": "leafo/lessphp",
            "version": "0.3.3",
            "source": {
                "url": "https://github.com/leafo/lessphp.git",
                "type": "git",
                "reference": "v0.3.3"
            },
            "autoload": {
                "classmap": [ "./" ]
            }
        }
    }
]

Unfortunately this also adds all the tests to the autoloader, but its better than nothing.

+1 :)

xrstf commented Apr 18, 2012

+1 :)

damianb commented Apr 18, 2012

_-1_ for pseudo-standard requirement 0 compliance. PEAR naming is dead, and namespacing was designed and intended to completely replace it and the hackish pseudo-namespacing that it used for autoloading; PSR-0 is an attempt to blend the two together to create something worse than ever before, both in terms of performance and straightforwardness. Having an underscore behave as a magic character when constructing a class's filepath only under specific conditions is bloody crazy talk and only mystifies design. Plus, it was created on a closed mailing list by a self-appointed "standards group" with very little public influence and input (and it shows).

There's some additional stuff on PSR-0's...lack of coherence here, I found: http://blog.ircmaxell.com/2011/11/on-psr-0-being-included-in-phps-core.html

A better solution is to use one that was provided in PHP-core from the very beginning, in PHP 5.3 - literal autoloading. Underscores map to underscores, namespace separators just map to directory separators, etc. Reference php manual, functions spl_autoload_extensions, get_include_path, set_include_path.

+1

Paulpro commented Apr 21, 2012

+1

joseym commented May 13, 2012

+1

Owner

leafo commented May 25, 2012

Okay it's up, thanks @RobLoach

http://packagist.org/packages/leafo/lessphp

Not sure how to push the version tags from git to it though, maybe only new ones show up? (I set up the commit hook)

leafo closed this May 25, 2012

Contributor

RobLoach commented May 25, 2012

Thanks a lot for the help! You're correct, only new versions will show up as those are the only versions that'll have the composer.json meta-data file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment