You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description:
We encountered a fatal error when trying to clear the cache after updating to APY/DataGridBundle version 4.0 on a Symfony 3.4 project. The issue seems to be due to the getRootNode() method in the TreeBuilder class, which does not exist in Symfony 3.4.
Error Message:
Fatal error: Uncaught Symfony\Component\Debug\Exception\UndefinedMethodException: Attempted to call an undefined method named "getRootNode" of class "Symfony\Component\Config\Definition\Builder\TreeBuilder". in /srv/app/vendor/apy/datagrid-bundle/DependencyInjection/Configuration.php:21
Steps to Reproduce:
Start with a Symfony 3.4 project.
Require APY/DataGridBundle version 4.0 using Composer.
Run composer update.
Attempt to clear the cache using php bin/console cache:clear --no-warmup.
Observe the fatal error.
Expected Behavior:
The bundle should either be compatible with Symfony 3.4, or the composer.json file should specify a Symfony version requirement that prevents installation on incompatible versions.
Actual Behavior:
The bundle attempts to use getRootNode(), which is available from Symfony 4.2 onwards, thus causing a fatal error in Symfony 3.4 environments.
Possible Solutions:
Update the composer.json to reflect the correct Symfony version requirements.
Adjust the Configuration.php to check for Symfony version and use either getRootNode() or the deprecated root() method accordingly.
Additional Context:
Updating to a newer version of Symfony might not be feasible for all projects immediately due to extensive dependencies and potential backward compatibility issues. A clarification in the documentation or adjustment in the code to maintain backward compatibility would be beneficial for developers relying on older Symfony versions.
Thank you for looking into this issue. Any guidance or updates on how to handle or patch this would be greatly appreciated.
The text was updated successfully, but these errors were encountered:
Description:
We encountered a fatal error when trying to clear the cache after updating to APY/DataGridBundle version 4.0 on a Symfony 3.4 project. The issue seems to be due to the
getRootNode()
method in theTreeBuilder
class, which does not exist in Symfony 3.4.Error Message:
Steps to Reproduce:
composer update
.php bin/console cache:clear --no-warmup
.Expected Behavior:
The bundle should either be compatible with Symfony 3.4, or the composer.json file should specify a Symfony version requirement that prevents installation on incompatible versions.
Actual Behavior:
The bundle attempts to use
getRootNode()
, which is available from Symfony 4.2 onwards, thus causing a fatal error in Symfony 3.4 environments.Possible Solutions:
composer.json
to reflect the correct Symfony version requirements.Configuration.php
to check for Symfony version and use eithergetRootNode()
or the deprecatedroot()
method accordingly.Additional Context:
Updating to a newer version of Symfony might not be feasible for all projects immediately due to extensive dependencies and potential backward compatibility issues. A clarification in the documentation or adjustment in the code to maintain backward compatibility would be beneficial for developers relying on older Symfony versions.
Thank you for looking into this issue. Any guidance or updates on how to handle or patch this would be greatly appreciated.
The text was updated successfully, but these errors were encountered: