diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 00000000..bc3ab5c1
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,6 @@
+version: 2
+updates:
+ - package-ecosystem: "composer"
+ directory: "/"
+ schedule:
+ interval: "daily"
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index ba672677..4515ff10 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -9,8 +9,13 @@ jobs:
uses: actions/checkout@v2
- name: Docker pull
run: docker-compose pull php
+ - name: Docker caching
+ uses: satackey/action-docker-layer-caching@v0.0.11
+ continue-on-error: true
+ - name: Start PHP container
+ run: docker-compose up --detach --build --no-deps php
- name: Run composer validate
- run: docker-compose run --rm --no-deps php composer validate --strict --no-interaction --ansi
+ run: docker-compose exec -T php composer validate --strict --no-interaction --ansi
run-php-cs-fixer:
name: php-cs-fixer
runs-on: ubuntu-latest
@@ -19,16 +24,21 @@ jobs:
uses: actions/checkout@v2
- name: Docker pull
run: docker-compose pull php
+ - name: Docker caching
+ uses: satackey/action-docker-layer-caching@v0.0.11
+ continue-on-error: true
- name: Composer caching
uses: actions/cache@v2
with:
path: ./build/.composer
key: ${{ runner.os }}-composer-v1-${{ hashFiles('composer.json') }}
restore-keys: ${{ runner.os }}-composer-v1-
+ - name: Start PHP container
+ run: docker-compose up --detach --build --no-deps php
- name: Install dependencies
- run: docker-compose run --rm --no-deps php composer --no-scripts install --no-interaction --ansi
+ run: docker-compose exec -T php composer --no-scripts install --no-interaction --ansi
- name: Run php-cs-fixer
- run: docker-compose run --rm --no-deps php bin/php-cs-fixer fix --diff --dry-run --ansi --config=.php-cs-fixer.dist.php
+ run: docker-compose exec -T php bin/php-cs-fixer fix --diff --dry-run --ansi --config=.php-cs-fixer.dist.php
run-phpunit:
name: phpunit
runs-on: ubuntu-latest
@@ -37,16 +47,21 @@ jobs:
uses: actions/checkout@v2
- name: Docker pull
run: docker-compose pull
+ - name: Docker caching
+ uses: satackey/action-docker-layer-caching@v0.0.11
+ continue-on-error: true
- name: Composer caching
uses: actions/cache@v2
with:
path: ./build/.composer
key: ${{ runner.os }}-composer-v1-${{ hashFiles('composer.json') }}
restore-keys: ${{ runner.os }}-composer-v1-
+ - name: Start containers
+ run: docker-compose up --detach --build
- name: Install dependencies
- run: docker-compose run --rm php composer install --no-scripts --no-interaction --ansi
+ run: docker-compose exec -T php composer install --no-scripts --no-interaction --ansi
- name: Run phpunit
- run: docker-compose run --rm php xphp bin/phpunit --color=always --configuration=phpunit.xml.dist
+ run: docker-compose exec -T php xphp bin/phpunit --color=always --configuration=phpunit.xml.dist
- name: Upload coverage report to codecov.io
uses: codecov/codecov-action@v1
with:
@@ -61,16 +76,21 @@ jobs:
uses: actions/checkout@v2
- name: Docker pull
run: docker-compose pull php
+ - name: Docker caching
+ uses: satackey/action-docker-layer-caching@v0.0.11
+ continue-on-error: true
- name: Composer caching
uses: actions/cache@v2
with:
path: ./build/.composer
key: ${{ runner.os }}-composer-v1-${{ hashFiles('composer.json') }}
restore-keys: ${{ runner.os }}-composer-v1-
+ - name: Start PHP container
+ run: docker-compose up --detach --build --no-deps php
- name: Install dependencies
- run: docker-compose run --rm --no-deps php composer install --no-interaction --ansi
+ run: docker-compose exec -T php composer install --no-interaction --ansi
- name: Run rector
- run: docker-compose run --rm --no-deps php bin/rector --no-progress-bar --dry-run --ansi
+ run: docker-compose exec -T php bin/rector --no-progress-bar --dry-run --ansi
run-deptrac:
name: deptrac
runs-on: ubuntu-latest
@@ -79,13 +99,18 @@ jobs:
uses: actions/checkout@v2
- name: Docker pull
run: docker-compose pull php
+ - name: Docker caching
+ uses: satackey/action-docker-layer-caching@v0.0.11
+ continue-on-error: true
- name: Composer caching
uses: actions/cache@v2
with:
path: ./build/.composer
key: ${{ runner.os }}-composer-v1-${{ hashFiles('composer.json') }}
restore-keys: ${{ runner.os }}-composer-v1-
+ - name: Start PHP container
+ run: docker-compose up --detach --build --no-deps php
- name: Install dependencies
- run: docker-compose run --rm --no-deps php composer install --no-scripts --no-interaction --ansi
+ run: docker-compose exec -T php composer install --no-scripts --no-interaction --ansi
- name: Run deptrac
- run: docker-compose run --rm --no-deps php bin/deptrac --no-progress --no-interaction --cache-file=./build/.deptrac/.deptrac.cache --ansi
+ run: docker-compose exec -T php bin/deptrac --no-progress --no-interaction --cache-file=./build/.deptrac/.deptrac.cache --ansi
diff --git a/.gitignore b/.gitignore
index 645767f7..72761464 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,9 +1,6 @@
# Build artifacts
/build/
-# Managed by IDE
-.idea/
-
# Managed by Composer
/bin/*
/vendor/
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 00000000..73f69e09
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
+# Editor-based HTTP Client requests
+/httpRequests/
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 00000000..04877b21
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/laravel-plugin.xml b/.idea/laravel-plugin.xml
new file mode 100644
index 00000000..83be2922
--- /dev/null
+++ b/.idea/laravel-plugin.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 00000000..a78c5d1f
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/php-test-framework.xml b/.idea/php-test-framework.xml
new file mode 100644
index 00000000..1f803e32
--- /dev/null
+++ b/.idea/php-test-framework.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/php.xml b/.idea/php.xml
new file mode 100644
index 00000000..672aabf0
--- /dev/null
+++ b/.idea/php.xml
@@ -0,0 +1,315 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /etc/php/8.0/cli/conf.d/10-mysqlnd.ini, /etc/php/8.0/cli/conf.d/10-opcache.ini, /etc/php/8.0/cli/conf.d/10-pdo.ini, /etc/php/8.0/cli/conf.d/15-xml.ini, /etc/php/8.0/cli/conf.d/20-apcu.ini, /etc/php/8.0/cli/conf.d/20-bcmath.ini, /etc/php/8.0/cli/conf.d/20-calendar.ini, /etc/php/8.0/cli/conf.d/20-ctype.ini, /etc/php/8.0/cli/conf.d/20-curl.ini, /etc/php/8.0/cli/conf.d/20-dom.ini, /etc/php/8.0/cli/conf.d/20-exif.ini, /etc/php/8.0/cli/conf.d/20-ffi.ini, /etc/php/8.0/cli/conf.d/20-fileinfo.ini, /etc/php/8.0/cli/conf.d/20-ftp.ini, /etc/php/8.0/cli/conf.d/20-gettext.ini, /etc/php/8.0/cli/conf.d/20-iconv.ini, /etc/php/8.0/cli/conf.d/20-igbinary.ini, /etc/php/8.0/cli/conf.d/20-intl.ini, /etc/php/8.0/cli/conf.d/20-mbstring.ini, /etc/php/8.0/cli/conf.d/20-mysqli.ini, /etc/php/8.0/cli/conf.d/20-pdo_mysql.ini, /etc/php/8.0/cli/conf.d/20-pdo_pgsql.ini, /etc/php/8.0/cli/conf.d/20-pgsql.ini, /etc/php/8.0/cli/conf.d/20-phar.ini, /etc/php/8.0/cli/conf.d/20-posix.ini, /etc/php/8.0/cli/conf.d/20-readline.ini, /etc/php/8.0/cli/conf.d/20-redis.ini, /etc/php/8.0/cli/conf.d/20-shmop.ini, /etc/php/8.0/cli/conf.d/20-simplexml.ini, /etc/php/8.0/cli/conf.d/20-sockets.ini, /etc/php/8.0/cli/conf.d/20-sysvmsg.ini, /etc/php/8.0/cli/conf.d/20-sysvsem.ini, /etc/php/8.0/cli/conf.d/20-sysvshm.ini, /etc/php/8.0/cli/conf.d/20-tokenizer.ini, /etc/php/8.0/cli/conf.d/20-xdebug.ini, /etc/php/8.0/cli/conf.d/20-xmlreader.ini, /etc/php/8.0/cli/conf.d/20-xmlwriter.ini, /etc/php/8.0/cli/conf.d/20-xsl.ini, /etc/php/8.0/cli/conf.d/20-zip.ini
+ /etc/php/8.0/cli/php.ini
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/phpunit.xml b/.idea/phpunit.xml
new file mode 100644
index 00000000..4f8104cf
--- /dev/null
+++ b/.idea/phpunit.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations/phpunit_xml_dist.xml b/.idea/runConfigurations/phpunit_xml_dist.xml
new file mode 100644
index 00000000..6abcbb7a
--- /dev/null
+++ b/.idea/runConfigurations/phpunit_xml_dist.xml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/streak.iml b/.idea/streak.iml
new file mode 100644
index 00000000..616bc03a
--- /dev/null
+++ b/.idea/streak.iml
@@ -0,0 +1,136 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 00000000..94a25f7f
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/docker-compose.yml b/docker-compose.yml
index 64c66d31..7ffe177e 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,12 +1,14 @@
-version: '3'
+version: '3.7'
services:
php:
image: streakphp/php80-cli:latest
+ init: true
volumes:
- .:/var/www/project
- ./docker/php/etc/php/8.0/cli/php.ini:/etc/php/8.0/cli/php.ini
working_dir: /var/www/project
+ entrypoint: tail -f /dev/null # keep container alive for development
depends_on:
- postgres
- redis
@@ -14,7 +16,6 @@ services:
COMPOSER_ALLOW_SUPERUSER: 1
COMPOSER_NO_INTERACTION: 1
COMPOSER_CACHE_DIR: /var/www/project/build/.composer
- XDEBUG_MODE: 'develop,debug,coverage'
postgres:
image: postgres:13-alpine