A curated list of amazingly awesome PHP libraries, resources and shiny things.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Console command for Phinx with argument "all" for executed migrations for multiple databases. | |
* | |
* Structure directory for migrations and configs: | |
* ``` | |
* migrations/ | |
* .db1/ | |
* .db2/ | |
* .db3/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Prevent strace from abbreviating arguments? | |
# You want the -s strsize option, which specifies the maximum length of a string to display (the default is 32). | |
# -etrace=!open means to trace every system call except open. In addition, the special values all and none have the obvious meanings. | |
#-etrace=!open | |
#-e trace=!write. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class PostListController extends Controller | |
{ | |
private $viewModel; | |
public function __construct() | |
{ | |
$this->viewModel = $this->get('view_model.twig'); | |
$this->on('data.post_list_served', array($this, 'listServed')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This file is part of the Project | |
* | |
* (c) Infinite Networks Pty Ltd <http://www.infinite.net.au> | |
* | |
* For the full copyright and license information, please view the LICENSE | |
* file that was distributed with this source code. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Acme\DemoBundle\Listener; | |
use Acme\DemoBundle\Security\Authorization\Voter; | |
use Symfony\Component\HttpFoundation\Response; | |
use Symfony\Component\HttpKernel\HttpKernelInterface; | |
use Symfony\Component\HttpKernel\Log\LoggerInterface; | |
use Symfony\Component\Security\Core\SecurityContextInterface; | |
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once dirname(__DIR__).'/../../../../app/AppKernel.php'; | |
/** | |
* Test case class helpful with Entity tests requiring the database interaction. | |
* For regular entity tests it's better to extend standard \PHPUnit_Framework_TestCase instead. | |
*/ | |
abstract class KernelAwareTest extends \PHPUnit_Framework_TestCase | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Liip\FunctionalTestBundle\Test\WebTestCase; | |
use Symfony\Component\HttpKernel\Profiler\Profiler; | |
use Symfony\Component\Security\Core\Authentication\Token\UsernamePasswordToken; | |
use Symfony\Component\Security\Core\User\UserInterface; | |
/** | |
* @group functional | |
*/ |