Skip to content

Commit b7f9448

Browse files
authored
Merge pull request #254 from akeneo/API-1925-php-client-upgrade-php-dependency-to-8-0
API-1925: Upgrade PHP dependency to 8.0
2 parents f8695d2 + f12cd6f commit b7f9448

File tree

126 files changed

+974
-1312
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+974
-1312
lines changed

.php_cs.php

-13
This file was deleted.

Dockerfile

+14-12
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,21 @@ RUN apt-get update && \
2525
/usr/share/lintian/* /usr/share/locale/* /usr/share/man/*
2626

2727
# Install PHP with some extensions
28-
RUN apt-get update && \
28+
RUN wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg && \
29+
sh -c 'echo "deb https://packages.sury.org/php/ bullseye main" > /etc/apt/sources.list.d/php.list' && \
30+
apt-get update && \
2931
apt-get --no-install-recommends --no-install-suggests --yes --quiet install \
30-
php7.4-cli \
31-
php7.4-apcu \
32-
php7.4-mbstring \
33-
php7.4-curl \
34-
php7.4-gd \
35-
php7.4-imagick \
36-
php7.4-intl \
37-
php7.4-bcmath \
38-
php7.4-xdebug \
39-
php7.4-xml \
40-
php7.4-zip && \
32+
php8.0-cli \
33+
php8.0-apcu \
34+
php8.0-mbstring \
35+
php8.0-curl \
36+
php8.0-gd \
37+
php8.0-imagick \
38+
php8.0-intl \
39+
php8.0-bcmath \
40+
php8.0-xdebug \
41+
php8.0-xml \
42+
php8.0-zip && \
4143
apt-get clean && apt-get --yes --quiet autoremove --purge && \
4244
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
4345
/usr/share/doc/* /usr/share/groff/* /usr/share/info/* /usr/share/linda/* \

Makefile

+11-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ DOCKER_RUN = DOCKER_BUILDKIT=1 docker-compose run php_client
44
help:
55
@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/'
66

7+
.PHONY: build-image
8+
build-image: ## Build docker image
9+
DOCKER_BUILDKIT=1 docker-compose build
10+
11+
.PHONY:
712
.PHONY: dependencies
813
dependencies: ## Install composer dependencies
914
cp docker-compose.yml.dist docker-compose.yml
@@ -32,8 +37,12 @@ cs: ## Run code style check
3237
@echo "------------------"
3338
@echo "- PHP code style -"
3439
@echo "------------------"
35-
$(DOCKER_RUN) bin/php-cs-fixer fix --diff --dry-run --config=.php_cs.php -vvv
40+
$(DOCKER_RUN) bin/ecs
3641

3742
.PHONY: fix-cs
3843
fix-cs: ## Fix PHP code style
39-
$(DOCKER_RUN) bin/php-cs-fixer fix --config=.php_cs.php
44+
$(DOCKER_RUN) bin/ecs --fix
45+
46+
.PHONY: rector
47+
rector: ## Run rector
48+
$(DOCKER_RUN) bin/rector

composer.json

+5-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
}
2121
},
2222
"require": {
23-
"php": ">=7.4",
23+
"php": ">=8.0",
2424
"psr/http-message": "^1.0",
2525
"psr/http-client": "^1.0",
2626
"psr/http-factory": "^1.0",
@@ -37,12 +37,14 @@
3737
"symfony/yaml": "^4.2",
3838
"donatj/mock-webserver": "^2.0",
3939
"http-interop/http-factory-guzzle": "^1.0",
40-
"php-http/guzzle6-adapter": "^2.0"
40+
"php-http/guzzle6-adapter": "^2.0",
41+
"rector/rector": "^0.14.6",
42+
"symplify/easy-coding-standard": "^11.1"
4143
},
4244
"config": {
4345
"bin-dir": "bin",
4446
"platform": {
45-
"php": "7.4"
47+
"php": "8.0"
4648
}
4749
},
4850
"suggest": {

0 commit comments

Comments
 (0)