Skip to content

Instantly share code, notes, and snippets.

View jaapio's full-sized avatar

Jaap van Otterdijk jaapio

View GitHub Profile
@jaapio
jaapio / uml.html.twig
Created November 7, 2024 19:51
raw uml example
<!-- place this file in .phpdoc/template/guides/body/uml.html.twig -->
{% apply spaceless %}
<figure
class="phpdocumentor-uml-diagram{% if node.classesString %} {{ node.classesString }}{% endif %}"
{% if node.hasOption('width') %}style="width: {{ node.option('width') }}"{% endif %}
>
{{ uml(node.value) }}
{% if node.caption %}<figcaption>{{ node.caption }}</figcaption>{% endif %}
</figure>
<!-- raw uml goes below ->
@jaapio
jaapio / RateLimitHandlingRetryStrategy.php
Last active May 28, 2021 17:00
Ratelimit Symfony messenger
<?php
declare(strict_types=1);
namespace App\Symfony\Messenger\Retry;
use App\Provider\Exception\RateLimitException;
use Symfony\Component\Messenger\Envelope;
use Symfony\Component\Messenger\Exception\HandlerFailedException;
use Symfony\Component\Messenger\Retry\RetryStrategyInterface;