Problem/Motivation
I am running my project on PHP 8.4 and encountering the following warning.
Has anyone experienced this issue before or knows the correct fix or workaround?
Thanks
Deprecated function: fgetcsv(): the $escape parameter must be provided as its default value will change in Drupal\schemadotorg\SchemaDotOrgInstaller->importTable() (line 615 of modules/contrib/schemadotorg/src/SchemaDotOrgInstaller.php).
DETAILS
Drupal\schemadotorg\SchemaDotOrgInstaller->importTable() (Line: 326)
Drupal\schemadotorg\SchemaDotOrgInstaller->install() (Line: 31)
schemadotorg_install() (Line: 829)
Drupal\Core\Extension\ModuleInstaller->invoke() (Line: 451)
Drupal\Core\Extension\ModuleInstaller->doInstall() (Line: 229)
Drupal\Core\Extension\ModuleInstaller->install() (Line: 83)
Drupal\Core\ProxyClass\Extension\ModuleInstaller->install() (Line: 186)
Drupal\system\Form\ModulesListConfirmForm->submitForm() (Line: 108)
Drupal\Core\Form\FormSubmitter->executeSubmitHandlers() (Line: 45)
Drupal\Core\Form\FormSubmitter->doSubmitForm() (Line: 615)
Drupal\Core\Form\FormBuilder->processForm() (Line: 347)
Drupal\Core\Form\FormBuilder->buildForm() (Line: 73)
Drupal\Core\Controller\FormController->getContentResult()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->{closure:Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber::wrapControllerExecutionInRenderContext():121}() (Line: 634)
Drupal\Core\Render\Renderer::{closure:Drupal\Core\Render\Renderer::executeInRenderContext():634}()
Fiber->resume() (Line: 649)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->{closure:Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber::onController():96}() (Line: 183)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 118)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 92)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 53)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 54)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 745)
Drupal\Core\DrupalKernel->handle() (Line: 19)
Issue fork schemadotorg-3564505
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
medha kumariHi, I create MR for this. Please check and review. Thanks!
Comment #5
jrockowitz commentedWe should use the approach in Drupal core via #3477324: Fix usage of str_getcsv() and fgetcsv() for PHP 8.4 and use
fgetcsv($handle, escape: '\\')Comment #6
pearls commentedMR !283 appears to have resolved the issue, or at least the error is no longer visible.
However, it might be appropriate to follow @jrockowitz’s recommendation.
Comment #8
elfakhar commentedI've updated the code, could somone check when have time. thanks
Comment #9
jrockowitz commented