Download the PHP package jaz303/phake without Composer

On this page you can find all versions of the php package jaz303/phake. 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 phake

phake - Rake/Make for PHP 5.3 Build Status

© 2010 Jason Frame [ @jaz303 ]
Released under the MIT License.

A wee clone of Ruby's rake for PHP 5.3. Uses closures for ultimate coolness.

Questions abut phake? Come and chat in #phake on Freenode!

Usage

Defining Tasks

Define tasks like this:

task('dependency1', function() {
    echo "i will run first!\n";
});

task('dependency2', function() {
    echo "i will run second!\n";
});

task('task_name', 'dependency1', 'dependency2', function() {
    echo "i will run last!\n";
});

This task would be invoked from the command line by ./phake task_name

Task bodies are optional if you want to create some sort of "super-task" that just invokes a bunch of others:

task('foo', 'dep1', 'dep2');

And multiple bodies can be added to tasks, all of which will be executed when the task is invoked:

task('foo', function() { echo "task work item 1\n"; });
task('foo', function() { echo "task work item 2\n"; });

Grouping Tasks

Like Rake, we can group tasks:

group('db', function() {
    task('init', function() {
        echo "i'm initialising the database\n";
    });
});

This would be invoked by ./phake db:init

Describing Tasks

Call desc() immediately before defining a task to set its description:

desc("Initialises the database");
task('db_init', function() { echo "oh hai it's a database\n"; });

Output from ./phake -T:

db_init    Initialises the database

After/Before Blocks

Sometimes you may want to specify that some code should run before or after a task (distinct from dependencies), a bit like Capistrano. Phake supports this:

before('foo', function() { ... });
after('baz:bar', function() { ... });

Task Arguments

Phake allows arguments to specified on the command line:

# Execute task `quux` with the given args
./phake quux name=Jason city=Glasgow

This format must be matched exactly; do not put spaces between = and the argument name/value. If you need to put spaces in the argument value, place the entire assignment in quotes.

Arguments are made available to tasks by the application object's ArrayAccess implementation:

task('task_with_args', function($app) {
    $name = $app['name'];
    $city = $app['city'];
    // do some stuff...
});

Aborting Execution

To abort execution of a task sequence, simply throw an exception.

desc('Demonstrate failure');
task('fail', function() {
    throw new Exception;
});

Running phake fail will yield:

- jason@disco phake % ./bin/phake fail
(in /Users/jason/dev/projects/phake)
aborted!
Exception 

(See full trace by running task with --trace)

A Somewhat More Complete Example

This is what a complete Phakefile might look like. It also highlights some of the more complex name resolution issues arising when dealing with groups.

Here's the output from ./phake (implied task to run is default):

jason@ratchet phake [master*] $ ./phake
(in /Users/jason/dev/projects/phake)
I am the outer environment. I should run first.
I am the inner environment. I should run second.
I am initialising the database...
Running unit tests...
Running a second batch of unit tests...
All tests complete! (<phake\Application>)

And the corresponding output from phake -T:

jason@ratchet phake [master*] $ ./phake -T
(in /Users/jason/dev/projects/phake)
database        Initialises the database connection
environment     Load the application environment
test:all:run    Run absolutely every test everywhere!
test:units      Run the unit tests

Bash Autocompletion

Bashkim Isai has created phake-autocomplete, a bash-completion script for phake task names.


All versions of phake with dependencies

PHP Build Version
Package Version
No informations.
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 jaz303/phake contains the following files

Loading the files please wait ....