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 | |
declare(strict_types=1); | |
namespace App; | |
use Symfony\Component\HttpFoundation\Response; | |
use Twig\Environment; | |
use League\OAuth2\Client\Provider\Google as GoogleProvider; |
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 App\EventSubscribers; | |
use App\Entity\Todo; | |
use Doctrine\Common\EventSubscriber; | |
use Doctrine\ORM\Events; | |
use Doctrine\Common\Persistence\Event\LifecycleEventArgs; | |
use Symfony\Component\Mailer\MailerInterface; | |
use Symfony\Component\Mime\Email; |
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 App\Entity\Traits; | |
use Doctrine\ORM\Mapping as ORM; | |
use Symfony\Component\Uid\Uuid; | |
trait EntityIdTrait | |
{ | |
/** |
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 App\Entity\Generator; | |
use Doctrine\ORM\EntityManager; | |
use Doctrine\ORM\Id\AbstractIdGenerator; | |
use Symfony\Component\Uid\Uuid; | |
class UuidGenerator extends AbstractIdGenerator | |
{ |
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 App\Entity; | |
use App\Entity\Traits\EntityIdTrait; | |
use App\Repository\TestRepository; | |
use Doctrine\ORM\Mapping as ORM; | |
/** | |
* @ORM\Entity(repositoryClass=TestRepository::class) |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<doctrine-mapping xmlns="http://doctrine-project.org/schemas/orm/doctrine-mapping" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://doctrine-project.org/schemas/orm/doctrine-mapping | |
http://www.doctrine-project.org/schemas/orm/doctrine-mapping.xsd"> | |
<embeddable name="Money\Currency"> | |
<field name="code" type="string" length="3"> | |
<options> | |
<option name="fixed">true</option> | |
</options> |
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
[ | |
{ | |
"text":"The biggest room in the world is the room for improvement.", | |
"from":"Helmut Schmidt" | |
}, | |
{ | |
"text":"Text is written once but read many times so put effort into make it readable", | |
"from":"Paul Rijke, co-founder Espunda" | |
}, | |
{ |
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
<return> | |
<state> | |
<ip>1.1.1.1</ip> | |
<date>2021-08-13 10:43:42</date> | |
<success>1</success> | |
</state> | |
<objects> | |
<object> | |
<id>64699</id> | |
<title> |
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 | |
// Enter your code here, enjoy! | |
function gen_uuid($len=8) { | |
$hex = md5("this is my SALT" . uniqid("", true)); | |
$pack = pack('H*', $hex); | |
$tmp = base64_encode($pack); | |
$uid = preg_replace("#(*UTF8)[^A-Za-z0-9]#", "", $tmp); |