Skip to content

Commit

Permalink
OP-312 - redesign cms plugin - update composer.json and packets
Browse files Browse the repository at this point in the history
  • Loading branch information
dariusz-rup committed Jan 17, 2025
1 parent 3ff807e commit e270e7e
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 51 deletions.
78 changes: 49 additions & 29 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,47 +9,66 @@
"description": "CMS plugin for Sylius applications.",
"license": "MIT",
"require": {
"php": "^8.1",
"sylius/sylius": "^1.12.0 || ^1.13.0",
"php": "^8.2",
"sylius/sylius": "~2.0",
"league/csv": "^9.1",
"friendsofsymfony/ckeditor-bundle": "^2.0",
"symfony/webpack-encore-bundle": "^1.12"
"symfony/webpack-encore-bundle": "^2.1",
"sylius/calendar": "^0.5.0",
"sylius/grid-bundle": "^1.13.0",
"sylius/twig-extra": "^0.5",
"sylius/twig-hooks": "^0.5",
"symfony/stimulus-bundle": "^2.12",
"symfony/ux-autocomplete": "^2.17",
"symfony/ux-live-component": "^2.20",
"symfony/ux-twig-component": "^2.20",
"symfony/workflow": "^7.2",
"willdurand/hateoas-bundle": "2.5.0"
},
"require-dev": {
"behat/behat": "^3.7",
"behat/mink-selenium2-driver": "~1.6.0",
"behat/behat": "^3.14",
"behat/mink-selenium2-driver": "1.6",
"bitbag/coding-standard": "^3.0.0",
"dmore/behat-chrome-extension": "^1.4",
"friends-of-behat/mink": "^1.11",
"friends-of-behat/mink-browserkit-driver": "^1.6",
"friends-of-behat/mink-debug-extension": "^2.1",
"friends-of-behat/mink-extension": "^2.7",
"friends-of-behat/page-object-extension": "^0.3",
"friends-of-behat/suite-settings-extension": "^1.1",
"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",
"league/flysystem-bundle": "^3.3",
"nelmio/alice": "^3.10",
"nyholm/psr7": "^1.8",
"phpspec/phpspec": "^7.0",
"phpunit/phpunit": "^9.5",
"polishsymfonycommunity/symfony-mocker-container": "^1.0",
"robertfausk/behat-panther-extension": "^1.1",
"sylius-labs/coding-standard": "^4.4",
"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/profiler-pack": "^1.0",
"dbrekelmans/bdi": "^1.1",
"bitbag/coding-standard": "^3.0",
"dmore/behat-chrome-extension": "^1.3",
"dmore/chrome-mink-driver": "^2.7",
"friends-of-behat/mink": "^1.8",
"friends-of-behat/mink-browserkit-driver": "^1.4",
"friends-of-behat/mink-debug-extension": "^2.0.0",
"friends-of-behat/mink-extension": "^2.4",
"friends-of-behat/page-object-extension": "^0.3",
"friends-of-behat/suite-settings-extension": "^1.0",
"friends-of-behat/symfony-extension": "^2.1",
"friends-of-behat/variadic-extension": "^1.3",
"instaclick/php-webdriver": "^1.4",
"lchrusciel/api-test-case": "^4.1 || ^5.0",
"matthiasnoback/symfony-config-test": "^5.1",
"phpspec/phpspec": "^7.2",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "^1.8.1",
"phpstan/phpstan-doctrine": "^1.3",
"phpstan/phpstan-strict-rules": "^1.3.0",
"phpstan/phpstan-webmozart-assert": "^1.2.0",
"phpunit/phpunit": "^10.5",
"polishsymfonycommunity/symfony-mocker-container": "^1.0",
"robertfausk/behat-panther-extension": "^1.1",
"sylius-labs/coding-standard": "^4.2",
"sylius-labs/suite-tags-extension": "^0.2",
"symfony/browser-kit": "^5.4 || ^6.4",
"symfony/debug-bundle": "^5.4 || ^6.4",
"symfony/dotenv": "^5.4 || ^6.4",
"symfony/intl": "^5.4 || ^6.4",
"symfony/runtime": "^5.4 || ^6.4",
"symfony/web-profiler-bundle": "^5.4 || ^6.4"
"symfony/runtime": "^5.4 || ^6.4"
},
"suggest": {
"stefandoorn/sitemap-plugin": "^2.2"
Expand All @@ -73,7 +92,8 @@
"dealerdirect/phpcodesniffer-composer-installer": false,
"phpstan/extension-installer": false,
"symfony/flex": false,
"symfony/runtime": true
"symfony/runtime": true,
"php-http/discovery": true
}
},
"extra": {
Expand Down
11 changes: 2 additions & 9 deletions tests/Application/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,11 @@ protected function configureContainer(ContainerBuilder $container, LoaderInterfa
$container->addResource(new FileResource($this->getProjectDir() . '/config/bundles.php'));
$container->setParameter('container.dumper.inline_class_loader', true);
$confDir = $this->getProjectDir() . '/config';
$syliusDir = $this->getProjectDir() . '/config/sylius/' . SyliusKernel::MAJOR_VERSION . '.' . SyliusKernel::MINOR_VERSION;

$loader->load($confDir . '/{packages}/*' . self::CONFIG_EXTS, 'glob');
$loader->load($confDir . '/{packages}/' . $this->environment . '/**/*' . self::CONFIG_EXTS, 'glob');
$loader->load($confDir . '/{services}' . self::CONFIG_EXTS, 'glob');
$loader->load($confDir . '/{services}_' . $this->environment . self::CONFIG_EXTS, 'glob');
if (is_dir($syliusDir)) {
$loader->load($syliusDir . '/{services}_' . $this->environment . self::CONFIG_EXTS, 'glob');
}
$loader->load($confDir . '/{api_resources}/*' . self::CONFIG_EXTS, 'glob');
}

Expand Down Expand Up @@ -135,11 +131,8 @@ private function registerBundlesFromFile(string $bundlesFile): iterable
private function getConfigurationDirectories(): iterable
{
yield $this->getProjectDir() . '/config';
$syliusConfigDir = $this->getProjectDir() . '/config/sylius/' . SyliusKernel::MAJOR_VERSION . '.' . SyliusKernel::MINOR_VERSION;
if (is_dir($syliusConfigDir)) {
yield $syliusConfigDir;
}
$symfonyConfigDir = $this->getProjectDir() . '/config/symfony/' . BaseKernel::MAJOR_VERSION . '.' . BaseKernel::MINOR_VERSION;

$symfonyConfigDir = $this->getProjectDir() . '/config/symfony/' . BaseKernel::MAJOR_VERSION . 'x';
if (is_dir($symfonyConfigDir)) {
yield $symfonyConfigDir;
}
Expand Down
22 changes: 12 additions & 10 deletions tests/Application/config/bundles.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
declare(strict_types=1);

return [
FOS\CKEditorBundle\FOSCKEditorBundle::class => ['all' => true],
Sylius\CmsPlugin\SyliusCmsPlugin::class => ['all' => true],
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
Sylius\Calendar\SyliusCalendarBundle::class => ['all' => true],
Sylius\Bundle\OrderBundle\SyliusOrderBundle::class => ['all' => true],
Sylius\Bundle\MoneyBundle\SyliusMoneyBundle::class => ['all' => true],
Sylius\Bundle\CurrencyBundle\SyliusCurrencyBundle::class => ['all' => true],
Expand All @@ -31,11 +32,6 @@
Sylius\Bundle\CoreBundle\SyliusCoreBundle::class => ['all' => true],
Sylius\Bundle\ResourceBundle\SyliusResourceBundle::class => ['all' => true],
Sylius\Bundle\GridBundle\SyliusGridBundle::class => ['all' => true],
winzou\Bundle\StateMachineBundle\winzouStateMachineBundle::class => ['all' => true],
Sonata\BlockBundle\SonataBlockBundle::class => ['all' => true],
Bazinga\Bundle\HateoasBundle\BazingaHateoasBundle::class => ['all' => true],
JMS\SerializerBundle\JMSSerializerBundle::class => ['all' => true],
FOS\RestBundle\FOSRestBundle::class => ['all' => true],
Knp\Bundle\GaufretteBundle\KnpGaufretteBundle::class => ['all' => true],
Knp\Bundle\MenuBundle\KnpMenuBundle::class => ['all' => true],
Liip\ImagineBundle\LiipImagineBundle::class => ['all' => true],
Expand All @@ -53,13 +49,19 @@
Fidry\AliceDataFixtures\Bridge\Symfony\FidryAliceDataFixturesBundle::class => ['dev' => true, 'test' => true, 'test_cached' => true],
Nelmio\Alice\Bridge\Symfony\NelmioAliceBundle::class => ['dev' => true, 'test' => true, 'test_cached' => true],
FriendsOfBehat\SymfonyExtension\Bundle\FriendsOfBehatSymfonyExtensionBundle::class => ['test' => true, 'test_cached' => true],
ApiPlatform\Core\Bridge\Symfony\Bundle\ApiPlatformBundle::class => ['all' => true],
Sylius\Behat\Application\SyliusTestPlugin\SyliusTestPlugin::class => ['test' => true, 'test_cached' => true],
ApiPlatform\Symfony\Bundle\ApiPlatformBundle::class => ['all' => true],
Lexik\Bundle\JWTAuthenticationBundle\LexikJWTAuthenticationBundle::class => ['all' => true],
Sylius\Bundle\ApiBundle\SyliusApiBundle::class => ['all' => true],
SyliusLabs\DoctrineMigrationsExtraBundle\SyliusLabsDoctrineMigrationsExtraBundle::class => ['all' => true],
SyliusLabs\Polyfill\Symfony\Security\Bundle\SyliusLabsPolyfillSymfonySecurityBundle::class => ['all' => true],
League\FlysystemBundle\FlysystemBundle::class => ['all' => true],
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
FOS\CKEditorBundle\FOSCKEditorBundle::class => ['all' => true],
Sylius\CmsPlugin\SyliusCmsPlugin::class => ['all' => true],
Sylius\TwigHooks\SyliusTwigHooksBundle::class => ['all' => true],
Symfony\UX\TwigComponent\TwigComponentBundle::class => ['all' => true],
Symfony\UX\LiveComponent\LiveComponentBundle::class => ['all' => true],
Symfony\UX\Autocomplete\AutocompleteBundle::class => ['all' => true],
Symfony\UX\StimulusBundle\StimulusBundle::class => ['all' => true],
Sylius\TwigExtra\Symfony\SyliusTwigExtraBundle::class => ['all' => true],
Symfony\UX\Icons\UXIconsBundle::class => ['all' => true],
Sylius\Abstraction\StateMachine\SyliusStateMachineAbstractionBundle::class => ['all' => true]
];
4 changes: 1 addition & 3 deletions tests/Application/config/packages/_sylius.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
imports:
- { resource: "@SyliusCoreBundle/Resources/config/app/config.yml" }

- { resource: "@SyliusPayumBundle/Resources/config/app/config.yaml" }
- { resource: "@SyliusAdminBundle/Resources/config/app/config.yml" }

- { resource: "@SyliusShopBundle/Resources/config/app/config.yml" }

- { resource: "@SyliusApiBundle/Resources/config/app/config.yaml" }
- { resource: "../parameters.yaml" }

Expand Down
10 changes: 10 additions & 0 deletions tests/Application/config/packages/http_discovery.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
services:
Psr\Http\Message\RequestFactoryInterface: '@http_discovery.psr17_factory'
Psr\Http\Message\ResponseFactoryInterface: '@http_discovery.psr17_factory'
Psr\Http\Message\ServerRequestFactoryInterface: '@http_discovery.psr17_factory'
Psr\Http\Message\StreamFactoryInterface: '@http_discovery.psr17_factory'
Psr\Http\Message\UploadedFileFactoryInterface: '@http_discovery.psr17_factory'
Psr\Http\Message\UriFactoryInterface: '@http_discovery.psr17_factory'

http_discovery.psr17_factory:
class: Http\Discovery\Psr17Factory
5 changes: 5 additions & 0 deletions tests/Application/config/symfony/6.x/bundles.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

return [
Bazinga\Bundle\HateoasBundle\BazingaHateoasBundle::class => ['all' => true],
];

0 comments on commit e270e7e

Please sign in to comment.