|
1 | 1 | # PHP-PM HttpKernel Adapter
|
2 | 2 |
|
3 |
| -This is a fork of PHP-PM's HttpKernel adapter for integrating Drupal with PHP-PM (therefore, also with ReactPHP). See https://github.com/php-pm/php-pm, https://github.com/php-pm/php-pm-httpkernel. |
| 3 | +This is a fork of PHP-PM's HttpKernel adapter for integrating Drupal with PHP-PM (therefore, also with ReactPHP). |
4 | 4 |
|
5 |
| -The code is in pre-alpha -- very experimental. Last tested against `drupal-8.0.2`. |
| 5 | +See: |
| 6 | +* https://github.com/php-pm/php-pm |
| 7 | +* https://github.com/php-pm/php-pm-httpkernel. |
| 8 | + |
| 9 | +The code is in alpha -- very experimental. Last tested against `drupal-8.0.2`. |
| 10 | + |
| 11 | +View / report issues at https://github.com/kentr/php-pm-drupal/issues. |
6 | 12 |
|
7 | 13 | ### Setup
|
8 | 14 |
|
9 |
| - 1. Install PHP-PM as described in the project docs. |
| 15 | + 1. Install Drupal. |
| 16 | + |
| 17 | + 2. From the Drupal web root, install this project with composer: `composer require kentr/php-pm-drupal-adapter`. |
| 18 | + |
| 19 | + This will also install PHP-PM and the default React <-> Symfony bridge (php-pm/httpkernel-adapter). |
| 20 | + |
| 21 | + 3. Apply these patches to Drupal core: |
| 22 | + * `vendor/kentr/php-pm-drupal-adapter/patches/kentr-allow-repeated-setSitePath-in-DrupalKernel.patch` |
| 23 | + * `vendor/kentr/php-pm-drupal-adapter/patches/stop_using-2505339-24.patch` |
10 | 24 |
|
11 |
| - 2. Replace the `vendor/php-pm/httpkernel-adapter` directory with this code. |
| 25 | + 4. Start php-pm with |
12 | 26 |
|
13 |
| - 3. Apply `kentr-allow-repeated-setSitePath-in-DrupalKernel.patch` to Drupal core. |
| 27 | +```bash |
| 28 | +sudo <absolute path to web root>/vendor/bin/ppm \ |
| 29 | +start \ |
| 30 | +<absolute path to web root> \ |
| 31 | +--bridge=httpKernel \ |
| 32 | +--bootstrap=PHPPM\\Bootstraps\\Drupal |
| 33 | +``` |
14 | 34 |
|
15 |
| - 4. Start php-pm with `sudo <absolute path to web root>/vendor/bin/ppm start <absolute path to web root> --bridge=httpKernel --bootstrap=PHPPM\\Bootstraps\\Drupal`. Example: `sudo vendor/bin/ppm start /var/www/html/ --bridge=httpKernel --bootstrap=PHPPM\\Bootstraps\\Drupal` |
| 35 | +Example: |
| 36 | +```bash |
| 37 | +sudo /var/www/html/vendor/bin/ppm \ |
| 38 | +start \ |
| 39 | +/var/www/html/ \ |
| 40 | +--bridge=httpKernel \ |
| 41 | +--bootstrap=PHPPM\\Bootstraps\\Drupal |
| 42 | +``` |
0 commit comments