PHP Extension installer

Related tags

Miscellaneous pickle
Overview

pickle - PHP Extension installer SensioLabsInsight

Pickle installs PHP extensions easily on all platforms.

Code Climate Scrutinizer Code Quality Code Coverage Build Status

Installation

Grab the latest phar at https://github.com/FriendsOfPHP/pickle/releases/latest

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

and run using

$ php pickle.phar

or add the execute flag

$ chmod +x pickle.phar

then run as:

$ pickle.phar info apcu

You can also rename the phar to "pickle"

$ mv pickle.phar pickle

so it can be called using pickle only.

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

On windows, use

$ php pickle.phar

or create a .bat containing:

@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 :)

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.

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

$ 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).

The concept behind Pickle is to ease the life of both developers and end users.

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

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.

Installation From Sources

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

Clone this repository and install the dependencies with Composer:

$ 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:

$ 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:

$ bin/pickle install memcache

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

$ bin/pickle install [email protected]

You can also use pickle from your extension directory, the following command:

$ cd myext
$ bin/pickle install

A list of the commands is available using:

$ bin/pickle list

To get extended help for a given command, use:

$ bin/pickle help install

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

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

Or run it from the extension source directory.

Contributing

Fork the project, create a feature branch and send us a pull request.

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

To check CS issues, you can use the cs-check composer command:

$ composer run cs-check

To automatically fix CS issues, you can use the cs-fix composer command:

$ composer run cs-fix

Support

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

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.

# 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:

$ 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:

$ 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).

Pickle is covered using 4 Behat tests suites:

  • 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
Comments
  • Can't install Xdebug when building a php8.2 container in DIND

    Can't install Xdebug when building a php8.2 container in DIND

    I'm using docker in docker (DIND) to build my base php8.2 container and I'm running into an issue trying to install xdebug that only shows up in DIND: https://gitlab.com/portlandlabs/containers/-/jobs/3481867623

    2: /tmp/xdebug/xdebug-3.2.0/src/base/filter.c:346:10: fatal error: mm.h: No such file or directory
    2:   346 | #include "mm.h"
    2:       |          ^~~~~~
    2: compilation terminated.
    

    This seems to be caused by base/filter.c somehow including the content of lib/str.c during compilation. See https://github.com/mlocati/docker-php-extension-installer/issues/674 for more info about the issue

    opened by KorvinSzanto 3
  • Optimize memory usage when logging output of an executed command.

    Optimize memory usage when logging output of an executed command.

    Problem

    During command execution, output gets buffered in $out array for further logging. The content of the array is then composed in a single log message.

    Use of array leads to unnecessary memory consumption.

    Solution

    Do not buffer command execution output in an array; instead, compose log message right away.

    opened by givanov2 2
  • php.ini is not updated after installation.

    php.ini is not updated after installation.

    I was installing redis pickle install redis the installation went successfully but the extension was not auto enabled in php.ini, when I used pecl pecl install redis it updates the php.ini file at the top with `extension="redis.so". Am I missing something?

    opened by yamenarahman 3
  • fix issue#253 window install failed

    fix issue#253 window install failed

    Fixes https://github.com/FriendsOfPHP/pickle/issues/253

    1. Remove undefined method Binary::setInput and DependencyLib::setInput
    2. Support Additional .ini Path
    3. Support deplister.exe not in Path
    4. Implementing PHPUnzipper function exttactTo
    opened by xiaoliwang 2
  • Fix default stability

    Fix default stability

    Fixes https://github.com/FriendsOfPHP/pickle/issues/247

    Previous behavior: default to latest version, if no stability or version was requested. New behavior: default to stable.

    opened by b1rdex 5
  • Bump composer/composer from 1.10.24 to 1.10.26

    Bump composer/composer from 1.10.24 to 1.10.26

    Bumps composer/composer from 1.10.24 to 1.10.26.

    Release notes

    Sourced from composer/composer's releases.

    1.10.26

    • Security: Fixed command injection vulnerability in HgDriver/GitDriver (GHSA-x7cr-6qr6-2hh6 / CVE-2022-24828)

    1.10.25

    • Fixed selfupdate on Windows + PHP 8.1 regression (#10446)
    Changelog

    Sourced from composer/composer's changelog.

    [1.10.26] 2022-04-13

    • Security: Fixed command injection vulnerability in HgDriver/GitDriver (GHSA-x7cr-6qr6-2hh6 / CVE-2022-24828)

    [1.10.25] 2022-01-21

    • Fixed selfupdate on Windows + PHP 8.1 regression (#10446)
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
Releases(v0.7.11)
Owner
null
PHP Extension installer

pickle - PHP Extension installer Pickle installs PHP extensions easily on all platforms. Installation Grab the latest phar at https://github.com/Frien

null 1.6k Dec 27, 2022
Universal extension installer for Magento 2, see introductory blog post here

ExtDN Installer for Magento 2 modules The installation of extensions for Magento 2 has a few scenarios to cover depending on your starting position (M

ExtDN 26 Apr 1, 2022
This is wegare tools but all-in-one installer only, exclude GUI

All In One Installer for Wegare Tools This is wegare tools, but this is all-in-one. Here is the source https://github.com/wegare123?tab=repositories I

Helmi Amirudin 3 Jul 29, 2022
OSX/Linux Docker containers installer for Magento 2

Magento 2 OSX/Linux Docker Requirements MacOS: Docker, docker-sync, Git Linux: Docker, Docker-compose, Git on Debian based OS (Example: Ubuntu, Linux

Osiozekhai Aliu 54 Dec 10, 2022
An installer package that let's you install NodeJS and NPM as a Composer dependency.

NodeJS installer for Composer This is an installer that will download NodeJS and NPM and install them in your Composer dependencies. Installation is s

TheCodingMachine 106 Sep 30, 2022
Composer installer for PHP_CodeSniffer coding standards

PHP_CodeSniffer Standards Composer Installer Plugin This composer installer plugin allows for easy installation of PHP_CodeSniffer coding standards (r

Dealerdirect 462 Dec 22, 2022
pine - A CLI installer for timber

pine - A CLI installer for timber A CLI tool written in PHP based on symfony console to easily create a WordPress (Timber) project. Installation compo

Azeem Hassni 29 Aug 24, 2022
This composer installer plugin allows for easy installation of PHP_CodeSniffer coding standards

PHP_CodeSniffer Standards Composer Installer Plugin This composer installer plugin allows for easy installation of PHP_CodeSniffer coding standards (r

PHPCSStandards 393 Feb 25, 2022
TrovCMS command line installer.

Trov CMS Installer TrovCMS is a start kit for websites, built on Filament and Laravel. This install allows you to quickly spin up new sites to hit the

TrovCMS 12 Dec 26, 2022
Magento 2 Extension to cleanup admin menu and Store > Configuration area by arranging third party extension items.

Clean Admin Menu - Magento 2 Extension It will merge all 3rd party extension's menu items in backend's primary menu to a common menu item named "Exten

RedChamps 109 Jan 3, 2023
Magento 2 Blog Extension is a better blog extension for Magento 2 platform. These include all useful features of Wordpress CMS

Magento 2 Blog extension FREE Magento 2 Better Blog by Mageplaza is integrated right into the Magento backend so you can manage your blog and your e-c

Mageplaza 113 Dec 14, 2022
PHP Meminfo is a PHP extension that gives you insights on the PHP memory content

MEMINFO PHP Meminfo is a PHP extension that gives you insights on the PHP memory content. Its main goal is to help you understand memory leaks: by loo

Benoit Jacquemont 994 Dec 29, 2022
Generate stubs for any PHP extension.

php-ext-stubs-generator Installation Run $ composer require --dev lctrs/php-ext-stubs-generator Usage $ php vendor/bin/generate-stubs-for-ext extensio

null 5 Dec 14, 2022
PHP extension for V8 JavaScript engine

php-v8 PHP extension for V8 JavaScript engine This extension requires PHP >= 7.2. Last version that supports PHP 7.1 is v0.2.2 and for PHP 7.0 is v0.1

PHP V8 207 Nov 24, 2022
Easily install PHP extension in Docker containers

Easy installation of PHP extensions in official PHP Docker images This repository contains a script that can be used to easily install a PHP extension

Michele Locati 2.8k Jan 4, 2023
A PHP API extension the 'An API of Ice and Fire'

This documentation is meant to enable you to consume our API and get you started right away using your favourite programming language. All endpoints and HTTP methods to be used have been detailed with a sample example for e

David Syengo 1 Mar 26, 2022
JSONFinder - a library that can find json values in a mixed text or html documents, can filter and search the json tree, and converts php objects to json without 'ext-json' extension.

JSONFinder - a library that can find json values in a mixed text or html documents, can filter and search the json tree, and converts php objects to json without 'ext-json' extension.

Eboubaker Eboubaker 2 Jul 31, 2022
An extension for PHPStan for adding analysis for PHP Language Extensions.

PHPStan PHP Language Extensions (currently in BETA) This is an extension for PHPStan for adding analysis for PHP Language Extensions. Language feature

Dave Liddament 9 Nov 30, 2022
Backwards compatibility Extension and Library for PHP 8.x and later

colopl_bc Provides various compatibility functions required for PHP (temporary) migration. WARNING This extension is intended for temporary use only.

COLOPL,Inc. 10 Jun 13, 2023