Jump to content

Phar?


Bit Bayou

Recommended Posts

Seeing as Blesta is PHP based, and you are all PHP developers, have any of you tried Phar? I've recently came across http://box-project.org and was researching it at http://php.net/manual/en/book.phar.php

 

Seems interesting, but not sure if want? I mean, we're all used to the ZIP/Tar archives and uploading a bunch of files via FTP..and then either running some MySQL queries or running an Install file...

 

Would a move to "put entire PHP applications into a single file called a "phar" (PHP Archive) for easy distribution and installation" be better?

 

I'm not even sure I understand the whole concept... Would it actually benefit anything, or is it just a different way of going about things? Anyone have any thoughts on that?

Link to comment
Share on other sites

I've used Phar before. I like the idea of it. Basically, you download and drop a single file into a directory, then PHP sees the inside like an archive (which it is). It means you can store a complete directory structure inside it for ease.

 

I think it's way more geared towards extensions/addons, rather than a complete application of course.

 

I do like the idea of this, would make deploying modules/gateways/plugins an absolute breeze, simply drop your phar file into the appropriate directory and have Blesta recognise it as installed.

 

However, as a point of interest, it would need to support both ways of handling packages (directory and phar), as development would be painful to have to keep bundling code while writing just to test a small change.

 

I have to question whether it would be beneficial for things that require ion-cube, if you could encrypt a complete phar file, would make for some interesting viewing.

Link to comment
Share on other sites

I like the idea of the Phar. Last time I really lookes at them they seemed kind of half baked and wasn't too sure about them. This was when 5.2 was in beta, though.

Namespaces, on the other hand, are freaking awesome! I don't know how I lived without them for so long.

 

OMG... how true is that statement!!!! They are absolutely brilliant!

Link to comment
Share on other sites

so what you're telling me is that I should probably stay away from it for now too... OK! lol thanks for information, I had just stumbled across it and wasn't sure if it would actually benefit anything or what

 

I like the idea of it, but I have never heard of an actual commercial PHP application distributed in this format.

Link to comment
Share on other sites

I like the idea of it, but I have never heard of an actual commercial PHP application distributed in this format.

Not even sure how that would work. You can't actually run a PHar directly right? You still require something external to instantiate and process the application? (ie. A bootstrap).

Link to comment
Share on other sites

I just wasn't sure... Is it actually workable for a full version of something? 

 

....

 

or should I just play around for now until maybe later?

 

For Blesta; You could build your libraries for Blesta using it, but you would still require the basic infrastructure that Blesta requires, then hook into it.

 

As for normal production, if you handing the app to somebody else, it sounds cool. If you coding for something that is on your own infrastructure, I just can't see the benefit.

 

Of course, I have a very limited understanding of it so I may be looking at it all wrongly.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...