Try Rector
Docs
Hire Team
Find Rule
Blog
Contact
AST
Try Rector
Docs
Hire Team
Find Rule
Blog
Contact
AST
Rector run Failed:
{ "totals": { "changed_files": 0, "errors": 1 }, "errors": [ { "message": "System error: \"This parameter does not have a default value available\"\nRun Rector with \"--debug\" option and post the report here: https://github.com/rectorphp/rector/issues/new", "file": "/var/www/storage/demo/4jyfb4ndabypmmcldc8v/rector_analyzed_file.php", "line": 172 } ] }
Run Rector on your code to see what it can do for you:
PHP snippet to change
<?php class ParentAttachable { public function __construct(array $properties) { parent::__construct($properties); } } class Attachable extends ParentAttachable { public function __construct(array $properties = []) { parent::__construct($properties); } }
Config
rector.php
<?php declare(strict_types=1); use Rector\Config\RectorConfig; use Rector\DeadCode\Rector\ClassMethod\RemoveParentDelegatingConstructorRector; return RectorConfig::configure() ->withRules([RemoveParentDelegatingConstructorRector::class]);
Run Rector
Rector version:
a6f0ce
- released at 2025-12-30 10:02