Skip to content

Commit

Permalink
Merge pull request #254 from akeneo/API-1925-php-client-upgrade-php-d…
Browse files Browse the repository at this point in the history
…ependency-to-8-0

API-1925: Upgrade PHP dependency to 8.0
  • Loading branch information
LevFlavien authored Nov 7, 2022
2 parents f8695d2 + f12cd6f commit b7f9448
Show file tree
Hide file tree
Showing 126 changed files with 974 additions and 1,312 deletions.
13 changes: 0 additions & 13 deletions .php_cs.php

This file was deleted.

26 changes: 14 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,21 @@ RUN apt-get update && \
/usr/share/lintian/* /usr/share/locale/* /usr/share/man/*

# Install PHP with some extensions
RUN apt-get update && \
RUN wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg && \
sh -c 'echo "deb https://packages.sury.org/php/ bullseye main" > /etc/apt/sources.list.d/php.list' && \
apt-get update && \
apt-get --no-install-recommends --no-install-suggests --yes --quiet install \
php7.4-cli \
php7.4-apcu \
php7.4-mbstring \
php7.4-curl \
php7.4-gd \
php7.4-imagick \
php7.4-intl \
php7.4-bcmath \
php7.4-xdebug \
php7.4-xml \
php7.4-zip && \
php8.0-cli \
php8.0-apcu \
php8.0-mbstring \
php8.0-curl \
php8.0-gd \
php8.0-imagick \
php8.0-intl \
php8.0-bcmath \
php8.0-xdebug \
php8.0-xml \
php8.0-zip && \
apt-get clean && apt-get --yes --quiet autoremove --purge && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
/usr/share/doc/* /usr/share/groff/* /usr/share/info/* /usr/share/linda/* \
Expand Down
13 changes: 11 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ DOCKER_RUN = DOCKER_BUILDKIT=1 docker-compose run php_client
help:
@grep -E '(^[a-zA-Z_-]+:.*?##.*$$)|(^##)' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-25s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/'

.PHONY: build-image
build-image: ## Build docker image
DOCKER_BUILDKIT=1 docker-compose build

.PHONY:
.PHONY: dependencies
dependencies: ## Install composer dependencies
cp docker-compose.yml.dist docker-compose.yml
Expand Down Expand Up @@ -32,8 +37,12 @@ cs: ## Run code style check
@echo "------------------"
@echo "- PHP code style -"
@echo "------------------"
$(DOCKER_RUN) bin/php-cs-fixer fix --diff --dry-run --config=.php_cs.php -vvv
$(DOCKER_RUN) bin/ecs

.PHONY: fix-cs
fix-cs: ## Fix PHP code style
$(DOCKER_RUN) bin/php-cs-fixer fix --config=.php_cs.php
$(DOCKER_RUN) bin/ecs --fix

.PHONY: rector
rector: ## Run rector
$(DOCKER_RUN) bin/rector
8 changes: 5 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
}
},
"require": {
"php": ">=7.4",
"php": ">=8.0",
"psr/http-message": "^1.0",
"psr/http-client": "^1.0",
"psr/http-factory": "^1.0",
Expand All @@ -37,12 +37,14 @@
"symfony/yaml": "^4.2",
"donatj/mock-webserver": "^2.0",
"http-interop/http-factory-guzzle": "^1.0",
"php-http/guzzle6-adapter": "^2.0"
"php-http/guzzle6-adapter": "^2.0",
"rector/rector": "^0.14.6",
"symplify/easy-coding-standard": "^11.1"
},
"config": {
"bin-dir": "bin",
"platform": {
"php": "7.4"
"php": "8.0"
}
},
"suggest": {
Expand Down
Loading

0 comments on commit b7f9448

Please sign in to comment.