Skip to content
This repository has been archived by the owner on Sep 6, 2020. It is now read-only.

Question and/or Issue about compresssion #98

Closed
llaville opened this issue Jan 26, 2015 · 5 comments
Closed

Question and/or Issue about compresssion #98

llaville opened this issue Jan 26, 2015 · 5 comments
Assignees
Labels

Comments

@llaville
Copy link

As specified by help itself

The compression (string, integer) setting is the compression algorithm
 to use when the Phar is built. The compression affects the individual
 files within the Phar, and not the Phar as a whole (Phar::compressFiles()).
 The following is a list of the signature algorithms listed on the help
 page:

   - BZ2 (Phar::BZ2)
   - GZ (Phar::GZ)
   - NONE (Phar::NONE)

I've tried with box 2.5.0 to put in my box.json config file ,

{
    "compression": "NONE"
}

After building the contents, I got an exception on console output

? Compressing...

  [BadMethodCallException]
  Unknown compression specified, please pass one of Phar::GZ or Phar::BZ2

My platform PHP 5.6.5 with phar directives, given by php --ri phar

Phar

Phar: PHP Archive support => enabled
Phar EXT version => 2.0.2
Phar API version => 1.1.1
SVN revision => $Id: ac6bd272c417316cc97fd46ea4f8372dcf054406 $
Phar-based phar archives => enabled
Tar-based phar archives => enabled
ZIP-based phar archives => enabled
gzip compression => enabled
bzip2 compression => enabled
OpenSSL support => enabled

Did I missed something, or misunderstood feature ?

@llaville
Copy link
Author

One month since I've opened this issue.
ping @kherge

@kherge
Copy link
Contributor

kherge commented Feb 27, 2015

Sorry for the wait!

Have you tried building your phar without the "compression" setting at all?

I think I may have misunderstood or incorrectly used the Phar::NONE constant. If you're able to build it without the option, I'll have fix the documentation.

@llaville
Copy link
Author

llaville commented Mar 1, 2015

Yes, without compression option, the phar was built. It may be usefull if compression: NONE works, because we can switch easily between NONE to another value like GZ or BZ2

@kherge kherge added the Bug label Mar 4, 2015
@kherge kherge self-assigned this Mar 4, 2015
@kherge kherge closed this as completed in 6e53b90 Mar 4, 2015
@kherge
Copy link
Contributor

kherge commented Mar 4, 2015

It should be fixed now. Please try the new version (box update).

@llaville
Copy link
Author

llaville commented Mar 4, 2015

I've just uploaded and tested the new 2.5.2 version.
It works like a charm (at least on Windows platform) Thanks a lot !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants