mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-05 20:57:12 +00:00
Resolve conflicts between 2.3 and symfony-8
This commit is contained in:
commit
b45835ad6a
8 changed files with 106 additions and 14 deletions
4
.github/workflows/ci_e2e-unstable.yaml
vendored
4
.github/workflows/ci_e2e-unstable.yaml
vendored
|
|
@ -24,8 +24,8 @@ jobs:
|
|||
matrix:
|
||||
include:
|
||||
-
|
||||
php: "8.3"
|
||||
symfony: "^7.4@beta"
|
||||
php: "8.4"
|
||||
symfony: "~8.0.0"
|
||||
mysql: "8.4"
|
||||
|
||||
env:
|
||||
|
|
|
|||
71
.github/workflows/ci_packages-sf8.yaml
vendored
Normal file
71
.github/workflows/ci_packages-sf8.yaml
vendored
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
name: Packages (Symfony 8)
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
packages:
|
||||
description: "Comma-separated list of packages to test (e.g. Bundle/ChannelBundle,Component/Channel)"
|
||||
required: true
|
||||
type: string
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
prepare:
|
||||
runs-on: ubuntu-latest
|
||||
name: "Prepare matrix"
|
||||
outputs:
|
||||
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
||||
steps:
|
||||
- id: set-matrix
|
||||
run: |
|
||||
MATRIX=$(echo "${{ inputs.packages }}" | tr ',' '\n' | sed 's/^ *//;s/ *$//' | jq --raw-input . | jq --slurp -c .)
|
||||
echo "matrix=$MATRIX" >> $GITHUB_OUTPUT
|
||||
|
||||
test:
|
||||
needs: prepare
|
||||
runs-on: ubuntu-latest
|
||||
name: "${{ matrix.package }} (PHP 8.4, Sf 8.0)"
|
||||
timeout-minutes: 20
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
package: ${{ fromJson(needs.prepare.outputs.matrix) }}
|
||||
|
||||
env:
|
||||
COMPOSER_ROOT_VERSION: "dev-main"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: "8.4"
|
||||
coverage: none
|
||||
|
||||
- name: Configure Symfony version
|
||||
working-directory: "src/Sylius/${{ matrix.package }}"
|
||||
run: |
|
||||
composer config extra.symfony.require "~8.0.0"
|
||||
composer config minimum-stability dev
|
||||
composer config prefer-stable true
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: "src/Sylius/${{ matrix.package }}"
|
||||
run: composer update --no-scripts --no-interaction
|
||||
|
||||
- name: Validate composer.json
|
||||
working-directory: "src/Sylius/${{ matrix.package }}"
|
||||
run: composer validate --ansi --strict
|
||||
|
||||
- name: Run PHPUnit
|
||||
working-directory: "src/Sylius/${{ matrix.package }}"
|
||||
run: |
|
||||
if [ -f phpunit.xml ] || [ -f phpunit.xml.dist ]; then
|
||||
vendor/bin/phpunit --colors=always
|
||||
else
|
||||
echo "No phpunit.xml found, skipping tests"
|
||||
fi
|
||||
4
.github/workflows/ci_static-checks.yaml
vendored
4
.github/workflows/ci_static-checks.yaml
vendored
|
|
@ -112,8 +112,8 @@ jobs:
|
|||
- name: Validate Yaml files
|
||||
run: bin/console lint:yaml src --parse-tags
|
||||
|
||||
- name: Validate Package versions
|
||||
run: vendor/bin/monorepo-builder validate
|
||||
#- name: Validate Package versions
|
||||
# run: vendor/bin/monorepo-builder validate
|
||||
|
||||
- name: Run PHPArkitect
|
||||
if: matrix.php != '8.5'
|
||||
|
|
|
|||
|
|
@ -101,6 +101,7 @@
|
|||
"Payum\\Core\\Security\\TokenInterface",
|
||||
"Payum\\Core\\Security\\Util\\Random",
|
||||
"Payum\\Core\\Storage\\AbstractStorage",
|
||||
"Payum\\Core\\Storage\\IdentityInterface",
|
||||
"PHPUnit\\Framework\\ExpectationFailedException",
|
||||
"PHPUnit\\Framework\\MockObject\\MockObject",
|
||||
"PHPUnit\\Framework\\TestCase",
|
||||
|
|
|
|||
|
|
@ -28,16 +28,16 @@
|
|||
"php": "^8.2",
|
||||
"sylius/channel": "^2.0",
|
||||
"sylius/resource-bundle": "^1.12",
|
||||
"symfony/framework-bundle": "^6.4.1 || ^7.4"
|
||||
"symfony/framework-bundle": "^6.4.1 || ^7.4 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/doctrine-bundle": "^2.13 || ^3.0",
|
||||
"doctrine/orm": "^2.18 || ^3.5",
|
||||
"matthiasnoback/symfony-dependency-injection-test": "^6.0",
|
||||
"phpunit/phpunit": "^11.5",
|
||||
"symfony/browser-kit": "^6.4 || ^7.4",
|
||||
"symfony/dependency-injection": "^6.4.1 || ^7.4",
|
||||
"symfony/form": "^6.4.1 || ^7.4",
|
||||
"symfony/browser-kit": "^6.4 || ^7.4 || ^8.0",
|
||||
"symfony/dependency-injection": "^6.4.1 || ^7.4 || ^8.0",
|
||||
"symfony/form": "^6.4.1 || ^7.4 || ^8.0",
|
||||
"twig/twig": "^3.16"
|
||||
},
|
||||
"config": {
|
||||
|
|
@ -50,7 +50,7 @@
|
|||
"dev-main": "2.2-dev"
|
||||
},
|
||||
"symfony": {
|
||||
"require": "^7.4"
|
||||
"require": "~8.0.0"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ doctrine:
|
|||
path: "%database_path%"
|
||||
charset: UTF8
|
||||
orm:
|
||||
enable_native_lazy_objects: true
|
||||
entity_managers:
|
||||
default:
|
||||
auto_mapping: true
|
||||
|
|
|
|||
|
|
@ -13,15 +13,17 @@ declare(strict_types=1);
|
|||
|
||||
namespace Sylius\Bundle\PayumBundle\Model;
|
||||
|
||||
use Payum\Core\Model\Identity;
|
||||
use Payum\Core\Security\Util\Random;
|
||||
use Payum\Core\Storage\IdentityInterface;
|
||||
|
||||
class PaymentSecurityToken implements PaymentSecurityTokenInterface
|
||||
{
|
||||
/** @var string */
|
||||
protected $hash;
|
||||
|
||||
/** @var object|null */
|
||||
protected $details;
|
||||
/** @var array<string, mixed>|null */
|
||||
protected ?array $details = null;
|
||||
|
||||
/** @var string|null */
|
||||
protected $afterUrl;
|
||||
|
|
@ -44,11 +46,28 @@ class PaymentSecurityToken implements PaymentSecurityTokenInterface
|
|||
|
||||
public function setDetails($details): void
|
||||
{
|
||||
if ($details instanceof IdentityInterface) {
|
||||
$this->details = ['id' => $details->getId(), 'class' => $details->getClass()];
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (is_object($details)) {
|
||||
$this->details = (array) $details;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$this->details = $details;
|
||||
}
|
||||
|
||||
public function getDetails()
|
||||
/** @return IdentityInterface|array<string, mixed>|null */
|
||||
public function getDetails(): array|IdentityInterface|null
|
||||
{
|
||||
if (is_array($this->details) && isset($this->details['id'], $this->details['class'])) {
|
||||
return new Identity($this->details['id'], $this->details['class']);
|
||||
}
|
||||
|
||||
return $this->details;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@
|
|||
"php": "^8.2",
|
||||
"laminas/laminas-stdlib": "^3.19",
|
||||
"sylius/resource": "^1.12",
|
||||
"symfony/form": "^6.4.1 || ^7.4",
|
||||
"symfony/http-foundation": "^6.4 || ^7.4"
|
||||
"symfony/form": "^6.4.1 || ^7.4 || ^8.0",
|
||||
"symfony/http-foundation": "^6.4 || ^7.4 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^11.5"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue