Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Commit 6dd4a15

Browse files
committed
Merging develop to master in preparation for 1.3.0 release.
2 parents bb03241 + 2d2b769 commit 6dd4a15

6 files changed

+43
-12
lines changed

.travis.yml

+5
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ env:
1616
global:
1717
- COMPOSER_ARGS="--no-interaction"
1818
- COVERAGE_DEPS="php-coveralls/php-coveralls"
19+
- TESTS_ZEND_DIAGNOSTICS_APCU_ENABLED=true
1920
- TESTS_ZEND_DIAGNOSTICS_MONGO_ENABLED=true
2021
- TESTS_ZEND_DIAGNOSTICS_RABBITMQ_ENABLED=true
2122
- TESTS_ZEND_DIAGNOSTICS_REDIS_ENABLED=true
@@ -26,19 +27,22 @@ matrix:
2627
env:
2728
- DEPS=lowest
2829
- MONGO_LEGACY=true
30+
- TESTS_ZEND_DIAGNOSTICS_APCU_ENABLED=false
2931
- TESTS_ZEND_DIAGNOSTICS_MEMCACHE_ENABLED=true
3032
- TESTS_ZEND_DIAGNOSTICS_MEMCACHED_ENABLED=false
3133
- php: 5.6
3234
env:
3335
- DEPS=locked
3436
- MONGO_LEGACY=true
3537
- LEGACY_DEPS="phpunit/phpunit"
38+
- TESTS_ZEND_DIAGNOSTICS_APCU_ENABLED=false
3639
- TESTS_ZEND_DIAGNOSTICS_MEMCACHE_ENABLED=true
3740
- TESTS_ZEND_DIAGNOSTICS_MEMCACHED_ENABLED=false
3841
- php: 5.6
3942
env:
4043
- DEPS=latest
4144
- MONGO_LEGACY=true
45+
- TESTS_ZEND_DIAGNOSTICS_APCU_ENABLED=false
4246
- TESTS_ZEND_DIAGNOSTICS_MEMCACHE_ENABLED=true
4347
- TESTS_ZEND_DIAGNOSTICS_MEMCACHED_ENABLED=false
4448
- php: 7
@@ -83,6 +87,7 @@ matrix:
8387

8488
before_install:
8589
- if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi
90+
- if [[ $TESTS_ZEND_DIAGNOSTICS_APCU_ENABLED == 'true' ]]; then echo "extension = apcu.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini ; fi
8691
- if [[ $TESTS_ZEND_DIAGNOSTICS_MEMCACHE_ENABLED == 'true' ]]; then echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini ; fi
8792
- if [[ $TESTS_ZEND_DIAGNOSTICS_MEMCACHED_ENABLED == 'true' ]]; then echo "extension = memcached.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini ; fi
8893
- if [[ $MONGO_LEGACY == 'true' ]]; then echo "extension = mongo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini ; fi

CHANGELOG.md

+22
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,28 @@ All notable changes to this project will be documented in this file, in reverse
44

55
Releases prior to 1.2.0 did not have entries.
66

7+
## 1.3.0 - 2018-07-30
8+
9+
### Added
10+
11+
- [#93](https://github.com/zendframework/zenddiagnostics/pull/93) adds compatibility for apcu
12+
13+
### Changed
14+
15+
- Nothing.
16+
17+
### Deprecated
18+
19+
- Nothing.
20+
21+
### Removed
22+
23+
- Nothing.
24+
25+
### Fixed
26+
27+
- Nothing.
28+
729
## 1.2.0 - 2018-06-25
830

931
### Added

composer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@
5656
},
5757
"extra": {
5858
"branch-alias": {
59-
"dev-master": "1.2.x-dev"
59+
"dev-master": "1.3.x-dev",
60+
"dev-develop": "1.4.x-dev"
6061
}
6162
},
6263
"scripts": {

composer.lock

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Check/ApcFragmentation.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
use ZendDiagnostics\Result\Warning;
1515

1616
/**
17-
* Checks to see if the APC fragmentation is below warning/critical thresholds
17+
* Checks to see if the APCu fragmentation is below warning/critical thresholds
1818
*
19-
* APC memory logic borrowed from APC project:
19+
* APCu memory logic borrowed from APC project:
2020
*
2121
* https://github.com/php/pecl-caching-apc/blob/master/apc.php
2222
* authors: Ralf Becker <[email protected]>, Rasmus Lerdorf <[email protected]>, Ilia Alshanetsky <[email protected]>
@@ -90,11 +90,11 @@ public function check()
9090
return new Skip('APC has not been enabled in CLI.');
9191
}
9292

93-
if (! function_exists('apc_sma_info')) {
94-
return new Warning('APC extension is not available');
93+
if (! function_exists('apcu_sma_info')) {
94+
return new Warning('APCu extension is not available');
9595
}
9696

97-
if (! $info = apc_sma_info()) {
97+
if (! $info = apcu_sma_info()) {
9898
return new Warning('Unable to retrieve APC memory status information.');
9999
}
100100

src/Check/ApcMemory.php

+8-5
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
use ZendDiagnostics\Result\Warning;
1414

1515
/**
16-
* Checks to see if the APC memory usage is below warning/critical thresholds
16+
* Checks to see if the APCu memory usage is below warning/critical thresholds
1717
*
18-
* APC memory logic borrowed from APC project:
18+
* APCu memory logic borrowed from APC project:
1919
* https://github.com/php/pecl-caching-apc/blob/master/apc.php
2020
* authors: Ralf Becker <[email protected]>, Rasmus Lerdorf <[email protected]>, Ilia Alshanetsky <[email protected]>
2121
* license: The PHP License, version 3.01
@@ -46,11 +46,14 @@ public function check()
4646
return new Skip('APC has not been enabled in CLI.');
4747
}
4848

49-
if (! function_exists('apc_sma_info')) {
50-
return new Warning('APC extension is not available');
49+
if (! function_exists('apcu_sma_info')) {
50+
return new Warning(sprintf(
51+
'%s extension is not available',
52+
PHP_VERSION_ID < 70000 ? 'APC' : 'APCu'
53+
));
5154
}
5255

53-
if (! $this->apcInfo = apc_sma_info()) {
56+
if (! $this->apcInfo = apcu_sma_info()) {
5457
return new Warning('Unable to retrieve APC memory status information.');
5558
}
5659

0 commit comments

Comments
 (0)