News for hackers. Stuff that matters.
Re:Show HN: Lescript – Simple PHP client library for Let's e... by 3dfan on Thursday December 10, 2015 @06:48AM (#10710159)
Hell, no!

A single PHP file is the perfect solution to this. Call it from /etc/crontab and you are done.

I hate overladen projects on GitHub with all kinds of fluff. A single source file and a readme is just awesome.

Re:Show HN: Lescript – Simple PHP client library for Let's e... by Navarr on Thursday December 10, 2015 @07:44AM (#10710332)
It requires at least two PHP files. One that ACTUALLY DOES WHAT YOU WANT and the library files.

Since you have to write a new PHP file anyway, composer allows you to pull in the latest version (or update it) with semver constraints.

Then you can package it as a phar and call it that way.

This is a library, not a file to run, and so it should have composer support.

Or, if you don't want to package it as a PHAR - since I have no idea how to do that, you'd implement your version in some directory and probably alias a command to it.

TL;DR: This is a library, not a script. It should have composer support.

Re:Show HN: Lescript – Simple PHP client library for Let's e... by 3dfan on Thursday December 10, 2015 @07:57AM (#10710378)
I don't want to automatically pull the latest version. I would only use this after I studied the code and made sure it is not doing anything harmful. That's why this has to be as simple as possible.
Re:Show HN: Lescript – Simple PHP client library for Let's e... by ceejayoz on Thursday December 10, 2015 @08:54AM (#10710574)
> I don't want to automatically pull the latest version.

You don't have to. Composer allows you to pick a particular package version if you like, and it's only going to fetch a more recent version if your composer.json permits it and if you explicitly run composer update.

Re:Show HN: Lescript – Simple PHP client library for Let's e... by jnardiello on Thursday December 10, 2015 @06:53AM (#10710171)
And how distributing this as a composer package would stop you from cloning the repo manually and still use the class as if it had no composer json?

On the other hand, what if you have a slightly more complex system with some logic to handle crons?

Re:Show HN: Lescript – Simple PHP client library for Let's e... by 3dfan on Thursday December 10, 2015 @06:57AM (#10710190)
Just fork and add whatever your "more complex system" needs. But don't force this complexity on me. I work hard to keep my systems simple.