Docker image to make contributing to php-src easier
376
Tools to make it easier to contribute to PHP itself (php-src). Uses Docker containers for building, running and testing PHP from source.
$ composer global require aboks/php-src-devtools
$ git clone https://github.com/php/php-src.git && cd php-src
# write a test, or make your own changes to PHP
$ php-src-devtools test
Even though there is a thriving open source community for projects written in PHP, only a very limited number of these people contribute to PHP itself. This can partly be explained by the fact that contributing to PHP internals is quite different from contributing to a PHP project: it uses a different language (C instead of PHP), different tools, and another workflow.
This project aims to remove some of these barriers for PHP developers to become PHP core developers:
For more information about contributing to PHP, see the slides for my "Getting started with PHP core development" conference talk.
Ensure that Docker is installed and running on your system.
The easiest way to install this tool is as a global composer package:
$ composer global require aboks/php-src-devtools
Alternatively, clone or download this repository somewhere, run composer install to install dependencies, and ensure that php-src-devtools is on your PATH.
In the folder that contains your clone of php-src, run:
php-src-devtools build to build PHP. Note that the initial build may take about an hour.php-src-devtools test to run the full PHP testsuite. You can use php-src-devtools test path/to/test.phpt to run a single test, or php-src-devtools test ext/foo to test a single extension.php-src-devtools php to run the compiled PHP CLI, e.g. php-src-devtools php -i for phpinfo.php-src-devtools list to see all subcommands, or php-src-devtools help for additional help.This tool is still in a pretty experimental stage, but the basic things like building PHP from source and running tests should work fine. Please try it out and report any issues and possible improvements that you encounter. Pull requests are welcome.
This project adheres to Semantic Versioning.
The code is released under the MIT license.
Content type
Image
Digest
Size
137.1 MB
Last updated
over 8 years ago
docker pull aboks/php-src-devtools