Skip to content

Commit

Permalink
Update for sylius 1.12
Browse files Browse the repository at this point in the history
  • Loading branch information
qhayat committed Dec 29, 2022
1 parent dff3e17 commit 9972668
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"license": "MIT",
"require": {
"php": "~7.4|~8.0",
"sylius/sylius": ">=1.8 <1.12",
"sylius/sylius": "^1.12",
"gedmo/doctrine-extensions": "^2.4.12 || ^3.0",
"monsieurbiz/sylius-rich-editor-plugin": "^2.0"
},
Expand Down
3 changes: 1 addition & 2 deletions src/Context/LastChanceLocaleContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ public function __construct(

public function getLocaleCode(): string
{
$request = $this->requestStack->getMasterRequest();
if (null === $request) {
if (null === $request = $this->requestStack->getMainRequest()) {
throw new LocaleNotFoundException('Main request not found, therefore no locale found…');
}
$pathInfo = $request->getPathInfo();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public function load(array $config, ContainerBuilder $container): void
/**
* @inheritdoc
*/
public function getAlias()
public function getAlias(): string
{
return str_replace('monsieur_biz', 'monsieurbiz', parent::getAlias());
}
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/PageTranslation.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class PageTranslation extends AbstractTranslation implements PageTranslationInte
*
* @var string|null
*/
protected $locale;
protected ?string $locale;

public function getId(): ?int
{
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/config/routing/shop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ monsieurbiz_cms_page_show:
path: /{slug}
methods: [GET]
defaults:
_controller: monsieurbiz_cms_page.controller.page:showAction
_controller: monsieurbiz_cms_page.controller.page::showAction
_sylius:
template: "@MonsieurBizSyliusCmsPagePlugin/Shop/Page/show.html.twig"
repository:
Expand Down
2 changes: 1 addition & 1 deletion src/Routing/RequestContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function __construct(

public function checkPageSlug(Request $request): bool
{
if ($request !== $this->requestStack->getMasterRequest()) {
if ($request !== $this->requestStack->getMainRequest()) {
return false;
}

Expand Down

0 comments on commit 9972668

Please sign in to comment.