This repository has been archived by the owner on Oct 22, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from Jimdo/apc_storage
Use APC as a storage adapter
- Loading branch information
Showing
25 changed files
with
936 additions
and
298 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
language: php | ||
php: | ||
- 5.6 | ||
- 5.3 | ||
|
||
services: | ||
- redis-server | ||
|
||
before_script: | ||
- echo yes | pecl install apcu-4.0.11 | ||
- echo "apc.enabled = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini | ||
- echo "apc.enable_cli = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini | ||
- echo "extension = redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini | ||
- composer self-update | ||
- composer install --no-interaction --prefer-source --dev | ||
- phpenv rehash | ||
- php -i | ||
|
||
script: | ||
- vendor/bin/phpunit --verbose --colors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,17 +4,22 @@ | |
{ | ||
"name": "Joscha", | ||
"email": "[email protected]" | ||
}, | ||
{ | ||
"name": "Jan Brauer", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"require": { | ||
"php": ">=5.3.3", | ||
"ext-redis": "*" | ||
"php": ">=5.6.3" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "4.1.0" | ||
}, | ||
"suggest": { | ||
"guzzlehttp/guzzle": "~6.0 for running the blackbox tests." | ||
"guzzlehttp/guzzle": "~6.0 for running the blackbox tests.", | ||
"ext-redis": "Required if using Redis.", | ||
"ext-apc": "Required if using APCu." | ||
}, | ||
"autoload": { | ||
"psr-0": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
require __DIR__ . '/../vendor/autoload.php'; | ||
|
||
$adapter = $_GET['adapter']; | ||
|
||
if ($adapter == 'redis') { | ||
define('REDIS_HOST', isset($_SERVER['REDIS_HOST']) ? $_SERVER['REDIS_HOST'] : '127.0.0.1'); | ||
|
||
$redisAdapter = new Prometheus\Storage\Redis(array('host' => REDIS_HOST)); | ||
$redisAdapter->flushRedis(); | ||
} | ||
|
||
if ($adapter == 'apc') { | ||
$apcAdapter = new Prometheus\Storage\APC(); | ||
$apcAdapter->flushAPC(); | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
FROM php:5.6-fpm | ||
|
||
RUN pecl install redis-2.2.8 && docker-php-ext-enable redis | ||
RUN pecl install apcu-4.0.11 && docker-php-ext-enable apcu | ||
|
||
COPY www.conf /usr/local/etc/php-fpm.d/ |
Oops, something went wrong.