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)
Command icon 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

pearls created an issue. See original summary.

medha kumari made their first commit to this issue’s fork.

medha kumari’s picture

Status: Active » Needs review

Hi, I create MR for this. Please check and review. Thanks!

jrockowitz’s picture

Status: Needs review » Needs work

We 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: '\\')

pearls’s picture

MR !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.

elfakhar made their first commit to this issue’s fork.

elfakhar’s picture

Status: Needs work » Needs review

I've updated the code, could somone check when have time. thanks

jrockowitz’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.