Skip to content

Commit b215a06

Browse files
authored
Merge pull request #29 from keboola/zajca-PST-1807
PST-1807 Native types PHP8
2 parents 047d7ca + a879413 commit b215a06

File tree

137 files changed

+2009
-2510
lines changed

Some content is hidden

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

137 files changed

+2009
-2510
lines changed

.github/workflows/push.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,7 @@ jobs:
8181
-
8282
name: Run tests
8383
run: |
84-
docker-compose run wait
85-
docker-compose run --rm app composer ci
84+
docker compose run --rm app composer ci
8685
8786
tests-in-kbc:
8887
needs: build

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM php:7.4-cli
1+
FROM php:8.3-cli
22

33
ARG COMPOSER_FLAGS="--prefer-dist --no-interaction"
44
ARG DEBIAN_FRONTEND=noninteractive
@@ -42,4 +42,4 @@ COPY . /code/
4242
# Run normal composer - all deps are cached already
4343
RUN composer install $COMPOSER_FLAGS
4444

45-
CMD php ./src/app.php run /data
45+
CMD ["php", "/code/src/run.php"]

Dockerfile-tests

Lines changed: 0 additions & 7 deletions
This file was deleted.

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ Application is prepared for run in container, you can start development same way
2525

2626
1. Clone this repository: `git clone git@github.com:keboola/dynamodb-extractor.git`
2727
2. Change directory: `cd dynamodb-extractor`
28-
3. Build services: `docker-compose build`
29-
4. Run tests `docker-compose run --rm app composer ci`
28+
3. Build services: `docker compose build`
29+
4. Run tests `docker compose run --rm app composer ci`
3030

3131
After seeing all tests green, continue:
3232

33-
1. Run service: `docker-compose run --rm app-tests` (starts container with `bash`)
34-
2. Create tables/indexes and load sample data: `php init.php`
33+
1. Run service: `docker compose run --rm app bash`
34+
2. Create tables/indexes and load sample data: `php tests/fixtures/init.php`
3535
3. Write tests and code
3636
4. Run tests: `composer tests`
3737

composer.json

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,38 @@
44
"type": "project",
55
"description": "Keboola DynamoDB Extractor",
66
"require": {
7-
"php": "^7.4",
7+
"php": "^8.3",
88
"aws/aws-sdk-php": "^3.224",
99
"symfony/console": "^5.4",
1010
"symfony/serializer": "^5.4",
1111
"symfony/filesystem": "^5.4",
1212
"nette/utils": "^3.2",
13-
"keboola/csvmap": "^1.1",
13+
"keboola/csvmap": "^2",
1414
"monolog/monolog": "^2.6",
15-
"keboola/php-component": "^9.0"
15+
"keboola/php-component": "^10"
1616
},
1717
"require-dev": {
18-
"keboola/coding-standard": "^13.0",
19-
"phpunit/phpunit": "^9.5",
18+
"keboola/coding-standard": "^15",
19+
"keboola/datadir-tests": "^5.6",
20+
"php-parallel-lint/php-parallel-lint": "^1.3",
2021
"phpstan/phpstan": "^1.7",
21-
"symfony/process": "^5.4",
22-
"php-parallel-lint/php-parallel-lint": "^1.3"
22+
"phpunit/phpunit": "^9.5",
23+
"symfony/process": "^5.4"
2324
},
2425
"autoload": {
2526
"psr-4": {
26-
"Keboola\\": "src/Keboola/"
27+
"Keboola\\": "src/Keboola/",
28+
"Keboola\\DynamoDbExtractor\\Tests\\": "tests/phpunit/",
29+
"Keboola\\DynamoDbExtractor\\FunctionalTests\\": "tests/functional/"
2730
}
2831
},
2932
"scripts": {
30-
"tests-phpunit": "phpunit",
33+
"tests-phpunit": "phpunit --testsuite unit",
34+
"tests-datadir": "phpunit --testsuite functional",
3135
"tests": [
32-
"php ./init.php",
33-
"@tests-phpunit"
36+
"php tests/fixtures/init.php",
37+
"@tests-phpunit",
38+
"@tests-datadir"
3439
],
3540

3641
"phpstan": "phpstan analyse ./src ./tests --level=max --no-progress -c phpstan.neon",

0 commit comments

Comments
 (0)