Skip to content

Commit c3658f5

Browse files
authored
Merge pull request #37 from maximehuran/3.x
2 parents 4048dac + 1e0ef49 commit c3658f5

File tree

123 files changed

+156539
-2843
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+156539
-2843
lines changed

.github/copilot-instructions.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

.github/workflows/recipe.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Flex Recipe
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [ $default-branch ]
66
pull_request:
77

88
jobs:
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
php: [ '8.2', '8.3' ]
17+
php: ['8.2', '8.3']
1818
sylius: [ '~2.0.0', '~2.1.0' ]
1919

2020
steps:

.github/workflows/tests.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Tests
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [ $default-branch ]
66
pull_request:
77

88
jobs:
@@ -14,8 +14,8 @@ jobs:
1414
strategy:
1515
fail-fast: false
1616
matrix:
17-
php: ['8.2', '8.3']
18-
node: ['20']
17+
php: [ '8.2', '8.3' ]
18+
node: [ '20' ]
1919

2020
env:
2121
SYMFONY_ARGS: --no-tls

.php-cs-fixer.dist.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@
3434
->setRiskyAllowed(true)
3535
->setRules([
3636
'@DoctrineAnnotation' => true,
37-
'@PHP71Migration' => true,
38-
'@PHP71Migration:risky' => true,
39-
'@PHPUnit60Migration:risky' => true,
37+
'@PHP7x1Migration' => true,
38+
'@PHP7x1Migration:risky' => true,
39+
'@PHPUnit6x0Migration:risky' => true,
4040
'@Symfony' => true,
4141
'@Symfony:risky' => true,
4242
'align_multiline_comment' => [
@@ -254,7 +254,7 @@
254254
'trim_array_spaces' => true,
255255
'type_declaration_spaces' => true,
256256
'unary_operator_spaces' => true,
257-
'visibility_required' => [
257+
'modifier_keywords' => [
258258
'elements' => [
259259
'const',
260260
'property',

Makefile

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,17 +72,12 @@ setup_application:
7272
(cd ${APP_DIR} && ${COMPOSER} config --no-plugins allow-plugins true)
7373
(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"]')
7474
(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
75-
# Temporary fix for Sylius 2.1
76-
(cd ${APP_DIR} && ${COMPOSER} require --no-install --no-scripts --no-progress api-platform/state)
77-
# End Temporary fix for Sylius 2.1
7875
$(MAKE) ${APP_DIR}/.php-version
7976
$(MAKE) ${APP_DIR}/php.ini
8077
(cd ${APP_DIR} && ${COMPOSER} install --no-interaction)
8178
$(MAKE) apply_dist
8279
(cd ${APP_DIR} && ${COMPOSER} require --no-progress monsieurbiz/${PLUGIN_NAME}="*@dev")
8380
rm -rf ${APP_DIR}/var/cache
84-
mkdir -p ${APP_DIR}/public/media/gallery
85-
cp -r fixtures/gallery/* ${APP_DIR}/public/media/gallery
8681

8782

8883
${APP_DIR}/docker-compose.yaml:
@@ -141,13 +136,13 @@ test.container: ## Lint the symfony container
141136
${CONSOLE} lint:container
142137

143138
test.yaml: ## Lint the symfony Yaml files
144-
${CONSOLE} lint:yaml ../../config --parse-tags
139+
${CONSOLE} lint:yaml ../../src/Resources/config --parse-tags
145140

146141
test.schema: ## Validate MySQL Schema
147142
${CONSOLE} doctrine:schema:validate
148143

149144
test.twig: ## Validate Twig templates
150-
${CONSOLE} lint:twig --no-debug templates/ ../../templates/
145+
${CONSOLE} lint:twig --no-debug templates/ ../../src/Resources/views/
151146

152147
###
153148
### SYLIUS

README.md

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,15 @@
99

1010
This plugin adds a media manager to your images, videos and other files type fields in Sylius.
1111

12-
![Example of field display](docs/images/media-manager-product-medias.png)
13-
![Example of image listing](docs/images/media-manager-images.png)
14-
![Example of PDF listing](docs/images/media-manager-pdfs.png)
12+
![Demo of the media manager](docs/images/demo.gif)
1513

1614
## Compatibility
1715

18-
| Sylius Version | PHP Version |
19-
|----------------|-------------|
20-
| 2.0, 2,1 | 8.2 - 8.3 |
16+
| Sylius Version | PHP Version |
17+
|----------------|-----------------|
18+
| 2.0, 2.1 | 8.2 - 8.3 |
2119

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

2422
## Installation
2523

@@ -50,7 +48,7 @@ return [
5048
];
5149
```
5250

53-
Copy the plugin configuration files in your `config` folder: https://github.com/monsieurbiz/symfony-recipes/tree/master/monsieurbiz/sylius-media-manager-plugin/1.0/config
51+
Copy the plugin configuration files in your `config` folder: https://github.com/monsieurbiz/symfony-recipes/tree/master/monsieurbiz/sylius-media-manager-plugin/3.0/config
5452

5553
Add these variables to your `.env` :
5654

@@ -99,10 +97,6 @@ Use `MonsieurBiz\SyliusMediaManagerPlugin\Form\Type\FaviconType`
9997

10098
Use `MonsieurBiz\SyliusMediaManagerPlugin\Form\Type\AudioType`
10199

102-
### All the previous file types
103-
104-
Use `MonsieurBiz\SyliusMediaManagerPlugin\Form\Type\FileType`
105-
106100
## Configuration
107101

108102
You can specify the default maximum file size allowed for the media manager by setting the `MONSIEURBIZ_SYLIUS_MEDIA_MANAGER_MAX_FILE_SIZE` environment variable.

UPGRADE-2.0.md

Lines changed: 0 additions & 43 deletions
This file was deleted.

composer.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@
55
"description": "Add a media manager to your Sylius.",
66
"license": "MIT",
77
"require": {
8-
"php": "^8.2",
9-
"sylius/sylius": "~2.0",
10-
"phpdocumentor/reflection-docblock": "^5.6"
8+
"php": "^8.1",
9+
"sylius/sylius": "~2.0"
1110
},
1211
"require-dev": {
1312
"friendsofphp/php-cs-fixer": "^3.16",
@@ -37,7 +36,7 @@
3736
},
3837
"extra": {
3938
"branch-alias": {
40-
"dev-master": "2.0-dev"
39+
"dev-master": "3.0-dev"
4140
},
4241
"symfony": {
4342
"docker": false,

config/config.yaml

Lines changed: 0 additions & 7 deletions
This file was deleted.

config/services.yaml

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)