Problem/Motivation

Having this error when using PHP 8.1:

Deprecated function: htmlentities(): Passing null to parameter #1 ($string) of type string is deprecated in Drupal\behat_ui\Controller\BehatUiController->getDefinitionStepsWithInfo() (line 313 of /var/www/html/test/drupal9c2/docroot/modules/contrib/behat_ui/src/Controller/BehatUiController.php)
#0 /var/www/html/test/drupal9c2/docroot/core/includes/bootstrap.inc(347): _drupal_error_handler_real()
#1 [internal function]: _drupal_error_handler()
#2 /var/www/html/test/drupal9c2/docroot/modules/contrib/behat_ui/src/Controller/BehatUiController.php(313): htmlentities()
#3 [internal function]: Drupal\behat_ui\Controller\BehatUiController->getDefinitionStepsWithInfo()
#4 /var/www/html/test/drupal9c2/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#5 /var/www/html/test/drupal9c2/docroot/core/lib/Drupal/Core/Render/Renderer.php(564): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#6 /var/www/html/test/drupal9c2/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext()
#7 /var/www/html/test/drupal9c2/docroot/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#8 /var/www/html/test/drupal9c2/vendor/symfony/http-kernel/HttpKernel.php(158): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#9 /var/www/html/test/drupal9c2/vendor/symfony/http-kernel/HttpKernel.php(80): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#10 /var/www/html/test/drupal9c2/docroot/core/lib/Drupal/Core/StackMiddleware/Session.php(58): Symfony\Component\HttpKernel\HttpKernel->handle()
#11 /var/www/html/test/drupal9c2/docroot/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#12 /var/www/html/test/drupal9c2/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#13 /var/www/html/test/drupal9c2/docroot/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#14 /var/www/html/test/drupal9c2/docroot/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
#15 /var/www/html/test/drupal9c2/docroot/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#16 /var/www/html/test/drupal9c2/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#17 /var/www/html/test/drupal9c2/docroot/core/lib/Drupal/Core/DrupalKernel.php(709): Stack\StackedHttpKernel->handle()
#18 /var/www/html/test/drupal9c2/docroot/index.php(19): Drupal\Core\DrupalKernel->handle()
#19 {main}

Proposed resolution

Remaining tasks

  • ✅ File an issue
  • ✅ Addition/Change/Update/Fix
  • ✅ Merge request, Patch, or Commit
  • ✅ Testing to ensure no regression
  • ➖ Automated unit testing coverage
  • ➖ Automated functional testing coverage
  • ➖ UX/UI designer responsibilities
  • ➖ Readability
  • ➖ Accessibility
  • ➖ Performance
  • ➖ Security
  • ➖ Documentation
  • ✅ Code review by maintainers
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Release notes snippet
  • ✅ Release behat_ui-4.0.2

User interface changes

  • N/A

API changes

  • N/A

Data model changes

  • N/A

Release notes snippet

  • Issue #3299221 by Tasneem Natshah: Fixed PHP 8.1 Deprecated function: htmlentities(): Passing null to parameter #1 ($string) of type string is deprecated

Issue fork behat_ui-3299221

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

Tasneem Natshah created an issue. See original summary.

tasneem natshah’s picture

Assigned: tasneem natshah » Unassigned
Status: Active » Needs review
rajab natshah’s picture

Issue summary: View changes

rajab natshah’s picture

Assigned: Unassigned » mohammed j. razem
Issue summary: View changes
Issue tags: +behat_ui-4.0.2
rajab natshah’s picture

Assigned: mohammed j. razem » Unassigned
rajab natshah’s picture

Status: Needs review » Fixed
rajab natshah’s picture

Issue summary: View changes

✅ Released behat_ui-4.0.2

rajab natshah’s picture

Status: Fixed » Closed (fixed)