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): Magento\Framework\App\ErrorHandler->handler()
#1 /var/www/magento2/vendor/composer/ClassLoader.php(582): include()
#2 /var/www/magento2/vendor/composer/ClassLoader.php(433): Composer\Autoload\{closure}()
#3 /var/www/magento2/vendor/composer/composer/src/Composer/Factory.php(384): Composer\Autoload\ClassLoader->loadClass()
#4 /var/www/magento2/vendor/composer/composer/src/Composer/Factory.php(595): Composer\Factory->createComposer()
#5 /var/www/magento2/vendor/magento/framework/Composer/ComposerFactory.php(45): Composer\Factory::create()
#6 /var/www/magento2/vendor/magento/framework/Composer/ComposerInformation.php(368): Magento\Framework\Composer\ComposerFactory->create()
#7 /var/www/magento2/vendor/magento/framework/Composer/ComposerInformation.php(381): Magento\Framework\Composer\ComposerInformation->getComposer()
#8 /var/www/magento2/vendor/magento/framework/Composer/ComposerInformation.php(244): Magento\Framework\Composer\ComposerInformation->getLocker()
#9 /var/www/magento2/vendor/magento/framework/App/ProductMetadata.php(120): Magento\Framework\Composer\ComposerInformation->getSystemPackages()
#10 /var/www/magento2/vendor/magento/framework/App/ProductMetadata.php(80): Magento\Framework\App\ProductMetadata->getSystemPackageVersion()
#11 /var/www/magento2/vendor/magento/framework/Console/Cli.php(99): Magento\Framework\App\ProductMetadata->getVersion()
#12 /var/www/magento2/bin/magento(22): Magento\Framework\Console\Cli->__construct()
#13 {main}
any suggestions?