Bit Bayou Posted July 16, 2013 Report Posted July 16, 2013 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? Quote
Scott Horsley Posted July 16, 2013 Report Posted July 16, 2013 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. Quote
Paul Posted July 16, 2013 Report Posted July 16, 2013 We had this discussion internally a long time ago, and chose not to use it for many reasons. What all those reasons were, I can't remember.. but it has a requirement of PHP 5.2, which would raise our minimum requirement. Quote
xison Posted July 17, 2013 Report Posted July 17, 2013 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. Scott Horsley 1 Quote
Scott Horsley Posted July 17, 2013 Report Posted July 17, 2013 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! Quote
Bit Bayou Posted July 18, 2013 Author Report Posted July 18, 2013 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 Quote
Paul Posted July 18, 2013 Report Posted July 18, 2013 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. Quote
Scott Horsley Posted July 18, 2013 Report Posted July 18, 2013 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). Quote
Max Posted July 19, 2013 Report Posted July 19, 2013 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). Looking at the intro page ( http://www.php.net/manual/en/phar.using.intro.php ) it seems you can set bootstrap code with setStub() Quote
Bit Bayou Posted July 20, 2013 Author Report Posted July 20, 2013 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? Quote
Scott Horsley Posted July 22, 2013 Report Posted July 22, 2013 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. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.