https://github.com/steevanb/docker-php-code-fixer
Docker image for wapmorgan/PhpCodeFixer
https://github.com/steevanb/docker-php-code-fixer
Last synced: 10 months 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 (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-03-20T15:11:11.000Z (about 6 years ago)
- Last Synced: 2025-04-02T03:23:23.409Z (about 1 year ago)
- Language: Shell
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://github.com/steevanb/docker-php-code-fixer/tree/2.0.23)
[](https://php.net)

## 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 sh
set -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/phpcf
workflows:
version: '2.1'
Code quality:
jobs:
- phpcf
```