Skip to content

Commit

Permalink
Openeuropa 778: Relax dependencies. (#77)
Browse files Browse the repository at this point in the history
* OPENEUROPA-778: Remove docker-compose.yml.

* OPENEUROPA-778: Add editorconfig file.

* OPENEUROPA-778: Relax dependencies on composer.json.

* OPENEUROPA-778: Add Packagist badge.

* OPENEUROPA-778: Add documentation for docker-compose.yml.dist.
  • Loading branch information
voidtek authored and richardcanoe committed Sep 13, 2018
1 parent 0b4b024 commit aa7bbec
Show file tree
Hide file tree
Showing 7 changed files with 94 additions and 36 deletions.
5 changes: 4 additions & 1 deletion .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pipeline:
volumes:
- /cache:/cache
commands:
- composer install
- composer update ${COMPOSER_BOUNDARY}

grumphp:
group: test
Expand All @@ -39,3 +39,6 @@ matrix:
IMAGE_PHP:
- fpfis/httpd-php-dev:5.6
- fpfis/httpd-php-dev:7.1
COMPOSER_BOUNDARY:
- '--prefer-lowest'
- ''
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org

# PHP PSR-2 Coding Standards
# http://www.php-fig.org/psr/psr-2/

root = true

[*.php]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 4
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ phpunit.xml
composer.lock
.idea
log.txt
docker-compose.yml
27 changes: 26 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,33 @@
# Poetry Client Library
[![Build Status](https://drone.fpfis.eu/api/badges/ec-europa/oe-poetry-client/status.svg)](https://drone.fpfis.eu/ec-europa/oe-poetry-client/)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/ec-europa/oe-poetry-client/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/ec-europa/oe-poetry-client/?branch=master)
[![Packagist](https://img.shields.io/packagist/v/ec-europa/oe-poetry-client.svg)](https://packagist.org/packages/ec-europa/oe-poetry-client)

The Poetry Client Library aims to hide Poetry service complexity behind and easy-to-use client library so that
users don't have to worry about building their own request messages nor implementing SOAP interactions.

## Installation using Docker Compose

The setup procedure can be simplified by using Docker Compose.

Requirements:

- [Docker](https://www.docker.com/get-docker)
- [Docker-compose](https://docs.docker.com/compose/)

Copy docker-compose.yml.dist into docker-compose.yml.

You can make any alterations you need for your local Docker setup. However, the defaults should be enough to set the project up.

Run:

```
$ docker-compose up -d
```

Then:

```
$ docker-compose exec web composer install
```

For more information check the documentation [here](docs/00-overview.md).
37 changes: 20 additions & 17 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,44 @@
"name": "ec-europa/oe-poetry-client",
"description": "Client library for the European Commission Poetry Service",
"type": "library",
"minimum-stability": "alpha",
"minimum-stability": "stable",
"prefer-stable": true,
"license": "EUPL-1.2",
"require": {
"php": ">=5.6",
"ext-soap": "*",
"symfony/validator": "^2.8 || ^3.0",
"symfony/event-dispatcher": "^2.8 || ^3.0",
"symfony/expression-language": "^2.8 || ^3.0",
"symfony/dom-crawler": "^2.8 || ^3.0",
"league/plates": "^3.3",
"pimple/pimple": "^3.1",
"psr/log": "^1.0"
"jeremeamia/superclosure": "~2.2",
"league/plates": "^3.3.0",
"php": ">=5.6",
"pimple/pimple": "~3.2.3",
"psr/log": "~1.0.2",
"symfony/dom-crawler": "^2.8|^3.0",
"symfony/event-dispatcher": "^2.8|^3.0",
"symfony/expression-language": "^2.8|^3.0",
"symfony/validator": "^2.8|^3.0",
"symfony/yaml": "~3.3|~4.0"
},
"require-dev": {
"openeuropa/code-review": "~0.2",
"phpunit/phpunit": "^5||^6",
"peridot-php/leo": "^1.6",
"guzzle/guzzle": "~2.7|~3.0",
"internations/http-mock": "~0.8",
"mockery/mockery": "^0.9.9",
"phpspec/phpspec": "^4.0",
"internations/http-mock": "^0.8"
"openeuropa/code-review": "~1.0@alpha",
"peridot-php/leo": "~1.6",
"phpspec/phpspec": "~4.0@alpha",
"phpunit/phpunit": "~5.5|~6"
},
"suggest": {
"monolog/monolog": "Log Poetry requests and responses via Monolog",
"ec-europa/oe-poetry-behat": "Test Poetry service integration with Behat"
},
"autoload": {
"psr-4": {
"EC\\Poetry\\": "./src"
"EC\\Poetry\\": "./src/"
}
},
"autoload-dev": {
"psr-4": {
"EC\\Poetry\\Tests\\": "./tests/src",
"spec\\EC\\Poetry\\": "./spec"
"EC\\Poetry\\Tests\\": "./tests/src/",
"spec\\EC\\Poetry\\": "./spec/"
}
}
}
17 changes: 0 additions & 17 deletions docker-compose.yml

This file was deleted.

28 changes: 28 additions & 0 deletions docker-compose.yml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
version: '2'
services:
web:
image: fpfis/httpd-php-dev:7.1
working_dir: /var/www/html
ports:
- 8080:8080
volumes:
- .:/var/www/html # Non Mac users.
# - nfsmount:/var/www/html # Mac Users with the nfsmount volume.
environment:
XDEBUG_CONFIG: "remote_enable=1 remote_host=10.254.254.254 remote_port=9000 idekey=PHPSTORM remote_autostart=1"
PHP_IDE_CONFIG: "serverName=Docker"
# For Xdebug setup, run this command in the terminal:
# For Mac users: sudo ifconfig en0 alias 10.254.254.254 255.255.255.0
# For Linux users: sudo ip addr add 10.254.254.254/32 dev lo label lo:1

#### Mac users: uncomment the "volumes" key to enable the NFS file sharing. You can find more information about Docker for Mac here: https://github.com/openeuropa/openeuropa/blob/master/docs/starting/tooling.md#using-docker-on-macos

#volumes:
# nfsmount:
# driver: local
# driver_opts:
# type: nfs
# o: addr=host.docker.internal,rw,nolock,hard,nointr,nfsvers=3
# device: ":${PWD}/"

#### End Mac users.

0 comments on commit aa7bbec

Please sign in to comment.