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/"] } }
Hi,
I don't know anything about this, so give me some time to look into it and I will follow up here. Thanks.
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.
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.
Any update on this?
When would it be possible to install this via Composer, and use a release version such as 6.0?
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.