Chronos: CakePHP replacement for carbon

Chronos aims to be a drop-in replacement for nesbot/carbon. It focuses on providing immutable date/datetime objects. Immutable objects help ensure that datetime objects aren’t accidentally modified keeping data more predictable.

<?php
require 'vendor/autoload.php';

use Cake\Chronos\Chronos;

printf("Now: %s", Chronos::now());

 

WHMCS Addons: Domain Blocker

After few trials, I finally decided to publish some information on a small add-on I’ve been working on a month ago for WHMCS platform.

Domain blocker settings panel

Domain Blocker add-on emerged from attempts of cutting down the number of phishing domain registrations, that’s been received on daily basis for the last couple of months.

Domain Blocker addon logs

It uses CartValidation hooks that prevent any domain registrations that use “offensive”/”blacklisted” words, and tiny eye-candy for the backend with Twitter Bootstrap v2. Unfortunately, Bootstrap v3 everts the admin page with  style overwrites, thus it’ll be used only when WHMCS reaches 6.x version. Of course, any feedback, bugs spotted will be highly appreciated on GitHub issue tracker.

GitHub: closing issues via commit messages

If anyone missed it (like I did), it’s worth noting due to my ultimate laziness:

When you enter “Fixes #45” into a commit message, issue #45 is closed once that commit is merged into your default branch. If the bug isn’t fixed in your default branch, the issue remains open. Once the commit with the fix is merged into your default branch, the issue is automatically closed.

If you make a commit in a non-default branch with the “Fixes #33” syntax, the issue is referenced with a tooltip.

You can use any of the following keywords to close an issue via commit message:

  • close
  • closes
  • closed
  • fixes
  • fixed
  • resolve
  • resolves
  • resolved