A simple wrapper to run chrome-php/chrome with caching and logging.
sudo apt install curl -y && curl -s https://raw.githubusercontent.com/TurboLabIt/webstackup/master/script/chrome/install.sh?$(date +%s) | sudo bash
See: webstackup/script/chrome/
If you want to use Chrome to generate PDFs, you also need this:
sudo apt install curl -y && curl -s https://raw.githubusercontent.com/TurboLabIt/webstackup/master/script/print/install-pdf.sh?$(date +%s) | sudo bash
composer config repositories.turbolabit/php-chrome-headless git https://github.com/TurboLabIt/php-chrome-headless.git
composer require turbolabit/php-chrome-headless:dev-main
# config/packages/chromeheadless.yaml
turbo_lab_it_chrome_headless:
$arrConfig:
pdf:
browser:
marginTop: 1.5
marginBottom: 1.5
See: services.yaml
<?php
?>
See: ChromeHeadlessTest
<?php
?>
See: ChromeHeadlessTest
git clone git@github.com:TurboLabIt/php-chrome-headless.git
cd php-chrome-headless
clear && bash script/test_runner.sh