Skip to content

Commit 3b1851d

Browse files
authored
Merge pull request #24 from keboola/COM-1533-update-packages
Update vendor packages
2 parents 366eab5 + b6881d2 commit 3b1851d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+3479
-1398
lines changed

.github/workflows/push.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ jobs:
8080
tag_as_latest: true
8181
-
8282
name: Run tests
83-
run: docker-compose run --rm app-tests
83+
run: |
84+
docker-compose run wait
85+
docker-compose run --rm app composer ci
8486
8587
tests-in-kbc:
8688
needs: build

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.idea
22
/vendor
33
/data
4+
.phpunit.result.cache

Dockerfile

Lines changed: 37 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,45 @@
1-
FROM php:7.2
2-
ENV DEBIAN_FRONTEND noninteractive
1+
FROM php:7.4-cli
32

4-
RUN apt-get update -q \
5-
&& apt-get install unzip wait-for-it git -y --no-install-recommends \
6-
&& rm -rf /var/lib/apt/lists/*
3+
ARG COMPOSER_FLAGS="--prefer-dist --no-interaction"
4+
ARG DEBIAN_FRONTEND=noninteractive
5+
ENV COMPOSER_ALLOW_SUPERUSER 1
6+
ENV COMPOSER_PROCESS_TIMEOUT 3600
77

8-
WORKDIR /root
8+
WORKDIR /code/
99

10-
RUN curl -sS https://getcomposer.org/installer | php \
11-
&& mv composer.phar /usr/local/bin/composer
10+
COPY docker/php/php-prod.ini /usr/local/etc/php/php.ini
11+
COPY docker/composer-install.sh /tmp/composer-install.sh
1212

13-
COPY ./docker/php/php-prod.ini /usr/local/etc/php/php.ini
14-
COPY . /code
13+
RUN apt-get update && apt-get install -y --no-install-recommends \
14+
git \
15+
wait-for-it \
16+
locales \
17+
unzip \
18+
libicu-dev \
19+
&& rm -r /var/lib/apt/lists/* \
20+
&& sed -i 's/^# *\(en_US.UTF-8\)/\1/' /etc/locale.gen \
21+
&& locale-gen \
22+
&& chmod +x /tmp/composer-install.sh \
23+
&& /tmp/composer-install.sh
1524

16-
WORKDIR /code
25+
RUN docker-php-ext-configure intl \
26+
&& docker-php-ext-install intl
1727

18-
RUN composer install --prefer-dist --no-interaction
28+
ENV LANGUAGE=en_US.UTF-8
29+
ENV LANG=en_US.UTF-8
30+
ENV LC_ALL=en_US.UTF-8
31+
32+
## Composer - deps always cached unless changed
33+
# First copy only composer files
34+
COPY composer.* /code/
35+
36+
# Download dependencies, but don't run scripts or init autoloaders as the app is missing
37+
RUN composer install $COMPOSER_FLAGS --no-scripts --no-autoloader
38+
39+
# Copy rest of the app
40+
COPY . /code/
41+
42+
# Run normal composer - all deps are cached already
43+
RUN composer install $COMPOSER_FLAGS
1944

2045
CMD php ./src/app.php run /data

composer.json

Lines changed: 42 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,34 +3,55 @@
33
"license": "MIT",
44
"type": "project",
55
"description": "Keboola DynamoDB Extractor",
6-
"keywords": ["keboola", "dynamodb", "extractor", "aws"],
7-
"authors": [
8-
{
9-
"name": "Vladimír Kriška",
10-
"email": "vlado@keboola.com"
11-
}
12-
],
136
"require": {
14-
"php": "^7.1",
15-
"aws/aws-sdk-php": "^3.19",
16-
"symfony/console": "^4.0",
17-
"symfony/serializer": "^4.0",
18-
"symfony/filesystem": "^4.0",
19-
"nette/utils": "^2.4",
20-
"keboola/csvmap": "^0.3",
21-
"monolog/monolog": "^1.22",
22-
"keboola/php-component": "^2.1"
7+
"php": "^7.4",
8+
"aws/aws-sdk-php": "^3.224",
9+
"symfony/console": "^5.4",
10+
"symfony/serializer": "^5.4",
11+
"symfony/filesystem": "^5.4",
12+
"nette/utils": "^3.2",
13+
"keboola/csvmap": "^1.1",
14+
"monolog/monolog": "^2.6",
15+
"keboola/php-component": "^9.0"
2316
},
2417
"require-dev": {
25-
"phpunit/phpunit": "~5.3",
26-
"squizlabs/php_codesniffer": "^3.2",
27-
"symfony/process": "^4.0"
18+
"keboola/coding-standard": "^13.0",
19+
"phpunit/phpunit": "^9.5",
20+
"phpstan/phpstan": "^1.7",
21+
"symfony/process": "^5.4",
22+
"php-parallel-lint/php-parallel-lint": "^1.3"
2823
},
2924
"autoload": {
3025
"psr-4": {
3126
"Keboola\\": "src/Keboola/"
3227
}
3328
},
34-
"minimum-stability": "dev",
35-
"prefer-stable": true
29+
"scripts": {
30+
"tests-phpunit": "phpunit",
31+
"tests": [
32+
"php ./init.php",
33+
"@tests-phpunit"
34+
],
35+
36+
"phpstan": "phpstan analyse ./src ./tests --level=max --no-progress -c phpstan.neon",
37+
"phpcs": "phpcs -n --ignore=vendor --extensions=php .",
38+
"phpcbf": "phpcbf -n --ignore=vendor --extensions=php .",
39+
"phplint": "parallel-lint -j 10 --exclude vendor .",
40+
"build": [
41+
"@phplint",
42+
"@phpcs",
43+
"@phpstan",
44+
"@tests"
45+
],
46+
"ci": [
47+
"@composer validate --no-check-publish --no-check-all",
48+
"@build"
49+
]
50+
},
51+
"config": {
52+
"sort-packages": true,
53+
"allow-plugins": {
54+
"dealerdirect/phpcodesniffer-composer-installer": true
55+
}
56+
}
3657
}

0 commit comments

Comments
 (0)