From bb774269068ed98d35c3a7dc1bd4f7797d21455e Mon Sep 17 00:00:00 2001 From: lotyp Date: Wed, 29 May 2024 12:06:09 +0300 Subject: [PATCH] ci: add support for phive ci: update Makefile with latest commands ci(docker-compose): add healthcheck for pgsql database ci(composer-require-checker): lint project files --- Makefile | 139 +++++-- app/.phive/.gitignore | 3 + app/.phive/phars.xml | 6 + app/composer-require-checker.json | 6 + app/composer.json | 87 ++--- app/composer.lock | 595 ++---------------------------- docker-compose.yaml | 6 + 7 files changed, 199 insertions(+), 643 deletions(-) create mode 100644 app/.phive/.gitignore create mode 100644 app/.phive/phars.xml create mode 100644 app/composer-require-checker.json diff --git a/Makefile b/Makefile index e7de65bc..a1a08b24 100644 --- a/Makefile +++ b/Makefile @@ -5,15 +5,18 @@ # https://docs.docker.com/compose/environment-variables/envvars/ export DOCKER_BUILDKIT ?= 1 +# Docker binary to use, when executing docker tasks +DOCKER ?= docker + # Binary to use, when executing docker-compose tasks -DOCKER_COMPOSE ?= docker compose +DOCKER_COMPOSE ?= $(DOCKER) compose # Support image with all needed binaries, like envsubst, mkcert, wait4x SUPPORT_IMAGE ?= wayofdev/build-deps:alpine-latest APP_RUNNER ?= $(DOCKER_COMPOSE) run --rm --no-deps app -APP_EXEC ?= $(DOCKER_COMPOSE) exec app APP_COMPOSER ?= $(APP_RUNNER) composer +APP_EXEC ?= $(DOCKER_COMPOSE) exec app BUILDER_PARAMS ?= docker run --rm -i \ --env-file ./.env \ @@ -32,6 +35,26 @@ WAITER ?= $(BUILDER_WIRED) wait4x # Shorthand envsubst command, executed through build-deps ENVSUBST ?= $(BUILDER) envsubst +# Yamllint docker image +YAML_LINT_RUNNER ?= $(DOCKER) run --rm $$(tty -s && echo "-it" || echo) \ + -v $(PWD):/data \ + cytopia/yamllint:latest \ + -c ./.github/.yamllint.yaml \ + -f colored . + +ACTION_LINT_RUNNER ?= $(DOCKER) run --rm $$(tty -s && echo "-it" || echo) \ + -v $(shell pwd):/repo \ + --workdir /repo \ + rhysd/actionlint:latest \ + -color + +MARKDOWN_LINT_RUNNER ?= $(DOCKER) run --rm $$(tty -s && echo "-it" || echo) \ + -v $(shell pwd):/app \ + --workdir /app \ + davidanson/markdownlint-cli2-rules:latest + +PHIVE_RUNNER ?= $(DOCKER_COMPOSE) run --rm --no-deps app + EXPORT_VARS = '\ $${APP_NAME} \ $${COMPOSE_PROJECT_NAME} \ @@ -39,7 +62,7 @@ EXPORT_VARS = '\ $${SHARED_SERVICES_NAMESPACE} \ $${COMPOSER_AUTH}' - +# # Self documenting Makefile code # ------------------------------------------------------------------------------------ ifneq ($(TERM),) @@ -63,35 +86,35 @@ else WHITE := "" RST := "" endif -MAKE_LOGFILE = /tmp/laravel-starter-tpl.log +MAKE_LOGFILE = /tmp/wayofdev-laravel-starter-tpl.log MAKE_CMD_COLOR := $(BLUE) default: all help: ## Show this menu - echo ${MAKEFILE_LIST} - - @echo 'Management commands for package:' + @echo 'Management commands for project:' @echo 'Usage:' @echo ' ${MAKE_CMD_COLOR}make${RST} Prepares and spins up project with default settings' @grep -E '^[a-zA-Z_0-9%-]+:.*?## .*$$' Makefile | awk 'BEGIN {FS = ":.*?## "}; {printf " ${MAKE_CMD_COLOR}make %-21s${RST} %s\n", $$1, $$2}' @echo @echo ' 📑 Logs are stored in $(MAKE_LOGFILE)' @echo - @echo ' 📦 Package laravel-starter-tpl (github.com/wayofdev/laravel-starter-tpl)' - @echo ' 🤠 Author Andrij Orlenko (github.com/lotyp)' - @echo ' 🏢 ${YELLOW}Org wayofdev (github.com/wayofdev)${RST}' + @echo ' 📦 Project laravel-starter-tpl (https://github.com/wayofdev/laravel-starter-tpl)' + @echo ' 🤠 Author Andrij Orlenko (https://github.com/lotyp)' + @echo ' 🏢 ${YELLOW}Org wayofdev (https://github.com/wayofdev)${RST}' + @echo .PHONY: help .EXPORT_ALL_VARIABLES: +# # Default action # Defines default command when `make` is executed without additional parameters # ------------------------------------------------------------------------------------ all: hooks install key prepare up .PHONY: all - +# # System Actions # ------------------------------------------------------------------------------------ override-create: ## Generate override file from dist @@ -119,11 +142,12 @@ prepare: mkdir -p app/.build/php-cs-fixer .PHONY: prepare - +# # Docker Actions # ------------------------------------------------------------------------------------ up: # Creates and starts containers, defined in docker-compose and override file $(DOCKER_COMPOSE) up --remove-orphans -d + @sleep 1 $(DOCKER_COMPOSE) exec app wait4x postgresql 'postgres://${DB_USERNAME}:${DB_PASSWORD}@database:5432/${DB_DATABASE}?sslmode=disable' -t 1m .PHONY: up @@ -131,11 +155,18 @@ down: # Stops and removes containers of this project $(DOCKER_COMPOSE) down --remove-orphans .PHONY: down +purge: ## Stops and removes containers, volumes, networks and images + $(DOCKER_COMPOSE) down --remove-orphans --volumes + $(DOCKER) network prune --force + $(DOCKER) volume prune --force + $(DOCKER) image prune --force +.PHONY: purge + restart: down up ## Runs down and up commands .PHONY: restart -clean: ## Stops containers if required and removes from system - $(DOCKER_COMPOSE) rm --force --stop +clean: ## Stops and removes containers of this project together with volumes + $(DOCKER_COMPOSE) rm --force --stop --volumes .PHONY: clean ps: ## List running project containers @@ -154,18 +185,57 @@ ssh: ## Login inside running docker container $(APP_EXEC) sh .PHONY: ssh +# +# Composer Commands +# ------------------------------------------------------------------------------------ +install: ## Install composer dependencies + $(APP_COMPOSER) install +.PHONY: install + +update: ## Update composer dependencies + $(APP_COMPOSER) update $(package) +.PHONY: update + +du: ## Dump composer autoload + $(APP_COMPOSER) dump-autoload +.PHONY: du -# Code Quality, Git, Linting, Testing +show: ## Shows information about installed composer packages + $(APP_COMPOSER) show +.PHONY: show + +phive: ## Installs dependencies with phive + $(APP_RUNNER) /usr/local/bin/phive install --trust-gpg-keys 0xC00543248C87FB13,0x033E5F8D801A2F8D,0x47436587D82C4A39 +.PHONY: phive + +# +# Code Quality, Git, Linting # ------------------------------------------------------------------------------------ hooks: ## Install git hooks from pre-commit-config pre-commit install + pre-commit install --hook-type commit-msg pre-commit autoupdate .PHONY: hooks +lint: lint-yaml lint-actions lint-md lint-php lint-stan lint-composer lint-audit ## Runs all linting commands +.PHONY: lint + lint-yaml: ## Lints yaml files inside project - yamllint . + @$(YAML_LINT_RUNNER) | tee -a $(MAKE_LOGFILE) .PHONY: lint-yaml +lint-actions: ## Lint all github actions + @$(ACTION_LINT_RUNNER) | tee -a $(MAKE_LOGFILE) +.PHONY: lint-actions + +lint-md: ## Lint all markdown files using markdownlint-cli2 + @$(MARKDOWN_LINT_RUNNER) --fix "**/*.md" "!CHANGELOG.md" "!app/vendor" "!app/node_modules" | tee -a $(MAKE_LOGFILE) +.PHONY: lint-md + +lint-md-dry: ## Lint all markdown files using markdownlint-cli2 in dry-run mode + @$(MARKDOWN_LINT_RUNNER) "**/*.md" "!CHANGELOG.md" "!app/vendor" "!app/node_modules" | tee -a $(MAKE_LOGFILE) +.PHONY: lint-md-dry + lint-php: ## Lints php files inside project using php-cs-fixer $(APP_COMPOSER) cs:fix .PHONY: lint-php @@ -182,10 +252,27 @@ lint-stan-baseline: ## Runs phpstan to update its baseline $(APP_COMPOSER) stan:baseline .PHONY: lint-stan-baseline -lint-deps: - $(APP_COMPOSER) deptrac +lint-deps: ## Runs composer-require-checker – checks for dependencies that are not used + $(APP_RUNNER) .phive/composer-require-checker check \ + --config-file=/app/composer-require-checker.json \ + --verbose .PHONY: lint-deps +lint-ddd-deps: + $(APP_RUNNER) .phive/deptrac +.PHONY: lint-ddd-deps + +lint-composer: ## Normalize composer.json and composer.lock files + $(APP_RUNNER) .phive/composer-normalize normalize +.PHONY: lint-composer + +lint-audit: ## Runs security checks for composer dependencies + $(APP_COMPOSER) audit +.PHONY: lint-security + +# +# Testing +# ------------------------------------------------------------------------------------ test: ## Run project php-unit and pest tests $(APP_COMPOSER) test .PHONY: test @@ -199,23 +286,7 @@ api-docs: ## Generate openapi docs specification file .PHONY: api-docs -# Composer Commands -# ------------------------------------------------------------------------------------ -install: ## Install composer dependencies - $(APP_COMPOSER) install -.PHONY: install -update: ## Update composer dependencies - $(APP_COMPOSER) update $(package) -.PHONY: update - -du: ## Dump composer autoload - $(APP_COMPOSER) dump-autoload -.PHONY: du - -show: ## Shows information about installed composer packages - $(APP_COMPOSER) show -.PHONY: show # Database Commands diff --git a/app/.phive/.gitignore b/app/.phive/.gitignore new file mode 100644 index 00000000..71d2e19d --- /dev/null +++ b/app/.phive/.gitignore @@ -0,0 +1,3 @@ +* +!.gitignore +!phars.xml diff --git a/app/.phive/phars.xml b/app/.phive/phars.xml new file mode 100644 index 00000000..2ac210e6 --- /dev/null +++ b/app/.phive/phars.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/app/composer-require-checker.json b/app/composer-require-checker.json new file mode 100644 index 00000000..a3ad615f --- /dev/null +++ b/app/composer-require-checker.json @@ -0,0 +1,6 @@ +{ + "symbol-whitelist": [ + "Symfony\\Component\\HttpFoundation\\Request", + "Symfony\\Component\\HttpFoundation\\Response" + ] +} diff --git a/app/composer.json b/app/composer.json index 305a5cc7..b1058c8d 100644 --- a/app/composer.json +++ b/app/composer.json @@ -1,16 +1,20 @@ { "name": "wayofdev/laravel-starter-tpl", - "type": "project", "description": "Laravel backend application template for building APIs.", - "keywords": ["framework", "laravel"], "license": "MIT", + "type": "project", + "keywords": [ + "framework", + "laravel" + ], "require": { "php": "^8.2", "ext-pdo": "*", "deployer/deployer": "^7.4", "guzzlehttp/guzzle": "^7.8", - "laravel/framework": "^v11.8", + "laravel/framework": "^11.8", "laravel/tinker": "^2.9", + "league/fractal": "^0.20.1", "sentry/sentry-laravel": "^4.5", "spatie/laravel-fractal": "^6.2", "spatie/laravel-query-builder": "^5.8", @@ -18,11 +22,10 @@ "wayofdev/laravel-open-docs": "^2.1" }, "require-dev": { - "ergebnis/composer-normalize": "^2.42", "fakerphp/faker": "^1.23", - "mockery/mockery": "^1.6", - "nunomaduro/collision": "^v8.1", "larastan/larastan": "^2.9", + "mockery/mockery": "^1.6", + "nunomaduro/collision": "^8.1", "pestphp/pest-plugin-laravel": "^2.4", "phpstan/extension-installer": "^1.3", "phpstan/phpstan-deprecation-rules": "^1.2", @@ -30,13 +33,15 @@ "spatie/laravel-ignition": "^2.7", "wayofdev/cs-fixer-config": "^1.4" }, + "minimum-stability": "dev", + "prefer-stable": true, "autoload": { "psr-4": { - "Laravel\\": "src/Bridge/Laravel/", - "Domain\\": "src/Domain/", - "Support\\": "src/Support/", "Database\\Factories\\": "database/factories/", - "Database\\Seeders\\": "database/seeders/" + "Database\\Seeders\\": "database/seeders/", + "Domain\\": "src/Domain/", + "Laravel\\": "src/Bridge/Laravel/", + "Support\\": "src/Support/" } }, "autoload-dev": { @@ -44,50 +49,48 @@ "Tests\\": "tests/" } }, + "config": { + "allow-plugins": { + "ergebnis/composer-normalize": true, + "pestphp/pest-plugin": true, + "php-http/discovery": true, + "phpstan/extension-installer": true + }, + "optimize-autoloader": true, + "preferred-install": "dist", + "sort-packages": true + }, + "extra": { + "composer-normalize": { + "indent-size": 4, + "indent-style": "space" + }, + "laravel": { + "dont-discover": [] + } + }, "scripts": { + "post-update-cmd": [ + "@php artisan vendor:publish --tag=laravel-assets --ansi --force" + ], "post-autoload-dump": [ "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", "@php artisan package:discover --ansi" ], - "post-update-cmd": [ - "@php artisan vendor:publish --tag=laravel-assets --ansi --force" - ], "post-root-package-install": [ "@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" ], "post-create-project-cmd": [ "@php artisan key:generate --ansi" ], - "cs:fix": "php vendor/bin/php-cs-fixer fix -v", "cs:diff": "php vendor/bin/php-cs-fixer fix --dry-run -v --diff", - "test": "php vendor/bin/pest", - "test:cc": "XDEBUG_MODE=coverage php vendor/bin/pest --coverage-clover coverage.xml", - "stan": "php vendor/bin/phpstan analyse --memory-limit=2G", - "stan:baseline": "php vendor/bin/phpstan analyse --generate-baseline --memory-limit=2G --allow-empty-baseline", + "cs:fix": "php vendor/bin/php-cs-fixer fix -v", "deptrac": "php vendor/bin/deptrac analyse --config-file=deptrac.yaml -v --cache-file=.build/.deptrac.cache", "deptrac:ci": "php vendor/bin/deptrac analyse --config-file=deptrac.yaml -v --cache-file=.build/.deptrac.cache --formatter github-actions", - "deptrac:gv": "php vendor/bin/deptrac analyse --config-file=deptrac.yaml -v --cache-file=.build/.deptrac.cache --formatter graphviz-image --output ../assets/deptrac.svg" - }, - "extra": { - "laravel": { - "dont-discover": [] - }, - "composer-normalize": { - "indent-size": 4, - "indent-style": "space" - } - }, - "config": { - "optimize-autoloader": true, - "preferred-install": "dist", - "sort-packages": true, - "allow-plugins": { - "pestphp/pest-plugin": true, - "php-http/discovery": true, - "ergebnis/composer-normalize": true, - "phpstan/extension-installer": true - } - }, - "minimum-stability": "dev", - "prefer-stable": true + "deptrac:gv": "php vendor/bin/deptrac analyse --config-file=deptrac.yaml -v --cache-file=.build/.deptrac.cache --formatter graphviz-image --output ../assets/deptrac.svg", + "stan": "php vendor/bin/phpstan analyse --memory-limit=2G", + "stan:baseline": "php vendor/bin/phpstan analyse --generate-baseline --memory-limit=2G --allow-empty-baseline", + "test": "php vendor/bin/pest", + "test:cc": "XDEBUG_MODE=coverage php vendor/bin/pest --coverage-clover coverage.xml" + } } diff --git a/app/composer.lock b/app/composer.lock index 09093bb1..edb984a2 100644 --- a/app/composer.lock +++ b/app/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "c3ebb635eaaad705102d23daaae76e73", + "content-hash": "c8e20dbc9f40f89e71b907a01099c12b", "packages": [ { "name": "brick/math", @@ -1154,16 +1154,16 @@ }, { "name": "laravel/framework", - "version": "v11.8.0", + "version": "v11.9.1", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "ceb892a25817c888ef3df4d1a2af9cac53978300" + "reference": "60167ce91c59ed5eea2ad4f2a7b6d686fb103ba7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/ceb892a25817c888ef3df4d1a2af9cac53978300", - "reference": "ceb892a25817c888ef3df4d1a2af9cac53978300", + "url": "https://api.github.com/repos/laravel/framework/zipball/60167ce91c59ed5eea2ad4f2a7b6d686fb103ba7", + "reference": "60167ce91c59ed5eea2ad4f2a7b6d686fb103ba7", "shasum": "" }, "require": { @@ -1355,20 +1355,20 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2024-05-21T17:57:45+00:00" + "time": "2024-05-28T18:16:41+00:00" }, { "name": "laravel/prompts", - "version": "v0.1.22", + "version": "v0.1.23", "source": { "type": "git", "url": "https://github.com/laravel/prompts.git", - "reference": "37f94de71758dbfbccc9d299b0e5eb76e02a40f5" + "reference": "9bc4df7c699b0452c6b815e64a2d84b6d7f99400" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/prompts/zipball/37f94de71758dbfbccc9d299b0e5eb76e02a40f5", - "reference": "37f94de71758dbfbccc9d299b0e5eb76e02a40f5", + "url": "https://api.github.com/repos/laravel/prompts/zipball/9bc4df7c699b0452c6b815e64a2d84b6d7f99400", + "reference": "9bc4df7c699b0452c6b815e64a2d84b6d7f99400", "shasum": "" }, "require": { @@ -1411,9 +1411,9 @@ "description": "Add beautiful and user-friendly forms to your command-line applications.", "support": { "issues": "https://github.com/laravel/prompts/issues", - "source": "https://github.com/laravel/prompts/tree/v0.1.22" + "source": "https://github.com/laravel/prompts/tree/v0.1.23" }, - "time": "2024-05-10T19:22:18+00:00" + "time": "2024-05-27T13:53:20+00:00" }, { "name": "laravel/serializable-closure", @@ -7251,415 +7251,6 @@ }, "time": "2024-01-30T19:34:25+00:00" }, - { - "name": "ergebnis/composer-normalize", - "version": "2.42.0", - "source": { - "type": "git", - "url": "https://github.com/ergebnis/composer-normalize.git", - "reference": "02cf2b69ad2a74c6f11a8c3f5f054b8f949df910" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ergebnis/composer-normalize/zipball/02cf2b69ad2a74c6f11a8c3f5f054b8f949df910", - "reference": "02cf2b69ad2a74c6f11a8c3f5f054b8f949df910", - "shasum": "" - }, - "require": { - "composer-plugin-api": "^2.0.0", - "ergebnis/json": "^1.2.0", - "ergebnis/json-normalizer": "^4.5.0", - "ergebnis/json-printer": "^3.5.0", - "ext-json": "*", - "justinrainbow/json-schema": "^5.2.12", - "localheinz/diff": "^1.1.1", - "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0" - }, - "require-dev": { - "composer/composer": "^2.6.6", - "ergebnis/license": "^2.4.0", - "ergebnis/php-cs-fixer-config": "^6.20.0", - "ergebnis/phpunit-slow-test-detector": "^2.9.0", - "fakerphp/faker": "^1.23.1", - "infection/infection": "~0.26.6", - "phpunit/phpunit": "^9.6.16", - "psalm/plugin-phpunit": "~0.18.4", - "rector/rector": "~0.19.2", - "symfony/filesystem": "^5.4.25", - "vimeo/psalm": "^5.20.0" - }, - "type": "composer-plugin", - "extra": { - "class": "Ergebnis\\Composer\\Normalize\\NormalizePlugin", - "composer-normalize": { - "indent-size": 2, - "indent-style": "space" - }, - "plugin-optional": true - }, - "autoload": { - "psr-4": { - "Ergebnis\\Composer\\Normalize\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Andreas Möller", - "email": "am@localheinz.com", - "homepage": "https://localheinz.com" - } - ], - "description": "Provides a composer plugin for normalizing composer.json.", - "homepage": "https://github.com/ergebnis/composer-normalize", - "keywords": [ - "composer", - "normalize", - "normalizer", - "plugin" - ], - "support": { - "issues": "https://github.com/ergebnis/composer-normalize/issues", - "security": "https://github.com/ergebnis/composer-normalize/blob/main/.github/SECURITY.md", - "source": "https://github.com/ergebnis/composer-normalize" - }, - "time": "2024-01-30T11:54:02+00:00" - }, - { - "name": "ergebnis/json", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/ergebnis/json.git", - "reference": "a457f25a5ba7ea11fc94f84d53678c5211abfce0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ergebnis/json/zipball/a457f25a5ba7ea11fc94f84d53678c5211abfce0", - "reference": "a457f25a5ba7ea11fc94f84d53678c5211abfce0", - "shasum": "" - }, - "require": { - "ext-json": "*", - "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0" - }, - "require-dev": { - "ergebnis/data-provider": "^3.2.0", - "ergebnis/license": "^2.4.0", - "ergebnis/php-cs-fixer-config": "^6.20.0", - "ergebnis/phpunit-slow-test-detector": "^2.9.0", - "fakerphp/faker": "^1.23.1", - "infection/infection": "~0.26.6", - "phpunit/phpunit": "^9.6.16", - "psalm/plugin-phpunit": "~0.18.4", - "rector/rector": "~0.19.2", - "vimeo/psalm": "^5.20.0" - }, - "type": "library", - "extra": { - "composer-normalize": { - "indent-size": 2, - "indent-style": "space" - } - }, - "autoload": { - "psr-4": { - "Ergebnis\\Json\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Andreas Möller", - "email": "am@localheinz.com", - "homepage": "https://localheinz.com" - } - ], - "description": "Provides a Json value object for representing a valid JSON string.", - "homepage": "https://github.com/ergebnis/json", - "keywords": [ - "json" - ], - "support": { - "issues": "https://github.com/ergebnis/json/issues", - "security": "https://github.com/ergebnis/json/blob/main/.github/SECURITY.md", - "source": "https://github.com/ergebnis/json" - }, - "time": "2024-01-29T15:09:24+00:00" - }, - { - "name": "ergebnis/json-normalizer", - "version": "4.5.0", - "source": { - "type": "git", - "url": "https://github.com/ergebnis/json-normalizer.git", - "reference": "f0ee9e70739f121b27fac8b743e4a52b23de2152" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ergebnis/json-normalizer/zipball/f0ee9e70739f121b27fac8b743e4a52b23de2152", - "reference": "f0ee9e70739f121b27fac8b743e4a52b23de2152", - "shasum": "" - }, - "require": { - "ergebnis/json": "^1.2.0", - "ergebnis/json-pointer": "^3.4.0", - "ergebnis/json-printer": "^3.5.0", - "ergebnis/json-schema-validator": "^4.2.0", - "ext-json": "*", - "justinrainbow/json-schema": "^5.2.12", - "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0" - }, - "require-dev": { - "composer/semver": "^3.4.0", - "ergebnis/data-provider": "^3.2.0", - "ergebnis/license": "^2.4.0", - "ergebnis/php-cs-fixer-config": "^6.20.0", - "ergebnis/phpunit-slow-test-detector": "^2.9.0", - "fakerphp/faker": "^1.23.1", - "infection/infection": "~0.26.6", - "phpunit/phpunit": "^9.6.16", - "psalm/plugin-phpunit": "~0.18.4", - "rector/rector": "~0.19.4", - "vimeo/psalm": "^5.20.0" - }, - "suggest": { - "composer/semver": "If you want to use ComposerJsonNormalizer or VersionConstraintNormalizer" - }, - "type": "library", - "autoload": { - "psr-4": { - "Ergebnis\\Json\\Normalizer\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Andreas Möller", - "email": "am@localheinz.com", - "homepage": "https://localheinz.com" - } - ], - "description": "Provides generic and vendor-specific normalizers for normalizing JSON documents.", - "homepage": "https://github.com/ergebnis/json-normalizer", - "keywords": [ - "json", - "normalizer" - ], - "support": { - "issues": "https://github.com/ergebnis/json-normalizer/issues", - "security": "https://github.com/ergebnis/json-normalizer/blob/main/.github/SECURITY.md", - "source": "https://github.com/ergebnis/json-normalizer" - }, - "time": "2024-01-30T09:10:15+00:00" - }, - { - "name": "ergebnis/json-pointer", - "version": "3.4.0", - "source": { - "type": "git", - "url": "https://github.com/ergebnis/json-pointer.git", - "reference": "b654757d873050622c2166f55ab25d04685261c5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ergebnis/json-pointer/zipball/b654757d873050622c2166f55ab25d04685261c5", - "reference": "b654757d873050622c2166f55ab25d04685261c5", - "shasum": "" - }, - "require": { - "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0" - }, - "require-dev": { - "ergebnis/data-provider": "^3.2.0", - "ergebnis/license": "^2.4.0", - "ergebnis/php-cs-fixer-config": "^6.20.0", - "ergebnis/phpunit-slow-test-detector": "^2.9.0", - "fakerphp/faker": "^1.23.1", - "infection/infection": "~0.26.6", - "phpunit/phpunit": "^9.6.16", - "psalm/plugin-phpunit": "~0.18.4", - "rector/rector": "~0.19.2", - "vimeo/psalm": "^5.20.0" - }, - "type": "library", - "extra": { - "composer-normalize": { - "indent-size": 2, - "indent-style": "space" - } - }, - "autoload": { - "psr-4": { - "Ergebnis\\Json\\Pointer\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Andreas Möller", - "email": "am@localheinz.com", - "homepage": "https://localheinz.com" - } - ], - "description": "Provides an abstraction of a JSON pointer.", - "homepage": "https://github.com/ergebnis/json-pointer", - "keywords": [ - "RFC6901", - "json", - "pointer" - ], - "support": { - "issues": "https://github.com/ergebnis/json-pointer/issues", - "security": "https://github.com/ergebnis/json-pointer/blob/main/.github/SECURITY.md", - "source": "https://github.com/ergebnis/json-pointer" - }, - "time": "2024-01-29T16:37:15+00:00" - }, - { - "name": "ergebnis/json-printer", - "version": "3.5.0", - "source": { - "type": "git", - "url": "https://github.com/ergebnis/json-printer.git", - "reference": "549e16fe6de34b8c3aee7b421be12caa552f3ced" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ergebnis/json-printer/zipball/549e16fe6de34b8c3aee7b421be12caa552f3ced", - "reference": "549e16fe6de34b8c3aee7b421be12caa552f3ced", - "shasum": "" - }, - "require": { - "ext-json": "*", - "ext-mbstring": "*", - "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0" - }, - "require-dev": { - "ergebnis/data-provider": "^3.2.0", - "ergebnis/license": "^2.4.0", - "ergebnis/php-cs-fixer-config": "^6.20.0", - "ergebnis/phpunit-slow-test-detector": "^2.9.0", - "fakerphp/faker": "^1.23.1", - "infection/infection": "~0.26.6", - "phpunit/phpunit": "^9.6.16", - "psalm/plugin-phpunit": "~0.18.4", - "rector/rector": "~0.19.2", - "vimeo/psalm": "^5.20.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Ergebnis\\Json\\Printer\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Andreas Möller", - "email": "am@localheinz.com", - "homepage": "https://localheinz.com" - } - ], - "description": "Provides a JSON printer, allowing for flexible indentation.", - "homepage": "https://github.com/ergebnis/json-printer", - "keywords": [ - "formatter", - "json", - "printer" - ], - "support": { - "issues": "https://github.com/ergebnis/json-printer/issues", - "security": "https://github.com/ergebnis/json-printer/blob/main/.github/SECURITY.md", - "source": "https://github.com/ergebnis/json-printer" - }, - "time": "2024-01-29T15:33:37+00:00" - }, - { - "name": "ergebnis/json-schema-validator", - "version": "4.2.0", - "source": { - "type": "git", - "url": "https://github.com/ergebnis/json-schema-validator.git", - "reference": "10ed514fdc3f9b71f8a92c567afea21a2f6fa1ef" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ergebnis/json-schema-validator/zipball/10ed514fdc3f9b71f8a92c567afea21a2f6fa1ef", - "reference": "10ed514fdc3f9b71f8a92c567afea21a2f6fa1ef", - "shasum": "" - }, - "require": { - "ergebnis/json": "^1.2.0", - "ergebnis/json-pointer": "^3.4.0", - "ext-json": "*", - "justinrainbow/json-schema": "^5.2.12", - "php": "~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0" - }, - "require-dev": { - "ergebnis/data-provider": "^3.2.0", - "ergebnis/license": "^2.4.0", - "ergebnis/php-cs-fixer-config": "^6.20.0", - "ergebnis/phpunit-slow-test-detector": "^2.9.0", - "fakerphp/faker": "^1.23.1", - "infection/infection": "~0.26.6", - "phpunit/phpunit": "^9.6.16", - "psalm/plugin-phpunit": "~0.18.4", - "rector/rector": "~0.19.2", - "vimeo/psalm": "^5.20.0" - }, - "type": "library", - "extra": { - "composer-normalize": { - "indent-size": 2, - "indent-style": "space" - } - }, - "autoload": { - "psr-4": { - "Ergebnis\\Json\\SchemaValidator\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Andreas Möller", - "email": "am@localheinz.com", - "homepage": "https://localheinz.com" - } - ], - "description": "Provides a JSON schema validator, building on top of justinrainbow/json-schema.", - "homepage": "https://github.com/ergebnis/json-schema-validator", - "keywords": [ - "json", - "schema", - "validator" - ], - "support": { - "issues": "https://github.com/ergebnis/json-schema-validator/issues", - "security": "https://github.com/ergebnis/json-schema-validator/blob/main/.github/SECURITY.md", - "source": "https://github.com/ergebnis/json-schema-validator" - }, - "time": "2024-01-29T16:50:15+00:00" - }, { "name": "evenement/evenement", "version": "v3.0.2", @@ -7904,16 +7495,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.57.2", + "version": "v3.58.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "22f7f3145606df92b02fb1bd22c30abfce956d3c" + "reference": "55d3483c80c09f91d876aa4e2971ce349d07310c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/22f7f3145606df92b02fb1bd22c30abfce956d3c", - "reference": "22f7f3145606df92b02fb1bd22c30abfce956d3c", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/55d3483c80c09f91d876aa4e2971ce349d07310c", + "reference": "55d3483c80c09f91d876aa4e2971ce349d07310c", "shasum": "" }, "require": { @@ -7992,7 +7583,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.57.2" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.58.0" }, "funding": [ { @@ -8000,7 +7591,7 @@ "type": "github" } ], - "time": "2024-05-20T20:41:57+00:00" + "time": "2024-05-28T16:55:30+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -8053,76 +7644,6 @@ }, "time": "2020-07-09T08:09:16+00:00" }, - { - "name": "justinrainbow/json-schema", - "version": "v5.2.13", - "source": { - "type": "git", - "url": "https://github.com/jsonrainbow/json-schema.git", - "reference": "fbbe7e5d79f618997bc3332a6f49246036c45793" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/jsonrainbow/json-schema/zipball/fbbe7e5d79f618997bc3332a6f49246036c45793", - "reference": "fbbe7e5d79f618997bc3332a6f49246036c45793", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "~2.2.20||~2.15.1", - "json-schema/json-schema-test-suite": "1.2.0", - "phpunit/phpunit": "^4.8.35" - }, - "bin": [ - "bin/validate-json" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "JsonSchema\\": "src/JsonSchema/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Bruno Prieto Reis", - "email": "bruno.p.reis@gmail.com" - }, - { - "name": "Justin Rainbow", - "email": "justin.rainbow@gmail.com" - }, - { - "name": "Igor Wiedler", - "email": "igor@wiedler.ch" - }, - { - "name": "Robert Schönthal", - "email": "seroscho@googlemail.com" - } - ], - "description": "A library to validate a json schema.", - "homepage": "https://github.com/justinrainbow/json-schema", - "keywords": [ - "json", - "schema" - ], - "support": { - "issues": "https://github.com/jsonrainbow/json-schema/issues", - "source": "https://github.com/jsonrainbow/json-schema/tree/v5.2.13" - }, - "time": "2023-09-26T02:20:38+00:00" - }, { "name": "larastan/larastan", "version": "v2.9.7", @@ -8225,66 +7746,6 @@ ], "time": "2024-05-27T18:33:26+00:00" }, - { - "name": "localheinz/diff", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/localheinz/diff.git", - "reference": "851bb20ea8358c86f677f5f111c4ab031b1c764c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/localheinz/diff/zipball/851bb20ea8358c86f677f5f111c4ab031b1c764c", - "reference": "851bb20ea8358c86f677f5f111c4ab031b1c764c", - "shasum": "" - }, - "require": { - "php": "^7.1 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^7.5 || ^8.0", - "symfony/process": "^4.2 || ^5" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - }, - { - "name": "Kore Nordmann", - "email": "mail@kore-nordmann.de" - } - ], - "description": "Fork of sebastian/diff for use with ergebnis/composer-normalize", - "homepage": "https://github.com/localheinz/diff", - "keywords": [ - "diff", - "udiff", - "unidiff", - "unified diff" - ], - "support": { - "source": "https://github.com/localheinz/diff/tree/main" - }, - "funding": [ - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - } - ], - "time": "2020-07-06T04:49:32+00:00" - }, { "name": "mockery/mockery", "version": "1.6.12", @@ -11426,16 +10887,16 @@ }, { "name": "spatie/ignition", - "version": "1.14.1", + "version": "1.14.2", "source": { "type": "git", "url": "https://github.com/spatie/ignition.git", - "reference": "c23cc018c5f423d2f413b99f84655fceb6549811" + "reference": "5e11c11f675bb5251f061491a493e04a1a571532" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/ignition/zipball/c23cc018c5f423d2f413b99f84655fceb6549811", - "reference": "c23cc018c5f423d2f413b99f84655fceb6549811", + "url": "https://api.github.com/repos/spatie/ignition/zipball/5e11c11f675bb5251f061491a493e04a1a571532", + "reference": "5e11c11f675bb5251f061491a493e04a1a571532", "shasum": "" }, "require": { @@ -11505,7 +10966,7 @@ "type": "github" } ], - "time": "2024-05-03T15:56:16+00:00" + "time": "2024-05-29T08:10:20+00:00" }, { "name": "spatie/laravel-ignition", @@ -11912,16 +11373,16 @@ }, { "name": "wayofdev/cs-fixer-config", - "version": "v1.4.4", + "version": "v1.5.0", "source": { "type": "git", "url": "https://github.com/wayofdev/php-cs-fixer-config.git", - "reference": "8d0578a412be010919a0109cf484f95742cf5291" + "reference": "1300d46e72b7893b038c429585206981820fb4e8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/wayofdev/php-cs-fixer-config/zipball/8d0578a412be010919a0109cf484f95742cf5291", - "reference": "8d0578a412be010919a0109cf484f95742cf5291", + "url": "https://api.github.com/repos/wayofdev/php-cs-fixer-config/zipball/1300d46e72b7893b038c429585206981820fb4e8", + "reference": "1300d46e72b7893b038c429585206981820fb4e8", "shasum": "" }, "require": { @@ -11986,7 +11447,7 @@ "type": "github" } ], - "time": "2024-05-23T14:54:07+00:00" + "time": "2024-05-29T08:43:41+00:00" } ], "aliases": [], diff --git a/docker-compose.yaml b/docker-compose.yaml index ae72660f..fde9dbd2 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -25,6 +25,7 @@ services: environment: FAKETIME: '+2h' XDEBUG_MODE: '${XDEBUG_MODE:-off}' + PHIVE_HOME: /app/.phive dns: 8.8.8.8 extra_hosts: @@ -67,6 +68,11 @@ services: POSTGRES_DB: ${DB_DATABASE} volumes: - database-data:/var/lib/postgresql/data:cached + healthcheck: + test: ['CMD', 'pg_isready', '-U', '${DB_USERNAME:-cycle}', '-d', '${DB_DATABASE:-default}'] + interval: 3s + timeout: 1s + retries: 10 redis: image: redis:7.2.5-alpine3.19