From 925dcf55a085dc520ea973da70752f6d9a0668e9 Mon Sep 17 00:00:00 2001 From: Michael Wikberg <130439907+mwikberg-virta@users.noreply.github.com> Date: Wed, 3 Apr 2024 17:38:01 +0300 Subject: [PATCH] Remove unused Carbon dependency --- CHANGELOG.md | 5 +++++ Makefile | 18 ++++++++++++++---- composer.json | 1 - 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 95e2981..57d3eb7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,11 @@ See [GitHub releases](https://github.com/mll-lab/laravel-utils/releases). ## Unreleased +### Changed + +- Remove unused dependency nesbot/carbon +- Support docker compose plugin in addition to docker-compose + ## v4.12.0 ### Changed diff --git a/Makefile b/Makefile index c3440b2..4702ab7 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,14 @@ -dcphp=$$(echo "docker-compose exec php") +ifneq (, $(shell which docker-compose)) +DOCKER_COMPOSE := docker-compose +endif +ifneq (, $(shell docker compose version 2>/dev/null)) +DOCKER_COMPOSE := docker compose +endif +ifndef DOCKER_COMPOSE +$(error "No docker-compose nor valid 'docker compose' in $(PATH), what now?") +endif + +dcphp=$$(echo "$(DOCKER_COMPOSE) exec php") .PHONY: it it: fix stan test ## Run the commonly used targets @@ -12,11 +22,11 @@ setup: build vendor ## Setup the local environment .PHONY: build build: ## Build the local Docker containers - docker-compose build --pull --build-arg USER_ID=$(shell id --user) --build-arg GROUP_ID=$(shell id --group) + ${DOCKER_COMPOSE} build --pull --build-arg USER_ID=$(shell id --user) --build-arg GROUP_ID=$(shell id --group) .PHONY: up -up: ## Bring up the docker-compose stack - docker-compose up --detach +up: ## Bring up the docker compose stack + ${DOCKER_COMPOSE} up --detach .PHONY: fix fix: rector php-cs-fixer diff --git a/composer.json b/composer.json index 92c9dce..8dbd7dc 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,6 @@ "php": "^8.1", "illuminate/support": "^9.51 || ^10 || ^11", "mll-lab/str_putcsv": "^1", - "nesbot/carbon": "^2.64", "ramsey/uuid": "^4.7", "thecodingmachine/safe": "^1 || ^2" },