-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Andre Rademacher
committed
May 20, 2023
1 parent
240fc8e
commit 95342ef
Showing
12 changed files
with
1,870 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
composer.phar | ||
/vendor/ | ||
# IDEs | ||
.idea | ||
|
||
# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control | ||
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file | ||
# composer.lock | ||
# composer files | ||
composer.phar | ||
vendor/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,39 @@ | ||
# codewars-php70 | ||
Solving katas the old fashioned way. | ||
# codewars | ||
Great for learning and sharpening your coding skillz. | ||
|
||
## Build PHP 7.0 Docker image | ||
Use the build script in order to build the custom PHP 7.0 Docker image | ||
`andrerademacher/codewars-php70`. | ||
|
||
```bash | ||
container/build.sh | ||
``` | ||
|
||
## Run command in container | ||
The `container.sh` script makes running commands in the Docker container easy! | ||
To open a shell, just add the "sh" command: | ||
```bash | ||
container.sh sh | ||
``` | ||
|
||
The current PHP version can be shown like this: | ||
```bash | ||
container.sh php --version | ||
``` | ||
|
||
The Composer binary is already present in the latest 2.2 LTS version supporting PHP 7.0 . | ||
To run any composer command, like `composer install`, just type: | ||
```bash | ||
container.sh composer install | ||
``` | ||
|
||
After installing the dev dependencies, the PHPUnit test suite can be run | ||
inside the container by calling the phpunit binary in the vendor directory: | ||
```bash | ||
container.sh vendor/bin/phpunit | ||
``` | ||
|
||
For convenience, this can be done also by using the composer script: | ||
```bash | ||
container.sh composer phpunit | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"name": "andrerademacher/codewars-php70", | ||
"description": "Minimalistic PHP 7.0 environment for codewars", | ||
"minimum-stability": "stable", | ||
"license": "MIT", | ||
"keywords": [ | ||
"codewars", | ||
"php" | ||
], | ||
"authors": [ | ||
{ | ||
"name": "Andre Rademacher", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"require-dev": { | ||
"phpunit/phpunit": "^5.7" | ||
}, | ||
"require": { | ||
"php": "^7.0" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Kata\\": "kata" | ||
} | ||
}, | ||
"scripts": { | ||
"qa": [ | ||
"phpunit" | ||
], | ||
"phpunit": "phpunit" | ||
} | ||
} |
Oops, something went wrong.