Skip to content

Commit 402915f

Browse files
author
Maxime Leclercq
committed
feat(plugin): first version
1 parent 06da662 commit 402915f

File tree

94 files changed

+3778
-38
lines changed

Some content is hidden

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

94 files changed

+3778
-38
lines changed

.github/workflows/recipe.yaml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,13 @@ jobs:
99

1010
recipe:
1111

12-
name: Flex recipe (PHP ${{ matrix.php }}, Sylius ${{ matrix.sylius }})
13-
1412
runs-on: ubuntu-latest
1513

1614
strategy:
1715
fail-fast: false
1816
matrix:
19-
php: ['8.2']
20-
sylius: ["~1.13.0"]
17+
php: ['8.1', '8.2']
18+
sylius: ["~1.12.0", "~1.13.0"]
2119

2220
steps:
2321
- name: Setup PHP

.github/workflows/security.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,12 @@ jobs:
88

99
security:
1010

11-
name: Security check (PHP ${{ matrix.php }})
12-
1311
runs-on: ubuntu-latest
1412

1513
strategy:
1614
fail-fast: false
1715
matrix:
18-
php: ['8.2']
16+
php: ['8.1', '8.2']
1917

2018
steps:
2119
- uses: actions/checkout@v3

.github/workflows/tests.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,12 @@ jobs:
99

1010
php:
1111

12-
name: Quality tests (PHP ${{ matrix.php }})
13-
1412
runs-on: ubuntu-latest
1513

1614
strategy:
1715
fail-fast: false
1816
matrix:
19-
php: ['8.2']
17+
php: ['8.1', '8.2']
2018

2119
env:
2220
COMPOSER_ARGS: --prefer-dist

.php-cs-fixer.dist.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
declare(strict_types=1);
1111

1212
$header = <<<'HEADER'
13-
This file is part of Monsieur Biz's for Sylius.
13+
This file is part of Monsieur Biz's Blog plugin for Sylius.
1414
(c) Monsieur Biz <[email protected]>
1515
For the full copyright and license information, please view the LICENSE
1616
file that was distributed with this source code.

README.md

Lines changed: 58 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,67 @@
1-
# Sylius Blog Plugin
1+
<h1 align="center">Sylius Blog Plugin</h1>
22

3+
This plugin adds a blog to your Sylius project. It allows you to create blog articles, tags and authors.
34

5+
## Compatibility
6+
7+
## Compatibility
8+
9+
| Sylius Version | PHP Version |
10+
|---|---|
11+
| 1.12 | 8.1 - 8.2 |
12+
| 1.13 | 8.1 - 8.2 |
413

514
## Installation
615

7-
TBD
16+
If you want to use our recipes, you can add recipes endpoints to your composer.json by running this command:
17+
18+
```bash
19+
composer config --no-plugins --json extra.symfony.endpoint '["https://api.github.com/repos/monsieurbiz/symfony-recipes/contents/index.json?ref=flex/master","flex://defaults"]'
20+
```
21+
22+
Install the plugin via composer:
23+
24+
```bash
25+
composer require monsieurbiz/sylius-blog-plugin:dev-master
26+
```
27+
28+
<!-- The section on the flex recipe will be displayed when the flex recipe will be available on contrib repo
29+
<details><summary>For the installation without flex, follow these additional steps</summary>
30+
-->
31+
32+
Change your `config/bundles.php` file to add this line for the plugin declaration:
33+
34+
```php
35+
<?php
36+
37+
return [
38+
//..
39+
MonsieurBiz\SyliusBlogPlugin\MonsieurBizSyliusBlogPlugin::class => ['all' => true],
40+
];
41+
```
42+
43+
Add the plugin's routing by creating a new file in `config/routes/monsieurbiz_sylius_blog_plugin.yaml` with the following content:
44+
45+
```yaml
46+
imports:
47+
resource: '@MonsieurBizSyliusBlogPlugin/Resources/config/config.yaml'
48+
```
49+
50+
Add the plugin's routing by creating a new file in `config/routes/monsieurbiz_sylius_blog_plugin.yaml` with the following content:
51+
52+
```yaml
53+
monsieurbiz_blog_plugin:
54+
resource: '@MonsieurBizSyliusBlogPlugin/Resources/config/routes.yaml'
55+
```
56+
57+
And finally, update your database:
58+
59+
```bash
60+
bin/console doctrine:migrations:migrate
61+
```
62+
863

964
## License
1065

1166
This plugin is under the MIT license.
12-
Please see the [LICENSE](LICENSE) file for more information.
67+
Please see the [LICENSE](LICENSE) file for more information._

composer.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
"description": "",
66
"license": "MIT",
77
"require": {
8-
"php": "^8.2",
9-
"sylius/sylius": "^1.12.0 || ^1.13.0"
8+
"php": "^8.1",
9+
"sylius/sylius": "^1.12.0 || ^1.13.0",
10+
"monsieurbiz/sylius-rich-editor-plugin": "^2.8",
11+
"monsieurbiz/sylius-media-manager-plugin": "^1.1"
1012
},
1113
"require-dev": {
1214
"behat/behat": "^3.6.1",

dist/.env.local

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
SYLIUS_FIXTURES_HOSTNAME=${SYMFONY_DEFAULT_ROUTE_HOST:-localhost}
2+
SYMFONY_IDE=phpstorm
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
imports:
1+
monsieurbiz_blog_plugin:
22
resource: '@MonsieurBizSyliusBlogPlugin/Resources/config/routes.yaml'

docker-compose.yaml.dist

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
version: '3.8'
21
services:
32
database:
43
image: mysql:8.0
@@ -18,4 +17,4 @@ services:
1817
- 1080
1918

2019
volumes:
21-
database: {}
20+
database: {}

src/Controller/.gitignore

Whitespace-only changes.

0 commit comments

Comments
 (0)