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
RECTOR RULES AND SHIPPED CODE OVER TIME
════════════════════════════════════════════════════════════════════════════════
β”‚ RULE CLASSES β”‚ SHIPPED CODE IN MB
rector date β”‚ core symfony doctrine phpunit all β”‚ rector 3rd party
────────────────────┼───────────────────────────────────────┼───────────────────
0.15.0 2022-12-04 β”‚ 416 73 23 42 554 β”‚ 5.3 4.7
0.15.1 2022-12-14 β”‚ 420 73 23 46 562 β”‚ 5.3 4.7
0.15.2 2022-12-24 β”‚ 424 73 23 46 566 β”‚ 5.3 4.7
0.15.3 2023-01-08 β”‚ 425 73 23 46 567 β”‚ 5.4 4.7
parameters:
ignoreErrors:
-
message: '#^Method Mautic\\ApiBundle\\Controller\\CommonApiController\:\:processBatchForm\(\) has no return type specified\.$#'
identifier: missingType.return
count: 1
path: app/bundles/ApiBundle/Controller/CommonApiController.php
-
message: '#^Method Mautic\\ApiBundle\\Controller\\CommonApiController\:\:setCategory\(\) has no return type specified\.$#'
@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;