Skip to content
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

Force paypal version to avoid error with 1.6 version #208

Merged
merged 6 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
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
12 changes: 12 additions & 0 deletions .github/workflows/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ jobs:
matrix:
php: ['7.4' ,'8.0', '8.1']
sylius: ["~1.9.0", "~1.10.0", "~1.11.0", "~1.12.0"]
include:
- php: '8.1'
sylius: '~1.12.0'
sylius_paypal: '~1.5.0'
exclude:
- php: 8.1
sylius: "~1.9.0"
Expand Down Expand Up @@ -76,6 +80,14 @@ jobs:
run: |
composer require --no-install --no-scripts --no-progress sylius/sylius="${{ matrix.sylius }}"

# Fix Paypal 1.5 on Sylius 1.12 and PHP 8.1
- name: Make sure to install the required version of Sylius Paypal Plugin
if: ${{ matrix.sylius_paypal }}
working-directory: ./sylius
run: |
composer require --no-install --no-scripts --no-progress sylius/paypal-plugin="${{ matrix.sylius_paypal }}" # @see https://github.com/Sylius/PayPalPlugin/issues/295


- name: Setup some requirements
working-directory: ./sylius
run: |
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
SHELL=/bin/bash
APP_DIR=tests/Application
SYLIUS_VERSION=1.12.0
SYLIUS_PAYPAL_VERSION=1.5.0
SYMFONY=cd ${APP_DIR} && symfony
COMPOSER=symfony composer
CONSOLE=${SYMFONY} console
export COMPOSE_PROJECT_NAME=search
export USER_UID=$(shell id -u)
PLUGIN_NAME=sylius-${COMPOSE_PROJECT_NAME}-plugin
COMPOSE=docker-compose
YARN=yarn
Expand Down Expand Up @@ -68,6 +70,7 @@ setup_application:
(cd ${APP_DIR} && ${COMPOSER} config minimum-stability dev)
(cd ${APP_DIR} && ${COMPOSER} config --no-plugins allow-plugins true)
(cd ${APP_DIR} && ${COMPOSER} require --no-install --no-scripts --no-progress sylius/sylius="~${SYLIUS_VERSION}") # Make sure to install the required version of sylius because the sylius-standard has a soft constraint
(cd ${APP_DIR} && ${COMPOSER} require --no-install --no-scripts --no-progress sylius/paypal-plugin="~${SYLIUS_PAYPAL_VERSION}") # @see https://github.com/Sylius/PayPalPlugin/issues/295
@if [ ${SYLIUS_VERSION} == '1.11.0' ]; then\
(cd ${APP_DIR} && ${COMPOSER} require --no-install --no-scripts --no-progress php-http/message-factory)\
fi
Expand All @@ -81,6 +84,8 @@ setup_application:
${APP_DIR}/docker-compose.yaml:
rm -f ${APP_DIR}/docker-compose.yml
rm -f ${APP_DIR}/docker-compose.yaml
rm -f ${APP_DIR}/compose.yml
rm -f ${APP_DIR}/compose.override.dist.yml
ln -s ../../docker-compose.yaml.dist ${APP_DIR}/docker-compose.yaml
.PHONY: ${APP_DIR}/docker-compose.yaml

Expand Down
23 changes: 0 additions & 23 deletions dist/docker-compose.override.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3.8'
services:
elasticsearch:
build:
Expand All @@ -22,27 +21,5 @@ services:
- "9200:9200"
- "9300:9300"

cerebro:
image: lmenezes/cerebro
ports:
- "9000:9000"
links:
- elasticsearch

kibana:
image: kibana:7.4.0
ports:
- "5601:5601"
environment:
- "SERVER_NAME=localhost"
- "ELASTICSEARCH_HOSTS=http://elasticsearch:9200"
- "XPACK_GRAPH_ENABLED=false"
- "XPACK_ML_ENABLED=false"
- "XPACK_REPORTING_ENABLED=false"
- "XPACK_SECURITY_ENABLED=false"
- "XPACK_WATCHER_ENABLED=false"
links:
- elasticsearch

volumes:
esdata: {}
1 change: 0 additions & 1 deletion docker-compose.yaml.dist
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: '3.8'
services:
database:
image: mysql:8.0
Expand Down
2 changes: 1 addition & 1 deletion src/Index/Indexer.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ private function getRealEntity($entity)
}

// Clear the entity manager to detach the proxy object
$this->entityManager->clear(\get_class($entity));
$this->entityManager->clear(\get_class($entity)); /** @phpstan-ignore-line */
// Retrieve the original class name
$entityClassName = $this->entityManager->getClassMetadata(\get_class($entity))->rootEntityName;
// Find the object in repository from the ID
Expand Down
Loading