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); | |
/** | |
* /src/Security/Provider/SecurityUserFactory.php | |
* | |
* @author TLe, Tarmo Leppänen <[email protected]> | |
*/ | |
namespace App\Security\Provider; |
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
security: | |
# https://symfony.com/doc/current/security.html#registering-the-user-hashing-passwords | |
password_hashers: | |
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto' | |
# https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider | |
providers: | |
chain_user_provider: | |
chain: | |
providers: [security_user_provider, api_key_user_provider] |
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\Tests\Integration; | |
use Doctrine\ORM\EntityManagerInterface; | |
use Doctrine\ORM\Tools\SchemaValidator; | |
use Doctrine\Persistence\ManagerRegistry; | |
use PHPUnit\Framework\Attributes\TestDox; | |
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; |
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\Command; | |
use App\Entity\DateDimension; | |
use App\Repository\DateDimensionRepository; | |
use Symfony\Component\Console\Attribute\AsCommand; | |
use Symfony\Component\Console\Command\Command; | |
use Symfony\Component\Console\Input\InputInterface; | |
use Symfony\Component\Console\Output\OutputInterface; |
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\Command; | |
use App\Entity\DateDimension; | |
use App\Repository\DateDimensionRepository; | |
use Symfony\Component\Console\Attribute\AsCommand; | |
use Symfony\Component\Console\Command\Command; | |
use Symfony\Component\Console\Input\InputInterface; | |
use Symfony\Component\Console\Output\OutputInterface; |
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\Entity\Traits; | |
use DateTimeImmutable; | |
use Doctrine\DBAL\Types\Types; | |
use Doctrine\ORM\Mapping as ORM; | |
use Gedmo\Mapping\Annotation as Gedmo; |
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
public function foo() | |
{ | |
$ids = ($this->createQueryBuilder()) | |
->select('Images.id') | |
->innerJoin('Slider', 's') | |
->where('s.id = :yourSliderId') | |
->setParameter('yourSliderId', 123) | |
->getQuery() | |
->getArrayResult(); | |
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\EventSubscriber; | |
use App\Entity\User; | |
use Symfony\Component\EventDispatcher\EventSubscriberInterface; | |
use Symfony\Component\HttpFoundation\RedirectResponse; | |
use Symfony\Component\HttpKernel\Event\RequestEvent; | |
use Symfony\Component\Routing\Router; | |
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; |
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\EventSubscriber; | |
use App\Entity\User; | |
use Symfony\Component\HttpKernel\Event\RequestEvent; | |
use Symfony\Component\Routing\Router; | |
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; | |
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 | |
class Foo { | |
public function __construct($a = 5) { | |
var_dump($a); | |
} | |
} | |
new Foo($argv[1]); |
NewerOlder