Skip to content

Commit 4c5850a

Browse files
authored
Merge pull request #9 from Kiwikoti/feature/remove-strict-versionning
2 parents 74b7033 + 086af1a commit 4c5850a

File tree

6 files changed

+38
-6
lines changed

6 files changed

+38
-6
lines changed

.github/workflows/recipe.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
php: ['8.2', '8.3']
20-
sylius: ['~2.0.0']
20+
sylius: ['~2.0.0', '~2.1.0']
2121

2222
steps:
2323
- name: Setup PHP

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.DEFAULT_GOAL := help
22
SHELL=/bin/bash
33
APP_DIR=tests/Application
4-
SYLIUS_VERSION=2.0.0
4+
SYLIUS_VERSION=2.1.0
55
SYMFONY=cd ${APP_DIR} && symfony
66
COMPOSER=symfony composer
77
CONSOLE=${SYMFONY} console

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66

77
## Compatibility
88

9-
| Sylius Version | PHP Version |
10-
|----------------|-----------------|
11-
| 2.0 | 8.2 - 8.3 |
9+
| Sylius Version | PHP Version |
10+
|----------------|-------------|
11+
| 2.0, 2.1 | 8.2 - 8.3 |
1212

1313
ℹ️ For Sylius 1.x, see our [1.x branch](https://github.com/monsieurbiz/SyliusCmsBlockPlugin/tree/1.x) and all 1.x releases.
1414

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"require": {
88
"monsieurbiz/sylius-rich-editor-plugin": "^3.0",
99
"php": "^8.2",
10-
"sylius/sylius": "~2.0.0"
10+
"sylius/sylius": "~2.0"
1111
},
1212
"require-dev": {
1313
"behat/behat": "^3.6.1",
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
3+
/*
4+
* This file is part of Monsieur Biz's Sylius Cms Block Plugin for Sylius.
5+
* (c) Monsieur Biz <[email protected]>
6+
* For the full copyright and license information, please view the LICENSE
7+
* file that was distributed with this source code.
8+
*/
9+
10+
declare(strict_types=1);
11+
12+
namespace App\Context\Channel\RequestBased;
13+
14+
use Sylius\Component\Channel\Context\RequestBased\RequestResolverInterface;
15+
use Sylius\Component\Channel\Model\ChannelInterface;
16+
use Sylius\Component\Channel\Repository\ChannelRepositoryInterface;
17+
use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag;
18+
use Symfony\Component\HttpFoundation\Request;
19+
20+
#[AutoconfigureTag('sylius.context.channel.request_based.resolver')]
21+
final class HostnameAndPortBasedRequestResolver implements RequestResolverInterface
22+
{
23+
public function __construct(private ChannelRepositoryInterface $channelRepository)
24+
{
25+
}
26+
27+
public function findChannel(Request $request): ?ChannelInterface
28+
{
29+
return $this->channelRepository->findOneEnabledByHostname($request->getHost() . ':' . $request->getPort());
30+
}
31+
}

phpstan.neon

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,5 @@ parameters:
1111
- 'tests/Application/**/*'
1212

1313
ignoreErrors:
14+
- identifier: missingType.generics
1415
- identifier: missingType.iterableValue

0 commit comments

Comments
 (0)