Skip to content

Instantly share code, notes, and snippets.

View vsmihaylovsky's full-sized avatar

Vadim Mihaylovsky vsmihaylovsky

View GitHub Profile
@fesor
fesor / README.md
Created July 25, 2018 12:28
Symfony without ORM

Удобный менеджмент миграций с Symfony и Doctrine

Мало кто знает, но что бы работал migration:diff вам не нужно ставить ORM.

Что бы это работало объявим простой сервис:

<?php
@marydn
marydn / LoginSuccessHandler.php
Created December 20, 2013 20:57
Custom URL redirect by role after success login on Symfony 2 using a service listener without FOSUser Bundle.
# src/Acme/DemoBundle/Security/Authentication/Handler/LoginSuccessHandler.php
<?php
namespace Acme\DemoBundle\Security\Authentication\Handler;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RedirectResponse;
use Symfony\Component\Routing\Router;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\SecurityContext;
@jgornick
jgornick / gist:208754
Created October 12, 2009 21:14
PHP: Capture phpinfo() Output
<?php
function pinfo() {
ob_start();
phpinfo();
$data = ob_get_contents();
ob_clean();
return $data;
}