Skip to content

Commit

Permalink
OP-550 - Remove php 8.4 and symfony 6.4 support
Browse files Browse the repository at this point in the history
  • Loading branch information
JanPalen committed Jan 10, 2025
1 parent aa51620 commit 6a7f0e4
Show file tree
Hide file tree
Showing 14 changed files with 103 additions and 178 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ "8.3" ]
symfony: [ "^6.4", "^7.0" ]
php: [ "8.2", "8.3" ]
symfony: [ "^7.1" ]
sylius: [ "^2.0" ]
node: [ "20.x" ]
mysql: [ "8.0" ]
Expand Down Expand Up @@ -159,6 +159,10 @@ jobs:
name: Run PHPUnit
run: vendor/bin/phpunit --colors=always

-
name: Cache clear
run: (cd tests/Application && rm -rf var/cache)

-
name: Run Behat
run: vendor/bin/behat --colors --strict -vvv --no-interaction || vendor/bin/behat --colors --strict -vvv --no-interaction --rerun
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/coding_standard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ "8.3" ]
symfony: [ "^6.4", "^7.0" ]
php: [ "8.2", "8.3" ]
symfony: [ "^7.1" ]
sylius: [ "^2.0" ]
node: [ "20.x" ]

Expand Down
28 changes: 0 additions & 28 deletions UPGRADE-1.3.md

This file was deleted.

86 changes: 0 additions & 86 deletions UPGRADE-1.4.md

This file was deleted.

18 changes: 9 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "Product bundle for Sylius.",
"license": "MIT",
"require": {
"php": "^8.2",
"php": "~8.2.0 || ~8.3.0",
"sylius/sylius": "~2.0.0",
"dompdf/dompdf": "^2.0",
"sylius/twig-hooks": "^0.5",
Expand All @@ -31,7 +31,7 @@
"friends-of-behat/symfony-extension": "^2.6",
"friends-of-behat/variadic-extension": "^1.6",
"gedmo/doctrine-extensions": "^3.9",
"lchrusciel/api-test-case": "^4.1 || ^5.0",
"lchrusciel/api-test-case": "^5.3",
"league/flysystem-bundle": "^3.3",
"nelmio/alice": "^3.10",
"nyholm/psr7": "^1.8",
Expand All @@ -42,13 +42,13 @@
"sylius-labs/suite-tags-extension": "~0.2",
"sylius/mailer-bundle": "^1.8 || ^2.0@beta",
"sylius/sylius-rector": "^2.0",
"symfony/browser-kit": "^6.4 || ^7.1",
"symfony/debug-bundle": "^6.4 || ^7.1",
"symfony/dependency-injection": "^6.4 || ^7.1",
"symfony/dotenv": "^6.4 || ^7.1",
"symfony/http-client": "^6.4 || ^7.1",
"symfony/intl": "^6.4 || ^7.1",
"symfony/web-profiler-bundle": "^6.4 || ^7.1"
"symfony/browser-kit": "^7.1",
"symfony/debug-bundle": "^7.1",
"symfony/dependency-injection": "^7.1",
"symfony/dotenv": "^7.1",
"symfony/http-client": "^7.1",
"symfony/intl": "^7.1",
"symfony/web-profiler-bundle": "^7.1"
},
"autoload": {
"psr-4": {
Expand Down
38 changes: 19 additions & 19 deletions src/Component/Product/AddToCartFormComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,32 +62,32 @@ final class AddToCartFormComponent extends BaseAddToCartFormComponent
* @param ProductVariantRepositoryInterface<ProductVariantInterface> $productVariantRepository
*/
public function __construct(
protected readonly FormFactoryInterface $formFactory,
protected readonly ObjectManager $manager,
protected readonly RouterInterface $router,
protected readonly RequestStack $requestStack,
protected readonly EventDispatcherInterface $eventDispatcher,
protected readonly CartContextInterface $cartContext,
protected readonly AddToCartCommandFactoryInterface $addToCartCommandFactory,
protected readonly CartItemFactoryInterface $cartItemFactory,
protected readonly string $formClass,
FormFactoryInterface $formFactory,
ObjectManager $manager,
RouterInterface $router,
RequestStack $requestStack,
EventDispatcherInterface $eventDispatcher,
CartContextInterface $cartContext,
AddToCartCommandFactoryInterface $addToCartCommandFactory,
CartItemFactoryInterface $cartItemFactory,
string $formClass,
ProductRepositoryInterface $productRepository,
ProductVariantRepositoryInterface $productVariantRepository,
private readonly AddProductBundleToCartDtoFactory $addProductBundleToCartDtoFactory,
protected readonly AddProductBundleToCartDtoFactory $addProductBundleToCartDtoFactory,
) {
$this->initializeProduct($productRepository);
$this->initializeProductVariant($productVariantRepository);

parent::__construct(
$this->formFactory,
$this->manager,
$this->router,
$this->requestStack,
$this->eventDispatcher,
$this->cartContext,
$this->addToCartCommandFactory,
$this->cartItemFactory,
$this->formClass,
$formFactory,
$manager,
$router,
$requestStack,
$eventDispatcher,
$cartContext,
$addToCartCommandFactory,
$cartItemFactory,
$formClass,
$productRepository,
$productVariantRepository,
);
Expand Down
2 changes: 0 additions & 2 deletions src/Resources/config/services/product.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
<argument type="service" id="sylius.context.cart" />
<argument type="service" id="sylius.factory.add_to_cart_command" />
<argument type="service" id="sylius.factory.order_item" />

<argument>BitBag\SyliusProductBundlePlugin\Form\Type\AddProductBundleToCartType</argument>

<argument type="service" id="sylius.repository.product" />
<argument type="service" id="sylius.repository.product_variant" />

Expand Down
10 changes: 1 addition & 9 deletions tests/Api/AdminJsonApiTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,11 @@

namespace Tests\BitBag\SyliusProductBundlePlugin\Api;

use Composer\InstalledVersions;

abstract class AdminJsonApiTestCase extends JsonApiTestCase
{
public function getAuthToken(string $email, string $password): string
{
$syliusVersion = InstalledVersions::getVersion('sylius/sylius');

if (version_compare($syliusVersion, '1.13.0', '>=')) {
$endpoint = '/api/v2/admin/administrators/token';
} else {
$endpoint = '/api/v2/admin/authentication-token';
}
$endpoint = '/api/v2/admin/administrators/token';

$this->client->request(
'POST',
Expand Down
1 change: 0 additions & 1 deletion tests/Application/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
/node_modules

/config/encryption
/config/jwt

###> symfony/framework-bundle ###
/.env.*.local
Expand Down
4 changes: 0 additions & 4 deletions tests/Application/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,5 @@ private function registerBundlesFromFile(string $bundlesFile): iterable
private function getConfigurationDirectories(): iterable
{
yield $this->getProjectDir() . '/config';
$symfonyConfigDir = $this->getProjectDir() . '/config/symfony/' . BaseKernel::MAJOR_VERSION . '.x';
if (is_dir($symfonyConfigDir)) {
yield $symfonyConfigDir;
}
}
}
54 changes: 54 additions & 0 deletions tests/Application/config/jwt/private.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
-----BEGIN ENCRYPTED PRIVATE KEY-----
MIIJrTBXBgkqhkiG9w0BBQ0wSjApBgkqhkiG9w0BBQwwHAQIDbthk+aF5EACAggA
MAwGCCqGSIb3DQIJBQAwHQYJYIZIAWUDBAEqBBA3DYfh2mXByUxFNke/Wf5SBIIJ
UBckIgXeXBWPLQAAq07pN8uNFMUcUirFuEvbmxVe1PupCCAqriNxi1DqeSu/M7c1
h66y0BqKZu/0G9SVTg63iCKDEiRAM3hLyD2CsjYg8h2LAaqQ9dFYGV0cHRhCXagZ
Sdt9YTfn2rarRbxauMSt0z9zwCaiUrBU4JwSM3g+tD7W0lxAm9TeaqBZek5DIX+j
3Gom5tPYQe8jvfGMGdMPuanoEwH4WbWzGcqypWriy4JwaggwKCQ4ituWfa9kqMMC
8HRmBBDg0gtafmQP910RZh18JL2ewF5Pl7GDsLtOj5gNLNuAiQxDCcYRnD4/Cdsl
bH91btmGX1nUVIFViUTW93eBsjBgdgqOMRVxUKkSSX6CmIZWlE3AazgwSbvOvNrN
JGa8X21UwfuS/JHLmfRmgdti0YxRjJkBYLPpcd3ILsi+MMhSHy0uycAM/dB80Q1B
vkW1UXGbCw/PzA5yHrzULzAl69E3Tt5nTVMIIcBGxw2rf+ej+AVjsuOl7etwecdC
gnA90ViNlGOACLVnhsjd4WVF9Oircosf0UYoblwcT6gw1GSVF9pWuu7k5hy/7Pt/
o1BvonUgz/4VHG+K58qvtnlto+JE0XWzPvukNUyggtekTLyoQCI3ZKge6ui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i1ReMQXE5XuEajYOVbzQdyWU5jleZIx0f6X
mTa4WvMEGNyNxKZZXsy9FAaBkZqrNzEv8k0uFgFMNWQcMMtiqbei86yACdqe+jiW
HqHv8wfoBHR+eIARub2itOJ/cI+oKv96d4it4FqQ9Lml8RUFFZj7Hrd6EjDb6Nq4
P9ti7eku/xZvS0saBNChvv44GhP6FZJS0i/gidVffLna7Wua98tPZEAXp57k+XUL
PzsRJ4a+hFuQjkyXFoz/v8YuUdyCFUSVVr9ArVu0v4+4euFWpQLav5sXv0Gh9X58
Ek1KIf7Z/tZAJnSjTjFuSbDX/AoTMTxpRBKKnFW6zY0Nw2pjTVMtTVDkv9xkBpBK
wod7FPD5f0T7y9YOARVZnBxVRSkkcYpEJFy5pLNeadg9
-----END ENCRYPTED PRIVATE KEY-----
4 changes: 2 additions & 2 deletions tests/Application/config/packages/test_cached/fos_rest.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
fos_rest:
exception:
debug: true
exception:
debug: true
10 changes: 10 additions & 0 deletions tests/Application/config/packages/test_cached/twig.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
twig:
paths: ['%kernel.project_dir%/templates']
debug: '%kernel.debug%'
strict_variables: true

services:
_defaults:
public: false
autowire: true
autoconfigure: true

Twig\Extra\Intl\IntlExtension: ~
14 changes: 0 additions & 14 deletions tests/Application/config/symfony/6.x/bundles.php

This file was deleted.

0 comments on commit 6a7f0e4

Please sign in to comment.