Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
fail-fast: false
matrix:
php: [ '8.2', '8.3' ]
sylius: [ '~2.0.0' ]
sylius: [ '~2.0.0', '~2.0.1' ]

steps:
- name: Setup PHP
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.DEFAULT_GOAL := help
SHELL=/bin/bash
APP_DIR=tests/Application
SYLIUS_VERSION=2.0.0
SYLIUS_VERSION=2.1.0
SYMFONY=cd ${APP_DIR} && symfony
COMPOSER=symfony composer
CONSOLE=${SYMFONY} console
Expand Down Expand Up @@ -72,6 +72,9 @@ setup_application:
(cd ${APP_DIR} && ${COMPOSER} config --no-plugins allow-plugins true)
(cd ${APP_DIR} && ${COMPOSER} config --no-plugins --json extra.symfony.endpoint '["https://api.github.com/repos/monsieurbiz/symfony-recipes/contents/index.json?ref=flex/master","flex://defaults"]')
(cd ${APP_DIR} && ${COMPOSER} require --no-install --no-scripts --no-progress sylius/sylius="~${SYLIUS_VERSION}") # Make sure to install the required version of sylius because the sylius-standard has a soft constraint
# Temporary fix for Sylius 2.1
(cd ${APP_DIR} && ${COMPOSER} require --no-install --no-scripts --no-progress api-platform/state)
# End Temporary fix for Sylius 2.1
$(MAKE) ${APP_DIR}/.php-version
$(MAKE) ${APP_DIR}/php.ini
(cd ${APP_DIR} && ${COMPOSER} install --no-interaction)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This plugin adds a media manager to your images, videos and other files type fie

| Sylius Version | PHP Version |
|----------------|-------------|
| 2.0 | 8.2 - 8.3 |
| 2.0, 2,1 | 8.2 - 8.3 |

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

Expand Down
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": "^8.2",
"sylius/sylius": "~2.0.0",
"sylius/sylius": "~2.0",
"phpdocumentor/reflection-docblock": "^5.6"
},
"require-dev": {
Expand Down
2 changes: 1 addition & 1 deletion dist/migrations/Version20250410102216.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

declare(strict_types=1);

namespace App;
namespace DoctrineMigrations;

use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?php

/*
* This file is part of Monsieur Biz' Media Manager plugin for Sylius.
*
* (c) Monsieur Biz <[email protected]>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*/

declare(strict_types=1);

namespace App\Context\Channel\RequestBased;

use Sylius\Component\Channel\Context\RequestBased\RequestResolverInterface;
use Sylius\Component\Channel\Model\ChannelInterface;
use Sylius\Component\Channel\Repository\ChannelRepositoryInterface;
use Symfony\Component\DependencyInjection\Attribute\AutoconfigureTag;
use Symfony\Component\HttpFoundation\Request;

#[AutoconfigureTag('sylius.context.channel.request_based.resolver')]
final class HostnameAndPortBasedRequestResolver implements RequestResolverInterface
{
public function __construct(private ChannelRepositoryInterface $channelRepository)
{
}

public function findChannel(Request $request): ?ChannelInterface
{
return $this->channelRepository->findOneEnabledByHostname($request->getHost() . ':' . $request->getPort());
}
}
6 changes: 5 additions & 1 deletion dist/src/Entity/Product/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,15 @@
use Doctrine\ORM\Mapping as ORM;
use Sylius\Component\Core\Model\Product as BaseProduct;
use Sylius\Component\Product\Model\ProductTranslationInterface;
use Sylius\MolliePlugin\Entity\ProductInterface;
use Sylius\MolliePlugin\Entity\ProductTrait;

#[ORM\Entity]
#[ORM\Table(name: 'sylius_product')]
class Product extends BaseProduct
class Product extends BaseProduct implements ProductInterface
{
use ProductTrait;

#[ORM\Column(name: 'image_path', type: 'string', nullable: true)]
private ?string $imagePath;

Expand Down
2 changes: 1 addition & 1 deletion src/Components/ConfirmationModal.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
use Symfony\UX\LiveComponent\ComponentToolsTrait;
use Symfony\UX\LiveComponent\DefaultActionTrait;

#[AsLiveComponent]
#[AsLiveComponent(route: 'sylius_admin_live_component')]
class ConfirmationModal
{
use ComponentToolsTrait;
Expand Down
2 changes: 1 addition & 1 deletion src/Components/FormField.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
use Symfony\UX\LiveComponent\ComponentToolsTrait;
use Symfony\UX\LiveComponent\DefaultActionTrait;

#[AsLiveComponent]
#[AsLiveComponent(route: 'sylius_admin_live_component')]
class FormField
{
use ComponentToolsTrait;
Expand Down
2 changes: 1 addition & 1 deletion src/Components/SelectionModal.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
use Symfony\UX\LiveComponent\ComponentToolsTrait;
use Symfony\UX\LiveComponent\DefaultActionTrait;

#[AsLiveComponent]
#[AsLiveComponent(route: 'sylius_admin_live_component')]
class SelectionModal
{
use ComponentToolsTrait;
Expand Down
2 changes: 1 addition & 1 deletion src/Components/SelectionModal/DirectoryManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
use Symfony\UX\LiveComponent\Attribute\LiveProp;
use Symfony\UX\LiveComponent\ComponentToolsTrait;

#[AsLiveComponent]
#[AsLiveComponent(route: 'sylius_admin_live_component')]
class DirectoryManager
{
use ComponentToolsTrait;
Expand Down
2 changes: 1 addition & 1 deletion src/Components/SelectionModal/FileListManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
use Symfony\UX\LiveComponent\Attribute\LiveProp;
use Symfony\UX\LiveComponent\ComponentToolsTrait;

#[AsLiveComponent]
#[AsLiveComponent(route: 'sylius_admin_live_component')]
final class FileListManager
{
use ComponentToolsTrait;
Expand Down
2 changes: 1 addition & 1 deletion src/Components/SelectionModal/UploadManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
use Symfony\UX\LiveComponent\Attribute\LiveProp;
use Symfony\UX\LiveComponent\ComponentToolsTrait;

#[AsLiveComponent]
#[AsLiveComponent(route: 'sylius_admin_live_component')]
final class UploadManager
{
use ComponentToolsTrait;
Expand Down
Loading