Skip to content

Commit

Permalink
Feat/apisaas 1496 (#80)
Browse files Browse the repository at this point in the history
!feat(APISAAS-1496): upgrading code builder to be compatible with php8.4
  • Loading branch information
ivanmunozruiz authored Dec 16, 2024
1 parent b20dc29 commit d992750
Show file tree
Hide file tree
Showing 6 changed files with 665 additions and 528 deletions.
22 changes: 12 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,36 @@ help: ## Autogenerated list of commands
@echo
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " %-25s %s\n", $$1, $$2}' $(MAKEFILE_LIST)

DOCKER_IMAGE := dev-telephonic:dev
COMPOSER_DEPENDENCY_PATH := $(HOME)/dependency

build: ## Build the project
@docker build -t dev-telephonic:dev --target base .
@docker build -t $(DOCKER_IMAGE) --target base .
@$(MAKE) composer-install

composer-install: ## Install composer dependencies
@docker run --rm --user "${UID}":"${GID}" -v "${PWD}":/app -w /app dev-telephonic:dev composer install
@docker run --rm --user "${UID}":"${GID}" -v "${PWD}":/app -w /app $(DOCKER_IMAGE) composer install

composer-update: ## Update composer dependencies
@docker run --rm --user "${UID}":"${GID}" -v "${PWD}":/app -v /Users/jamuriano/personal-workspace/opentelemetry-php-cloud-trace-exporter:/dependency -w /app dev-telephonic:dev composer update $(filter-out $@,$(MAKECMDGOALS))
@docker run --rm --user "${UID}":"${GID}" -v "${PWD}":/app -v "$(COMPOSER_DEPENDENCY_PATH)":/dependency -w /app $(DOCKER_IMAGE) composer update $(filter-out $@,$(MAKECMDGOALS))

composer-require: ## Require composer dependencies
@docker run --rm --tty --user "${UID}":"${GID}" -v "${PWD}":/app -v /Users/jamuriano/personal-workspace/opentelemetry-php-cloud-trace-exporter:/dependency -w /app dev-telephonic:dev composer require $(filter-out $@,$(MAKECMDGOALS))
@docker run --rm --tty --user "${UID}":"${GID}" -v "${PWD}":/app -v "$(COMPOSER_DEPENDENCY_PATH)":/dependency -w /app $(DOCKER_IMAGE) composer require $(filter-out $@,$(MAKECMDGOALS))

composer-require-dev: ## Require composer dev dependencies
@docker run --rm --tty --user "${UID}":"${GID}" -v "${PWD}":/app -v /Users/jamuriano/personal-workspace/opentelemetry-php-cloud-trace-exporter:/dependency -w /app dev-telephonic:dev composer require --dev $(filter-out $@,$(MAKECMDGOALS))
@docker run --rm --tty --user "${UID}":"${GID}" -v "${PWD}":/app -v "$(COMPOSER_DEPENDENCY_PATH)":/dependency -w /app $(DOCKER_IMAGE) composer require --dev $(filter-out $@,$(MAKECMDGOALS))

composer-why: ## Show why a package is installed
@docker run --rm --user "${UID}":"${GID}" -v "${PWD}":/app -v /Users/jamuriano/personal-workspace/opentelemetry-php-cloud-trace-exporter:/dependency -w /app dev-telephonic:dev composer why $(filter-out $@,$(MAKECMDGOALS))

@docker run --rm --user "${UID}":"${GID}" -v "${PWD}":/app -v "$(COMPOSER_DEPENDENCY_PATH)":/dependency -w /app $(DOCKER_IMAGE) composer why $(filter-out $@,$(MAKECMDGOALS))

test: ## Run the tests
@docker run --rm --tty --user "${UID}":"${GID}" -v "${PWD}":/app -w /app dev-telephonic:dev php vendor/bin/phpunit --colors=always --no-coverage --stop-on-failure
@docker run --rm --tty --user "${UID}":"${GID}" -v "${PWD}":/app -w /app $(DOCKER_IMAGE) php vendor/bin/phpunit --colors=always --no-coverage --stop-on-failure

test-coverage: ## Run the tests with coverage
@docker run --rm --tty --user "${UID}":"${GID}" -e "XDEBUG_MODE=coverage" -v "${PWD}":/app -w /app dev-telephonic:dev php vendor/bin/phpunit --colors=always --stop-on-failure
@docker run --rm --tty --user "${UID}":"${GID}" -e "XDEBUG_MODE=coverage" -v "${PWD}":/app -w /app $(DOCKER_IMAGE) php vendor/bin/phpunit --colors=always --stop-on-failure

run-example: up ## Run the project
@docker compose exec app php $(filter-out $@,$(MAKECMDGOALS));
@docker compose exec app php $(filter-out $@,$(MAKECMDGOALS))

up: ## Start the project
@docker compose up -d
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"nyholm/psr7": "^1.8",
"open-telemetry/api": "@stable",
"open-telemetry/exporter-otlp": "@stable",
"open-telemetry/exporter-zipkin": "^0.0.17",
"open-telemetry/exporter-zipkin": "^1.1.0",
"open-telemetry/sdk": "@stable",
"open-telemetry/transport-grpc": "@stable",
"php-http/httplug": "^2.4",
Expand Down
Loading

0 comments on commit d992750

Please sign in to comment.