Change record status: 
Introduced in branch: 
Introduced in version: 

The PHP Filter module has been removed from Drupal Core and moved to a contributed module at .

If your contributed modules allows a Drupal user to execute php via the interface you should update it. The method of checking depends on the existing an instance of ModuleHandler on your object:

  • Check $this->moduleHandler->moduleExists('php') && user_access('use PHP for settings') before allowing the code to be entered.
  • Check $this->moduleHandler->moduleExists('php') before allowing the code to be executed.

If your object does not have an instance of ModuleHandler available, it can be accessed statically:

  • \Drupal::moduleHandler()->moduleExists('php')
Site builders, administrators, editors
Module developers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other updates done