Skip to content

Upgrade to symfony 7 compatibility #289

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -24,22 +24,22 @@ RUN apt-get update && \
/usr/share/doc/* /usr/share/groff/* /usr/share/info/* /usr/share/linda/* \
/usr/share/lintian/* /usr/share/locale/* /usr/share/man/*

# Install PHP with some extensions
# Install PHP 8.2 with some extensions
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 \
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 && \
php8.2-cli \
php8.2-apcu \
php8.2-mbstring \
php8.2-curl \
php8.2-gd \
php8.2-imagick \
php8.2-intl \
php8.2-bcmath \
php8.2-xdebug \
php8.2-xml \
php8.2-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/* \
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
DOCKER_RUN ?= DOCKER_BUILDKIT=1 docker-compose run php_client
DOCKER_RUN ?= DOCKER_BUILDKIT=1 docker compose run php_client

.PHONY: help
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
DOCKER_BUILDKIT=1 docker compose build

.PHONY:
.PHONY: dependencies
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ For example, if your PIM is currently a v2.3, you can still use a 1.0 version of

## Requirements

* PHP >= 8.0
* PHP >= 8.2
* Composer

## Installation
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
@@ -20,19 +20,19 @@
}
},
"require": {
"php": ">=8.0",
"php": ">=8.2",
"psr/http-message": "^1.0",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem in our Slack conversation seems more related to this restriction on psr/http-message where they need 2.0 or above.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, so I need to upgrade psr/http-message

"psr/http-client": "^1.0",
"psr/http-factory": "^1.0",
"psr/http-message-implementation": "^1.0|^2.0",
"php-http/httplug": "^2.0",
"php-http/discovery": "^1.6",
"php-http/multipart-stream-builder": "^1.0",
"symfony/options-resolver": "^5.4|^6.0|^7.0"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this break the compatibility with versions older than 7.0?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, how does this bring compatibility with Symfony 7? It seems it was already in the list, so I don't see what it adds.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Symfony 7 needs at least PHP 8.2

"symfony/options-resolver": "^7.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.5",
"phpunit/phpunit": "^8.0",
"friendsofphp/php-cs-fixer": "^3.64",
"phpunit/phpunit": "^9.0",
"phpspec/phpspec": "^7.1",
"symfony/yaml": "^4.2",
"donatj/mock-webserver": "^2.0",
@@ -44,7 +44,7 @@
"config": {
"bin-dir": "bin",
"platform": {
"php": "8.0"
"php": "8.2"
},
"allow-plugins": {
"php-http/discovery": false
2,787 changes: 1,706 additions & 1,081 deletions composer.lock

Large diffs are not rendered by default.