Skip to content

Instantly share code, notes, and snippets.

@MaximePinot
MaximePinot / Kernel.php
Last active July 21, 2022 08:42
Add the `mail_settings` field to the payload when using `symfony/sendgrid-mailer`
<?php
declare(strict_types=1);
namespace App;
use App\HttpClient\SendgridHttpClient;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
@MaximePinot
MaximePinot / .env
Last active July 21, 2022 09:49
Disable client-side validation on all forms. This is useful in dev and test environments.
CLIENT_SIDE_VALIDATION_ENABLED=1
@MaximePinot
MaximePinot / .htaccess
Created February 4, 2019 11:11
A .htaccess file made for Symfony 4 apps deployed with Deployer.
# Use the front controller as index file. It serves as a fallback solution when
# every other rewrite/redirect fails (e.g. in an aliased environment without
# mod_rewrite). Additionally, this reduces the matching process for the
# start page (path "/") because otherwise Apache will apply the rewriting rules
# to each configured DirectoryIndex file (e.g. index.php, index.html, index.pl).
DirectoryIndex index.php
Options FollowSymlinks
# Disabling MultiViews prevents unwanted negotiation, e.g. "/index" should not resolve