2017 © Pedro Peláez
 

application pickle

Installer for PHP extension, supports pecl package or install from src tree directly

image

friendsofphp/pickle

Installer for PHP extension, supports pecl package or install from src tree directly

  • Wednesday, September 6, 2017
  • by pborreli
  • Repository
  • 65 Watchers
  • 1075 Stars
  • 2,994 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 47 Forks
  • 25 Open issues
  • 9 Versions
  • 0 % Grown

The README.md

pickle - PHP Extension installer SensioLabsInsight

Pickle installs PHP extensions easily on all platforms., (*1)

Code Climate Scrutinizer Code Quality Code Coverage Build Status, (*2)

Installation

Grab the latest phar at https://github.com/FriendsOfPHP/pickle/releases/latest, (*3)

wget https://github.com/FriendsOfPHP/pickle/releases/latest/download/pickle.phar

and run using, (*4)

$ php pickle.phar

or add the execute flag, (*5)

$ chmod +x pickle.phar

then run as:, (*6)

$ pickle.phar info apcu

You can also rename the phar to "pickle", (*7)

$ mv pickle.phar pickle

so it can be called using pickle only., (*8)

And finally you can add it to your path or copy it in /usr/local/bin or your favorite binary directory., (*9)

On windows, use, (*10)

$ php pickle.phar

or create a .bat containing:, (*11)

@echo OFF
setlocal DISABLEDELAYEDEXPANSION
c:\path\to\php.exe "c:\path\to\pickle.phar" %*

If someone would be kind enough to write an installer script, we would be eternally thankful :), (*12)

Introduction

Pickle is a new PHP extension installer. It is based on Composer and the plan is to get Composer to fully support it. See https://github.com/composer/composer/pull/2898#issuecomment-48439196 for the Composer part of the discussions., (*13)

Pickle fully supports existing extensions in http://pecl.php.net, running the following will install the latest available version of the memcache extension:, (*14)

$ pickle install memcache

Windows is fully supported, to install binaries or from the sources (work in progress and given that you have a working build environment in place)., (*15)

The concept behind Pickle is to ease the life of both developers and end users., (*16)

For end users, nothing changes much except that Pickle is based on modern concepts and works with multiple protocols (git or http(s) URLs)., (*17)

For developers, it drastically reduces the release work. Extension meta information is not duplicated anymore. Configuration options, files to package etc. are automatically fetched from the sources and the respective files are updated during the release process. There is no risk anymore of forgetting to update the version here or there, or to neglect to include a file., (*18)

Installation From Sources

While the phar usage is recommended, one is indeed able to use it from git., (*19)

Clone this repository and install the dependencies with Composer:, (*20)

$ composer install

If you like to create your own phar from the pickle sources, you will need to install Box (http://box-project.github.io/box2/). Then clone the repository and run the following commands:, (*21)

$ cd pickle
$ composer install --no-dev --optimize-autoloader
$ php -d phar.readonly=0 box.phar build

Usage

Usage is pretty straightforward. For example, to install the memcache extension run the following command:, (*22)

$ bin/pickle install memcache

If you need to install a specific version of an extension, you may do so:, (*23)

$ bin/pickle install redis@5.3.2

You can also use pickle from your extension directory, the following command:, (*24)

$ cd myext
$ bin/pickle install

A list of the commands is available using:, (*25)

$ bin/pickle list

To get extended help for a given command, use:, (*26)

$ bin/pickle help install

To convert a package (based on package.xml current PECL installer), use:, (*27)

$ bin/pickle convert /home/pierre/myext/

Or run it from the extension source directory., (*28)

Contributing

Fork the project, create a feature branch and send us a pull request., (*29)

To ensure a consistent code base, you should make sure the code follows the PSR-1 and PSR-2 coding standards., (*30)

To check CS issues, you can use the cs-check composer command:, (*31)

$ composer run cs-check

To automatically fix CS issues, you can use the cs-fix composer command:, (*32)

$ composer run cs-fix

Support

Support is available via the issue tracker in the Github project page or via IRC, EFNet, channel #pickle., (*33)

Running tests

You should run the tests by setting the PICKLE_PECL_TESTSERVER environment variable to yes (or true or 1). This implies that test are executed using a well-defined environment instead of using a live web server., (*34)

# On Unix-like systems
export PICKLE_PECL_TESTSERVER=yes
# On Windows systems
set PICKLE_PECL_TESTSERVER=yes

Unit tests are written using atoum. You will get atoum, among other dependencies, when running composer install. To run tests, you will need to run the following command:, (*35)

$ vendor/bin/atoum

# To run tests in a loop, ideal to do TDD
$ vendor/bin/atoum --loop

There are also some Behat tests. You will get Behat, among other dependencies, when running composer install. To run tests, you will need to run the following command:, (*36)

$ vendor/bin/behat

# To choose the test suite you want to run
$ vendor/bin/behat -s pickle

Behat tests also test the phar, generate it prior to run the full test as described here (composer install --no-dev mode)., (*37)

Pickle is covered using 4 Behat tests suites:, (*38)

  • pickle runs tests against pickle's sources
  • pickle_phar runs tests against pickle's Phar which you have to manually build
  • pecl tests PECL extensions conversion with pickle's sources
  • phar_pecl tests PECL extensions conversion with pickle's Phar

The Versions

06/09 2017

dev-master

9999999-dev https://github.com/FriendsOfPHP/pickle

Installer for PHP extension, supports pecl package or install from src tree directly

  Sources   Download

PHP-3.01

The Requires

 

The Development Requires

02/09 2016

dev-fabpot-patch-1

dev-fabpot-patch-1 https://github.com/FriendsOfPHP/pickle

Installer for PHP extension, supports pecl package or install from src tree directly

  Sources   Download

PHP-3.01

The Requires

 

The Development Requires

02/01 2016

dev-deploy-phar

dev-deploy-phar https://github.com/FriendsOfPHP/pickle

Installer for PHP extension, supports pecl package or install from src tree directly

  Sources   Download

PHP-3.01

The Requires

 

The Development Requires

24/11 2015

dev-perm-issues-config

dev-perm-issues-config https://github.com/FriendsOfPHP/pickle

Installer for PHP extension, supports pecl package or install from src tree directly

  Sources   Download

PHP-3.01

The Requires

 

The Development Requires

23/02 2015

v0.4.0

0.4.0.0 https://github.com/FriendsOfPHP/pickle

Installer for PHP extension, supports pecl package or install from src tree directly

  Sources   Download

PHP-3.01

The Requires

 

The Development Requires