Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
23c90a1
Changes in composer.json
rust-le Apr 28, 2025
9674780
Changes in config/bundles.php
rust-le Apr 28, 2025
45b61d4
Add or modify config files
rust-le Apr 28, 2025
f7227e6
Changed order in bundles.php
rust-le Apr 28, 2025
08f5de4
Fixed yarn issue
rust-le Apr 29, 2025
443d9aa
Fixed no shop and admin asset package
rust-le Apr 30, 2025
0d09364
Add changes in matrix
rust-le May 2, 2025
cffc4b0
Add captainhook dev dependency
rust-le May 2, 2025
cc53f51
Fix service dependency
rust-le May 5, 2025
44fa488
Add change in dependency
rust-le May 6, 2025
639062b
Removal of non existing service
rust-le May 6, 2025
d8b8e21
Fix Kernel
rust-le May 6, 2025
643b186
Kernel removal
rust-le May 6, 2025
1591312
Merge branch 'master' into OP-570-upgrade-from-1.4-to-2.0
senghe May 6, 2025
2e03ecf
Removal of accidentally add symfony/flex
rust-le May 7, 2025
bbdb754
Package version reconciliation
rust-le May 7, 2025
ae48101
Add translations files
rust-le May 7, 2025
aae323a
Changes in README
rust-le May 7, 2025
ef75367
Add conflicts information
rust-le May 8, 2025
23c7080
Update installation.md
senghe Jul 3, 2025
e4b6f19
Update composer.json
senghe Jul 3, 2025
939ad6f
Update README.md
senghe Jul 3, 2025
4c6c630
Update .github/workflows/build.yml
senghe Jul 3, 2025
f3b153b
Update stof_doctrine_extensions.yaml
senghe Jul 3, 2025
3a89aef
Update stof_doctrine_extensions.yaml
senghe Jul 3, 2025
72d096d
Update composer.json
senghe Jul 3, 2025
92e7a24
Update composer.json
senghe Jul 3, 2025
3a0959b
Update composer.json
senghe Jul 3, 2025
978237a
Update composer.json
senghe Jul 3, 2025
99e45c4
Update composer.json
senghe Jul 3, 2025
acc02df
Update composer.json
senghe Jul 3, 2025
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
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ["8.1", "8.2", "8.3"]
symfony: ["^5.4", "^6.4"]
sylius: ["~1.14.0"]
node: ["^18.0", "^20.0"]
php: ["8.2", "8.3"]
symfony: ["^6.4", "^7.1"]
sylius: ["^2.0"]
node: ["^20.x"]
mysql: ["8.0"]

env:
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@ The complete installation guide can be found **[here](doc/installation.md).**

We work on stable, supported and up-to-date versions of packages. We recommend you to do the same.

| Package | Version |
|---------------|----------|
| PHP | \>=8.1 |
| sylius/sylius | 1.14.x |
| MySQL | \>= 5.7 |
| NodeJS | \>= 18.x |
| Package | Version |
|---------------|----------------|
| PHP | 8.2, 8.3 |
| sylius/sylius | 2.x |
| MySQL | \>= 8.0 |
| NodeJS | \>= 20.x, 22.x |


---
Expand Down
75 changes: 44 additions & 31 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,57 +10,70 @@
}
],
"require": {
"php": "^8.1",
"php": "^8.2",
"ext-soap": "*",
"bitbag/shipping-export-plugin": "^3.0",
"bitbag/shipping-export-plugin": "^4.0",
"msztorc/php-dpd-api": "^2.1",
"sylius/sylius": "~1.14",
"symfony/webpack-encore-bundle": "^1.17"
"sylius/sylius": "^2.0",
"symfony/webpack-encore-bundle": "^2.2.0"
},
"require-dev": {
"behat/behat": "^3.6.1",
"behat/mink-selenium2-driver": "^1.4",
"behat/behat": "^3.14",
"behat/mink-selenium2-driver": "~1.6",
"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",
"captainhook/captainhook": "^5.25",
"dmore/behat-chrome-extension": "^1.4",
"dmore/chrome-mink-driver": "^2.9",
"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.0",
"friends-of-behat/symfony-extension": "^2.1",
"friends-of-behat/variadic-extension": "^1.3",
"league/flysystem-bundle": "2.4.0",
"phpspec/phpspec": "^7.0",
"friends-of-behat/suite-settings-extension": "^1.1",
"friends-of-behat/symfony-extension": "^2.6",
"friends-of-behat/variadic-extension": "^1.6",
"league/flysystem-bundle": "3.4.0",
"nyholm/psr7": "^1.8",
"phpspec/phpspec": "^7.5",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan": "^1.12",
"phpstan/phpstan-doctrine": "^1.3",
"phpstan/phpstan-strict-rules": "^1.5",
"phpstan/phpstan-webmozart-assert": "^1.2",
"phpunit/phpunit": "^9.5",
"phpunit/phpunit": "^10.5",
"polishsymfonycommunity/symfony-mocker-container": "^1.0",
"sylius-labs/coding-standard": "^4.0",
"symfony/browser-kit": "^5.4 || ^6.0",
"symfony/debug-bundle": "^5.4 || ^6.0",
"symfony/dotenv": "^5.4 || ^6.0",
"symfony/intl": "^5.4 || ^6.0",
"symfony/profiler-pack": "^1.0",
"symfony/web-profiler-bundle": "^5.4 || ^6.0"
"robertfausk/behat-panther-extension": "^1.1",
"sylius-labs/coding-standard": "^4.4",
"sylius-labs/suite-tags-extension": "~0.2",
"sylius/sylius-rector": "^2.0",
"symfony/browser-kit": "^6.4 || ^7.1",
"symfony/debug-bundle": "^6.4 || ^7.1",
"symfony/dotenv": "^6.4 || ^7.1",
"symfony/http-client": "^6.4 || ^7.1",
"symfony/intl": "^6.4 || ^7.1",
"symfony/stopwatch": "^6.4",
"symfony/web-profiler-bundle": "^6.4 || ^7.1"
},
"conflict": {
"sylius/resource-bundle": "1.9.1 || 1.9.0",
"behat/mink-selenium2-driver": ">=1.7.0"
"behat/mink-selenium2-driver": ">=1.7.0",
"doctrine/orm": ">=3.1.0"
},
"config": {
"sort-packages": true,
"allow-plugins": {
"symfony/thanks": true,
"composer/package-versions-deprecated": true,
"dealerdirect/phpcodesniffer-composer-installer": true,
"dealerdirect/phpcodesniffer-composer-installer": false,
"php-http/discovery": false,
"phpstan/extension-installer": true
}
},
"extra": {
"branch-alias": {
"dev-master": "2.0-dev"
},
"symfony": {
"require": "^6.4"
}
},
"autoload": {
"psr-4": {
"BitBag\\DpdPlShippingExportPlugin\\": "src/",
Expand Down
20 changes: 14 additions & 6 deletions doc/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,20 @@ ADDITIONAL
## Requirements:
We work on stable, supported and up-to-date versions of packages. We recommend you to do the same.

| Package | Version |
|---------------|----------|
| PHP | \>=8.1 |
| sylius/sylius | 1.14.x |
| MySQL | \>= 5.7 |
| NodeJS | \>= 18.x |
| Package | Version |
|---------------|----------------|
| PHP | 8.2, 8.3 |
| sylius/sylius | 2.x |
| MySQL | \>= 8.0 |
| NodeJS | \>= 20.x, 22.x |

## CONFLICTS
As described in sylius/sylius-standard:2.0 (see CONFLICTS.md file) there is incompatibility
between version of `behat/mink-selenium2-driver` used in Sylius 2.0 and this plugin.

Before startig the plugin installation, it is necessary to downgrade in `composer.json` version
of `behat/mink-selenium2-driver` to `~1.6.0` and run `composer update behat/mink-selenium2-driver`.


## Composer:
```bash
Expand Down
32 changes: 32 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,37 @@

<env name="APP_ENV" value="test"/>
<env name="SHELL_VERBOSITY" value="-1" />

<!-- ###+ symfony/framework-bundle ### -->
<env name="APP_ENV" value="dev"/>
<env name="APP_SECRET" value="186059096e4873cdf8641717991b911b"/>
<!-- ###- symfony/framework-bundle ### -->

<!-- ###+ symfony/messenger ### -->
<!-- Choose one of the transports below -->
<!-- MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages -->
<!-- MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages -->
<env name="MESSENGER_TRANSPORT_DSN" value="doctrine://default?auto_setup=0"/>
<!-- ###- symfony/messenger ### -->

<!-- ###+ symfony/mailer ### -->
<env name="MAILER_DSN" value="null://null"/>
<!-- ###- symfony/mailer ### -->

<!-- ###+ doctrine/doctrine-bundle ### -->
<!-- Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url -->
<!-- IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml -->
<!-- -->
<!-- DATABASE_URL="sqlite:///%kernel.project_dir%/var/data_%kernel.environment%.db" -->
<!-- DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=8.0.32&charset=utf8mb4" -->
<!-- DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=10.11.2-MariaDB&charset=utf8mb4" -->
<env name="DATABASE_URL" value="postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=16&amp;charset=utf8"/>
<!-- ###- doctrine/doctrine-bundle ### -->

<!-- ###+ lexik/jwt-authentication-bundle ### -->
<env name="JWT_SECRET_KEY" value="%kernel.project_dir%/config/jwt/private.pem"/>
<env name="JWT_PUBLIC_KEY" value="%kernel.project_dir%/config/jwt/public.pem"/>
<env name="JWT_PASSPHRASE" value="638703cd316ef7f7b64b3cd542ae6dd7327c174190588fe0bc8805016d0b4cda"/>
<!-- ###- lexik/jwt-authentication-bundle ### -->
</php>
</phpunit>
15 changes: 0 additions & 15 deletions tests/Application/.babelrc

This file was deleted.

112 changes: 0 additions & 112 deletions tests/Application/Kernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,122 +4,10 @@

namespace Tests\BitBag\DpdPlShippingExportPlugin\Application;

use PSS\SymfonyMockerContainer\DependencyInjection\MockerContainer;
use Sylius\Bundle\CoreBundle\Application\Kernel as SyliusKernel;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\Config\Resource\FileResource;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Bundle\BundleInterface;
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;

final class Kernel extends BaseKernel
{
use MicroKernelTrait;

private const CONFIG_EXTS = '.{php,xml,yaml,yml}';

public function getCacheDir(): string
{
return $this->getProjectDir() . '/var/cache/' . $this->environment;
}

public function getLogDir(): string
{
return $this->getProjectDir() . '/var/log';
}

public function registerBundles(): iterable
{
foreach ($this->getConfigurationDirectories() as $confDir) {
$bundlesFile = $confDir . '/bundles.php';
if (false === is_file($bundlesFile)) {
continue;
}
yield from $this->registerBundlesFromFile($bundlesFile);
}
}

protected function configureContainer(ContainerBuilder $container, LoaderInterface $loader): void
{
foreach ($this->getConfigurationDirectories() as $confDir) {
$bundlesFile = $confDir . '/bundles.php';
if (false === is_file($bundlesFile)) {
continue;
}
$container->addResource(new FileResource($bundlesFile));
}

$container->setParameter('container.dumper.inline_class_loader', true);

foreach ($this->getConfigurationDirectories() as $confDir) {
$this->loadContainerConfiguration($loader, $confDir);
}
}

protected function configureRoutes(RoutingConfigurator $routes): void
{
foreach ($this->getConfigurationDirectories() as $confDir) {
$this->loadRoutesConfiguration($routes, $confDir);
}
}

protected function getContainerBaseClass(): string
{
if ($this->isTestEnvironment() && class_exists(MockerContainer::class)) {
return MockerContainer::class;
}

return parent::getContainerBaseClass();
}

private function isTestEnvironment(): bool
{
return 0 === strpos($this->getEnvironment(), 'test');
}

private function loadContainerConfiguration(LoaderInterface $loader, string $confDir): void
{
$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');
}

private function loadRoutesConfiguration(RoutingConfigurator $routes, string $confDir): void
{
$routes->import($confDir . '/{routes}/*' . self::CONFIG_EXTS);
$routes->import($confDir . '/{routes}/' . $this->environment . '/**/*' . self::CONFIG_EXTS);
$routes->import($confDir . '/{routes}' . self::CONFIG_EXTS);
}

/**
* @return BundleInterface[]
*/
private function registerBundlesFromFile(string $bundlesFile): iterable
{
$contents = require $bundlesFile;
foreach ($contents as $class => $envs) {
if (isset($envs['all']) || isset($envs[$this->environment])) {
yield new $class();
}
}
}

/**
* @return string[]
*/
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;
if (is_dir($symfonyConfigDir)) {
yield $symfonyConfigDir;
}
}
}
Empty file.
Loading
Loading