I updated magento to 2.4.6 and PHP 8.2 and When I run any comment in Magento (i.e php bin/magento cache:flush or php bin/magento cache:clean) I get this error on the console:
There is an error in /var/www/magento2/vendor/magento/framework/App/ErrorHandler.php at line: 62
Deprecated Functionality: Using ${var} in strings is deprecated, use {$var} instead in /var/www/magento2/vendor/composer/composer/src/Composer/Autoload/AutoloadGenerator.php on line 777#0 /var/www/magento2/vendor/composer/ClassLoader.php(582): MagentoFrameworkAppErrorHandler->handler()
#1 /var/www/magento2/vendor/composer/ClassLoader.php(582): include()
#2 /var/www/magento2/vendor/composer/ClassLoader.php(433): ComposerAutoload{closure}()
#3 /var/www/magento2/vendor/composer/composer/src/Composer/Factory.php(384): ComposerAutoloadClassLoader->loadClass()
#4 /var/www/magento2/vendor/composer/composer/src/Composer/Factory.php(595): ComposerFactory->createComposer()
#5 /var/www/magento2/vendor/magento/framework/Composer/ComposerFactory.php(45): ComposerFactory::create()
#6 /var/www/magento2/vendor/magento/framework/Composer/ComposerInformation.php(368): MagentoFrameworkComposerComposerFactory->create()
#7 /var/www/magento2/vendor/magento/framework/Composer/ComposerInformation.php(381): MagentoFrameworkComposerComposerInformation->getComposer()
#8 /var/www/magento2/vendor/magento/framework/Composer/ComposerInformation.php(244): MagentoFrameworkComposerComposerInformation->getLocker()
#9 /var/www/magento2/vendor/magento/framework/App/ProductMetadata.php(120): MagentoFrameworkComposerComposerInformation->getSystemPackages()
#10 /var/www/magento2/vendor/magento/framework/App/ProductMetadata.php(80): MagentoFrameworkAppProductMetadata->getSystemPackageVersion()
#11 /var/www/magento2/vendor/magento/framework/Console/Cli.php(99): MagentoFrameworkAppProductMetadata->getVersion()
#12 /var/www/magento2/bin/magento(22): MagentoFrameworkConsoleCli->__construct()
#13 {main}
any suggestions?