chore: Update PHP version (#46)

Closes #38
This commit is contained in:
Julien BIANCHI 2020-07-23 21:10:34 +02:00 committed by GitHub
parent 6ab4ce942b
commit bf8d4b200f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 22 additions and 30 deletions

View file

@ -6,17 +6,12 @@ services:
- docker - docker
php: php:
- 7.0
- 7.1
- 7.2 - 7.2
- 7.3
- 7.4
- nightly - nightly
env: env:
matrix:
- COMPOSERFLAGS=
- COMPOSERFLAGS=--prefer-lowest
- COMPOSERFLAGS=--prefer-stable
global: global:
# DOCKER_EMAIL # DOCKER_EMAIL
- secure: JAbpFtQJovMT1IqHJmSlVI3xQpLUoqDlbYXUgExK99dH7+GH78Rd6CgjCo5fDAw5KW4zBoTJut7BWv+qdF1j9qpUEXlxB6dEwKdLHCCM8M9p+BddkaZUWF9kG+4pC1h6AeDeWi7Q77TzrOX7VAP1UubFOPItRNayF99zCJH6ioh8qnHNi2XHedIagMW4PGLp6HmTuyhzdF6RVEXcCos2fpkx5wzcjALb/ffN8A0dqtfELRvs6bjaQZ1ktmNjd3fSnQOtGO14VOei8E58e4roZNdDHMoIxzeqaM+bphsTZvHne4DAZEn3wU2iguzXLZMCAgF336Inu+t2Rjv4UDLcPeppMrYA+02Ww0kbCXcIQx4Og0Un54SY5qdIHZtnTXA+SAFr+5r+T80p29Tlp9cUfxaHWFynDEEDWx7minAATweSQU50ipPnAkge1WY/ADSN1EARqM2GYVQYLvddIaTSIbnq37MnlncWL+jkcQ0cL83xidYd7JnQ7/gZJf9MzeZzMVXrY+2VYL1WOrv1uwmVi30bpQss1D7IVVtN5iBlB2ciph+iHdvkhv6f8ji9xZmWkotfDzsRoZg7csDAVgliz55QkJYKeWDoiW7kb1i+pIsgmrdEonPMg7NHjSqIIkrwI89016Tsx4LH1t2sRRYW8Z7wuVhW3VcJD+CnkhAWvLc= - secure: JAbpFtQJovMT1IqHJmSlVI3xQpLUoqDlbYXUgExK99dH7+GH78Rd6CgjCo5fDAw5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+OpQUXx2P5iDhx5qz173lO4h1WX4vEQ3p4aFbfnNREUDPGYsMJo6flm5Azq8F0qh065sxPldKunr9H4fAXrFzqMJnTepReEGPNJRn35TLl08RI7GTp0hKxlaycsu+c2Qz0/GcKbODWf5w24d/pxrOMM9KmJpDZTBm9bWiZlRbbZm1OnK0PiaRi9ft44Em5NYTFVvuWL2M2tIyGObI3kquKTkANvrSuPTofJ0JawXg2YBKOH8=" - secure: "BqpmNofWU38cV3eUT9Hm9wxiiRlp1LKl1JQBxvsYng/dk4L7ONiBVsrG6T7nYhkTktWc/II4ZAoQ7AGHN42W1quzSmc6d0fszQ7uTwNobfFQu2JzFNkhyP9D6b0v8uXhT8n6TPqOGgoJUcguStvasG3TuZwn7+PhwjyVfnzf+DhyaXjCljMatg7ekL0JDPGdAz/SQhuBiwk2xlZtxtEokNy7IVr9VcMi2O0nG3LMhCl1sQjo3JKBxPsalQi78dShDUHcazAE68T7M1FjAZCJYia902FMDWiIuujLamq+NpDgEKB3aLCLwF/o3j8z3ekPrk2v9Zokz+t36cQ2BmPpwqFfhvPdUv9tj9bi7Qv2R4NKreX8TWB8KB5afSVWiKfufWV5hp5KfwEmcLBc/hQdjRIwzDqVPK/fyy/GJ5fT4X5kz+YYLQEFxeWPtxL+OpQUXx2P5iDhx5qz173lO4h1WX4vEQ3p4aFbfnNREUDPGYsMJo6flm5Azq8F0qh065sxPldKunr9H4fAXrFzqMJnTepReEGPNJRn35TLl08RI7GTp0hKxlaycsu+c2Qz0/GcKbODWf5w24d/pxrOMM9KmJpDZTBm9bWiZlRbbZm1OnK0PiaRi9ft44Em5NYTFVvuWL2M2tIyGObI3kquKTkANvrSuPTofJ0JawXg2YBKOH8="
matrix: matrix:
exclude:
- php: 7.0
env: COMPOSERFLAGS=
- php: 7.1
env: COMPOSERFLAGS=--prefer-lowest
- php: 7.2
env: COMPOSERFLAGS=--prefer-lowest
- php: nightly
env: COMPOSERFLAGS=--prefer-lowest
allow_failures: allow_failures:
- php: nightly - php: nightly
@ -45,10 +31,10 @@ deploy:
- provider: script - provider: script
script: ci/deploy.sh script: ci/deploy.sh
on: on:
php: 7.1 php: 7.4
all_branches: master all_branches: master
- provider: script - provider: script
script: ci/deploy.sh script: ci/deploy.sh
on: on:
php: 7.1 php: 7.4
tags: true tags: true

View file

@ -1,4 +1,16 @@
FROM php:7.1-alpine FROM php:7.4-alpine as builder
COPY composer.json /dcv/composer.json
COPY composer.lock /dcv/composer.lock
WORKDIR /dcv
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
php composer-setup.php && \
php -r "unlink('composer-setup.php');" && \
php composer.phar install --prefer-dist
FROM php:7.4-alpine
RUN apk update && \ RUN apk update && \
apk add graphviz ttf-dejavu && \ apk add graphviz ttf-dejavu && \
@ -8,7 +20,7 @@ RUN apk update && \
COPY bin/ /dcv/bin COPY bin/ /dcv/bin
COPY src/ /dcv/src COPY src/ /dcv/src
COPY vendor/ /dcv/vendor COPY --from=builder /dcv/vendor /dcv/vendor
RUN chmod +x /dcv/bin/dcv RUN chmod +x /dcv/bin/dcv

View file

@ -24,17 +24,11 @@ clean:
rm -rf vendor/ rm -rf vendor/
docker.lock: Dockerfile bin/entrypoint.sh vendor src/application.php src/functions.php docker.lock: Dockerfile bin/entrypoint.sh vendor src/application.php src/functions.php
$(COMPOSER) dump-autoload --classmap-authoritative
$(DOCKER) build -t $(DCV_IMAGE_NAME) . $(DOCKER) build -t $(DCV_IMAGE_NAME) .
touch docker.lock touch docker.lock
ifndef COMPOSERFLAGS
vendor: composer.lock vendor: composer.lock
$(COMPOSER) install --prefer-dist $(COMPOSER) install --prefer-dist
else
vendor: composer.lock
$(COMPOSER) update $(COMPOSERFLAGS)
endif
composer.lock: composer.json composer.lock: composer.json
$(COMPOSER) update $(COMPOSERFLAGS) $(COMPOSER) update $(COMPOSERFLAGS)

View file

@ -24,7 +24,7 @@ This will generate the `docker-compose.png` file in the current working director
Before you start, make sure you have: Before you start, make sure you have:
* [Composer](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx) installed, * [Composer](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx) installed,
* [PHP 7](http://php.net/downloads.php#v7.0.9) installed, * [PHP 7.2](http://php.net/downloads.php#v7.2.32) (at least) installed,
* GraphViz installed (see below for a guide on how to install it) * GraphViz installed (see below for a guide on how to install it)
``` ```

View file

@ -2,7 +2,7 @@
"name": "pmsipilot/docker-compose-viz", "name": "pmsipilot/docker-compose-viz",
"description": "Docker compose graph visualization", "description": "Docker compose graph visualization",
"require": { "require": {
"php": "^7", "php": "^7.2",
"symfony/yaml": "^3.1 || ^4", "symfony/yaml": "^3.1 || ^4",
"symfony/console": "^3.1", "symfony/console": "^3.1",
"clue/graph": "^0.9", "clue/graph": "^0.9",

4
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "e5370b9d4f890699543b1dbd6ba801de", "content-hash": "b969fd3f88d63984295c01f8c964a703",
"packages": [ "packages": [
{ {
"name": "clue/graph", "name": "clue/graph",
@ -1721,7 +1721,7 @@
"prefer-stable": true, "prefer-stable": true,
"prefer-lowest": false, "prefer-lowest": false,
"platform": { "platform": {
"php": "^7" "php": "^7.2"
}, },
"platform-dev": [] "platform-dev": []
} }