Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/steevanb/docker-php-code-fixer
Docker image for wapmorgan/PhpCodeFixer
https://github.com/steevanb/docker-php-code-fixer
Last synced: 28 days ago
JSON representation
Docker image for wapmorgan/PhpCodeFixer
- Host: GitHub
- URL: https://github.com/steevanb/docker-php-code-fixer
- Owner: steevanb
- Created: 2019-08-23T09:30:53.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-03-20T15:11:11.000Z (almost 5 years ago)
- Last Synced: 2024-10-27T12:24:12.876Z (3 months ago)
- Language: Shell
- Size: 3.91 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![version](https://img.shields.io/badge/version-2.0.23-green.svg)](https://github.com/steevanb/docker-php-code-fixer/tree/2.0.23)
[![php](https://img.shields.io/badge/docker-blue.svg)](https://php.net)
![Lines](https://img.shields.io/badge/code%20lines-132-green.svg)## docker-php-code-fixer
Docker container for [wapmorgan/PhpCodeFixer](https://github.com/wapmorgan/PhpCodeFixer).
Version of this repository,
and docker images on [dockerhub](https://cloud.docker.com/u/steevanb/repository/docker/steevanb/php-code-fixer),
follow [wapmorgan/PhpCodeFixer](https://github.com/wapmorgan/PhpCodeFixer) versions.If some fixes has to be made on this repository, we will add a 4th level in version, like 2.0.23`.1`.
## Installation
You don't need to install this repository, use the Docker image directly.
## Usage
### Locally with Docker
Create `bin/phpcf`:
```bash
#!/usr/bin/env shset -e
if [ $(which docker || false) ]; then
readonly PROJECT_DIRECTORY="$(realpath $(dirname $(realpath $0))/..)"
docker \
run \
--rm \
-it \
-v ${PROJECT_DIRECTORY}:/app:ro \
-w /app \
steevanb/php-code-fixer:2.0.23 \
bin/phpcf
else
phpcf --exclude=/vendor/ .
fi
```### Integration with CircleCI
Add phpcf in `.circleci/config.yml`:
```yaml
version: '2.1'jobs:
phpcf:
docker:
- image: steevanb/php-code-fixer:2.0.23
working_directory: /app
steps:
- checkout
- run:
name: phpcf
command: bin/phpcfworkflows:
version: '2.1'
Code quality:
jobs:
- phpcf
```