Giter Club home page Giter Club logo

box2's People

Contributors

christiaan avatar cordoval avatar empi89 avatar fabpot avatar flip111 avatar hason avatar ickbinhier avatar jojosch avatar keradus avatar kherge avatar kherrera-ebsco avatar mbrodala avatar mhor avatar ocramius avatar pborreli avatar sasezaki avatar smatyas avatar stof avatar theofidry avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

box2's Issues

Building fatals when building a larger project

When I try to build a phar for phpDocumentor I get the following error:

? Generating new stub...
? Compressing...
PHP Fatal error:  Uncaught exception 'ErrorException' with message 'proc_open(): unable to create pipe Too many open files' in phar:///home/mvriel/Copy/Projects/OSS/phpDocumentor/phpDocumentor2/box.phar/src/vendors/symfony/console/Symfony/Component/Console/Application.php:974
Stack trace:
#0 [internal function]: KevinGH\Box\Application->KevinGH\Box\{closure}(2, 'proc_open(): un...', 'phar:///home/mv...', 974, Array)
#1 phar:///home/mvriel/Copy/Projects/OSS/phpDocumentor/phpDocumentor2/box.phar/src/vendors/symfony/console/Symfony/Component/Console/Application.php(974): proc_open('stty -a | grep ...', Array, NULL, NULL, NULL, Array)
#2 phar:///home/mvriel/Copy/Projects/OSS/phpDocumentor/phpDocumentor2/box.phar/src/vendors/symfony/console/Symfony/Component/Console/Application.php(793): Symfony\Component\Console\Application->getSttyColumns()
#3 phar:///home/mvriel/Copy/Projects/OSS/phpDocumentor/phpDocumentor2/box.phar/src/vendors/symfony/console/Symfony/Component/Console/Application.php(754): Symfony\Component\Console\Application in phar:///home/mvriel/Copy/Projects/OSS/phpDocumentor/phpDocumentor2/box.phar/src/vendors/symfony/console/Symfony/Component/Console/Application.php on line 974

More verbose create command

The --verbose option should cause the create command to output more information than just the files that are added.

The verbose output should also include whether user given or default information is used.

An example would be: Was a user given stub file used, or was one generated by Box?

This could be useful for debugging configuration settings.

Support multiple locales in app messages

The messages output by Box should support more locales than just English.

I will probably use Symfony's Translator component and bundle an English localization file for starters.

Unable to install kherge/version

When trying to install dependencies for kherge/box I eventually end up trying to install kherge/version. Here the following happens:

Installing kherge/version (1.0.1)
    Downloading: connection...
Could not fetch https://api.github.com/repos/kherge/Version/zipball/f07cf83f8ce533be8f93d2893d96d674bbeb7e30, enter your GitHub credentials to access private repos
The credentials will be swapped for an OAuth token stored in /Users/kasper/.composer/config.json, your password will not be stored
To revoke access to this token you can visit https://github.com/settings/applications
Username: kasperg
Password:
    Downloading: connection...


  [Composer\Downloader\TransportException]
  The "https://api.github.com/repos/kherge/Version/zipball/f07cf83f8ce533be8f93d2893d96d674bbeb7e30" file could not be downloaded (H
  TTP/1.1 404 Not Found)

I guess this happens because the project has been deprecated/moved and composer cannot handle this.

If kherge/version has been deprecated for herrera-io/php-version I think some more composer files need to be updated to reflect this as well.

Load only used classes

It would be great if Box somehow figured out which classes were used, and only included those in the load.

The workaround for now is using an explicit file list to list all of the files.

Consider adding an option to avoid comment stripping

At the moment, all comments are stripped by default. This introduces bugs in the compiled code if for example Doctrine annotations are removed.

I'd therefore suggest to make this an optional switch can be enabled/disabled, or not strip Doctrine annotations. The latter seems more complex though.

Installer is failing

Hello
when I run

curl -s http://box-project.org/installer.php | php

I get the warnings below, and the resulting box.phar file doesn't do anything.

I am running Mac OSX 10.8.4
PHP 5.3.25 (cli) (built: May 29 2013 12:16:24)

Thanks
Todd

ERROR

Checking requirements...
PHP Notice: Use of undefined constant STDERR - assumed 'STDERR' in - on line 13
PHP Stack trace:
PHP 1. {main}() -:0
PHP 2. Installer::run() -:3
PHP 3. Installer::checkRequirements() -:8
PHP 4. Installer::assert() -:10
PHP 5. Installer::warn() -:9

Notice: Use of undefined constant STDERR - assumed 'STDERR' in - on line 13

Call Stack:
0.2043 775464 1. {main}() -:0
0.2043 775464 2. Installer::run() -:3
0.2043 775464 3. Installer::checkRequirements() -:8
0.2044 776360 4. Installer::assert() -:10
0.2044 776360 5. Installer::warn() -:9

PHP Warning: fwrite() expects parameter 1 to be resource, string given in - on line 13
PHP Stack trace:
PHP 1. {main}() -:0
PHP 2. Installer::run() -:3
PHP 3. Installer::checkRequirements() -:8
PHP 4. Installer::assert() -:10
PHP 5. Installer::warn() -:9
PHP 6. fwrite() -:13

Warning: fwrite() expects parameter 1 to be resource, string given in - on line 13

Call Stack:
0.2043 775464 1. {main}() -:0
0.2043 775464 2. Installer::run() -:3
0.2043 775464 3. Installer::checkRequirements() -:8
0.2044 776360 4. Installer::assert() -:10
0.2044 776360 5. Installer::warn() -:9
0.2046 776616 6. fwrite() -:13

Downloading...
Done!

Consider Added support to map file

Hello. I'm trying your library. It seems cool, thanks.
But I have an issue.

I use composer, with the native autoloader, but I use a mount point like that This is not my project, this is just a sample.

My issue is that the autoloader can find class a the root of my project. But If I hack and copy the lib to the target-dir, it works.

So it could me very nice to add a new option: a map between real path, and phar path:

"map": {
  "src": "SensioLabs/Bundle/ConnectBundle"
}

Add deployment command

A command for deploying an updated box.phar would be extremely useful, and simplify the update-commit-push-create-publish cycle.

Only update within same major version

The Box application must only be able to update within its own major version.

If a new major version is available, an option like --upgrade must be used.

This will prevent somebody from upgrading from 1.0 to 2.0, and potentially breaking their PHAR building setup.

This will affect the update command and the installer script.

Error including "index.php" even when "web" is set to false.

I'm on the latest build of Box 2.0. I tried basically started with the box.json.dist file that ships with Box when making my own box file, which looks like this:

{
    "alias": "craft.phar",
    "chmod": "0755",
    "directories": ["src/lib"],
    "finder": [
        {
            "name": "*.php",
            "exclude": [
                "phpunit",
                "phpunit-test-case",
                "Tester",
                "Tests",
                "tests",
                "yaml"
            ],
            "in": "src/vendors"
        }
    ],
    "main": "bin/craft",
    "output": "craft.phar",
    "stub": true
}

However, I am getting an error that the index.php doesn't exist when actually trying to run the generated Phar. So, I cloned down Box itself and ran box build and get the same error on a clean clone of Box:

Warning: include(phar:///media/sf_Code/Laboratory/Box/box-2.0.0-rc.1-8-g77f3c19.phar/index.php):

Add support for Phar::interceptFileFuncs

Add a configuration option that toggles the use of Phar::interceptFileFuncs on and off.

This option will likely only be supported by the default stub generated by Box.

box.phar returns Hs?

When I try to run box.phar after installing the project using the installer the command always seems to return Hs?.

If I clone the master branch of the project, install dependencies using composer and finally run php ./bin/box I get the expected Symfony console application overview.

Is there a problem with the current box.phar or could it be something that is not configured right on my local system?

I'm using:

  • OSX 10.8.3
  • PHP 5.3.16

Load third-party compactors using Phar

The Box Phar should be able to load third-party compactors.

There would probably needs to be an optional configuration setting that builders can use to specific an bootstrap file that can be included by Box prior to the build process.

Error on adding the same file twice

I am just wondering how to show an error message if users add the same file twice to the phar, e.g. by specifying a directory and including files of the directory via the finder method too. Currently there is only a call to addFile (https://github.com/kherge/Box/blob/2.0/src/lib/KevinGH/Box/Command/Build.php#L668) without checking if the file is already in. The underlying library does not hold a state which files are in the phar (https://github.com/herrera-io/php-box/blob/master/src/lib/Herrera/Box/Box.php#L117) and could not check either.

Maybe it would be good to change the library to store all added files in an array and expose a method like getFiles() or isFileOnPath($path)?

installer.php not always available.

My travis builds are failing recently, because the http://box-project.org/installer.php is sometimes not available.

Example output from curl:

$ curl --verbose http://box-project.org/installer.php
* About to connect() to box-project.org port 80 (#0)
* Trying 204.232.175.78... connected
> GET /installer.php HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: box-project.org
> Accept: */*
> 
< HTTP/1.1 302 Found
< Connection: close
< Pragma: no-cache
< cache-control: no-cache
< Location: /installer.php
<
* Closing connection #0

Would a different call to curl fix this?

Maybe using '--location' or '--retry 3'.

Can't install on php 5.3.10 with Suhosin-Patch

Box installer doesn't work on php 5.3.10 with Suhosin patch

As far as I understand adding suhosin.executor.include.whitelist = phar will work only for Suhosin extension. Suhosin patch seems to ignore this keyword.

After I commented out suhosin check, installed worked as expected, so it seems that white listing isn't required for patch.

Composer installer checks white list only for extension: composer/getcomposer.org@9b43609

Also similar issue can be seen here symfony/symfony#5444 (comment)

Use constant names instead of values

It would be far better to use the Phar::* constants instead of setting their values directly in the configuration file.

{
    "algorithm": "SHA1"
}

Would resolve to constant("Phar::$algorithm") if it exists.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.