phar command

php.internals

Nikita Popov

5 years ago
Hi, The PHP build system currently produces a "phar" command. See http://manpages.ubuntu.com/manpages/xenial/en/man1/phar7.0.1.html for a man page. Apart from changes to keep it working, the last time its implementation was touched was back in ... 2008. I'm wondering if anyone is using this command? My understanding is that packaging libraries as phars is not exactly straightforward, and people use different tooling to achieve that. Regards, Nikita

Sebastian Bergmann

5 years ago
Am 30.11.2020 um 16:55 schrieb Nikita Popov:
> My understanding is that packaging libraries as phars is not exactly > straightforward, and people use different tooling to achieve that.
While I do not use this "phar" command to package my software as PHARs, I use it every once in a while to look inside a PHAR. Don't know whether that justifies keeping it around, though.

Unnamed Person

5 years ago
On Mon, Nov 30, 2020 at 8:59 AM Sebastian Bergmann <sebastian@php.net> wrote:
> Am 30.11.2020 um 16:55 schrieb Nikita Popov: > > My understanding is that packaging libraries as phars is not exactly > > straightforward, and people use different tooling to achieve that. > > While I do not use this "phar" command to package my software as PHARs, I > use it every once in a while to look inside a PHAR. Don't know whether > that justifies keeping it around, though.
I've used it occasionally, and almost entirely to poke around a phar (`phar tree phpunit-9.phar`, for instance).

Bishop Bettini

5 years ago
On Mon, Nov 30, 2020 at 10:56 AM Nikita Popov <nikita.ppv@gmail.com> wrote:
> > The PHP build system currently produces a "phar" command. See > http://manpages.ubuntu.com/manpages/xenial/en/man1/phar7.0.1.html for a > man > page. > > Apart from changes to keep it working, the last time its implementation was > touched was back in ... 2008. I'm wondering if anyone is using this > command? > > My understanding is that packaging libraries as phars is not exactly > straightforward, and people use different tooling to achieve that. >
I also regularly use it for inspecting phar. However, I had thought - at some point when time allows - it'd be nice to migrate it from php-src/ to its own phar-tools/ repository. Doing so focuses php-src/ to just the gritty Phar implementation and lets us develop independently consumable tooling.

Nikita Popov

5 years ago
On Tue, Dec 1, 2020 at 3:16 AM Bishop Bettini <bishop@php.net> wrote:
> On Mon, Nov 30, 2020 at 10:56 AM Nikita Popov <nikita.ppv@gmail.com> > wrote: > >> >> The PHP build system currently produces a "phar" command. See >> http://manpages.ubuntu.com/manpages/xenial/en/man1/phar7.0.1.html for a >> man >> page. >> >> Apart from changes to keep it working, the last time its implementation >> was >> touched was back in ... 2008. I'm wondering if anyone is using this >> command? >> >> My understanding is that packaging libraries as phars is not exactly >> straightforward, and people use different tooling to achieve that. >> > > I also regularly use it for inspecting phar. However, I had thought - at > some point when time allows - it'd be nice to migrate it from php-src/ to > its own phar-tools/ repository. Doing so focuses php-src/ to just the > gritty Phar implementation and lets us develop independently consumable > tooling. >
Thanks for the responses! Looks like the command is getting some use at least. It's not really an undue maintenance burden either -- I was just wondering if it doesn't happen to be dead code :) Moving it out of php-src would in itself be good (that would allow things like ... actually testing that it works), but I expect that the distribution mechanics will not be favorable (e.g. I would expect distros to no longer ship the command if it's not part of php-src). Nikita