Skip to content

Instantly share code, notes, and snippets.

View TomasVotruba's full-sized avatar
🎯
Deprecating Legacy

Tomas Votruba TomasVotruba

🎯
Deprecating Legacy
View GitHub Profile
@TomasVotruba
TomasVotruba / AvoidAlwaysCalledSettersOnNewObjectRule.php
Created June 25, 2025 17:29
[phpstan] rule - use constructor over the same old same setters again and again
<?php
declare(strict_types=1);
namespace Utils\PHPStan\Rule;
use PhpParser\Node;
use PHPStan\Analyser\Scope;
use PHPStan\Node\CollectedDataNode;
use PHPStan\Rules\Rule;
@TomasVotruba
TomasVotruba / SymfonyWorkflowsTest.php
Created April 17, 2025 08:19
[post] How we Maintain Dozens of Symfony Workflows with Ease
<?php
declare(strict_types=1);
namespace Tests\Unit\Smoke;
use AppKernel;
use PHPUnit\Framework\TestCase;
use ReflectionProperty;
use Symfony\Component\DependencyInjection\ContainerInterface;