Download the PHP package cbednarski/pharcc without Composer

On this page you can find all versions of the php package cbednarski/pharcc. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package pharcc

pharcc

pharcc is a command-line tool that converts your php project into a single, executable .phar file for easy distribution.

Build Status Roadmap Items

Installation

pharcc requires php 5.3+. You must also set phar.readonly = Off in your php.ini or you will be unable to compile .phar files.

Via .phar

The easiest way to get it working is to download a tagged pharcc.phar release, and put this on your path. For example:

$ wget https://github.com/cbednarski/pharcc/releases/download/v0.2.3/pharcc.phar
$ chmod +x pharcc.phar
$ sudo mv pharcc.phar /usr/local/bin/pharcc

Other ways

Composer (thanks @clue):

$ composer global require cbednarski/pharcc=dev-master
$ echo 'export PATH=$PATH:$HOME/.composer/vendor/bin' >> ~/.bash_profile

From source:

$ git clone https://github.com/cbednarski/pharcc
$ cd pharcc
$ make install      # For using
$ make install-dev  # For hacking

Usage

pharcc is a command-line tool that examines your project and produces a .phar file. cd into your project root and run the following:

$ pharcc init
$ pharcc build

You can also use pharcc as a library and call the internals directly, but if you do that I'm going to assume you're comfortable reading the code yourself. It's pretty short. Comments are welcome!

How it works

A phar is essentially a slew of php files that are concatenated together to create a single, executable php file, complete with assets and such. pharcc reads a .pharcc.yml file from the root of your project and, combined with some assumed conventions, builds an executable phar for you.

I assume the following:

Based on our assumptions, I've selected some sensible defaults for which files to include or exclude from your .phar file, which you can customize by editing the .pharcc.yml file. If your application is not a console app, you can omit main from the config.

Your Project Layout

I assume your project layout looks something like this, which is pretty standard for PSR-0 applications:

.
├── LICENSE
├── bin
│   └── pharcc
├── composer.json
├── readme.md
├── src
│   └── cbednarski
│       └── Pharcc
├── tests
│   └── cbednarski
│       └── Pharcc
└── vendor
    ├── autoload.php
    ├── cbednarski
    │   └── fileutils
    ├── composer
    │   ├── ClassLoader.php
    └── symfony
        ├── console
        ├── finder
        └── yaml

If your application doesn't look like this pharcc will probably still work, but you'll need to tweak your .pharcc.yml with some other appropriate includes / excludes.

Version Reporting

If your project is in git, uses semver tags for releases, and uses the symfony console component, pharcc can report the version of your application on the commandline. For example:

$ pharcc --version
pharcc version 0.2.3

To make this work in your app, you'll need to add cbednarski\Pharcc\Git::getVersion(__DIR__) to your bin file.

Note: The current implementation is pretty magic, and only works if you worship the git, semver, and symfony console component gods.

Contributing

Contributions are welcome! Please don't hesitate to file a bug, pull-request a feature, or let me know what could be made easier to use.

Check out the list of ready-for-dev items here: Roadmap Items Here are some guidelines to follow:


All versions of pharcc with dependencies

PHP Build Version
Package Version
Requires cbednarski/fileutils Version 0.1.*
symfony/finder Version 2.3.*
symfony/console Version 2.3.*
symfony/yaml Version 2.3.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package cbednarski/pharcc contains the following files

Loading the files please wait ....