Menu

#54 Please, add composer.json file

None
open
lbayuk
None
1
None
2014-12-22
2013-05-14
No

Please, add a composer.json file to the repository so PHPlot can be managed through composer (http://getcomposer.org).

Here is a proposal for composer.json:

{
    "name": "phplot/phplot",
    "description": "PHPlot - Create charts in PHP",
    "keywords": [ "phplot", "chart" ],
    "homepage": "http://phplot.sourceforge.net",
    "license": "LGPL",
    "require": {
        "php": ">5.3.0"
    },
    "autoload": {
        "classmap": ["phplot/"]
    }
}

Discussion

  • lbayuk

    lbayuk - 2013-05-14
    • assigned_to: lbayuk
     
  • lbayuk

    lbayuk - 2013-05-14

    Hi,

    I don't know anything about this, so give me some time to look into it and I will follow up here. Thanks.

     
  • lbayuk

    lbayuk - 2013-05-21

    My first reaction was no, not going to do this, because when I first read through the documentation it seems to focus exclusively on installing packages (libraries) directly from the version control system (VCS), rather than using a packaged release. I know that seems to be github's way of doing things, but I think it is a bad idea. PHPlot has releases, and nobody should be using anything directly out of Subversion.

    After a more careful reading, they do support installation from releases. But there is very little description of this. One example (for the Smarty template system) shows it, and that seems like what I would want to do. It just needs a name, version, download URL ("dist"), and any dependencies.

    But downloading from Sourceforge.net is more complex. The link (such as /project/phplot/files/phplot/6.1.0/phplot-6.1.0.zip/download) actually opens a new page to one of the mirrors, and that page starts the download. I don't know if it is possible to provide a URL directly to the package download (other than one through a specific mirror, which is a bad idea).

    That is the current status: Yes, if it can be done with packaged releases, downloaded from Sourceforge.

     
  • lbayuk

    lbayuk - 2013-05-22

    Re: downloading from sourceforge.net, never mind, that is not a problem. Apparently the download URL works transparently if used by something like wget. That is, instead of getting the mirror's web page, it redirects to the download file on the mirror.

     
  • Hjalmar Joonas Valkoviiksi

    Any update on this?
    When would it be possible to install this via Composer, and use a release version such as 6.0?

     
  • lbayuk

    lbayuk - 2014-12-22

    Sorry, I haven't looked at in a while. I gave up on it because I just couldn't figure it out. If anyone can show me one simple example project that uses composer to fetch a release from Sourceforge (not from git or SVN or some other revision control system, but from an actual release) and unzip it, I would have something to start from. I got lost with their documentation on autoloaders, namespaces (which PHPlot doesn't even use), etc.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.