Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* Make sure to enable zend.assertions=1 in your php.ini for assert to work.
*/
assert_options(ASSERT_ACTIVE, 1);
function OneEditApart(string $a, string $b): bool
{
// the longer one will be on the left
@jkobus
jkobus / EmailViewController.php
Created January 4, 2024 16:38
Preview twig email in controller during development
<?php
namespace App\Controller;
use Symfony\Bridge\Twig\Mime\TemplatedEmail;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Mime\BodyRendererInterface;
use Symfony\Component\Routing\Attribute\Route;
class EmailViewController extends AbstractController