mhujer
Repos
119
Followers
71
Following
42

Tool for checking if the YAML config files are alphabetically sorted

22
9

Converts JavaScript errors to alerts, so you won't miss them if you don't have the browser console open.

1
2

Custom PHPStan Rules for Consistence library (https://github.com/phpstan/phpstan and https://github.com/consistence/consistence/)

7
0

Nebudete tomu věřit, ale sepisuju si recepty :-)

0
0

PHP implementation of Fio Bank API

29
20

Events

Partial Deck Import

@RitaSayre my guess is that the deck was imported successfully, but the Anki displays that there are just 20 new cards for today.

Try using the "Browse" button in the Anki to see the imported cards.

Created at 1 week ago
mhujer create tag 2.0.0
Created at 2 weeks ago
mhujer delete branch native-enums
Created at 2 weeks ago

support also native enums

release 2.0.0

Created at 2 weeks ago

release 2.0.0

Created at 2 weeks ago
mhujer create tag 2.0.0
Created at 2 weeks ago
mhujer delete branch native-enums
Created at 2 weeks ago

require PHP 8.1

add support for native enums to make the migration easier

release 2.0.0

Created at 2 weeks ago

require PHP 8.1

add support for native enums to make the migration easier

release 2.0.0

Created at 2 weeks ago

add support for native enums to make the migration easier

Created at 2 weeks ago
mhujer create branch native-enums
Created at 2 weeks ago
mhujer create branch native-enums
Created at 3 weeks ago
mhujer delete branch mh-updates
Created at 3 weeks ago

require PHP 8.1

Created at 3 weeks ago
mhujer create branch mh-updates
Created at 3 weeks ago
mhujer delete branch mh-dev
Created at 3 weeks ago

bump dev dependencies

Created at 3 weeks ago

bump dev dependencies

Created at 3 weeks ago
mhujer create branch mh-dev
Created at 3 weeks ago
class-string vs literal-string in QueryBuilder

With the recent addition of literal-types to QueryBuilder (https://github.com/phpstan/phpstan-doctrine/pull/327), I'm getting warnings when passing class-string there: Parameter #1 $from of method Doctrine\ORM\QueryBuilder::from() expects literal-string, class-string given

This is the simplified example to reproduce the issue:

    /**
     * @param class-string $className
     */
    public function getSortable(
        string $className,
    ): ?Sortable
    {
        return $this
            ->entityManager
            ->createQueryBuilder()
            ->select('sortable')
            ->from($className, 'sortable')
            ->getQuery()
            ->getOneOrNullResult();
    }

What is do you think is the correct way to handle this? To me it seems that class-string is more specific type than the literal-string.

cc @VincentLanglet

Created at 3 weeks ago
issue comment
class-string vs literal-string in QueryBuilder

@ondrejmirtes yes, I'm now using this:

    /**
     * @phpstan-param class-string&literal-string $className
     */
    public function getSortable(
        string $className,
    ): ?Sortable
    {
        return $this
            ->entityManager
            ->createQueryBuilder()
            ->select('sortable')
            ->from($className, 'sortable')
            ->getQuery()
            ->getOneOrNullResult();
    }
Created at 3 weeks ago
Created at 1 month ago
issue comment
Make `Mime\BodyRenderer` markdown conversion configurable

@fabpot awesome, thanks! 🌞

Created at 1 month ago
issue comment
[Form] Allow disabling of preferred_choices being shown twice

Just adding my "+1" here. We just ran into the very same issue with CountryType as @scuben.

Created at 1 month ago
issue comment
Panther with Authentication

Hi! I'm using the following base class for our E2E tests (it is based on previous comments in this discussion and code in KernelBrowser::loginUser) and it works fine on SF 6.1.

//...
use Symfony\Component\Panther\Client as PantherClient;
//...

abstract class PantherTestCase extends KernelTestCase
{

    use WebTestAssertionsTrait;

    /**
     * @param string[] $options An array of options to pass to the createKernel class
     * @param string[] $kernelOptions
     * @param string[] $managerOptions
     */
    protected static function createAuthenticatedPantherClient(
        User $user,
        array $options = [],
        array $kernelOptions = [],
        array $managerOptions = []
    ): PantherClient
    {
        $client = self::createPantherClient();

        // without this request, the session cookie could not be set
        $client->request('GET', '/');

        // Inspired by \Symfony\Bundle\FrameworkBundle\KernelBrowser::loginUser()
        $token = new UsernamePasswordToken($user, 'main', $user->getRoles());

        $container = self::getContainer();
        $container->get('security.untracked_token_storage')->setToken($token);

        $session = $container->get('session.factory')->createSession();
        $session->set('_security_main', serialize($token));
        $session->save();

        $cookie = new Cookie($session->getName(), $session->getId());
        $client->getCookieJar()->set($cookie);

        return $client;
    }
Created at 2 months ago