Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
134 lines (77 sloc) 3.8 KB

Installation

If you want to use atoum, simply download the latest version.

You can install atom in several ways:

Composer

Composer is a dependency management tool in PHP.

Be sure you have a working composer installation.

Add atoum/atoum as a dev dependency :

composer require --dev atoum/atoum

PHAR archive

A PHAR (PHp ARchive) is created automatically on each modification of atoum.

PHAR is an archive format for PHP application.

Installation

You can download the latest stable version of atoum directly from the official website: http://downloads.atoum.org/nightly/atoum.phar

Update

To update the PHAR archive, just run the following command:

$ php -d phar.readonly=0 atoum.phar --update

Note

The update process modifies the PHAR archive. But the default PHP configuration doesn't allow this. So it is mandatory to use the directive -d phar.readonly=0.

If a newer version is available it will be downloaded automatically and installed in the archive:

$ php -d phar.readonly=0 atoum.phar --update
Checking if a new version is available... Done !
Update to version 'nightly-2416-201402121146'... Done !
Enable version 'nightly-2416-201402121146'... Done !
Atoum was updated to version 'nightly-2416-201402121146' successfully !

If there is no newer version, atoum will stop immediately:

$ php -d phar.readonly=0 atoum.phar --update
Checking if a new version is available... Done !
There is no new version available !

atoum doesn't require any confirmation from the user to be upgraded, because it's very easy to get back to a previous version.

List the versions contained in the archive

You can list versions in the archive by using the argument --list-available-versions, or -lav:

$ php atoum.phar -lav
  nightly-941-201201011548
  nightly-1568-201210311708
* nightly-2416-201402121146

The list of versions in the archive is displayed. The currently active version is preceded by *.

Change the current version

To activate another version, just use the argument --enable-version, or -ev, followed by the name of the version to use:

$ php -d phar.readonly=0 atoum.phar -ev DEVELOPMENT

Note

Modification of the current version requires the modification of the PHAR archive. The default PHP configuration doesn't allow this. So it is mandatory to use the directive -d phar.readonly=0.

Deleting older versions

Over time, the archive may contain multiple versions of atoum which are no longer required.

To remove them, just use the argument --delete-version, or -dv followed by the name of the version to deleted:

$ php -d phar.readonly=0 atoum.phar -dv nightly-941-201201011548

The version is then removed.

Warning

It's not possible to delete the current version.

Note

Deleting a version requires the modification of the PHAR archive. the default PHP configuration doesn't allow this. So it is mandatory to use the directive -d phar.readonly=0.

Github

If you want to use atoum directly from source code, you can clone or « fork » the github repository: git://github.com/atoum/atoum.git