Skip to content

Instantly share code, notes, and snippets.

View jzawadzki's full-sized avatar
💜

Jerzy Zawadzki jzawadzki

💜
View GitHub Profile

FWIW: I (@Rondy) am not the author of the content presented here, which is an outline from Edmond Lau's book. I've just copy-pasted it from somewhere and saved as a personal gist, before it got popular on newsnews.ycombinator.com. I don't remember where exactly the original source is from and neither could find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

<?php
class MyTeamProviderTest extends WebTestCase
{
/**
* @dataProvider dataProvider
*/
public function test_my_team()
{
$client = static::createClient();
<?php
class Hello {
private string $url;
private function __construct() {}
public function getUrl(): string {
return $this->url;
<?php
class Hello
{
private string $secret
public function __construct(string $secret)
{
$this->secret = $secret;
}
<?php
declare(strict_types=1);
namespace App\Console;
use Symfony\Bundle\FrameworkBundle\Console\Application as BaseApplication;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Command\ListCommand;
class Application extends BaseApplication
<?php
namespace App\Router;
use Symfony\Bundle\FrameworkBundle\Routing\Router;
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\CacheWarmer\WarmableInterface;
use Symfony\Component\Routing\Exception\InvalidParameterException;
use Symfony\Component\Routing\Exception\MethodNotAllowedException;
services:
...
App\Router\OwnRouter:
decorates: router
arguments: ['@.inner']
<?php
namespace App\Router;
use Symfony\Bundle\FrameworkBundle\Routing\Router;
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\CacheWarmer\WarmableInterface;