Skip to content

peon-dev/php-recipes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Jul 16, 2023
3c82e59 · Jul 16, 2023

History

39 Commits
May 3, 2022
Jul 16, 2023
Jun 30, 2022
Feb 16, 2023
Jul 16, 2023
May 5, 2022
May 5, 2022
Jun 1, 2022
May 2, 2022
Jun 30, 2022
Jul 16, 2023
Jul 16, 2023
Jun 1, 2022
Jun 23, 2022
May 3, 2022

Repository files navigation

Peon official PHP recipes

Set of PHP recipes for peon.dev

Usage

Expects mounted, built PHP application in /app directory.

bin/run-recipe [options] <recipeName> <paths>...

Arguments:
  recipeName             
  paths                  

Options:
      --timeout=TIMEOUT  
  -h, --help             Display help for the given command. When no command is given display help for the bin/run-recipe command
  -q, --quiet            Do not output any message
  -V, --version          Display this application version
      --ansi|--no-ansi   Force (or disable --no-ansi) ANSI output
  -n, --no-interaction   Do not ask any interactive question
  -e, --env=ENV          The Environment name. [default: "dev"]
      --no-debug         Switches off debug mode.
  -v|vv|vvv, --verbose   Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Xdebug

Create docker-compose.override.yml with following content (tweak for your needs):

version: "3.7"
services:
    php:
        environment:
            XDEBUG_CONFIG: "client_host=192.168.64.1"
            PHP_IDE_CONFIG: "serverName=peon"
        volumes:
          - ./.docker/php/xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini

Adding new recipes

  1. Add recipe into Peon\PhpRecipes\Recipe\Recipe enum (src/Recipe.php)
  2. Write config for that recipe (src/Recipe/Config/<recipe-name>.php)
  3. Write test expectation xml (tests/RecipesExpectedChanges/<recipe-name>.xml) You might need to prepare some code for it in example application (tests/ExampleApplication)