Sign inSign up

vaugenwake/phptools

By vaugenwake

Updated over 2 years ago

PHP QA Tools

Image
0

522

vaugenwake/phptools repository overview

PHP QA Tools

This docker image exists to install and run PHP QA tooling without installing the tooling locally in your project. The tools are installed and maintained at a global level and compatable with the php version installed.

Versions & Tools

8.4 - 8.0:
  • PHP CS 3.8.0
  • Coverage Checker 0.0.8
  • PHP MND 3.3.0
  • PHP MD @stable
  • PHP Lint 9.0.*
  • PHP Parallel Lint 1.3.2
7.4:
  • PHP CS 3.8.0
  • Coverage Checker 0.0.8
  • PHP MND 3.3.0
  • PHP MD @stable
  • PHP Lint 3.*
  • PHP Parallel Lint 1.3.2

Usage

1. Define your QA tooling execution script: Create a new shell script in your project so that will define your complete QA pipeline execution steps, example qa-checks.sh:

#!/bin/bash
set -e

# Import the integrated utils
source /utils.sh

# Define your QA execution flow
c_output "Starting QA checks" "" "green"
line_break

c_output "PHP CS" "" "yellow"
phpcs --standard=PSR12 index.php || true
line_break

c_output "Finished" "" "green"

2. Create a new shell script to execute your checks within a new container: qa-check.sh

#!/bin/bash
set -e

docker run --rm -it \
    -v ./test-run:/app \
    --workdir=/app \
    vaugenwake/phptools:8.3-arm64 \
    ./test-run.sh

3. Run your QA check pipeline:

./qa-check.sh

Utils

This docker image ships with a utils.sh script that you can import to provide utility functions to make displaying output nicer to end users:

c_output "[output-string]" "[text-color]" "[bg-color]"

c_output "This is a heading" "" "green"

line_break Will add a line break at line position

Import utilities into our qa checks runner:

# Add this import to the top of our runner script
source /utils.sh

Tag summary

Content type

Image

Digest

sha256:7338fac5d

Size

273 MB

Last updated

over 2 years ago

docker pull vaugenwake/phptools:8.3