Skip to content

Instantly share code, notes, and snippets.

View tarlepp's full-sized avatar
💭
örrr

Tarmo Leppänen tarlepp

💭
örrr
  • Pinja
  • Jyväskylä, Finland
View GitHub Profile
<?php
namespace App\Command;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;
<?php
namespace App\Command;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;
<?php
namespace App\Command;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;
server {
server_name app.localhost;
root /app/public;
location / {
# try to serve file directly, fallback to index.php
try_files $uri @rewriteapp;
}
location @rewriteapp {
services:
# default configuration for services in *this* file
_defaults:
# automatically injects dependencies in your services
autowire: true
# automatically registers your services as commands, form types, etc.
autoconfigure: true
# this means you cannot fetch services directly from the container via $container->get()
# if you need to do this, you can override this setting on individual services
public: false
<?php
namespace App\Model;
class Header
{
/**
* @var string
*/
public $OrganizationID;
{
"type": "project",
"license": "proprietary",
"require": {
"php": ">=7.2.5",
"ext-ctype": "*",
"ext-iconv": "*",
"doctrine/doctrine-bundle": "^2.2",
"symfony/console": "5.1.*",
"symfony/dotenv": "5.1.*",
<?php
declare(strict_types = 1);
namespace App\Controller;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Throwable;
class IndexController
<?php
declare(strict_types = 1);
namespace App\Service;
use App\Utils\JSON;
use Closure;
use Psr\Log\LoggerInterface;
use stdClass;
use Symfony\Contracts\Cache\CacheInterface;
protected function setUp(): void
{
$this->platform = new MySqlPlatform();
Type::hasType('datetime')
? Type::overrideType('datetime', UTCDateTimeType::class)
: Type::addType('datetime', UTCDateTimeType::class);
$this->type = Type::getType('datetime');
}