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

OP-558: Sylius 2 upgrade #71

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

OP-558: Sylius 2 upgrade #71

wants to merge 10 commits into from

Conversation

jkindly
Copy link

@jkindly jkindly commented Oct 9, 2024

No description provided.

@jkindly jkindly requested a review from senghe October 10, 2024 08:53
Comment on lines 29 to 30
exclude:
- sylius: "~1.13.0"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
exclude:
- sylius: "~1.13.0"

Comment on lines 26 to 27
exclude:
- sylius: ^1.13
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
exclude:
- sylius: ^1.13

remove all excludes

"doctrine/annotations": "^2.0.0"
"php": "^8.2",
"doctrine/annotations": "^2.0.0",
"sylius-labs/polyfill-symfony-security": "^1.1",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"sylius-labs/polyfill-symfony-security": "^1.1",

"doctrine/annotations": "^2.0.0",
"sylius-labs/polyfill-symfony-security": "^1.1",
"sylius/calendar": "^0.5.0",
"sylius/grid-bundle": "^1.13.0-ALPHA.3",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"sylius/grid-bundle": "^1.13.0-ALPHA.3",
"sylius/grid-bundle": "^1.13.0",

@@ -39,16 +39,16 @@
</service>

<service id="sylius.form.type.checkout_address" class="Sylius\Bundle\CoreBundle\Form\Type\Checkout\AddressType">
<argument type="service" id="sylius.address_comparator" />
Copy link
Member

Choose a reason for hiding this comment

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

this service will probably be changed in sylius 2.0.0 to sylius.comparator.address

<tag
name="sylius.live_component"
key="sylius_admin:blacklisting_rule:form"
template="@BitBagSyliusBlacklistPlugin/BlacklistingRule/Admin/form.html.twig"
Copy link
Member

Choose a reason for hiding this comment

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

next alpha will allow setting components templates in hooks rather then in service definitions

@@ -0,0 +1,53 @@
{% form_theme form '@BitBagSyliusBlacklistPlugin/Form/theme.html.twig' %}
Copy link
Member

Choose a reason for hiding this comment

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

I will suggest to change views directory to templates

use Twig\Extension\AbstractExtension;
use Twig\TwigFunction;

final class AutomaticBlacklistingConfigurationLabelsExtension extends AbstractExtension
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
final class AutomaticBlacklistingConfigurationLabelsExtension extends AbstractExtension
final readonly class AutomaticBlacklistingConfigurationLabelsExtension extends AbstractExtension


access_control:
- { path: "%sylius.security.admin_regex%/_partial", role: PUBLIC_ACCESS, ips: [127.0.0.1, ::1] }
- { path: "%sylius.security.admin_regex%/_partial", role: ROLE_NO_ACCESS }
Copy link
Member

Choose a reason for hiding this comment

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

please check latest security configuration in sylius. This access_control is out

"chart.js": "^3.9.1",
"flag-icons": "^7.2.3",
"infinite-tree": "^1.18.0",
"jquery": "^3.6.0",
Copy link
Member

Choose a reason for hiding this comment

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

there is no jquery in sylius anymore :)

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.

I've checked this, but I think @mpysiak review is more relevant than my

>
<services>
<service
id="bitbag_sylius_blacklist_plugin.twig.component.automatic_blacklisting_configuration.form"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
id="bitbag_sylius_blacklist_plugin.twig.component.automatic_blacklisting_configuration.form"
id="bitbag.sylius_blacklist_plugin.twig.component.automatic_blacklisting_configuration.form"

For all services

Comment on lines +50 to +54
<tag
name="sylius.live_component"
key="sylius_admin:fraud_suspicion:form"
template="@BitBagSyliusBlacklistPlugin/FraudSuspicion/Admin/form.html.twig"
/>
Copy link
Member

Choose a reason for hiding this comment

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

I would use a formatting like below:

Suggested change
<tag
name="sylius.live_component"
key="sylius_admin:fraud_suspicion:form"
template="@BitBagSyliusBlacklistPlugin/FraudSuspicion/Admin/form.html.twig"
/>
<tag name="sylius.live_component"
key="sylius_admin:fraud_suspicion:form"
template="@BitBagSyliusBlacklistPlugin/FraudSuspicion/Admin/form.html.twig"
/>

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