Web hooks for the phputil/flags framework.
PHP 7.4 or later. It uses Guzzle for making HTTP requests.
composer require phputil/flags-webhooks
require_once 'vendor/autoload.php';
use \phputil\flags\webhooks\WebhookListener;
$listener = new WebhookListener( 'https://example.com' );
// Now let's use it with the framework
$flags = new \phputil\flags\FlagManager();
$flags->getListeners()->add( $listener );
// Notifying
$flags->enable( 'foo' ); // POST request (creation)
$flags->disable( 'foo' ); // PUT request (update)
$flags->remove( 'foo' ); // DELETE request (removal)
Soon