-
-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Making cachetool compatible w/ php7 #49
Conversation
jrmbrgs
commented
Mar 7, 2017
- Add support of php7.0-fpm socket
- Fix some php7 warn
- Skip unit tests related to APC (not supported by php7)
* Add support of php7.0-fpm socket * Fix some php7 warn * Skip unit tests related to APC (not supported by php7)
src/CacheTool/Adapter/FastCGI.php
Outdated
@@ -21,6 +21,11 @@ class FastCGI extends AbstractAdapter | |||
*/ | |||
protected $client; | |||
|
|||
protected $possibleSocketFiles = [ | |||
'/var/run/php5-fpm.sock', | |||
'/var/run/php/php7.0-fpm.sock' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/var/run/php-fpm.sock
would be nice to add too, as a generic name.. or maybe glob for /var/run/php*.sock
/ /var/run/php/*.sock
as a last resort?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, I pushed a bit too fast.
I'll change for both ['/var/run/php*.sock', '/var/run/php/php7.0-fpm.sock']
@@ -6,6 +6,9 @@ class ApcBinDumpCommandTest extends CommandTest | |||
{ | |||
public function testCommand() | |||
{ | |||
if (explode('.', PHP_VERSION_ID)[0] >= 7) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PHP_VERSION_ID >= 70000
reads a bit easier than this explode IMO :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also you can't explode on '.' because PHP_VERSION_ID has no dots, it's an integer MAJOR/MINOR/PATCH without separator. See http://php.net/manual/en/reserved.constants.php#reserved.constants.core
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're right, took the return of phpversion()
...
Fixing that.
Really sorry, It missed one commit |
@Seldaek Thanks for the reviews by the way. |
any reason why it's not merged? |
I don't know, still waiting for it to be merged... |
Your 6 commits behind master and it's not possible to merge your PR before you rebase / reroll the changes. patch -p1 --dry-run < 49.patch |
Hello @robincee, I rebased and pushed. Thx you |
Thx ! |