Mock type | Tests duration |
---|---|
Native mocks | 160.10 seconds |
Mockery | 177.01 seconds (+10%) |
PHPUnit mocks | 232.29 seconds (+45%) |
Prophecy | 3868.80 seconds (+2416%) |
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
#!/usr/local/bin/php | |
<?php | |
// Get a key from Github > Settings > Developer Settings > Personal Access Tokens | |
// Create a token with only the 'gist' permission. | |
const GISTKEY = ''; | |
const GISTUSER = ''; // Put your github username here. Duh. | |
const GISTPOST = 'https://api.github.com/gists'; | |
$headers = [ |
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
rackspace/php-opencloud/lib/OpenCloud/Common/Metadata.php:40 | |
In method __set(): | |
return $this->setProperty($property, $value); | |
kub-at/php-simple-html-dom-parser/src/KubAT/PhpSimple/lib/simple_html_dom.php:989 | |
In method __set(): | |
return $this->_[HDOM_INFO_OUTER] = $value; | |
kub-at/php-simple-html-dom-parser/src/KubAT/PhpSimple/lib/simple_html_dom.php:992 | |
In method __set(): | |
return $this->_[HDOM_INFO_TEXT] = $value; | |
kub-at/php-simple-html-dom-parser/src/KubAT/PhpSimple/lib/simple_html_dom.php:994 |
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
# Add at the end of your .zshrc file | |
# After every command `cd`, it will check a ".phpbrew" file in the current directory and if it exists it will change the version of php automatically | |
# Create a .phpbrew file like this: `echo "7.4.4" > .phpbrew` in the folder you want to use the specific version of php | |
function phpbrew_change_by_dir() { | |
emulate -L zsh | |
if [ -f ".phpbrew" ]; then | |
PHPBREW_LOCAL_VERSION=$(cat .phpbrew); | |
COMMAND="phpbrew use "; |
-
when using github,
./configure
is not present and didn't know how to start -
download from http://php.net/downloads.php
-
downloading specific version http://php.net/get/php-5.6.30.tar.gz/from/a/mirror
-
I want to build minimal version only for testing
-
following http://www.phpinternalsbook.com/build_system/building_php.html#obtaining-the-source-code
-
Run
./configure --disable-all
-
Run
time make
-
OR run both at the same time
time ./configure --disable-all && time make
Assuming PHP is compiled with debug enabled.
$ gdb /usr/sbin/php-fpm
Then:
r --nodaemonize --fpm-config /etc/php7/fpm/php-fpm.conf
- Install gpg and gpg-agent:
brew install gpg gpg-agent
- Generate a new key: run
gpg --gen-key
and follow the instructions - Write down the ID of the key. To do this, run
gpg --list-keys
. The output will look like this:
pub 4096R/E9468C9A 2016-04-20 [expires: 2016-07-19]
uid Andreas B.
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
NewerOlder