Skip to content

Commit

Permalink
Added some info to README and made php-tool-run executable
Browse files Browse the repository at this point in the history
  • Loading branch information
mcustiel committed Jan 30, 2017
1 parent 2121a2a commit 2336bcb
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 0 deletions.
71 changes: 71 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,74 @@
Docker image containing common tools used in php development

Based in [docker images for composer](https://github.com/RobLoach/docker-composer), PHP7 and PHP5 versions.

## Integrated tools

# Package manager

* Composer

# Tasks runner

* Phing

### Testing

* PHPUnit + DBUnit
* Codeception

### Static Code Analysis

* PHP Copy-Paste Detector
* PHP LOC
* PHP Mess Detector
* PHP CodeSniffer + Symfony2 Code Standard
* PHP Metrics
* Security Checker

# Code fixing

* PHP CS Fixer

## Use

### Installation

Download the Dockerfile you need (PHP7 and PHP5 versions included) and execute:
```bash
docker build . -t php-tools
```
Copy `php-tool-run` file to your PATH.

### Run

`php-tool-run <tool>`

#### Examples:

```bash
php-tool-run composer update
```

```bash
# Run php-cs-fixer in ./src
php-tool-run php-cs-fixer fix src
```

```bash
# Runs composer update and then change the ownerships of vendor
# files to the current user and group (docker will give ownership to root)
php-tool-run composer update --dpt-owner
```

```bash
# Runs composer update and then change the ownerships of vendor
# files to the given user and group (docker will give ownership to root)
php-tool-run composer update --dpt-owner --dpt-user myuser --dpt-group mygroup
```

```bash
# Runs php-cs-fixer in the given directory
php-tool-run php-cs-fixer --dpt-dir /my/path
```

1 change: 1 addition & 0 deletions php-tool-run
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ if [ "$CHANGE_OWNER" -eq "1" ]; then
echo "CHANGING OWNERSHIP TO $USER:$GROUP"
sudo chown -R $USER:$GROUP $DIR
fi

0 comments on commit 2336bcb

Please sign in to comment.