This command was created for Gedmo Doctrine Behavioral Tree Extension.
If your tree has been damaged, the leaves and roots have incorrect values - this command is all you need.
You can easily recalc all the properties of a tree by one command.
- Install package
composer require devpack/gedmo-tree-recalc
or copy only command 😉 - Add bundle to your
bundles.php
file
Example:
<?php
return [
// ...
DevPack\GedmoTreeRecalc\GedmoTreeRecalcBundle::class => ['all' => true],
];
- Run your symfony console
Example:
php bin/console gedmo:tree:recalc [<YourEntity>]
Run this command: ./vendor/bin/phpunit tests