Monthly Archives: April 2015

Require specific commit and branch from GitHub with Composer

If you need to include specific branch and/or specific commit from GitHub into your project via Composer use following syntax: { “minimum-stability”: “dev”, “require”: { “vendor/package”: “dev-branchname#6bdd====full commit id====a9c6”, } , “repositories”: [ { “type”: “git”, “url”: “” } ] } branch name gets always dev- in front (so branch “features” translates to “dev-features”) you […]

PHP var_dump() to error log

Nice function to var_dump() any variable into php error_log()… Sometimes it can be very usefull for debugging purposes. function var_error_log( $object=null ){ ob_start(); // start buffer capture var_dump( $object ); // dump the values $contents = ob_get_contents(); // put the buffer into a variable ob_end_clean(); // end capture error_log( $contents ); // log contents of […]