GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - php-pm/php-pm-drupal: Drupal adapter for use of Drupal 8 with PHP-PM

BranchesTags
Open more actions menu

Latest commit

 

History

74 Commits
74 Commits

Folders and files

NameName
Last commit message
Last commit date
Bootstraps
Bootstraps
 
 
Bridges
Bridges
 
 
patches
patches
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
composer.json
composer.json
 
 

Repository files navigation

PHP-PM DrupalKernel Adapter

Overview

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:

  • https://github.com/php-pm/php-pm
  • https://github.com/php-pm/php-pm-httpkernel
  • http://marcjschmidt.de/blog/2014/02/08/php-high-performance.html

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.

Setup / Usage

  1. Install Drupal.

  2. 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).

  1. 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

  2. Start php-pm with

<absolute path to web root>/vendor/bin/ppm \
start \
<absolute path to web root> \
--bridge=httpKernel \
--bootstrap=PHPPM\\Bootstraps\\Drupal

Example:

/var/www/html/vendor/bin/ppm \
start \
/var/www/html/ \
--bridge=httpKernel \
--bootstrap=PHPPM\\Bootstraps\\Drupal

DrupalKernel bridge

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).

Setup / Usage

  1. Install as described above.

  2. Include the environment variables and the --bridge option in the php-pm start command.

Supported environment variables:
* **SCRIPT_NAME:** '/index.php' to emulate a standard setup where web requests execute Drupal's `index.php` script.
* **SERVER_NAME:** Your site's server / domain name.  If you're using trusted host settings (`$settings['trusted_host_patterns']` in `settings.php`), this must match one of the trusted hosts.
* **SERVER_ADDRESS:** IP address of the server.
* **DOCUMENT_ROOT:** Absolute filepath of the web root directory.

Example:

SCRIPT_NAME=/index.php \
SERVER_NAME=localhost \
SERVER_ADDRESS=127.0.0.1 \
DOCUMENT_ROOT=/var/www/html \
/var/www/html/vendor/bin/ppm start /var/www/html \
--bridge=PHPPM\\Bridges\\DrupalKernel \
--bootstrap=PHPPM\\Bootstraps\\Drupal

About

Drupal adapter for use of Drupal 8 with PHP-PM

Resources

Readme
Activity
Custom properties

Stars

43 stars

Watchers

8 watching

Forks

2 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.