Name: php-pm-drupal
Owner: PPM - PHP Process Manager
Description: Drupal adapter for use of Drupal 8 with PHP-PM
Created: 2015-10-27 22:45:37.0
Updated: 2018-05-16 11:07:00.0
Pushed: 2017-03-10 20:04:31.0
Size: 48
Language: PHP
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
This is a fork of PHP-PM's HttpKernel adapter for integrating Drupal with PHP-PM (therefore, also with ReactPHP).
The primary components are a bootstrap and bridge.
See:
The code is in alpha – very experimental. Last tested against drupal-8.0.2
.
View / report issues at https://github.com/php-pm/php-pm-drupal/issues.
Install Drupal.
From the Drupal web root, install this project with composer: composer require php-pm/drupal-adapter
.
This will also install PHP-PM and the default React <-> Symfony bridge (php-pm/httpkernel-adapter).
Apply these patches to Drupal core:
vendor/kentr/php-pm-drupal-adapter/patches/kentr-allow-repeated-setSitePath-in-DrupalKernel.patch
vendor/kentr/php-pm-drupal-adapter/patches/stop_using-2505339-24.patch
Start php-pm with
olute path to web root>/vendor/bin/ppm \
t \
olute path to web root> \
idge=httpKernel \
otstrap=PHPPM\\Bootstraps\\Drupal
Example:
/www/html/vendor/bin/ppm \
t \
/www/html/ \
idge=httpKernel \
otstrap=PHPPM\\Bootstraps\\Drupal
By default, PHP-PM uses the \PHPPM\Bridges\HttpKernel
bridge to convert a ReactPHP request into a Symfony request and the Symfony response into a ReactPHP response.
The included \PHPPM\Bridges\DrupalKernel
bridge extends \PHPPM\Bridges\HttpKernel
to populate various request meta-variables specified by CGI/1.1 (RFC 3875).
Install as described above.
Include the environment variables and the --bridge
option in the php-pm start command.
Supported environment variables:
index.php
script.$settings['trusted_host_patterns']
in settings.php
), this must match one of the trusted hosts.Example:
PT_NAME=/index.php \
ER_NAME=localhost \
ER_ADDRESS=127.0.0.1 \
MENT_ROOT=/var/www/html \
/www/html/vendor/bin/ppm start /var/www/html \
idge=PHPPM\\Bridges\\DrupalKernel \
otstrap=PHPPM\\Bootstraps\\Drupal