One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
<?php | |
const STREAM_OPEN_FOR_INCLUDE = 128; | |
final class HardCoreDebugLogger | |
{ | |
public static function register(string $output = 'php://stdout') | |
{ | |
register_tick_function(function () use ($output) { | |
$bt = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1); |
<?php | |
/** DefaultController.php **/ | |
namespace AppBundle\Controller; | |
use AppBundle\Entity\Person; | |
use AppBundle\Service\RequestHandler; | |
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\HttpFoundation\Response; |
<?php | |
declare(strict_types=1); | |
namespace App\Infrastructure\Email; | |
use Symfony\Component\Mailer\Transport\Dsn; | |
use Symfony\Component\Mailer\Transport\Smtp\Auth\AuthenticatorInterface; | |
use Symfony\Component\Mailer\Transport\Smtp\EsmtpTransport; | |
use Symfony\Component\Mailer\Transport\Smtp\EsmtpTransportFactory; |
<?php | |
declare(strict_types=1); | |
namespace App; | |
use Symfony\Component\HttpFoundation\Response; | |
use Twig\Environment; | |
use League\OAuth2\Client\Provider\Google as GoogleProvider; |
<?php | |
// src/DependencyInjection/CacheWarmerCompilerPass.php | |
namespace App\DependencyInjection; | |
use App\Cache\MyCacheWarmer; | |
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; | |
use Symfony\Component\DependencyInjection\ContainerBuilder; | |
use Symfony\Component\DependencyInjection\Exception\EnvNotFoundException; |
The API we are creating in this gist will follow these rules :
password
Grant Type only (no need for Authorization pages and such).v1.api.example.com
)The API will be written in PHP with the Symfony 2 framework. The following SF2 bundles are used :
<?php | |
declare(strict_types=1); | |
namespace ApiPlatform\Workflow\PathResolver; | |
use ApiPlatform\Core\PathResolver\OperationPathResolverInterface; | |
final class OperationPathResolver implements OperationPathResolverInterface | |
{ |
<?php | |
/** | |
* Created by PhpStorm. | |
* User: ciryk | |
* Date: 11/07/18 | |
* Time: 19:23 | |
*/ | |
namespace App\Service; |