Skip to content

Instantly share code, notes, and snippets.

View andreia's full-sized avatar
❤️
coding

Andréia Bohner andreia

❤️
coding
View GitHub Profile
# config/services.yaml
services:
App\NewMailer:
decorates: App\Mailer
decoration_on_invalid: ignore
# config/services.yaml
services:
_instanceof:
App\Foo\Rule\RuleInterface:
tags: ['app.foo.rule']
_defaults:
bind:
iterable $rules: !tagged_iterator app.foo.rule
imports:
# irá exibir uma erro se 'parameters.yaml' existe mas contém erros de sintaxe
- { resource: 'parameters.yaml', ignore_errors: 'not_found' }
class Kernel extends BaseKernel
{
// ...
protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader): void
{
// ...
$container->setParameter('container.dumper.inline_factories', true);
# config/services.yaml
services:
# ...
_defaults:
bind:
$projectDir: '%kernel.project_dir%'
@andreia
andreia / SomeCommand.php
Created November 26, 2019 01:27
A Symfony Command
<?php
// src/Command/SomeCommand.php
namespace App\Command;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class SomeCommand extends Command
@andreia
andreia / onename
Created October 24, 2015 01:57
Verifying that +andreia is my blockchain ID. https://onename.com/andreia
Verifying that +andreia is my blockchain ID. https://onename.com/andreia

Keybase proof

I hereby claim:

  • I am andreia on github.
  • I am andreia (https://keybase.io/andreia) on keybase.
  • I have a public key whose fingerprint is 8D20 56C4 04DA 2B8E 3A1F 8B39 18D7 0631 1E7C 0522

To claim this, I am signing this object:

<?php
namespace Acme\DemoBundle\EventSubscriber;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\Form\FormEvents;
use Symfony\Component\Form\FormEvent;
/**
* Changes Form->submit() behavior so that it treats not set values as if they
old_sound_rabbit_mq:
connections:
default:
host: 'localhost'
port: 5672
user: 'guest'
password: 'guest'
vhost: '/'
lazy: false
producers: