Skip to content

Instantly share code, notes, and snippets.

View binabik's full-sized avatar

Simon Bailey binabik

View GitHub Profile
@binabik
binabik / LLSecurityIdentityRetrievalStrategy.php
Created September 3, 2012 07:39
Custom SecurityIdentityRetrieval
<?php
namespace LL\Infrastructure\Permissions;
use Symfony\Component\Security\Core\Role\RoleInterface;
use Symfony\Component\Security\Acl\Domain\RoleSecurityIdentity;
use Symfony\Component\Security\Acl\Domain\UserSecurityIdentity;
use Symfony\Component\Security\Core\Authentication\Token\AnonymousToken;
@binabik
binabik / bootstrap_phpunit.php
Created August 9, 2012 09:24
bootstrap phpunit tests
<?php
use Symfony\Bundle\SecurityBundle\Command\InitAclCommand;
use Doctrine\Bundle\FixturesBundle\Command\LoadDataFixturesDoctrineCommand;
use Doctrine\Bundle\DoctrineBundle\Command\Proxy\CreateSchemaDoctrineCommand;
use Doctrine\Bundle\DoctrineBundle\Command\CreateDatabaseDoctrineCommand;
use Doctrine\Bundle\DoctrineBundle\Command\DropDatabaseDoctrineCommand;
require_once __DIR__.'/bootstrap.php.cache';
require_once __DIR__.'/AppKernel.php';
@binabik
binabik / FutureDate.php
Created August 9, 2012 08:11
Custom Validator not being called
<?php
namespace SimonB\CMSBundle\Validator\Constraints;
use Symfony\Component\Validator\Constraint;
/**
* @author simon
* @Annotation
*/
class FutureDate extends Constraint