Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sylius 2.0 upgrade #57

Open
wants to merge 29 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
27a8a20
OP-550 - Add support for Sylius 2.0
JanPalen Oct 7, 2024
82447ec
OP-550 - Refactor webpack and twigs for Sylius 2.0
JanPalen Oct 7, 2024
9f35200
OP-550 - Upgrade api platform resources for 3.4 version
JanPalen Oct 7, 2024
814841e
OP-550 - Remove deprecated implementations
JanPalen Oct 7, 2024
87c52cd
OP-550 - Admin panel forms fixes
JanPalen Oct 8, 2024
fb65999
OP-550 - Admin panel tabs create
JanPalen Oct 16, 2024
982ffdc
OP-550 - Composer.json update to Sylius 2.0 stable
tomkalon Nov 27, 2024
3364510
OP-550 - Updating config and services
tomkalon Nov 27, 2024
451ab41
OP-550 - Node.js
tomkalon Nov 27, 2024
95d1abd
OP-550 - Sylius twig hook and apiPlatform
tomkalon Nov 27, 2024
a76fdde
OP-550 - Fix admin products list
JanPalen Dec 9, 2024
71652e7
OP-550 - Order in admin panel update
JanPalen Dec 16, 2024
78ee11c
OP-550 - Remove 'plus' icon from create product button
JanPalen Dec 16, 2024
76edd32
OP-550 - gitignore update
JanPalen Dec 16, 2024
8e9decc
OP-550 - Add isPacked checkbox
JanPalen Dec 16, 2024
702918a
OP-550 - Change twig paths
JanPalen Dec 16, 2024
a8daee4
OP-550 - Fix displaying products in shop page
JanPalen Dec 17, 2024
b215236
OP-550 - Fix behats
JanPalen Dec 17, 2024
7d49ce5
OP-550 - Fix api platform
JanPalen Jan 3, 2025
406ec05
OP-550 - Fix unit tests
JanPalen Jan 3, 2025
a1e5737
OP-550 - Fix phpstan
JanPalen Jan 3, 2025
182f4ae
OP-550 - Fix code standards
JanPalen Jan 3, 2025
870e38d
OP-550 - Upgrade composer json
JanPalen Jan 7, 2025
518063f
OP-550 - Fixes for installation
JanPalen Jan 7, 2025
5fa7947
OP-550 - Update readme
JanPalen Jan 8, 2025
ec9419e
OP-550 - Fix api platform configuration
JanPalen Jan 8, 2025
aa51620
OP-550 - Fix builds
JanPalen Jan 8, 2025
66d1b38
OP-550 - Remove php 8.4 and symfony 6.4 support
JanPalen Jan 9, 2025
c9634fc
OP-550 - Change structures of the directories to current Symfony reco…
JanPalen Jan 10, 2025
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
27 changes: 11 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,12 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ "8.0", "8.1", "8.2", "8.3" ]
symfony: [ "^5.4", "^6.4" ]
sylius: [ "^1.12", "^1.13" ]
node: [ "18.x", "20.x" ]
php: [ "8.2", "8.3" ]
symfony: [ "^7.1" ]
sylius: [ "^2.0" ]
node: [ "20.x" ]
mysql: [ "8.0" ]

exclude:
- sylius: ^1.13
php: 8.0
- sylius: ^1.12
php: 8.0
symfony: ^6.4

env:
APP_ENV: test
DATABASE_URL: "mysql://root:[email protected]/sylius?serverVersion=${{ matrix.mysql }}"
Expand Down Expand Up @@ -82,7 +75,7 @@ jobs:

-
name: Run webserver
run: (cd tests/Application && symfony server:start --port=8080 --dir=public --daemon)
run: (cd tests/Application && symfony server:start --port=8080 --dir=public --daemon && symfony -V)

-
name: Get Composer cache directory
Expand Down Expand Up @@ -115,9 +108,6 @@ jobs:
env:
SYMFONY_REQUIRE: ${{ matrix.symfony }}

- name: Install Behat driver
run: vendor/bin/bdi browser:google-chrome drivers

-
name: Get Yarn cache directory
id: yarn-cache
Expand Down Expand Up @@ -169,18 +159,23 @@ jobs:
name: Run PHPUnit
run: vendor/bin/phpunit --colors=always

-
name: Create behat logs directory
run: (mkdir -p etc/build && chmod a+rw etc/build )

-
name: Run Behat
run: vendor/bin/behat --colors --strict -vvv --no-interaction || vendor/bin/behat --colors --strict -vvv --no-interaction --rerun

-
name: Upload Behat logs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: failure()
with:
name: Behat logs
path: etc/build/
if-no-files-found: ignore
overwrite: true

-
name: Failed build Slack notification
Expand Down
15 changes: 4 additions & 11 deletions .github/workflows/coding_standard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,10 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ "8.0", "8.1", "8.2", "8.3" ]
symfony: [ "^5.4", "^6.4" ]
sylius: [ "^1.12", "^1.13" ]
node: [ "18.x", "20.x" ]

exclude:
- sylius: ^1.13
php: 8.0
- sylius: ^1.12
php: 8.0
symfony: ^6.4
php: [ "8.2", "8.3" ]
symfony: [ "^7.1" ]
sylius: [ "^2.0" ]
node: [ "20.x" ]

steps:
- uses: actions/checkout@v3
Expand Down
107 changes: 52 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@

----

[ ![](https://img.shields.io/packagist/l/bitbag/product-bundle-plugin.svg) ](https://packagist.org/packages/bitbag/product-bundle-plugin "License")
[ ![](https://img.shields.io/packagist/v/bitbag/product-bundle-plugin.svg) ](https://packagist.org/packages/bitbag/product-bundle-plugin "Version")
[ ![](https://img.shields.io/github/actions/workflow/status/BitBagCommerce/SyliusProductBundlePlugin/build.yml?branch=master) ](https://github.com/BitBagCommerce/SyliusProductBundlePlugin/actions "Build status")
[ ![](https://poser.pugx.org/bitbag/product-bundle-plugin/downloads)](https://packagist.org/packages/bitbag/product-bundle-plugin "Total Downloads")
[ ![Slack](https://img.shields.io/badge/community%20chat-slack-FF1493.svg)](http://sylius-devs.slack.com)
[ ![](https://img.shields.io/packagist/l/bitbag/product-bundle-plugin.svg) ](https://packagist.org/packages/bitbag/product-bundle-plugin "License")
[ ![](https://img.shields.io/packagist/v/bitbag/product-bundle-plugin.svg) ](https://packagist.org/packages/bitbag/product-bundle-plugin "Version")
[ ![](https://img.shields.io/github/actions/workflow/status/BitBagCommerce/SyliusProductBundlePlugin/build.yml?branch=master) ](https://github.com/BitBagCommerce/SyliusProductBundlePlugin/actions "Build status")
[ ![](https://poser.pugx.org/bitbag/product-bundle-plugin/downloads)](https://packagist.org/packages/bitbag/product-bundle-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_productbundle)

We want to impact many unique eCommerce projects and build our brand recognition worldwide, so we are heavily involved in creating open-source solutions, especially for Sylius. We have already created over **35 extensions, which have been downloaded almost 2 million times.**

You can find more information about our eCommerce services and technologies on our website: https://bitbag.io/. We have also created a unique service dedicated to creating plugins: https://bitbag.io/services/sylius-plugin-development.
You can find more information about our eCommerce services and technologies on our website: https://bitbag.io/. We have also created a unique service dedicated to creating plugins: https://bitbag.io/services/sylius-plugin-development.

Do you like our work? Would you like to join us? Check out the **“Career” tab:** https://bitbag.io/pl/kariera.
Do you like our work? Would you like to join us? Check out the **“Career” tab:** https://bitbag.io/pl/kariera.

# About Us
# About Us
---

BitBag is a software house that implements tailor-made eCommerce platforms with the entire infrastructure—from creating eCommerce platforms to implementing PIM and CMS systems to developing custom eCommerce applications, specialist B2B solutions, and migrations from other platforms.
Expand All @@ -36,14 +36,14 @@ We have a 70-person team of experts: business analysts and consultants, eCommerc
* PIM and CMS implementations

**Some numbers from BitBag regarding Sylius:**
* 70 experts on board
* 70 experts on board
* +150 projects delivered on top of Sylius
* 30 countries of BitBag’s customers
* 7 years in the Sylius ecosystem
* +35 plugins created for Sylius

---
[![](https://bitbag.io/wp-content/uploads/2024/09/badges-sylius.png)](https://bitbag.io/contact-us/?utm_source=github&utm_medium=referral&utm_campaign=plugins_productbandle)
[![](https://bitbag.io/wp-content/uploads/2024/09/badges-sylius.png)](https://bitbag.io/contact-us/?utm_source=github&utm_medium=referral&utm_campaign=plugins_productbandle)

---

Expand Down Expand Up @@ -128,7 +128,7 @@ The **SyliusProductBundle** plugin allows you to create bundles from existing pr
```

Mapping (Attributes) - Override bundle trait, by create new one and use it in Entity/Product/Product .

**Note.** If you're using Attributes Mapping, please use your `ProductTrait` in your `Product` entity instead of plugins `ProductBundlesAwareTrait`.

```php
Expand Down Expand Up @@ -200,7 +200,7 @@ The **SyliusProductBundle** plugin allows you to create bundles from existing pr
}
```
Mapping (Attributes) - Override bundle trait, by create new one and use it in Entity/Order/OrderItem .

**Note.** If you're using Attributes Mapping, please use your `OrderItemTrait` in your `OrderItem` entity instead of plugins`ProductBundleOrderItemsAwareTrait`.

```php
Expand Down Expand Up @@ -273,32 +273,29 @@ The **SyliusProductBundle** plugin allows you to create bundles from existing pr
# config/packages/_sylius.yaml

sylius_grid:
grids:
sylius_admin_product:
actions:
main:
create:
type: links
label: sylius.ui.create
options:
class: primary
icon: plus
header:
icon: cube
label: sylius.ui.type
links:
simple:
label: sylius.ui.simple_product
icon: plus
route: sylius_admin_product_create_simple
configurable:
label: sylius.ui.configurable_product
icon: plus
route: sylius_admin_product_create
bundle:
label: bitbag_sylius_product_bundle.ui.bundle
icon: plus
route: bitbag_product_bundle_admin_product_create_bundle
grids:
sylius_admin_product:
actions:
main:
create:
type: links
label: sylius.ui.create
options:
class: primary
icon: "tabler:plus"
header:
icon: cube
label: sylius.ui.type
links:
simple:
label: sylius.ui.simple_product
route: sylius_admin_product_create_simple
configurable:
label: sylius.ui.configurable_product
route: sylius_admin_product_create
bundle:
label: bitbag_sylius_product_bundle.ui.bundle
route: bitbag_product_bundle_admin_product_create_bundle

```
11. If you have full configuration in xml override doctrine config :
Expand All @@ -316,44 +313,44 @@ The **SyliusProductBundle** plugin allows you to create bundles from existing pr


```

12. Copy plugin templates into your project `templates/bundles` directory:

```bash
$ cp -R vendor/bitbag/product-bundle-plugin/tests/Application/templates/bundles/* templates/bundles/
cp -R vendor/bitbag/product-bundle-plugin/tests/Application/templates/bundles/* templates/bundles/
```

13. Please clear application cache by running command below:

```bash
$ bin/console cache:clear
bin/console cache:clear
```

14. Finish the installation by updating the database schema and installing assets:

```bash
$ bin/console doctrine:migrations:diff
$ bin/console doctrine:migrations:migrate
bin/console doctrine:migrations:diff
bin/console doctrine:migrations:migrate
```
15. Add plugin assets to your project:
[Import webpack config](./README_webpack-config.md)*
[Import webpack config](./README_webpack-config.md)*

# Testing
----

```bash
$ composer install
$ cd tests/Application
$ yarn install
$ yarn build
$ bin/console assets:install public -e test
$ bin/console doctrine:schema:create -e test
$ bin/console server:run 127.0.0.1:8080 -d public -e test
$ open http://localhost:8080
$ vendor/bin/behat
composer install
cd tests/Application
yarn install
yarn build
bin/console assets:install public -e test
bin/console doctrine:schema:create -e test
bin/console server:run 127.0.0.1:8080 -d public -e test
open http://localhost:8080
vendor/bin/behat
```

# Functionalities
# Functionalities

All main functionalities of the plugin are described **[here.](https://github.com/BitBagCommerce/SyliusProductBundlePlugin/blob/master/doc/functionalities.md)**

Expand Down
28 changes: 0 additions & 28 deletions UPGRADE-1.3.md

This file was deleted.

86 changes: 0 additions & 86 deletions UPGRADE-1.4.md

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Loading