Skip to content

Commit 82b01ca

Browse files
authored
Merge branch '3.0' into fix/published_at
2 parents d05d4cf + d54f865 commit 82b01ca

155 files changed

Lines changed: 2361 additions & 1205 deletions

File tree

Some content is hidden

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

.travis.yml

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
11
language: php
22

3-
dist: trusty
3+
dist: bionic
44

55
sudo: false
66

77
matrix:
88
include:
9-
# Sylius 1.7
9+
# Sylius 1.9
1010
-
11-
php: 7.3
11+
php: 7.4
1212
env:
13-
- DEPENDENCY_VERSIONS="sylius/sylius:1.7.*"
13+
- DEPENDENCY_VERSIONS="sylius/sylius:1.9.*"
14+
15+
addons:
16+
chrome: stable
17+
18+
services:
19+
- mysql
1420

1521
cache:
1622
yarn: true
@@ -32,6 +38,7 @@ before_install:
3238

3339
install:
3440
- composer require ${DEPENDENCY_VERSIONS} --no-update
41+
- composer require stefandoorn/sitemap-plugin --no-update
3542
- composer update --no-interaction --prefer-dist
3643
- (cd tests/Application && yarn install)
3744

@@ -41,6 +48,7 @@ before_script:
4148
- (cd tests/Application && bin/console ckeditor:install --clear=drop -vvv)
4249
- (cd tests/Application && bin/console assets:install public -vvv)
4350
- (cd tests/Application && bin/console cache:warmup -vvv)
51+
- (cd tests/Application && bin/console sylius:sitemap:generate -vvv)
4452
- (cd tests/Application && yarn build)
4553

4654
# Configure display
@@ -49,23 +57,23 @@ before_script:
4957

5058
# Download and configure ChromeDriver
5159
- |
52-
if [ ! -f $SYLIUS_CACHE_DIR/chromedriver ] || [ "$($SYLIUS_CACHE_DIR/chromedriver --version | grep -c 2.34)" = "0" ]; then
53-
curl http://chromedriver.storage.googleapis.com/2.34/chromedriver_linux64.zip > chromedriver.zip
60+
export CHROMEDRIVER_STABLE_VERSION=$(curl https://chromedriver.storage.googleapis.com/LATEST_RELEASE)
61+
if [ ! -f $SYLIUS_CACHE_DIR/chromedriver ] || [ "$($SYLIUS_CACHE_DIR/chromedriver --version | grep -c $CHROMEDRIVER_STABLE_VERSION)" = "0" ]; then
62+
curl https://chromedriver.storage.googleapis.com/$CHROMEDRIVER_STABLE_VERSION/chromedriver_linux64.zip > chromedriver.zip
5463
unzip chromedriver.zip
5564
chmod +x chromedriver
5665
mv chromedriver $SYLIUS_CACHE_DIR
66+
rm chromedriver.zip
5767
fi
58-
5968
# Run ChromeDriver
6069
- $SYLIUS_CACHE_DIR/chromedriver > /dev/null 2>&1 &
6170

6271
# Download and configure Selenium
6372
- |
64-
if [ ! -f $SYLIUS_CACHE_DIR/selenium.jar ] || [ "$(java -jar $SYLIUS_CACHE_DIR/selenium.jar --version | grep -c 3.4.0)" = "0" ]; then
65-
curl http://selenium-release.storage.googleapis.com/3.4/selenium-server-standalone-3.4.0.jar > selenium.jar
73+
if [ ! -f $SYLIUS_CACHE_DIR/selenium.jar ] || [ "$(java -jar $SYLIUS_CACHE_DIR/selenium.jar --version | grep -c 3.141.59)" = "0" ]; then
74+
curl https://selenium-release.storage.googleapis.com/3.141/selenium-server-standalone-3.141.59.jar > selenium.jar
6675
mv selenium.jar $SYLIUS_CACHE_DIR
6776
fi
68-
6977
# Run Selenium
7078
- java -Dwebdriver.chrome.driver=$SYLIUS_CACHE_DIR/chromedriver -jar $SYLIUS_CACHE_DIR/selenium.jar > /dev/null 2>&1 &
7179

@@ -79,5 +87,5 @@ script:
7987
- vendor/bin/phpspec run
8088
- vendor/bin/behat --strict -vvv --no-interaction --tags '~@unstable' || vendor/bin/behat --strict -vvv --no-interaction --rerun --tags '~@unstable'
8189

82-
after_failure:
83-
- vendor/lakion/mink-debug-extension/travis/tools/upload-textfiles "${SYLIUS_BUILD_DIR}/*.log"
90+
#after_failure:
91+
# - vendor/lakion/mink-debug-extension/travis/tools/upload-textfiles "${SYLIUS_BUILD_DIR}/*.log"

README.md

Lines changed: 102 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,34 @@
1-
<h1 align="center">
2-
<a href="http://bitbag.shop" target="_blank">
3-
<img src="doc/logo.png" width="55%" />
4-
</a>
5-
<br />
6-
<a href="https://packagist.org/packages/bitbag/cms-plugin" title="License" target="_blank">
7-
<img src="https://img.shields.io/packagist/l/bitbag/cms-plugin.svg" />
8-
</a>
9-
<a href="https://packagist.org/packages/bitbag/cms-plugin" title="Version" target="_blank">
10-
<img src="https://img.shields.io/packagist/v/bitbag/cms-plugin.svg" />
11-
</a>
12-
<a href="http://travis-ci.org/BitBagCommerce/SyliusCmsPlugin" title="Build status" target="_blank">
13-
<img src="https://img.shields.io/travis/BitBagCommerce/SyliusCmsPlugin/master.svg" />
14-
</a>
15-
<a href="https://scrutinizer-ci.com/g/BitBagCommerce/SyliusCmsPlugin/" title="Scrutinizer" target="_blank">
16-
<img src="https://img.shields.io/scrutinizer/g/BitBagCommerce/SyliusCmsPlugin.svg" />
17-
</a>
18-
<a href="https://packagist.org/packages/bitbag/cms-plugin" title="Total Downloads" target="_blank">
19-
<img src="https://poser.pugx.org/bitbag/cms-plugin/downloads" />
20-
</a>
21-
<p>
22-
<img src="https://sylius.com/assets/badge-approved-by-sylius.png" width="85">
23-
</p>
24-
</h1>
25-
26-
## About us
27-
28-
At BitBag we do believe in open source. However, we are able to do it just because of our awesome clients, who are kind enough to share some parts of our work with the community. Therefore, if you feel like there is a possibility for us working together, feel free to reach us out. You will find out more about our professional services, technologies and contact details at https://bitbag.io/.
29-
30-
## BitBag SyliusCmsPlugin
31-
32-
Almost each eCommerce app has to present some content. Managing it is often done via third-party libraries
33-
like Wordpress, eZ Platform or a built-in content management system. As Sylius does not have a CMS in the
34-
standard platform, we decided to develop our own which will be as flexible as Sylius. This plugin allows
35-
you to add dynamic blocks with images, text or HTML to your storefront as well as pages and FAQs section.
36-
37-
## Demo
38-
39-
We created a demo app with some useful use-cases of the plugin! Visit [demo.bitbag.shop](https://demo.bitbag.shop) to take a look at it.
40-
The admin can be accessed under [demo.bitbag.shop/admin](https://demo.bitbag.shop/admin) link and `sylius: sylius` credentials.
1+
# [![](https://bitbag.io/wp-content/uploads/2021/01/CMS.png)](https://bitbag.io/contact-us/?utm_source=github&utm_medium=referral&utm_campaign=plugins_cms)
412

42-
We also recorded a webinar which presents most of the plugin features, including how they have been implemented and specific use-cases.
3+
# BitBag SyliusCMSPlugin
434

44-
<div align="center">
45-
46-
[![Webinar](https://img.youtube.com/vi/Nk8fKA48t_Y/0.jpg)](https://www.youtube.com/watch?v=Nk8fKA48t_Y)
5+
----
476

48-
</div>
7+
[![](https://img.shields.io/packagist/l/bitbag/cms-plugin.svg) ](https://packagist.org/packages/bitbag/cms-plugin "License") [ ![](https://img.shields.io/packagist/v/bitbag/cms-plugin.svg) ](https://packagist.org/packages/bitbag/cms-plugin "Version") [ ![](https://img.shields.io/travis/BitBagCommerce/SyliusCMSPlugin/master.svg) ](http://travis-ci.org/BitBagCommerce/SyliusCMSPlugin "Build status") [ ![](https://img.shields.io/scrutinizer/g/BitBagCommerce/SyliusCMSPlugin.svg) ](https://scrutinizer-ci.com/g/BitBagCommerce/SyliusCMSPlugin/ "Scrutinizer") [![](https://poser.pugx.org/bitbag/cms-plugin/downloads)](https://packagist.org/packages/bitbag/cms-plugin "Total Downloads") [![Slack](https://img.shields.io/badge/community%20chat-slack-FF1493.svg)](http://sylius-devs.slack.com) [![Support](https://img.shields.io/badge/support-contact%20author-blue])](https://bitbag.io/contact-us/?utm_source=github&utm_medium=referral&utm_campaign=plugins_cms)
8+
9+
<p>
10+
<img src="https://sylius.com/assets/badge-approved-by-sylius.png" width="85">
11+
</p>
12+
13+
At BitBag we do believe in open source. However, we are able to do it just because of our awesome clients, who are kind enough to share some parts of our work with the community. Therefore, if you feel like there is a possibility for us working together, feel free to reach us out. You will find out more about our professional services, technologies and contact details at [https://bitbag.io/](https://bitbag.io/contact-us/?utm_source=github&utm_medium=referral&utm_campaign=plugins_cms).
14+
15+
## Table of Content
16+
17+
***
18+
19+
* [Overwiev](#overwiev)
20+
* [Support](#we-are-here-to-help)
21+
* [About us](#about-us)
22+
* [Community](#community)
23+
* [Demo](#demo)
24+
* [License](#license)
25+
* [Contact](#contact)
26+
27+
# Overwiev
28+
29+
***
4930

50-
## Documentation
31+
Almost each eCommerce app has to present some content. Managing it is often done via third-party libraries like Wordpress, eZ Platform or a built-in content management system. As Sylius does not have a CMS in the standard platform, we decided to develop our own which will be as flexible as Sylius. This plugin allows you to add dynamic blocks with images, text or HTML to your storefront as well as pages and FAQs section.
5132

5233
- [Installation](doc/installation.md)
5334
- [Upgrading](UPGRADE.md)
@@ -63,6 +44,79 @@ We also recorded a webinar which presents most of the plugin features, including
6344
- [Sitemap](doc/sitemap.md)
6445
- [Customization](doc/customization.md)
6546

66-
## Contribution
47+
## We are here to help
48+
This **open-source plugin was developed to help the Sylius community**. If you have any additional questions, would like help with installing or configuring the plugin or need any assistance with your Sylius project - let us know!
49+
50+
[![](https://bitbag.io/wp-content/uploads/2020/10/button-contact.png)](https://bitbag.io/contact-us/?utm_source=github&utm_medium=referral&utm_campaign=plugins_cms)
51+
52+
Read more about [Sylius CMS](https://bitbag.io/sylius-cms-all-you-need-to-know-3-implementation-methods/?utm_source=github&utm_medium=referral&utm_campaign=plugins_cms)
53+
# About us
54+
55+
---
56+
57+
BitBag is an agency that provides high-quality **eCommerce and Digital Experience software**. Our main area of expertise includes eCommerce consulting and development for B2C, B2B, and Multi-vendor Marketplaces.
58+
The scope of our services related to Sylius includes:
59+
- **Consulting** in the field of strategy development
60+
- Personalized **headless software development**
61+
- **System maintenance and long-term support**
62+
- **Outsourcing**
63+
- **Plugin development**
64+
- **Data migration**
65+
66+
Some numbers regarding Sylius:
67+
* **20+ experts** including consultants, UI/UX designers, Sylius trained front-end and back-end developers,
68+
* **100+ projects** delivered on top of Sylius,
69+
* Clients from **20+ countries**
70+
* **3+ years** in the Sylius ecosystem.
71+
72+
---
73+
74+
If you need some help with Sylius development, don't be hesitate to contact us directly. You can fill the form on [this site](https://bitbag.io/contact-us/?utm_source=github&utm_medium=referral&utm_campaign=plugins_cms) or send us an e-mail to hello@bitbag.io!
75+
76+
---
77+
78+
[![](https://bitbag.io/wp-content/uploads/2020/10/badges-sylius.png)](https://bitbag.io/contact-us/?utm_source=github&utm_medium=referral&utm_campaign=plugins_cms)
79+
80+
## Community
81+
82+
----
83+
84+
For online communication, we invite you to chat with us & other users on [Sylius Slack](https://sylius-devs.slack.com/).
85+
86+
# Demo
87+
88+
---
89+
90+
We created a demo app with some useful use-cases of the plugin! Visit [demo.bitbag.shop](https://demo.bitbag.shop) to take a look at it.
91+
The admin can be accessed under [demo.bitbag.shop/admin](https://demo.bitbag.shop/admin) link and `sylius: sylius` credentials.
92+
93+
We also recorded a webinar which presents most of the plugin features, including how they have been implemented and specific use-cases.
94+
95+
<div align="center">
96+
97+
[![Webinar](https://img.youtube.com/vi/Nk8fKA48t_Y/0.jpg)](https://www.youtube.com/watch?v=Nk8fKA48t_Y)
98+
99+
</div>
100+
101+
102+
103+
**If you need an overview of this plugin, schedule a consultation with our expert.**
104+
105+
[![](https://bitbag.io/wp-content/uploads/2020/10/button_free_consulatation-1.png)](https://bitbag.io/contact-us/?utm_source=github&utm_medium=referral&utm_campaign=plugins_cms)
106+
107+
108+
109+
## License
110+
111+
---
112+
113+
This plugin's source code is completely free and released under the terms of the MIT license.
114+
115+
[//]: # (These are reference links used in the body of this note and get stripped out when the markdown processor does its job. There is no need to format nicely because it shouldn't be seen.)
116+
117+
## Contact
118+
119+
---
120+
If you want to contact us, the best way is to fill the form on [our website](https://bitbag.io/contact-us/?utm_source=github&utm_medium=referral&utm_campaign=plugins_cms) or send us an e-mail to hello@bitbag.io with your question(s). We guarantee that we answer as soon as we can!
67121

68-
Learn more about our contribution workflow on http://docs.sylius.org/en/latest/contributing/.
122+
[![](https://bitbag.io/wp-content/uploads/2020/10/footer.png)](https://bitbag.io/contact-us/?utm_source=github&utm_medium=referral&utm_campaign=plugins_cms)

UPGRADE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# UPGRADE FROM 2.4 TO 3.0
2+
3+
* The `stefandoorn/sitemap-plugin` dependency has been removed, and moved to the `suggest` section of composer.json.
4+
If you didn't require this plugin by yourselves, but want to keep the sitemap support, consider requiring it directly in your project as described [here](doc/sitemap.md).
5+
6+
* Width and height has been added to image media. Now width and height html tags are generated in shop image.
7+
Read the below changelog first and then migrate your structure using
8+
`bin/console doctrine:migrations:diff && bin/console doctrine:migrations:migrate` commands
9+
110
# UPGRADE FROM 1.0 TO 2.0
211

312
* A lot of database modifications has been made. Read the below changelog first and then migrate your

composer.json

Lines changed: 33 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,36 +12,40 @@
1212
"php": "^7.3",
1313
"league/csv": "^9.1",
1414
"friendsofsymfony/ckeditor-bundle": "^1.1|^2.0",
15-
"stefandoorn/sitemap-plugin": "^1.0",
16-
"sylius/sylius": "^1.7"
15+
"sylius/sylius": "^1.9"
1716
},
1817
"require-dev": {
19-
"behat/behat": "^3.6",
20-
"behat/mink": "^1.7",
21-
"behat/mink-browserkit-driver": "^1.3",
22-
"behat/mink-extension": "^2.2",
23-
"behat/mink-selenium2-driver": "^1.3",
18+
"behat/behat": "^3.7",
19+
"behat/mink": "^1.8",
20+
"behat/mink-selenium2-driver": "^1.4",
21+
"friends-of-behat/mink-browserkit-driver": "^1.4",
22+
"friends-of-behat/mink-debug-extension": "^2.0",
23+
"friends-of-behat/mink-extension": "^2.4",
2424
"friends-of-behat/page-object-extension": "^0.3",
2525
"friends-of-behat/suite-settings-extension": "^1.0",
26-
"friends-of-behat/symfony-extension": "^2.0",
27-
"friends-of-behat/variadic-extension": "^1.1",
28-
"lakion/mink-debug-extension": "^1.2.3",
29-
"lchrusciel/api-test-case": "^3.0",
30-
"matthiasnoback/symfony-config-test": "^3.0",
31-
"phpspec/phpspec": "^6.0",
32-
"phpstan/phpstan-doctrine": "^0.10",
33-
"phpstan/phpstan-shim": "^0.10",
34-
"phpstan/phpstan-symfony": "^0.10",
35-
"phpstan/phpstan-webmozart-assert": "^0.10",
36-
"phpunit/phpunit": "^6.5",
37-
"sensiolabs/security-checker": "^5.0",
38-
"sylius-labs/coding-standard": "^3.0",
39-
"symfony/browser-kit": "^4.4",
40-
"symfony/debug-bundle": "^4.4",
41-
"symfony/dotenv": "^4.4",
42-
"symfony/intl": "^4.4",
43-
"symfony/web-profiler-bundle": "^4.4",
44-
"symfony/web-server-bundle": "^4.4"
26+
"friends-of-behat/symfony-extension": "^2.1",
27+
"friends-of-behat/variadic-extension": "^1.3",
28+
"friendsofsymfony/oauth-server-bundle": ">2.0.0-alpha.0 ^2.0@dev",
29+
"lchrusciel/api-test-case": "^4.1||^5.0",
30+
"matthiasnoback/symfony-config-test": "^4.0",
31+
"phpspec/phpspec": "^7.0",
32+
"phpstan/phpstan": "^0.12",
33+
"phpstan/phpstan-doctrine": "^0.12.32",
34+
"phpstan/phpstan-symfony": "^0.12.21",
35+
"phpstan/phpstan-webmozart-assert": "^0.12.12",
36+
"phpunit/phpunit": "^8.0||^9.0",
37+
"sylius-labs/coding-standard": "^3.2",
38+
"symfony/browser-kit": "^4.4||^5.2",
39+
"symfony/debug-bundle": "^4.4||^5.2",
40+
"symfony/dotenv": "^4.4||^5.2",
41+
"symfony/intl": "^4.4||^5.2",
42+
"symfony/web-profiler-bundle": "^4.4||^5.2"
43+
},
44+
"suggest": {
45+
"stefandoorn/sitemap-plugin": "^2.0@alpha"
46+
},
47+
"suggest": {
48+
"stefandoorn/sitemap-plugin": "Adds CMS pages & sections support to the Sylius sitemap plugin"
4549
},
4650
"conflict": {
4751
"symfony/symfony": "4.1.8",
@@ -58,6 +62,9 @@
5862
}
5963
},
6064
"autoload-dev": {
65+
"psr-4": {
66+
"spec\\BitBag\\SyliusCmsPlugin\\": "spec/"
67+
},
6168
"classmap": ["tests/Application/Kernel.php"]
6269
}
6370
}

doc/installation.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ return [
99
...
1010

1111
FOS\CKEditorBundle\FOSCKEditorBundle::class => ['all' => true], // WYSIWYG editor
12-
SitemapPlugin\SitemapPlugin::class => ['all' => true], // Sitemap support
1312
BitBag\SyliusCmsPlugin\BitBagSyliusCmsPlugin::class => ['all' => true],
1413
];
1514
```
@@ -53,8 +52,8 @@ Import routing in your `config/routes.yaml` file:
5352
bitbag_sylius_cms_plugin:
5453
resource: "@BitBagSyliusCmsPlugin/Resources/config/routing.yml"
5554
```
56-
57-
Import optional sitemap providers:
55+
If You have installed https://github.com/stefandoorn/sitemap-plugin according to its installation instructions
56+
import optional sitemap providers:
5857
```yaml
5958
# config/services.yaml
6059
...
@@ -63,6 +62,14 @@ imports:
6362
- { resource: "@BitBagSyliusCmsPlugin/Resources/config/services/sitemap_provider.yml" }
6463
```
6564

65+
and plugin dependency to your `config/bundles.php` file:
66+
```php
67+
return [
68+
...
69+
70+
SitemapPlugin\SitemapPlugin::class => ['all' => true], // Sitemap support
71+
];
72+
```
6673

6774
Finish the installation by updating the database schema and installing assets:
6875
```

doc/sitemap.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Sitemap
22

3-
This plugin uses Sylius sitemap plugin. It's already configured with the default installation
4-
and contains a page & section provider.
3+
This plugin suggests to install the Sylius sitemap plugin. The plugin is not installed automatically, but to install run:
4+
5+
```bash
6+
$ composer require stefandoorn/sitemap-plugin ^2.0@alpha
7+
```
8+
9+
It's already configured after installation and contains a page & section provider.
510

611
For more information, read the original [SitemapPlugin documentation](https://github.com/stefandoorn/sitemap-plugin).

features/admin/adding_page.feature

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,15 @@ Feature: Adding new page
3232

3333
@ui @javascript
3434
Scenario: Adding page with page image
35+
And there is an existing "image" media with "aston-martin" code
3536
When I go to the create page page
3637
And I fill the code with "aston_martin_is_amazing_car"
3738
And I fill the slug with "aston_martin_is_amazing_car"
3839
And I fill the name with "Aston Martin is amazing car"
3940
And I fill the meta keywords with "Aston Martin is amazing car"
4041
And I fill the meta description with "Aston Martin is amazing car for this summer."
4142
And I fill the content with "Aston Martin is amazing car for this summer. Buy it."
42-
And I upload the "aston_martin_db_11.jpg" image
43+
And I choose "aston-martin" media as image
4344
And I add it
4445
Then I should be notified that the page has been created
4546

0 commit comments

Comments
 (0)