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

Merged

Conversation

JanPalen
Copy link
Contributor

@JanPalen JanPalen commented Oct 7, 2024

Upgrade plugin to Sylius 2.0.

  • Change dependencies
  • Fix tests/Application for new Sylius version
  • Fix for Symfony 7

@JanPalen JanPalen force-pushed the feature/OP-550-sylius-2.0-upgrade branch from 4ec348a to 87c52cd Compare October 9, 2024 12:14
@tomkalon tomkalon force-pushed the feature/OP-550-sylius-2.0-upgrade branch from 704095d to 95d1abd Compare November 27, 2024 11:35
@JanPalen JanPalen force-pushed the feature/OP-550-sylius-2.0-upgrade branch from f3baf2c to de59090 Compare December 17, 2024 14:14
@JanPalen JanPalen force-pushed the feature/OP-550-sylius-2.0-upgrade branch from de59090 to cbf730f Compare January 3, 2025 14:06
@JanPalen JanPalen force-pushed the feature/OP-550-sylius-2.0-upgrade branch from cbf730f to 182f4ae Compare January 7, 2025 07:35
@JanPalen JanPalen force-pushed the feature/OP-550-sylius-2.0-upgrade branch 16 times, most recently from 795cd6f to 6a7f0e4 Compare January 10, 2025 07:30
@JanPalen JanPalen force-pushed the feature/OP-550-sylius-2.0-upgrade branch 4 times, most recently from 6713b09 to b9b368c Compare January 10, 2025 12:59
@JanPalen JanPalen force-pushed the feature/OP-550-sylius-2.0-upgrade branch from b9b368c to c9634fc Compare January 10, 2025 13:22
@@ -17,5 +16,10 @@ parameters:

ignoreErrors:
- '/Parameter #1 \$configuration of method Symfony\\Component\\DependencyInjection\\Extension\\Extension::processConfiguration\(\) expects Symfony\\Component\\Config\\Definition\\ConfigurationInterface, Symfony\\Component\\Config\\Definition\\ConfigurationInterface\|null given\./'
- '#missingType.iterableValue#'
- '#missingType.generics#'
- '/Parameter #1 \$productRepository of method BitBag\\SyliusProductBundlePlugin\\Component\\Product\\AddToCartFormComponent::initializeProduct\(\) expects Sylius\\Component\\Core\\Repository\\ProductRepositoryInterface<Sylius\\Component\\Core\\Model\\ProductInterface>, Sylius\\Component\\Core\\Repository\\ProductRepositoryInterface<BitBag\\SyliusProductBundlePlugin\\Entity\\ProductInterface> given\./'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need so many errors ignored? Can't we handle them?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I handled some of them.

#[AsLiveComponent]
final class AddToCartFormComponent extends BaseAddToCartFormComponent
{
//TODO there should be decoration instead of extension ? To discuss
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this todo be handled?

Copy link
Contributor Author

@JanPalen JanPalen Jan 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From my point of view extension is the correct way. Maybe you have different opinion?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not have any preference, just wanted to highlight the comment

use Webmozart\Assert\Assert;

#[AsMessageHandler]
final class AddProductBundleToCartHandler
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not get, why this is written from scratch. Was this feature missing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is some bug in git for me. That file existed from 2019 and I just edited that.

"hydra:member": [
{
"@id": "\/api\/v2\/admin\/product-bundles\/@integer@",
"@id": "\/api\/v2/admin\/product-bundles\/@integer@",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why only one backslash has been removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missclick

"inStock": true
},
"productName": "Whiskey Double Pack",
"variant": "/api/v2/shop/product-variants/@string@",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the "productBundleItems" is "hidden" here, am I right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes you are right.

@@ -1 +1 @@
import 'sylius/bundle/AdminBundle/Resources/private/entry';
import 'sylius/bundle/AdminBundle/Resources/assets/entrypoint';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this any standard?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thats how sylius 2.0 need to do that

Copy link
Member

@senghe senghe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JanPalen please remove the TODO comment, and we can go with testing on branch

@JanPalen JanPalen force-pushed the feature/OP-550-sylius-2.0-upgrade branch from 01b603b to ed031a3 Compare January 16, 2025 11:05
@senghe senghe merged commit e266da7 into BitBagCommerce:master Jan 19, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants