I am using magento version 2.4.2
and php version 7.4.3
I am trying to run project locally, getting below error:
Exception: Deprecated Functionality: Return type of MagentoFrameworkConfigFileIterator::current() should either be compatible with Iterator::current(): mixed, or the #[ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/prodmagerepo/vendor/magento/framework/Config/FileIterator.php on line 68 in /var/www/html/prodmagerepo/vendor/magento/framework/App/ErrorHandler.php:61 Stack trace: #0 /var/www/html/prodmagerepo/vendor/magento/framework/Config/FileIterator.php(17): MagentoFrameworkAppErrorHandler->handler() #1 /var/www/html/prodmagerepo/vendor/composer/ClassLoader.php(576): include('...') #2 /var/www/html/prodmagerepo/vendor/composer/ClassLoader.php(427): ComposerAutoload{closure}() #3 /var/www/html/prodmagerepo/vendor/magento/framework/Config/FileIteratorFactory.php(38): ComposerAutoloadClassLoader->loadClass() #4 /var/www/html/prodmagerepo/vendor/magento/framework/Module/Dir/Reader.php(111): MagentoFrameworkConfigFileIteratorFactory->create() #5 /var/www/html/prodmagerepo/vendor/magento/framework/Module/Dir/Reader.php(86): MagentoFrameworkModuleDirReader->getFilesIterator() #6 /var/www/html/prodmagerepo/vendor/magento/framework/App/Config/FileResolver.php(65): MagentoFrameworkModuleDirReader->getConfigurationFiles() #7 /var/www/html/prodmagerepo/generated/code/Magento/Framework/App/Config/FileResolver/Proxy.php(95): MagentoFrameworkAppConfigFileResolver->get() #8 /var/www/html/prodmagerepo/vendor/magento/framework/Config/Reader/Filesystem.php(128): MagentoFrameworkAppConfigFileResolverProxy->get() #9 /var/www/html/prodmagerepo/vendor/magento/framework/App/ResourceConnection/Config/Reader.php(59): MagentoFrameworkConfigReaderFilesystem->read() #10 /var/www/html/prodmagerepo/generated/code/Magento/Framework/App/ResourceConnection/Config/Reader/Proxy.php(95): MagentoFrameworkAppResourceConnectionConfigReader->read() #11 /var/www/html/prodmagerepo/vendor/magento/framework/Config/Data/Scoped.php(119): MagentoFrameworkAppResourceConnectionConfigReaderProxy->read() #12 /var/www/html/prodmagerepo/vendor/magento/framework/Config/Data/Scoped.php(97): MagentoFrameworkConfigDataScoped->_loadScopedData() #13 /var/www/html/prodmagerepo/vendor/magento/framework/App/ResourceConnection/Config.php(68): MagentoFrameworkConfigDataScoped->get() #14 /var/www/html/prodmagerepo/generated/code/Magento/Framework/App/ResourceConnection/Config/Proxy.php(95): MagentoFrameworkAppResourceConnectionConfig->getConnectionName() #15 /var/www/html/prodmagerepo/vendor/magento/framework/App/ResourceConnection.php(96): MagentoFrameworkAppResourceConnectionConfigProxy->getConnectionName() #16 /var/www/html/prodmagerepo/vendor/magento/framework/Lock/Backend/Database.php(82): MagentoFrameworkAppResourceConnection->getConnection() #17 /var/www/html/prodmagerepo/vendor/magento/framework/Cache/LockGuardedCacheLoader.php(134): MagentoFrameworkLockBackendDatabase->lock() #18 /var/www/html/prodmagerepo/vendor/magento/module-config/App/Config/Type/System.php(281): MagentoFrameworkCacheLockGuardedCacheLoader->lockedLoadData() #19 /var/www/html/prodmagerepo/vendor/magento/module-config/App/Config/Type/System.php(207): MagentoConfigAppConfigTypeSystem->loadDefaultScopeData() #20 /var/www/html/prodmagerepo/vendor/magento/module-config/App/Config/Type/System.php(181): MagentoConfigAppConfigTypeSystem->getWithParts() #21 /var/www/html/prodmagerepo/vendor/magento/framework/App/Config.php(132): MagentoConfigAppConfigTypeSystem->get() #22 /var/www/html/prodmagerepo/vendor/magento/framework/App/Config.php(80): MagentoFrameworkAppConfig->get() #23 /var/www/html/prodmagerepo/vendor/magento/framework/App/Config.php(93): MagentoFrameworkAppConfig->getValue() #24 /var/www/html/prodmagerepo/vendor/magento/module-new-relic-reporting/Model/Config.php(94): MagentoFrameworkAppConfig->isSetFlag() #25 /var/www/html/prodmagerepo/vendor/magento/module-new-relic-reporting/Plugin/HttpPlugin.php(49): MagentoNewRelicReportingModelConfig->isNewRelicEnabled() #26 /var/www/html/prodmagerepo/vendor/magento/framework/Interception/Interceptor.php(121): MagentoNewRelicReportingPluginHttpPlugin->beforeCatchException() #27 /var/www/html/prodmagerepo/vendor/magento/framework/Interception/Interceptor.php(153): MagentoFrameworkAppHttpInterceptor->MagentoFrameworkInterception{closure}() #28 /var/www/html/prodmagerepo/generated/code/Magento/Framework/App/Http/Interceptor.php(23): MagentoFrameworkAppHttpInterceptor->___callPlugins() #29 /var/www/html/prodmagerepo/vendor/magento/framework/App/Bootstrap.php(269): MagentoFrameworkAppHttpInterceptor->catchException() #30 /var/www/html/prodmagerepo/pub/index.php(29): MagentoFrameworkAppBootstrap->run() #31 {main}
Please if anyone have any idea to fix this issue then please help me out.
Thanks