A dump yet clever way to debug wp-cron

A new way: //Get log from cron jobs: $output = json_encode($YOUR_OBEJCT); $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"https://www.369usa.com/msg/ ... ...

Some Notes about Docker + PHPUnit

This is kinda a confusing subject to learn for me, especially when I am not very familiar with docker yet, nor with PHPUnit. Here is my note as I go a ... ...

Docker + WordPress Setup

All the instruction will be found at the link underneath: https://davidyeiser.com/tutorial/docker-wordpress-theme-setup When I was installing this, I ... ...

Run Docker with Nginx

Docker Useful Commands: docker run --name -d -p : docker start docker ps docker ps -a docker rm -d: weather run in the background or not. Note: usuall ... ...

Docker Installation(Ubuntu)

Docker comes in two flavours: The Comunity Edition (CE) and the Enterprise Edition (EE). See this question for the differences. Just take Docker CE if ... ...

PHPUnit Basic

Basic Example 1: declare(strict_types=1); final class FunctionsTest extends WP_UnitTestCase { public function testPushAndPop() { $stack = []; $this->a ... ...

PHP Monolog Basic

require __DIR__ . '/vendor/autoload.php'; use Monolog\Handler\StreamHandler; use Monolog\Logger; $logger = new Logger('main'); $logger->pushHandler(ne ... ...

PHP traits

It may sound fancy, but it’s very simple and easy. trait sharable{ function foo(){ echo "foo\n"; } } class A{ use sharable; function bar(){ echo ... ...