[MediaWiki-commits] [Gerrit] wikimedia...vendor[master]: Update PHP-Queue to 1.0
Ejegg has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/377490 ) Change subject: Update PHP-Queue to 1.0 .. Update PHP-Queue to 1.0 Change-Id: I7a8ac462c40ed8ca54d6b18264e1d9f97f237bc1 --- M coderkungfu/php-queue/.travis.yml M coderkungfu/php-queue/README.md M coderkungfu/php-queue/composer.json M coderkungfu/php-queue/demo/runners/README.md M composer/installed.json 5 files changed, 113 insertions(+), 108 deletions(-) Approvals: Ejegg: Verified; Looks good to me, approved diff --git a/coderkungfu/php-queue/.travis.yml b/coderkungfu/php-queue/.travis.yml index 7941bc4..8f270d2 100644 --- a/coderkungfu/php-queue/.travis.yml +++ b/coderkungfu/php-queue/.travis.yml @@ -4,16 +4,21 @@ # language: php -php: - - 5.3 - - 5.4 - - 5.5 - - 5.6 - - 7.0 - - hhvm + +dist: trusty matrix: + include: +- php: 5.3 + dist: precise +- php: 5.4 +- php: 5.5 +- php: 5.6 +- php: 7.0 +- php: hhvm allow_failures: +- php: 5.3 + dist: precise - php: 7.0 - php: hhvm @@ -22,6 +27,8 @@ username: root encoding: utf8 +before_install: echo "extension=memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini + before_script: - mysql -e 'create database phpqueuetest;' - composer self-update @@ -29,5 +36,3 @@ script: phpunit --coverage-text -c phpunit.travis.xml -after_script: - - "wget --quiet http://mauris.sg/bin/pdc.phar && php pdc.phar src" diff --git a/coderkungfu/php-queue/README.md b/coderkungfu/php-queue/README.md index 74ff0e7..3f3d2f6 100644 --- a/coderkungfu/php-queue/README.md +++ b/coderkungfu/php-queue/README.md @@ -1,5 +1,5 @@ # PHP-Queue # -[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/CoderKungfu/php-queue?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/CoderKungfu/php-queue?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) A unified front-end for different queuing backends. Includes a REST server, CLI interface and daemon runners. @@ -57,12 +57,12 @@ 2. Download and install Composer. - ``` +``` curl -s "http://getcomposer.org/installer"; | php ``` 3. Install your dependencies. - ``` +``` php composer.phar install ``` @@ -70,7 +70,7 @@ 5. Require Composer's autoloader. - ```php +```php @@ -130,19 +130,19 @@ 1. Add new job. - ``` +``` # Form post curl -XPOST http://localhost// -d "var1=foo&var2=bar" ``` - ``` +``` # JSON post curl -XPOST http://localhost// -H "Content-Type: application/json" -d '{"var1":"foo","var2":"bar"}' ``` 2. Trigger next job. - ``` +``` curl -XPUT http://localhost// ``` @@ -154,13 +154,13 @@ 1. Add new job. - ``` +``` $ php cli.php add --data '{"boo":"bar","foo":"car"}' ``` 2. Trigger next job. - ``` +``` $ php cli.php work ``` diff --git a/coderkungfu/php-queue/composer.json b/coderkungfu/php-queue/composer.json index 085c069..6e30fad 100644 --- a/coderkungfu/php-queue/composer.json +++ b/coderkungfu/php-queue/composer.json @@ -5,6 +5,7 @@ "homepage": "http://github.com/CoderKungfu/php-queue";, "type": "library", "license": "MIT", +"version": "1.0.0", "authors": [ { "name": "Michael Cheng", @@ -24,12 +25,12 @@ }, "require-dev": { "mrpoundsign/pheanstalk-5.3": "dev-master", -"aws/aws-sdk-php": "dev-master", +"aws/aws-sdk-php": ">=2.8", "amazonwebservices/aws-sdk-for-php": "dev-master", "predis/predis": "1.*", "iron-io/iron_mq": "dev-master", "ext-memcache": "*", -"microsoft/windowsazure": "dev-master" +"microsoft/windowsazure": ">=0.4.0" }, "suggest": { "predis/predis": "For Redis backend support", diff --git a/coderkungfu/php-queue/demo/runners/README.md b/coderkungfu/php-queue/demo/runners/README.md index 5ddab8d..3f89d0f 100644 --- a/coderkungfu/php-queue/demo/runners/README.md +++ b/coderkungfu/php-queue/demo/runners/README.md @@ -26,13 +26,13 @@ 1. Create a new PHP file named "SimpleRunner.php" (no naming convention here). 2. Include the config file: - ```php +```php require_once '/path/to/your/config.php'; ``` 3. Create a new Runner class (extending `PHPQueue\Runner`). The queue name can be defined in the `$queue_name` attribute. - ```php +```php class SampleRunner extends PHPQueue\Runner { public $queue_name = 'Sample'; @@ -41,14 +41,14 @@ 4. Instantiate the class and call the `run()` method. - ```php +```php $runner = new SampleRunner(); $runner->run(); ``` 5. Run the Runner. - ``` +``` $ php SimpleRunner.php ``` @@ -92,8 +92,7 @@ $ php BeanstalkSampleStop.php ``` -***Note:*** -On CentOS, you will need to install `p
[MediaWiki-commits] [Gerrit] wikimedia...vendor[master]: Update PHP-Queue to 1.0
Ejegg has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/377490 ) Change subject: Update PHP-Queue to 1.0 .. Update PHP-Queue to 1.0 Change-Id: I7a8ac462c40ed8ca54d6b18264e1d9f97f237bc1 --- M coderkungfu/php-queue/.travis.yml M coderkungfu/php-queue/README.md M coderkungfu/php-queue/composer.json M coderkungfu/php-queue/demo/runners/README.md M composer/installed.json 5 files changed, 113 insertions(+), 108 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig/vendor refs/changes/90/377490/1 diff --git a/coderkungfu/php-queue/.travis.yml b/coderkungfu/php-queue/.travis.yml index 7941bc4..8f270d2 100644 --- a/coderkungfu/php-queue/.travis.yml +++ b/coderkungfu/php-queue/.travis.yml @@ -4,16 +4,21 @@ # language: php -php: - - 5.3 - - 5.4 - - 5.5 - - 5.6 - - 7.0 - - hhvm + +dist: trusty matrix: + include: +- php: 5.3 + dist: precise +- php: 5.4 +- php: 5.5 +- php: 5.6 +- php: 7.0 +- php: hhvm allow_failures: +- php: 5.3 + dist: precise - php: 7.0 - php: hhvm @@ -22,6 +27,8 @@ username: root encoding: utf8 +before_install: echo "extension=memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini + before_script: - mysql -e 'create database phpqueuetest;' - composer self-update @@ -29,5 +36,3 @@ script: phpunit --coverage-text -c phpunit.travis.xml -after_script: - - "wget --quiet http://mauris.sg/bin/pdc.phar && php pdc.phar src" diff --git a/coderkungfu/php-queue/README.md b/coderkungfu/php-queue/README.md index 74ff0e7..3f3d2f6 100644 --- a/coderkungfu/php-queue/README.md +++ b/coderkungfu/php-queue/README.md @@ -1,5 +1,5 @@ # PHP-Queue # -[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/CoderKungfu/php-queue?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/CoderKungfu/php-queue?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) A unified front-end for different queuing backends. Includes a REST server, CLI interface and daemon runners. @@ -57,12 +57,12 @@ 2. Download and install Composer. - ``` +``` curl -s "http://getcomposer.org/installer"; | php ``` 3. Install your dependencies. - ``` +``` php composer.phar install ``` @@ -70,7 +70,7 @@ 5. Require Composer's autoloader. - ```php +```php @@ -130,19 +130,19 @@ 1. Add new job. - ``` +``` # Form post curl -XPOST http://localhost// -d "var1=foo&var2=bar" ``` - ``` +``` # JSON post curl -XPOST http://localhost// -H "Content-Type: application/json" -d '{"var1":"foo","var2":"bar"}' ``` 2. Trigger next job. - ``` +``` curl -XPUT http://localhost// ``` @@ -154,13 +154,13 @@ 1. Add new job. - ``` +``` $ php cli.php add --data '{"boo":"bar","foo":"car"}' ``` 2. Trigger next job. - ``` +``` $ php cli.php work ``` diff --git a/coderkungfu/php-queue/composer.json b/coderkungfu/php-queue/composer.json index 085c069..6e30fad 100644 --- a/coderkungfu/php-queue/composer.json +++ b/coderkungfu/php-queue/composer.json @@ -5,6 +5,7 @@ "homepage": "http://github.com/CoderKungfu/php-queue";, "type": "library", "license": "MIT", +"version": "1.0.0", "authors": [ { "name": "Michael Cheng", @@ -24,12 +25,12 @@ }, "require-dev": { "mrpoundsign/pheanstalk-5.3": "dev-master", -"aws/aws-sdk-php": "dev-master", +"aws/aws-sdk-php": ">=2.8", "amazonwebservices/aws-sdk-for-php": "dev-master", "predis/predis": "1.*", "iron-io/iron_mq": "dev-master", "ext-memcache": "*", -"microsoft/windowsazure": "dev-master" +"microsoft/windowsazure": ">=0.4.0" }, "suggest": { "predis/predis": "For Redis backend support", diff --git a/coderkungfu/php-queue/demo/runners/README.md b/coderkungfu/php-queue/demo/runners/README.md index 5ddab8d..3f89d0f 100644 --- a/coderkungfu/php-queue/demo/runners/README.md +++ b/coderkungfu/php-queue/demo/runners/README.md @@ -26,13 +26,13 @@ 1. Create a new PHP file named "SimpleRunner.php" (no naming convention here). 2. Include the config file: - ```php +```php require_once '/path/to/your/config.php'; ``` 3. Create a new Runner class (extending `PHPQueue\Runner`). The queue name can be defined in the `$queue_name` attribute. - ```php +```php class SampleRunner extends PHPQueue\Runner { public $queue_name = 'Sample'; @@ -41,14 +41,14 @@ 4. Instantiate the class and call the `run()` method. - ```php +```php $runner = new SampleRunner(); $runner->run(); ``` 5. Run the Runner. - ``` +``` $ php SimpleRunner.php ``` @@ -92,8 +92,7 @@ $ php BeanstalkSampleStop.php ``` -***Note: