[Behat] Convert API suite config from YAML to PHP#18868
Conversation
📝 WalkthroughWalkthroughMigrates Behat API suite configurations from YAML to PHP: replaces the API import in Changes
Sequence Diagram(s)(omitted) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
❌ Preview Environment deleted from BunnyshellAvailable commands:
|
There was a problem hiding this comment.
Actionable comments posted: 14
🧹 Nitpick comments (1)
src/Sylius/Behat/Resources/config/suites/api/user/managing_customer_groups.php (1)
21-23: Add trailing comma in the multi-line argument list (Line 21-23).💡 Suggested fix
- ->withSuite((new Suite('api_managing_customer_groups', [ - 'javascript' => false, - ])) + ->withSuite((new Suite('api_managing_customer_groups', [ + 'javascript' => false, + ],))As per coding guidelines, use trailing commas in multi-line PHP arrays and argument lists.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/Sylius/Behat/Resources/config/suites/api/user/managing_customer_groups.php` around lines 21 - 23, The multi-line argument passed to withSuite is missing a trailing comma; update the call that constructs the Suite (the expression using new Suite('api_managing_customer_groups', ['javascript' => false])) so the argument list for withSuite ends with a trailing comma (i.e., add a comma after the closing parenthesis of the Suite expression) to comply with the multi-line argument/array trailing-comma guideline and keep the change localized to the withSuite(...) / new Suite(...) call.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/Sylius/Behat/Resources/config/suites/api/admin/dashboard.php`:
- Around line 27-49: Remove the duplicate context registration and merge all
transform contexts into one contiguous block: eliminate the second
'sylius.behat.context.transform.shared_storage' entry and move the transform
entries 'sylius.behat.context.transform.channel',
'sylius.behat.context.transform.customer',
'sylius.behat.context.transform.lexical',
'sylius.behat.context.transform.order', 'sylius.behat.context.transform.product'
so they sit immediately with the other transform entries
('sylius.behat.context.transform.admin', 'sylius.behat.context.transform.user',
etc.), leaving the setup contexts (e.g. 'sylius.behat.context.setup.*') in their
own group; ensure no duplicate service IDs remain (particularly
'sylius.behat.context.transform.shared_storage') to avoid Behat Redundant
exceptions.
In `@src/Sylius/Behat/Resources/config/suites/api/checkout/checkout.php`:
- Around line 48-71: The contexts list contains duplicates: remove the
early/misplaced CatalogPromotionContext::class entry from the transform contexts
block and keep only the CatalogPromotionContext::class under the setup contexts
group, and delete the consecutive duplicate
'sylius.behat.context.setup.geographical' entry so it appears only once; ensure
you only register CatalogPromotionContext in the Sylius\Behat\Context\Setup
group (use the existing CatalogPromotionContext::class near the end) and remove
the other two redundant lines.
In
`@src/Sylius/Behat/Resources/config/suites/api/currency/managing_currencies.php`:
- Around line 24-34: The suite is missing two required Behat contexts used by
other managing suites; add 'sylius.behat.context.api.admin.response' and
'sylius.behat.context.api.admin.save' to the ->withContexts(...) list
immediately after 'sylius.behat.context.api.admin.managing_currencies' so that
response assertions and save steps are available for the managing_currencies
suite.
In
`@src/Sylius/Behat/Resources/config/suites/api/product/managing_product_reviews.php`:
- Around line 21-23: The multi-line Suite constructor call using
Suite('api_managing_product_reviews', [ 'javascript' => false, ]) is missing a
trailing comma in the array/argument list; update the Suite invocation (the
Suite class/constructor call and its array literal) to include a trailing comma
after the last array element so the multi-line argument list conforms to the
repo PHP formatting rules.
In
`@src/Sylius/Behat/Resources/config/suites/api/product/managing_product_variants.php`:
- Around line 28-47: The contexts list contains duplicated entries for
'sylius.behat.context.transform.channel' and
'sylius.behat.context.setup.locale'; remove the duplicate occurrences so each
context key appears only once (delete the second
'sylius.behat.context.transform.channel' and the second
'sylius.behat.context.setup.locale' from the array) to avoid double-registration
of hooks and step definitions.
In
`@src/Sylius/Behat/Resources/config/suites/api/product/viewing_price_history_after_catalog_promotions.php`:
- Around line 25-38: The CatalogPromotionContext class is registered twice in
the withContexts(...) call which causes duplicate Behat step/hook registrations;
remove the extra occurrence so CatalogPromotionContext::class appears only once
in the withContexts list (locate the withContexts invocation that includes
CatalogPromotionContext::class and delete the duplicate entry).
In
`@src/Sylius/Behat/Resources/config/suites/api/product/viewing_product_in_admin_panel.php`:
- Around line 43-56: The file registers CatalogPromotionContext::class twice;
remove the stray occurrence inside the transform/context block (the earlier
CatalogPromotionContext::class entry) so the context is only declared once among
the setup contexts (the later CatalogPromotionContext::class). Edit the list of
contexts to delete the duplicate CatalogPromotionContext::class entry that sits
with the transform service IDs, leaving the single correct registration that
references src/Sylius/Behat/Context/Setup/CatalogPromotionContext.php.
In `@src/Sylius/Behat/Resources/config/suites/api/product/viewing_products.php`:
- Around line 37-51: The suite configuration lists
CatalogPromotionContext::class twice causing Behat to register duplicate step
definitions; remove the duplicate entry so CatalogPromotionContext::class
appears only once in the contexts array (leave the single instance near the
other context registrations such as PriceHistoryContext::class and the various
'sylius.behat.context.setup.*' entries) to prevent Redundant exceptions.
In
`@src/Sylius/Behat/Resources/config/suites/api/promotion/applying_catalog_promotions.php`:
- Line 34: The CatalogPromotionContext::class is registered twice (once
mistakenly between the transform and setup groups and again correctly inside the
setup group), causing duplicate instantiation and ambiguous step errors; remove
the misplaced registration (the occurrence outside the setup group) so
CatalogPromotionContext::class is declared only once (keep the registration
inside the setup group), and scan the file for any other duplicate
CatalogPromotionContext::class entries to ensure a single registration.
In
`@src/Sylius/Behat/Resources/config/suites/api/promotion/managing_catalog_promotions.php`:
- Around line 36-43: The suite registers CatalogPromotionContext::class twice
causing Behat to throw a Redundant exception; remove the misplaced duplicate
registration so CatalogPromotionContext::class appears only once in the list
(keep the intended registration
'sylius.behat.context.api.admin.managing_catalog_promotions' and remove the
earlier CatalogPromotionContext::class entry) to prevent double instantiation
and duplicated step definitions.
In
`@src/Sylius/Behat/Resources/config/suites/api/promotion/receiving_discount.php`:
- Around line 20-61: The call chains for Config->withProfile and
Profile->withSuite (specifically the withProfile((new Profile('default')) and
withSuite((new Suite('api_receiving_discount', [ ... ]) ) calls) use multi-line
argument lists but lack trailing commas; update those call sites (including the
Suite constructor arguments and the withSuite and withProfile argument lists) to
include trailing commas after the final argument on each multi-line list to
follow the PHP style rules.
In
`@src/Sylius/Behat/Resources/config/suites/api/promotion/removing_catalog_promotions.php`:
- Around line 35-42: The Transform context entry is wrong: replace the first
CatalogPromotionContext reference with Transform\CatalogPromotionContext and add
an import for Transform\CatalogPromotionContext (so both
Transform\CatalogPromotionContext and Setup\CatalogPromotionContext are
available); ensure the existing Setup\CatalogPromotionContext registration (the
later CatalogPromotionContext entry) remains as-is and only the
transform-section entry is changed to the Transform variant.
In
`@src/Sylius/Behat/Resources/config/suites/api/shipping/managing_shipping_methods.php`:
- Around line 41-42: Remove the duplicate Behat context registration: there are
two identical entries of 'sylius.behat.context.setup.shipping' in the suite
configuration; keep a single occurrence of the
'sylius.behat.context.setup.shipping' entry so the context is only instantiated
once (remove the extra duplicate line to avoid ambiguous step matches and
doubled hooks).
- Line 44: The entry 'sylius.behat.context.transform.customer' is misplaced
outside the transform group; move this service identifier into the existing
transform group alongside the other 'sylius.behat.context.transform.*' entries
so all transform contexts are grouped together (remove it from its current
location after the setup block and add it with the other transform contexts).
---
Nitpick comments:
In
`@src/Sylius/Behat/Resources/config/suites/api/user/managing_customer_groups.php`:
- Around line 21-23: The multi-line argument passed to withSuite is missing a
trailing comma; update the call that constructs the Suite (the expression using
new Suite('api_managing_customer_groups', ['javascript' => false])) so the
argument list for withSuite ends with a trailing comma (i.e., add a comma after
the closing parenthesis of the Suite expression) to comply with the multi-line
argument/array trailing-comma guideline and keep the change localized to the
withSuite(...) / new Suite(...) call.
ℹ️ Review info
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (139)
src/Sylius/Behat/Resources/config/suites.phpsrc/Sylius/Behat/Resources/config/suites/api.phpsrc/Sylius/Behat/Resources/config/suites/api.ymlsrc/Sylius/Behat/Resources/config/suites/api/account/address_book.phpsrc/Sylius/Behat/Resources/config/suites/api/account/address_book.ymlsrc/Sylius/Behat/Resources/config/suites/api/account/customer.phpsrc/Sylius/Behat/Resources/config/suites/api/account/customer.ymlsrc/Sylius/Behat/Resources/config/suites/api/account/customer_registration.phpsrc/Sylius/Behat/Resources/config/suites/api/account/customer_registration.ymlsrc/Sylius/Behat/Resources/config/suites/api/account/email_verification.phpsrc/Sylius/Behat/Resources/config/suites/api/account/email_verification.ymlsrc/Sylius/Behat/Resources/config/suites/api/account/login.phpsrc/Sylius/Behat/Resources/config/suites/api/account/login.yamlsrc/Sylius/Behat/Resources/config/suites/api/addressing/managing_countries.phpsrc/Sylius/Behat/Resources/config/suites/api/addressing/managing_countries.yamlsrc/Sylius/Behat/Resources/config/suites/api/addressing/managing_zones.phpsrc/Sylius/Behat/Resources/config/suites/api/addressing/managing_zones.ymlsrc/Sylius/Behat/Resources/config/suites/api/admin/dashboard.phpsrc/Sylius/Behat/Resources/config/suites/api/admin/dashboard.yamlsrc/Sylius/Behat/Resources/config/suites/api/admin/locale.phpsrc/Sylius/Behat/Resources/config/suites/api/admin/locale.yamlsrc/Sylius/Behat/Resources/config/suites/api/admin/login.phpsrc/Sylius/Behat/Resources/config/suites/api/admin/login.ymlsrc/Sylius/Behat/Resources/config/suites/api/admin/security.phpsrc/Sylius/Behat/Resources/config/suites/api/admin/security.ymlsrc/Sylius/Behat/Resources/config/suites/api/cart/accessing_cart.phpsrc/Sylius/Behat/Resources/config/suites/api/cart/accessing_cart.ymlsrc/Sylius/Behat/Resources/config/suites/api/cart/shopping_cart.phpsrc/Sylius/Behat/Resources/config/suites/api/cart/shopping_cart.ymlsrc/Sylius/Behat/Resources/config/suites/api/channel/channels.phpsrc/Sylius/Behat/Resources/config/suites/api/channel/channels.ymlsrc/Sylius/Behat/Resources/config/suites/api/channel/managing_channels.phpsrc/Sylius/Behat/Resources/config/suites/api/channel/managing_channels.ymlsrc/Sylius/Behat/Resources/config/suites/api/checkout/checkout.phpsrc/Sylius/Behat/Resources/config/suites/api/checkout/checkout.ymlsrc/Sylius/Behat/Resources/config/suites/api/checkout/paying_for_order.phpsrc/Sylius/Behat/Resources/config/suites/api/checkout/paying_for_order.ymlsrc/Sylius/Behat/Resources/config/suites/api/contact/requesting_contact.phpsrc/Sylius/Behat/Resources/config/suites/api/contact/requesting_contact.ymlsrc/Sylius/Behat/Resources/config/suites/api/currency/currencies.phpsrc/Sylius/Behat/Resources/config/suites/api/currency/currencies.ymlsrc/Sylius/Behat/Resources/config/suites/api/currency/managing_currencies.phpsrc/Sylius/Behat/Resources/config/suites/api/currency/managing_currencies.ymlsrc/Sylius/Behat/Resources/config/suites/api/currency/managing_exchange_rates.phpsrc/Sylius/Behat/Resources/config/suites/api/currency/managing_exchange_rates.ymlsrc/Sylius/Behat/Resources/config/suites/api/currency/viewing_exchange_rates.phpsrc/Sylius/Behat/Resources/config/suites/api/currency/viewing_exchange_rates.ymlsrc/Sylius/Behat/Resources/config/suites/api/homepage/viewing_products.phpsrc/Sylius/Behat/Resources/config/suites/api/homepage/viewing_products.ymlsrc/Sylius/Behat/Resources/config/suites/api/inventory/cart_inventory.phpsrc/Sylius/Behat/Resources/config/suites/api/inventory/cart_inventory.ymlsrc/Sylius/Behat/Resources/config/suites/api/inventory/checkout_inventory.phpsrc/Sylius/Behat/Resources/config/suites/api/inventory/checkout_inventory.yamlsrc/Sylius/Behat/Resources/config/suites/api/inventory/managing_inventory.phpsrc/Sylius/Behat/Resources/config/suites/api/inventory/managing_inventory.yamlsrc/Sylius/Behat/Resources/config/suites/api/locale/locales.phpsrc/Sylius/Behat/Resources/config/suites/api/locale/locales.yamlsrc/Sylius/Behat/Resources/config/suites/api/locale/managing_locales.phpsrc/Sylius/Behat/Resources/config/suites/api/locale/managing_locales.yamlsrc/Sylius/Behat/Resources/config/suites/api/order/managing_orders.phpsrc/Sylius/Behat/Resources/config/suites/api/order/managing_orders.ymlsrc/Sylius/Behat/Resources/config/suites/api/order/modifying_placed_order_address.phpsrc/Sylius/Behat/Resources/config/suites/api/order/modifying_placed_order_address.yamlsrc/Sylius/Behat/Resources/config/suites/api/order/order_history.phpsrc/Sylius/Behat/Resources/config/suites/api/order/order_history.yamlsrc/Sylius/Behat/Resources/config/suites/api/payment/managing_payment_methods.phpsrc/Sylius/Behat/Resources/config/suites/api/payment/managing_payment_methods.yamlsrc/Sylius/Behat/Resources/config/suites/api/payment/managing_payments.phpsrc/Sylius/Behat/Resources/config/suites/api/payment/managing_payments.ymlsrc/Sylius/Behat/Resources/config/suites/api/product/adding_product_review.phpsrc/Sylius/Behat/Resources/config/suites/api/product/adding_product_review.ymlsrc/Sylius/Behat/Resources/config/suites/api/product/managing_product_association_types.phpsrc/Sylius/Behat/Resources/config/suites/api/product/managing_product_association_types.ymlsrc/Sylius/Behat/Resources/config/suites/api/product/managing_product_attributes.phpsrc/Sylius/Behat/Resources/config/suites/api/product/managing_product_attributes.ymlsrc/Sylius/Behat/Resources/config/suites/api/product/managing_product_options.phpsrc/Sylius/Behat/Resources/config/suites/api/product/managing_product_options.ymlsrc/Sylius/Behat/Resources/config/suites/api/product/managing_product_reviews.phpsrc/Sylius/Behat/Resources/config/suites/api/product/managing_product_reviews.ymlsrc/Sylius/Behat/Resources/config/suites/api/product/managing_product_variants.phpsrc/Sylius/Behat/Resources/config/suites/api/product/managing_product_variants.ymlsrc/Sylius/Behat/Resources/config/suites/api/product/managing_products.phpsrc/Sylius/Behat/Resources/config/suites/api/product/managing_products.ymlsrc/Sylius/Behat/Resources/config/suites/api/product/viewing_price_history.phpsrc/Sylius/Behat/Resources/config/suites/api/product/viewing_price_history.ymlsrc/Sylius/Behat/Resources/config/suites/api/product/viewing_price_history_after_catalog_promotions.phpsrc/Sylius/Behat/Resources/config/suites/api/product/viewing_price_history_after_catalog_promotions.ymlsrc/Sylius/Behat/Resources/config/suites/api/product/viewing_product_in_admin_panel.phpsrc/Sylius/Behat/Resources/config/suites/api/product/viewing_product_in_admin_panel.yamlsrc/Sylius/Behat/Resources/config/suites/api/product/viewing_product_reviews.phpsrc/Sylius/Behat/Resources/config/suites/api/product/viewing_product_reviews.ymlsrc/Sylius/Behat/Resources/config/suites/api/product/viewing_product_variants.phpsrc/Sylius/Behat/Resources/config/suites/api/product/viewing_product_variants.ymlsrc/Sylius/Behat/Resources/config/suites/api/product/viewing_products.phpsrc/Sylius/Behat/Resources/config/suites/api/product/viewing_products.ymlsrc/Sylius/Behat/Resources/config/suites/api/promotion/applying_catalog_promotions.phpsrc/Sylius/Behat/Resources/config/suites/api/promotion/applying_catalog_promotions.ymlsrc/Sylius/Behat/Resources/config/suites/api/promotion/applying_promotion_coupon.phpsrc/Sylius/Behat/Resources/config/suites/api/promotion/applying_promotion_coupon.ymlsrc/Sylius/Behat/Resources/config/suites/api/promotion/applying_promotion_rules.phpsrc/Sylius/Behat/Resources/config/suites/api/promotion/applying_promotion_rules.ymlsrc/Sylius/Behat/Resources/config/suites/api/promotion/managing_catalog_promotions.phpsrc/Sylius/Behat/Resources/config/suites/api/promotion/managing_catalog_promotions.ymlsrc/Sylius/Behat/Resources/config/suites/api/promotion/managing_promotion_coupons.phpsrc/Sylius/Behat/Resources/config/suites/api/promotion/managing_promotion_coupons.ymlsrc/Sylius/Behat/Resources/config/suites/api/promotion/managing_promotions.phpsrc/Sylius/Behat/Resources/config/suites/api/promotion/managing_promotions.ymlsrc/Sylius/Behat/Resources/config/suites/api/promotion/receiving_discount.phpsrc/Sylius/Behat/Resources/config/suites/api/promotion/receiving_discount.ymlsrc/Sylius/Behat/Resources/config/suites/api/promotion/removing_catalog_promotions.phpsrc/Sylius/Behat/Resources/config/suites/api/promotion/removing_catalog_promotions.ymlsrc/Sylius/Behat/Resources/config/suites/api/shipping/applying_shipping_fee.phpsrc/Sylius/Behat/Resources/config/suites/api/shipping/applying_shipping_fee.ymlsrc/Sylius/Behat/Resources/config/suites/api/shipping/applying_shipping_method_rules.phpsrc/Sylius/Behat/Resources/config/suites/api/shipping/applying_shipping_method_rules.ymlsrc/Sylius/Behat/Resources/config/suites/api/shipping/managing_shipments.phpsrc/Sylius/Behat/Resources/config/suites/api/shipping/managing_shipments.ymlsrc/Sylius/Behat/Resources/config/suites/api/shipping/managing_shipping_categories.phpsrc/Sylius/Behat/Resources/config/suites/api/shipping/managing_shipping_categories.ymlsrc/Sylius/Behat/Resources/config/suites/api/shipping/managing_shipping_methods.phpsrc/Sylius/Behat/Resources/config/suites/api/shipping/managing_shipping_methods.ymlsrc/Sylius/Behat/Resources/config/suites/api/shipping/viewing_shipping_methods.phpsrc/Sylius/Behat/Resources/config/suites/api/shipping/viewing_shipping_methods.ymlsrc/Sylius/Behat/Resources/config/suites/api/taxation/applying_taxes.phpsrc/Sylius/Behat/Resources/config/suites/api/taxation/applying_taxes.ymlsrc/Sylius/Behat/Resources/config/suites/api/taxation/managing_tax_categories.phpsrc/Sylius/Behat/Resources/config/suites/api/taxation/managing_tax_categories.ymlsrc/Sylius/Behat/Resources/config/suites/api/taxation/managing_tax_rates.phpsrc/Sylius/Behat/Resources/config/suites/api/taxation/managing_tax_rates.ymlsrc/Sylius/Behat/Resources/config/suites/api/taxon/managing_taxons.phpsrc/Sylius/Behat/Resources/config/suites/api/taxon/managing_taxons.ymlsrc/Sylius/Behat/Resources/config/suites/api/user/managing_administrators.phpsrc/Sylius/Behat/Resources/config/suites/api/user/managing_administrators.ymlsrc/Sylius/Behat/Resources/config/suites/api/user/managing_customer_groups.phpsrc/Sylius/Behat/Resources/config/suites/api/user/managing_customer_groups.ymlsrc/Sylius/Behat/Resources/config/suites/api/user/managing_customers.phpsrc/Sylius/Behat/Resources/config/suites/api/user/managing_customers.ymlsrc/Sylius/Behat/Resources/config/suites/api/user/managing_users.phpsrc/Sylius/Behat/Resources/config/suites/api/user/managing_users.yml
💤 Files with no reviewable changes (69)
- src/Sylius/Behat/Resources/config/suites/api/account/email_verification.yml
- src/Sylius/Behat/Resources/config/suites/api.yml
- src/Sylius/Behat/Resources/config/suites/api/order/modifying_placed_order_address.yaml
- src/Sylius/Behat/Resources/config/suites/api/cart/accessing_cart.yml
- src/Sylius/Behat/Resources/config/suites/api/product/managing_product_attributes.yml
- src/Sylius/Behat/Resources/config/suites/api/currency/currencies.yml
- src/Sylius/Behat/Resources/config/suites/api/product/managing_product_reviews.yml
- src/Sylius/Behat/Resources/config/suites/api/shipping/applying_shipping_fee.yml
- src/Sylius/Behat/Resources/config/suites/api/currency/viewing_exchange_rates.yml
- src/Sylius/Behat/Resources/config/suites/api/order/managing_orders.yml
- src/Sylius/Behat/Resources/config/suites/api/locale/locales.yaml
- src/Sylius/Behat/Resources/config/suites/api/product/managing_product_options.yml
- src/Sylius/Behat/Resources/config/suites/api/payment/managing_payments.yml
- src/Sylius/Behat/Resources/config/suites/api/checkout/checkout.yml
- src/Sylius/Behat/Resources/config/suites/api/user/managing_customer_groups.yml
- src/Sylius/Behat/Resources/config/suites/api/promotion/receiving_discount.yml
- src/Sylius/Behat/Resources/config/suites/api/account/login.yaml
- src/Sylius/Behat/Resources/config/suites/api/shipping/applying_shipping_method_rules.yml
- src/Sylius/Behat/Resources/config/suites/api/user/managing_customers.yml
- src/Sylius/Behat/Resources/config/suites/api/promotion/applying_promotion_rules.yml
- src/Sylius/Behat/Resources/config/suites/api/cart/shopping_cart.yml
- src/Sylius/Behat/Resources/config/suites/api/product/viewing_products.yml
- src/Sylius/Behat/Resources/config/suites/api/currency/managing_currencies.yml
- src/Sylius/Behat/Resources/config/suites/api/promotion/removing_catalog_promotions.yml
- src/Sylius/Behat/Resources/config/suites/api/promotion/managing_promotions.yml
- src/Sylius/Behat/Resources/config/suites/api/shipping/managing_shipping_methods.yml
- src/Sylius/Behat/Resources/config/suites/api/taxon/managing_taxons.yml
- src/Sylius/Behat/Resources/config/suites/api/user/managing_users.yml
- src/Sylius/Behat/Resources/config/suites/api/taxation/managing_tax_categories.yml
- src/Sylius/Behat/Resources/config/suites/api/taxation/applying_taxes.yml
- src/Sylius/Behat/Resources/config/suites/api/channel/channels.yml
- src/Sylius/Behat/Resources/config/suites/api/product/managing_product_variants.yml
- src/Sylius/Behat/Resources/config/suites/api/promotion/managing_promotion_coupons.yml
- src/Sylius/Behat/Resources/config/suites/api/product/viewing_price_history_after_catalog_promotions.yml
- src/Sylius/Behat/Resources/config/suites/api/promotion/applying_promotion_coupon.yml
- src/Sylius/Behat/Resources/config/suites/api/product/managing_products.yml
- src/Sylius/Behat/Resources/config/suites/api/user/managing_administrators.yml
- src/Sylius/Behat/Resources/config/suites/api/product/viewing_product_variants.yml
- src/Sylius/Behat/Resources/config/suites/api/taxation/managing_tax_rates.yml
- src/Sylius/Behat/Resources/config/suites/api/product/viewing_product_reviews.yml
- src/Sylius/Behat/Resources/config/suites/api/addressing/managing_countries.yaml
- src/Sylius/Behat/Resources/config/suites/api/account/address_book.yml
- src/Sylius/Behat/Resources/config/suites/api/admin/dashboard.yaml
- src/Sylius/Behat/Resources/config/suites/api/account/customer_registration.yml
- src/Sylius/Behat/Resources/config/suites/api/checkout/paying_for_order.yml
- src/Sylius/Behat/Resources/config/suites/api/account/customer.yml
- src/Sylius/Behat/Resources/config/suites/api/admin/login.yml
- src/Sylius/Behat/Resources/config/suites/api/product/viewing_product_in_admin_panel.yaml
- src/Sylius/Behat/Resources/config/suites/api/admin/security.yml
- src/Sylius/Behat/Resources/config/suites/api/order/order_history.yaml
- src/Sylius/Behat/Resources/config/suites/api/admin/locale.yaml
- src/Sylius/Behat/Resources/config/suites/api/shipping/managing_shipping_categories.yml
- src/Sylius/Behat/Resources/config/suites/api/shipping/viewing_shipping_methods.yml
- src/Sylius/Behat/Resources/config/suites/api/promotion/managing_catalog_promotions.yml
- src/Sylius/Behat/Resources/config/suites/api/product/managing_product_association_types.yml
- src/Sylius/Behat/Resources/config/suites/api/inventory/cart_inventory.yml
- src/Sylius/Behat/Resources/config/suites/api/currency/managing_exchange_rates.yml
- src/Sylius/Behat/Resources/config/suites/api/addressing/managing_zones.yml
- src/Sylius/Behat/Resources/config/suites/api/inventory/checkout_inventory.yaml
- src/Sylius/Behat/Resources/config/suites/api/promotion/applying_catalog_promotions.yml
- src/Sylius/Behat/Resources/config/suites/api/locale/managing_locales.yaml
- src/Sylius/Behat/Resources/config/suites/api/contact/requesting_contact.yml
- src/Sylius/Behat/Resources/config/suites/api/homepage/viewing_products.yml
- src/Sylius/Behat/Resources/config/suites/api/shipping/managing_shipments.yml
- src/Sylius/Behat/Resources/config/suites/api/channel/managing_channels.yml
- src/Sylius/Behat/Resources/config/suites/api/product/adding_product_review.yml
- src/Sylius/Behat/Resources/config/suites/api/payment/managing_payment_methods.yaml
- src/Sylius/Behat/Resources/config/suites/api/product/viewing_price_history.yml
- src/Sylius/Behat/Resources/config/suites/api/inventory/managing_inventory.yaml
src/Sylius/Behat/Resources/config/suites/api/admin/dashboard.php
Outdated
Show resolved
Hide resolved
src/Sylius/Behat/Resources/config/suites/api/checkout/checkout.php
Outdated
Show resolved
Hide resolved
src/Sylius/Behat/Resources/config/suites/api/currency/managing_currencies.php
Show resolved
Hide resolved
src/Sylius/Behat/Resources/config/suites/api/product/managing_product_reviews.php
Show resolved
Hide resolved
src/Sylius/Behat/Resources/config/suites/api/product/managing_product_variants.php
Outdated
Show resolved
Hide resolved
src/Sylius/Behat/Resources/config/suites/api/promotion/managing_catalog_promotions.php
Outdated
Show resolved
Hide resolved
src/Sylius/Behat/Resources/config/suites/api/promotion/receiving_discount.php
Show resolved
Hide resolved
src/Sylius/Behat/Resources/config/suites/api/promotion/removing_catalog_promotions.php
Outdated
Show resolved
Hide resolved
src/Sylius/Behat/Resources/config/suites/api/shipping/managing_shipping_methods.php
Show resolved
Hide resolved
src/Sylius/Behat/Resources/config/suites/api/shipping/managing_shipping_methods.php
Show resolved
Hide resolved
10644ec to
d9cbeca
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (7)
src/Sylius/Behat/Resources/config/suites/api/product/viewing_price_history_after_catalog_promotions.php (1)
32-37:⚠️ Potential issue | 🟠 MajorRemove the duplicated
CatalogPromotionContextregistration.
CatalogPromotionContext::classis listed twice in thewithContexts(...)call (lines 32 and 37). Behat will register the context — and all its hooks/steps — twice, causing duplicate step definitions and unpredictable test results.🐛 Proposed fix
->withContexts( 'sylius.behat.context.hook.doctrine_orm', 'sylius.behat.context.transform.channel', 'sylius.behat.context.transform.lexical', 'sylius.behat.context.transform.product', 'sylius.behat.context.transform.product_variant', 'sylius.behat.context.transform.shared_storage', CatalogPromotionContext::class, 'sylius.behat.context.setup.admin_api_security', 'sylius.behat.context.setup.admin_user', 'sylius.behat.context.setup.channel', 'sylius.behat.context.setup.product', - CatalogPromotionContext::class, 'sylius.behat.context.api.admin.channel_pricing_log_entry', 'sylius.behat.context.api.admin.managing_catalog_promotions', 'sylius.behat.context.api.debug', )🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/Sylius/Behat/Resources/config/suites/api/product/viewing_price_history_after_catalog_promotions.php` around lines 32 - 37, The withContexts(...) call currently registers CatalogPromotionContext::class twice, causing duplicate step/hook registrations; remove the duplicated entry so CatalogPromotionContext::class appears only once in the withContexts(...) array (keep one of the two occurrences and delete the other) to ensure each context is registered a single time.src/Sylius/Behat/Resources/config/suites/api/shipping/managing_shipping_methods.php (2)
44-44:⚠️ Potential issue | 🟡 Minor
sylius.behat.context.transform.customerstill misplaced after the setup block.This was flagged in a previous review. The transform context should be grouped with the other
sylius.behat.context.transform.*entries (lines 26–34).♻️ Proposed fix
'sylius.behat.context.transform.shared_storage', 'sylius.behat.context.transform.shipping_calculator', 'sylius.behat.context.transform.shipping_method', 'sylius.behat.context.transform.zone', + 'sylius.behat.context.transform.customer', 'sylius.behat.context.setup.admin_api_security', 'sylius.behat.context.setup.channel', 'sylius.behat.context.setup.locale', 'sylius.behat.context.setup.order', 'sylius.behat.context.setup.payment', 'sylius.behat.context.setup.product', 'sylius.behat.context.setup.shipping', 'sylius.behat.context.setup.zone', - 'sylius.behat.context.transform.customer',🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/Sylius/Behat/Resources/config/suites/api/shipping/managing_shipping_methods.php` at line 44, The service id sylius.behat.context.transform.customer is misplaced inside the setup block; move the 'sylius.behat.context.transform.customer' entry out of the setup section and group it with the other transform context entries (the sylius.behat.context.transform.* entries currently around lines 26–34) so all transform contexts are declared together under the transform group.
41-42:⚠️ Potential issue | 🔴 CriticalDuplicate
sylius.behat.context.setup.shippingstill present.Both entries remain unresolved in the current code. This was flagged in a previous review.
🐛 Proposed fix
'sylius.behat.context.setup.product', 'sylius.behat.context.setup.shipping', - 'sylius.behat.context.setup.shipping', 'sylius.behat.context.setup.zone',🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/Sylius/Behat/Resources/config/suites/api/shipping/managing_shipping_methods.php` around lines 41 - 42, The suite configuration contains a duplicate context identifier 'sylius.behat.context.setup.shipping'; remove the redundant entry so the array/list contains a single 'sylius.behat.context.setup.shipping' occurrence (or replace the second entry with the intended different context if that was the original intent) and ensure the surrounding suite setup (the list containing 'sylius.behat.context.setup.shipping') remains syntactically valid after the change.src/Sylius/Behat/Resources/config/suites/api/product/viewing_products.php (1)
37-51:⚠️ Potential issue | 🟠 MajorRemove duplicate
CatalogPromotionContextregistration.
CatalogPromotionContext::classis registered on Line 37 and again on Line 50. This can duplicate step definitions and break Behat suite execution with redundant-step errors. Keep only one entry.🐛 Proposed fix
'sylius.behat.context.transform.shared_storage', 'sylius.behat.context.transform.taxon', CatalogPromotionContext::class, 'sylius.behat.context.setup.admin_user', @@ 'sylius.behat.context.setup.product_taxon', 'sylius.behat.context.setup.shop_api_security', 'sylius.behat.context.setup.taxonomy', - CatalogPromotionContext::class, PriceHistoryContext::class, 'sylius.behat.context.api.debug',🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/Sylius/Behat/Resources/config/suites/api/product/viewing_products.php` around lines 37 - 51, Remove the duplicate CatalogPromotionContext::class entry from the suite registration so it appears only once; locate both occurrences of CatalogPromotionContext::class in the list (the entries surrounding PriceHistoryContext::class and earlier in the block) and delete the redundant one to avoid duplicate step definitions while keeping a single CatalogPromotionContext::class registration.src/Sylius/Behat/Resources/config/suites/api/promotion/managing_catalog_promotions.php (1)
36-42: DuplicateCatalogPromotionContext::classregistration — still present.
CatalogPromotionContext::classis listed on both Line 36 and Line 42. Behat will fail with a redundant context exception. Remove the first occurrence (Line 36) which appears misplaced among thetransformentries.🐛 Proposed fix
'sylius.behat.context.transform.shared_storage', 'sylius.behat.context.transform.taxon', - CatalogPromotionContext::class, 'sylius.behat.context.setup.admin_api_security', 'sylius.behat.context.setup.channel', 'sylius.behat.context.setup.product',🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/Sylius/Behat/Resources/config/suites/api/promotion/managing_catalog_promotions.php` around lines 36 - 42, Remove the duplicate CatalogPromotionContext::class registration by deleting the first occurrence that is misplaced among the transform/setup entries (the one listed alongside 'sylius.behat.context.setup.admin_api_security', 'sylius.behat.context.setup.channel', etc.), leaving only the valid CatalogPromotionContext::class registration later in the list so Behat no longer throws a redundant context exception.src/Sylius/Behat/Resources/config/suites/api/product/managing_product_reviews.php (1)
21-23: Reapply trailing comma in the multi-lineSuiteconstructor call.This regressed in the current diff: add the trailing comma after the options array argument.
As per coding guidelines, "Use trailing commas in multi-line PHP arrays and argument lists".Proposed fix
- ->withSuite((new Suite('api_managing_product_reviews', [ - 'javascript' => false, - ])) + ->withSuite((new Suite('api_managing_product_reviews', [ + 'javascript' => false, + ],))🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/Sylius/Behat/Resources/config/suites/api/product/managing_product_reviews.php` around lines 21 - 23, The multi-line Suite constructor call has lost its trailing comma after the options array argument; update the call that creates new Suite('api_managing_product_reviews', [ 'javascript' => false, ]) by reapplying the trailing comma after the closing bracket so the argument list ends with a comma in the multi-line invocation of Suite.src/Sylius/Behat/Resources/config/suites/api/checkout/checkout.php (1)
48-59:⚠️ Potential issue | 🟠 MajorRemove duplicated context registrations in the suite context list.
CatalogPromotionContext::classandsylius.behat.context.setup.geographicalare each registered twice. This can double-register hooks/steps and cause ambiguous or repeated execution.Proposed fix
- CatalogPromotionContext::class, 'sylius.behat.context.setup.address', 'sylius.behat.context.setup.admin_user', 'sylius.behat.context.setup.cart', 'sylius.behat.context.setup.channel', 'sylius.behat.context.setup.checkout', 'sylius.behat.context.setup.checkout.address', 'sylius.behat.context.setup.checkout.payment', 'sylius.behat.context.setup.checkout.shipping', 'sylius.behat.context.setup.customer', 'sylius.behat.context.setup.geographical', - 'sylius.behat.context.setup.geographical', 'sylius.behat.context.setup.locale',Also applies to: 71-71
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/Sylius/Behat/Resources/config/suites/api/checkout/checkout.php` around lines 48 - 59, The suite context list contains duplicate registrations for CatalogPromotionContext::class and 'sylius.behat.context.setup.geographical' which can cause duplicated hooks/steps; remove the redundant entries so each context appears only once (keep the first occurrence and delete the later duplicate), and scan the same suite block for the other duplicate occurrence of 'sylius.behat.context.setup.geographical' to remove it as well; ensure no other context strings or class entries are repeated after your cleanup.
🧹 Nitpick comments (4)
src/Sylius/Behat/Resources/config/suites/api/checkout/paying_for_order.php (1)
21-23: Add trailing comma in the multi-lineSuite(...)argument list.Please add a trailing comma after the options array to match repository PHP formatting rules.
As per coding guidelines, "Use trailing commas in multi-line PHP arrays and argument lists".Proposed fix
- ->withSuite((new Suite('api_paying_for_order', [ - 'javascript' => false, - ])) + ->withSuite((new Suite('api_paying_for_order', [ + 'javascript' => false, + ],))🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/Sylius/Behat/Resources/config/suites/api/checkout/paying_for_order.php` around lines 21 - 23, The multi-line argument list passed to Suite in the withSuite(...) call is missing a trailing comma; update the Suite instantiation (Suite('api_paying_for_order', [ 'javascript' => false, ])) to include a trailing comma after the options array so the argument list ends with a comma, ensuring the call in withSuite(...) follows the repository's multi-line trailing-comma formatting rules.src/Sylius/Behat/Resources/config/suites/api/inventory/cart_inventory.php (1)
21-23: Add a trailing comma to the multi-lineSuiteargument list.The
Suite(...)call is multi-line and should end with a trailing comma after the options array.As per coding guidelines, "Use trailing commas in multi-line PHP arrays and argument lists".Proposed fix
- ->withSuite((new Suite('api_cart_inventory', [ - 'javascript' => false, - ])) + ->withSuite((new Suite('api_cart_inventory', [ + 'javascript' => false, + ],))🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/Sylius/Behat/Resources/config/suites/api/inventory/cart_inventory.php` around lines 21 - 23, The Suite constructor call inside the withSuite chain is a multi-line argument list and needs a trailing comma; update the expression ->withSuite((new Suite('api_cart_inventory', [ 'javascript' => false, ], )) so that the Suite invocation (new Suite('api_cart_inventory', [ 'javascript' => false, ],)) ends with a trailing comma after the options array to comply with the multi-line argument list rule and keep withSuite unchanged.src/Sylius/Behat/Resources/config/suites/api/checkout/checkout.php (1)
22-24: Add trailing comma in the multi-lineSuiteconstructor arguments.This constructor is split across lines and should include a trailing comma after the options array.
As per coding guidelines, "Use trailing commas in multi-line PHP arrays and argument lists".Proposed fix
- ->withSuite((new Suite('api_checkout', [ - 'javascript' => false, - ])) + ->withSuite((new Suite('api_checkout', [ + 'javascript' => false, + ],))🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/Sylius/Behat/Resources/config/suites/api/checkout/checkout.php` around lines 22 - 24, Add a trailing comma to the multi-line argument list when instantiating Suite: update the call to new Suite('api_checkout', [ 'javascript' => false, ]) so the array argument ends with a trailing comma (i.e., ensure the Suite constructor invocation inside withSuite(...) uses a trailing comma after the options array). This touches the new Suite(...) expression used by ->withSuite and ensures the multi-line argument list follows the trailing-comma guideline.src/Sylius/Behat/Resources/config/suites/api/taxation/applying_taxes.php (1)
21-23: Add trailing comma to the multi-lineSuitecall.Please add a trailing comma after the options array argument.
As per coding guidelines, "Use trailing commas in multi-line PHP arrays and argument lists".Proposed fix
- ->withSuite((new Suite('api_applying_taxes', [ - 'javascript' => false, - ])) + ->withSuite((new Suite('api_applying_taxes', [ + 'javascript' => false, + ],))🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/Sylius/Behat/Resources/config/suites/api/taxation/applying_taxes.php` around lines 21 - 23, The Suite constructor call inside the withSuite chain (new Suite('api_applying_taxes', [ 'javascript' => false, ])) needs a trailing comma after the options array argument; update the multi-line call to add a comma immediately after the closing bracket of the options array so the argument list ends with a trailing comma (i.e., in the expression constructing Suite in the withSuite(...) chain).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@src/Sylius/Behat/Resources/config/suites/api/product/viewing_product_reviews.php`:
- Around line 21-23: The multi-line constructor call to new
Suite('api_viewing_product_reviews', ['javascript' => false]) is missing a
trailing comma; update the withSuite call that constructs the Suite (identifier:
Suite and suite name 'api_viewing_product_reviews') to include a trailing comma
after the final argument in the argument list so the multi-line argument list
follows the coding guideline for trailing commas.
---
Duplicate comments:
In `@src/Sylius/Behat/Resources/config/suites/api/checkout/checkout.php`:
- Around line 48-59: The suite context list contains duplicate registrations for
CatalogPromotionContext::class and 'sylius.behat.context.setup.geographical'
which can cause duplicated hooks/steps; remove the redundant entries so each
context appears only once (keep the first occurrence and delete the later
duplicate), and scan the same suite block for the other duplicate occurrence of
'sylius.behat.context.setup.geographical' to remove it as well; ensure no other
context strings or class entries are repeated after your cleanup.
In
`@src/Sylius/Behat/Resources/config/suites/api/product/managing_product_reviews.php`:
- Around line 21-23: The multi-line Suite constructor call has lost its trailing
comma after the options array argument; update the call that creates new
Suite('api_managing_product_reviews', [ 'javascript' => false, ]) by reapplying
the trailing comma after the closing bracket so the argument list ends with a
comma in the multi-line invocation of Suite.
In
`@src/Sylius/Behat/Resources/config/suites/api/product/viewing_price_history_after_catalog_promotions.php`:
- Around line 32-37: The withContexts(...) call currently registers
CatalogPromotionContext::class twice, causing duplicate step/hook registrations;
remove the duplicated entry so CatalogPromotionContext::class appears only once
in the withContexts(...) array (keep one of the two occurrences and delete the
other) to ensure each context is registered a single time.
In `@src/Sylius/Behat/Resources/config/suites/api/product/viewing_products.php`:
- Around line 37-51: Remove the duplicate CatalogPromotionContext::class entry
from the suite registration so it appears only once; locate both occurrences of
CatalogPromotionContext::class in the list (the entries surrounding
PriceHistoryContext::class and earlier in the block) and delete the redundant
one to avoid duplicate step definitions while keeping a single
CatalogPromotionContext::class registration.
In
`@src/Sylius/Behat/Resources/config/suites/api/promotion/managing_catalog_promotions.php`:
- Around line 36-42: Remove the duplicate CatalogPromotionContext::class
registration by deleting the first occurrence that is misplaced among the
transform/setup entries (the one listed alongside
'sylius.behat.context.setup.admin_api_security',
'sylius.behat.context.setup.channel', etc.), leaving only the valid
CatalogPromotionContext::class registration later in the list so Behat no longer
throws a redundant context exception.
In
`@src/Sylius/Behat/Resources/config/suites/api/shipping/managing_shipping_methods.php`:
- Line 44: The service id sylius.behat.context.transform.customer is misplaced
inside the setup block; move the 'sylius.behat.context.transform.customer' entry
out of the setup section and group it with the other transform context entries
(the sylius.behat.context.transform.* entries currently around lines 26–34) so
all transform contexts are declared together under the transform group.
- Around line 41-42: The suite configuration contains a duplicate context
identifier 'sylius.behat.context.setup.shipping'; remove the redundant entry so
the array/list contains a single 'sylius.behat.context.setup.shipping'
occurrence (or replace the second entry with the intended different context if
that was the original intent) and ensure the surrounding suite setup (the list
containing 'sylius.behat.context.setup.shipping') remains syntactically valid
after the change.
---
Nitpick comments:
In `@src/Sylius/Behat/Resources/config/suites/api/checkout/checkout.php`:
- Around line 22-24: Add a trailing comma to the multi-line argument list when
instantiating Suite: update the call to new Suite('api_checkout', [ 'javascript'
=> false, ]) so the array argument ends with a trailing comma (i.e., ensure the
Suite constructor invocation inside withSuite(...) uses a trailing comma after
the options array). This touches the new Suite(...) expression used by
->withSuite and ensures the multi-line argument list follows the trailing-comma
guideline.
In `@src/Sylius/Behat/Resources/config/suites/api/checkout/paying_for_order.php`:
- Around line 21-23: The multi-line argument list passed to Suite in the
withSuite(...) call is missing a trailing comma; update the Suite instantiation
(Suite('api_paying_for_order', [ 'javascript' => false, ])) to include a
trailing comma after the options array so the argument list ends with a comma,
ensuring the call in withSuite(...) follows the repository's multi-line
trailing-comma formatting rules.
In `@src/Sylius/Behat/Resources/config/suites/api/inventory/cart_inventory.php`:
- Around line 21-23: The Suite constructor call inside the withSuite chain is a
multi-line argument list and needs a trailing comma; update the expression
->withSuite((new Suite('api_cart_inventory', [ 'javascript' => false, ], )) so
that the Suite invocation (new Suite('api_cart_inventory', [ 'javascript' =>
false, ],)) ends with a trailing comma after the options array to comply with
the multi-line argument list rule and keep withSuite unchanged.
In `@src/Sylius/Behat/Resources/config/suites/api/taxation/applying_taxes.php`:
- Around line 21-23: The Suite constructor call inside the withSuite chain (new
Suite('api_applying_taxes', [ 'javascript' => false, ])) needs a trailing comma
after the options array argument; update the multi-line call to add a comma
immediately after the closing bracket of the options array so the argument list
ends with a trailing comma (i.e., in the expression constructing Suite in the
withSuite(...) chain).
ℹ️ Review info
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (139)
src/Sylius/Behat/Resources/config/suites.phpsrc/Sylius/Behat/Resources/config/suites/api.phpsrc/Sylius/Behat/Resources/config/suites/api.ymlsrc/Sylius/Behat/Resources/config/suites/api/account/address_book.phpsrc/Sylius/Behat/Resources/config/suites/api/account/address_book.ymlsrc/Sylius/Behat/Resources/config/suites/api/account/customer.phpsrc/Sylius/Behat/Resources/config/suites/api/account/customer.ymlsrc/Sylius/Behat/Resources/config/suites/api/account/customer_registration.phpsrc/Sylius/Behat/Resources/config/suites/api/account/customer_registration.ymlsrc/Sylius/Behat/Resources/config/suites/api/account/email_verification.phpsrc/Sylius/Behat/Resources/config/suites/api/account/email_verification.ymlsrc/Sylius/Behat/Resources/config/suites/api/account/login.phpsrc/Sylius/Behat/Resources/config/suites/api/account/login.yamlsrc/Sylius/Behat/Resources/config/suites/api/addressing/managing_countries.phpsrc/Sylius/Behat/Resources/config/suites/api/addressing/managing_countries.yamlsrc/Sylius/Behat/Resources/config/suites/api/addressing/managing_zones.phpsrc/Sylius/Behat/Resources/config/suites/api/addressing/managing_zones.ymlsrc/Sylius/Behat/Resources/config/suites/api/admin/dashboard.phpsrc/Sylius/Behat/Resources/config/suites/api/admin/dashboard.yamlsrc/Sylius/Behat/Resources/config/suites/api/admin/locale.phpsrc/Sylius/Behat/Resources/config/suites/api/admin/locale.yamlsrc/Sylius/Behat/Resources/config/suites/api/admin/login.phpsrc/Sylius/Behat/Resources/config/suites/api/admin/login.ymlsrc/Sylius/Behat/Resources/config/suites/api/admin/security.phpsrc/Sylius/Behat/Resources/config/suites/api/admin/security.ymlsrc/Sylius/Behat/Resources/config/suites/api/cart/accessing_cart.phpsrc/Sylius/Behat/Resources/config/suites/api/cart/accessing_cart.ymlsrc/Sylius/Behat/Resources/config/suites/api/cart/shopping_cart.phpsrc/Sylius/Behat/Resources/config/suites/api/cart/shopping_cart.ymlsrc/Sylius/Behat/Resources/config/suites/api/channel/channels.phpsrc/Sylius/Behat/Resources/config/suites/api/channel/channels.ymlsrc/Sylius/Behat/Resources/config/suites/api/channel/managing_channels.phpsrc/Sylius/Behat/Resources/config/suites/api/channel/managing_channels.ymlsrc/Sylius/Behat/Resources/config/suites/api/checkout/checkout.phpsrc/Sylius/Behat/Resources/config/suites/api/checkout/checkout.ymlsrc/Sylius/Behat/Resources/config/suites/api/checkout/paying_for_order.phpsrc/Sylius/Behat/Resources/config/suites/api/checkout/paying_for_order.ymlsrc/Sylius/Behat/Resources/config/suites/api/contact/requesting_contact.phpsrc/Sylius/Behat/Resources/config/suites/api/contact/requesting_contact.ymlsrc/Sylius/Behat/Resources/config/suites/api/currency/currencies.phpsrc/Sylius/Behat/Resources/config/suites/api/currency/currencies.ymlsrc/Sylius/Behat/Resources/config/suites/api/currency/managing_currencies.phpsrc/Sylius/Behat/Resources/config/suites/api/currency/managing_currencies.ymlsrc/Sylius/Behat/Resources/config/suites/api/currency/managing_exchange_rates.phpsrc/Sylius/Behat/Resources/config/suites/api/currency/managing_exchange_rates.ymlsrc/Sylius/Behat/Resources/config/suites/api/currency/viewing_exchange_rates.phpsrc/Sylius/Behat/Resources/config/suites/api/currency/viewing_exchange_rates.ymlsrc/Sylius/Behat/Resources/config/suites/api/homepage/viewing_products.phpsrc/Sylius/Behat/Resources/config/suites/api/homepage/viewing_products.ymlsrc/Sylius/Behat/Resources/config/suites/api/inventory/cart_inventory.phpsrc/Sylius/Behat/Resources/config/suites/api/inventory/cart_inventory.ymlsrc/Sylius/Behat/Resources/config/suites/api/inventory/checkout_inventory.phpsrc/Sylius/Behat/Resources/config/suites/api/inventory/checkout_inventory.yamlsrc/Sylius/Behat/Resources/config/suites/api/inventory/managing_inventory.phpsrc/Sylius/Behat/Resources/config/suites/api/inventory/managing_inventory.yamlsrc/Sylius/Behat/Resources/config/suites/api/locale/locales.phpsrc/Sylius/Behat/Resources/config/suites/api/locale/locales.yamlsrc/Sylius/Behat/Resources/config/suites/api/locale/managing_locales.phpsrc/Sylius/Behat/Resources/config/suites/api/locale/managing_locales.yamlsrc/Sylius/Behat/Resources/config/suites/api/order/managing_orders.phpsrc/Sylius/Behat/Resources/config/suites/api/order/managing_orders.ymlsrc/Sylius/Behat/Resources/config/suites/api/order/modifying_placed_order_address.phpsrc/Sylius/Behat/Resources/config/suites/api/order/modifying_placed_order_address.yamlsrc/Sylius/Behat/Resources/config/suites/api/order/order_history.phpsrc/Sylius/Behat/Resources/config/suites/api/order/order_history.yamlsrc/Sylius/Behat/Resources/config/suites/api/payment/managing_payment_methods.phpsrc/Sylius/Behat/Resources/config/suites/api/payment/managing_payment_methods.yamlsrc/Sylius/Behat/Resources/config/suites/api/payment/managing_payments.phpsrc/Sylius/Behat/Resources/config/suites/api/payment/managing_payments.ymlsrc/Sylius/Behat/Resources/config/suites/api/product/adding_product_review.phpsrc/Sylius/Behat/Resources/config/suites/api/product/adding_product_review.ymlsrc/Sylius/Behat/Resources/config/suites/api/product/managing_product_association_types.phpsrc/Sylius/Behat/Resources/config/suites/api/product/managing_product_association_types.ymlsrc/Sylius/Behat/Resources/config/suites/api/product/managing_product_attributes.phpsrc/Sylius/Behat/Resources/config/suites/api/product/managing_product_attributes.ymlsrc/Sylius/Behat/Resources/config/suites/api/product/managing_product_options.phpsrc/Sylius/Behat/Resources/config/suites/api/product/managing_product_options.ymlsrc/Sylius/Behat/Resources/config/suites/api/product/managing_product_reviews.phpsrc/Sylius/Behat/Resources/config/suites/api/product/managing_product_reviews.ymlsrc/Sylius/Behat/Resources/config/suites/api/product/managing_product_variants.phpsrc/Sylius/Behat/Resources/config/suites/api/product/managing_product_variants.ymlsrc/Sylius/Behat/Resources/config/suites/api/product/managing_products.phpsrc/Sylius/Behat/Resources/config/suites/api/product/managing_products.ymlsrc/Sylius/Behat/Resources/config/suites/api/product/viewing_price_history.phpsrc/Sylius/Behat/Resources/config/suites/api/product/viewing_price_history.ymlsrc/Sylius/Behat/Resources/config/suites/api/product/viewing_price_history_after_catalog_promotions.phpsrc/Sylius/Behat/Resources/config/suites/api/product/viewing_price_history_after_catalog_promotions.ymlsrc/Sylius/Behat/Resources/config/suites/api/product/viewing_product_in_admin_panel.phpsrc/Sylius/Behat/Resources/config/suites/api/product/viewing_product_in_admin_panel.yamlsrc/Sylius/Behat/Resources/config/suites/api/product/viewing_product_reviews.phpsrc/Sylius/Behat/Resources/config/suites/api/product/viewing_product_reviews.ymlsrc/Sylius/Behat/Resources/config/suites/api/product/viewing_product_variants.phpsrc/Sylius/Behat/Resources/config/suites/api/product/viewing_product_variants.ymlsrc/Sylius/Behat/Resources/config/suites/api/product/viewing_products.phpsrc/Sylius/Behat/Resources/config/suites/api/product/viewing_products.ymlsrc/Sylius/Behat/Resources/config/suites/api/promotion/applying_catalog_promotions.phpsrc/Sylius/Behat/Resources/config/suites/api/promotion/applying_catalog_promotions.ymlsrc/Sylius/Behat/Resources/config/suites/api/promotion/applying_promotion_coupon.phpsrc/Sylius/Behat/Resources/config/suites/api/promotion/applying_promotion_coupon.ymlsrc/Sylius/Behat/Resources/config/suites/api/promotion/applying_promotion_rules.phpsrc/Sylius/Behat/Resources/config/suites/api/promotion/applying_promotion_rules.ymlsrc/Sylius/Behat/Resources/config/suites/api/promotion/managing_catalog_promotions.phpsrc/Sylius/Behat/Resources/config/suites/api/promotion/managing_catalog_promotions.ymlsrc/Sylius/Behat/Resources/config/suites/api/promotion/managing_promotion_coupons.phpsrc/Sylius/Behat/Resources/config/suites/api/promotion/managing_promotion_coupons.ymlsrc/Sylius/Behat/Resources/config/suites/api/promotion/managing_promotions.phpsrc/Sylius/Behat/Resources/config/suites/api/promotion/managing_promotions.ymlsrc/Sylius/Behat/Resources/config/suites/api/promotion/receiving_discount.phpsrc/Sylius/Behat/Resources/config/suites/api/promotion/receiving_discount.ymlsrc/Sylius/Behat/Resources/config/suites/api/promotion/removing_catalog_promotions.phpsrc/Sylius/Behat/Resources/config/suites/api/promotion/removing_catalog_promotions.ymlsrc/Sylius/Behat/Resources/config/suites/api/shipping/applying_shipping_fee.phpsrc/Sylius/Behat/Resources/config/suites/api/shipping/applying_shipping_fee.ymlsrc/Sylius/Behat/Resources/config/suites/api/shipping/applying_shipping_method_rules.phpsrc/Sylius/Behat/Resources/config/suites/api/shipping/applying_shipping_method_rules.ymlsrc/Sylius/Behat/Resources/config/suites/api/shipping/managing_shipments.phpsrc/Sylius/Behat/Resources/config/suites/api/shipping/managing_shipments.ymlsrc/Sylius/Behat/Resources/config/suites/api/shipping/managing_shipping_categories.phpsrc/Sylius/Behat/Resources/config/suites/api/shipping/managing_shipping_categories.ymlsrc/Sylius/Behat/Resources/config/suites/api/shipping/managing_shipping_methods.phpsrc/Sylius/Behat/Resources/config/suites/api/shipping/managing_shipping_methods.ymlsrc/Sylius/Behat/Resources/config/suites/api/shipping/viewing_shipping_methods.phpsrc/Sylius/Behat/Resources/config/suites/api/shipping/viewing_shipping_methods.ymlsrc/Sylius/Behat/Resources/config/suites/api/taxation/applying_taxes.phpsrc/Sylius/Behat/Resources/config/suites/api/taxation/applying_taxes.ymlsrc/Sylius/Behat/Resources/config/suites/api/taxation/managing_tax_categories.phpsrc/Sylius/Behat/Resources/config/suites/api/taxation/managing_tax_categories.ymlsrc/Sylius/Behat/Resources/config/suites/api/taxation/managing_tax_rates.phpsrc/Sylius/Behat/Resources/config/suites/api/taxation/managing_tax_rates.ymlsrc/Sylius/Behat/Resources/config/suites/api/taxon/managing_taxons.phpsrc/Sylius/Behat/Resources/config/suites/api/taxon/managing_taxons.ymlsrc/Sylius/Behat/Resources/config/suites/api/user/managing_administrators.phpsrc/Sylius/Behat/Resources/config/suites/api/user/managing_administrators.ymlsrc/Sylius/Behat/Resources/config/suites/api/user/managing_customer_groups.phpsrc/Sylius/Behat/Resources/config/suites/api/user/managing_customer_groups.ymlsrc/Sylius/Behat/Resources/config/suites/api/user/managing_customers.phpsrc/Sylius/Behat/Resources/config/suites/api/user/managing_customers.ymlsrc/Sylius/Behat/Resources/config/suites/api/user/managing_users.phpsrc/Sylius/Behat/Resources/config/suites/api/user/managing_users.yml
💤 Files with no reviewable changes (69)
- src/Sylius/Behat/Resources/config/suites/api/shipping/managing_shipments.yml
- src/Sylius/Behat/Resources/config/suites/api/addressing/managing_countries.yaml
- src/Sylius/Behat/Resources/config/suites/api/product/viewing_price_history.yml
- src/Sylius/Behat/Resources/config/suites/api/product/viewing_price_history_after_catalog_promotions.yml
- src/Sylius/Behat/Resources/config/suites/api/taxation/applying_taxes.yml
- src/Sylius/Behat/Resources/config/suites/api/account/address_book.yml
- src/Sylius/Behat/Resources/config/suites/api/product/adding_product_review.yml
- src/Sylius/Behat/Resources/config/suites/api/cart/accessing_cart.yml
- src/Sylius/Behat/Resources/config/suites/api/promotion/receiving_discount.yml
- src/Sylius/Behat/Resources/config/suites/api/promotion/applying_promotion_rules.yml
- src/Sylius/Behat/Resources/config/suites/api/shipping/applying_shipping_method_rules.yml
- src/Sylius/Behat/Resources/config/suites/api/admin/dashboard.yaml
- src/Sylius/Behat/Resources/config/suites/api/account/email_verification.yml
- src/Sylius/Behat/Resources/config/suites/api/admin/login.yml
- src/Sylius/Behat/Resources/config/suites/api/order/modifying_placed_order_address.yaml
- src/Sylius/Behat/Resources/config/suites/api/user/managing_users.yml
- src/Sylius/Behat/Resources/config/suites/api/locale/locales.yaml
- src/Sylius/Behat/Resources/config/suites/api/admin/locale.yaml
- src/Sylius/Behat/Resources/config/suites/api/product/viewing_product_reviews.yml
- src/Sylius/Behat/Resources/config/suites/api/locale/managing_locales.yaml
- src/Sylius/Behat/Resources/config/suites/api/user/managing_customer_groups.yml
- src/Sylius/Behat/Resources/config/suites/api/shipping/managing_shipping_categories.yml
- src/Sylius/Behat/Resources/config/suites/api/contact/requesting_contact.yml
- src/Sylius/Behat/Resources/config/suites/api/product/viewing_product_variants.yml
- src/Sylius/Behat/Resources/config/suites/api/cart/shopping_cart.yml
- src/Sylius/Behat/Resources/config/suites/api/taxation/managing_tax_rates.yml
- src/Sylius/Behat/Resources/config/suites/api/payment/managing_payments.yml
- src/Sylius/Behat/Resources/config/suites/api/channel/managing_channels.yml
- src/Sylius/Behat/Resources/config/suites/api/product/managing_product_attributes.yml
- src/Sylius/Behat/Resources/config/suites/api/promotion/removing_catalog_promotions.yml
- src/Sylius/Behat/Resources/config/suites/api/taxation/managing_tax_categories.yml
- src/Sylius/Behat/Resources/config/suites/api/product/managing_product_reviews.yml
- src/Sylius/Behat/Resources/config/suites/api/payment/managing_payment_methods.yaml
- src/Sylius/Behat/Resources/config/suites/api/product/viewing_product_in_admin_panel.yaml
- src/Sylius/Behat/Resources/config/suites/api/order/managing_orders.yml
- src/Sylius/Behat/Resources/config/suites/api/shipping/applying_shipping_fee.yml
- src/Sylius/Behat/Resources/config/suites/api/product/viewing_products.yml
- src/Sylius/Behat/Resources/config/suites/api/currency/viewing_exchange_rates.yml
- src/Sylius/Behat/Resources/config/suites/api/product/managing_product_variants.yml
- src/Sylius/Behat/Resources/config/suites/api/promotion/managing_promotion_coupons.yml
- src/Sylius/Behat/Resources/config/suites/api/addressing/managing_zones.yml
- src/Sylius/Behat/Resources/config/suites/api/shipping/managing_shipping_methods.yml
- src/Sylius/Behat/Resources/config/suites/api/inventory/checkout_inventory.yaml
- src/Sylius/Behat/Resources/config/suites/api/product/managing_product_association_types.yml
- src/Sylius/Behat/Resources/config/suites/api/promotion/applying_catalog_promotions.yml
- src/Sylius/Behat/Resources/config/suites/api/currency/managing_exchange_rates.yml
- src/Sylius/Behat/Resources/config/suites/api/promotion/managing_promotions.yml
- src/Sylius/Behat/Resources/config/suites/api/checkout/checkout.yml
- src/Sylius/Behat/Resources/config/suites/api/account/customer.yml
- src/Sylius/Behat/Resources/config/suites/api/user/managing_administrators.yml
- src/Sylius/Behat/Resources/config/suites/api/order/order_history.yaml
- src/Sylius/Behat/Resources/config/suites/api/account/customer_registration.yml
- src/Sylius/Behat/Resources/config/suites/api/currency/currencies.yml
- src/Sylius/Behat/Resources/config/suites/api/account/login.yaml
- src/Sylius/Behat/Resources/config/suites/api/checkout/paying_for_order.yml
- src/Sylius/Behat/Resources/config/suites/api/user/managing_customers.yml
- src/Sylius/Behat/Resources/config/suites/api/product/managing_product_options.yml
- src/Sylius/Behat/Resources/config/suites/api/admin/security.yml
- src/Sylius/Behat/Resources/config/suites/api/taxon/managing_taxons.yml
- src/Sylius/Behat/Resources/config/suites/api/homepage/viewing_products.yml
- src/Sylius/Behat/Resources/config/suites/api/inventory/cart_inventory.yml
- src/Sylius/Behat/Resources/config/suites/api.yml
- src/Sylius/Behat/Resources/config/suites/api/shipping/viewing_shipping_methods.yml
- src/Sylius/Behat/Resources/config/suites/api/channel/channels.yml
- src/Sylius/Behat/Resources/config/suites/api/promotion/managing_catalog_promotions.yml
- src/Sylius/Behat/Resources/config/suites/api/promotion/applying_promotion_coupon.yml
- src/Sylius/Behat/Resources/config/suites/api/inventory/managing_inventory.yaml
- src/Sylius/Behat/Resources/config/suites/api/product/managing_products.yml
- src/Sylius/Behat/Resources/config/suites/api/currency/managing_currencies.yml
🚧 Files skipped from review as they are similar to previous changes (36)
- src/Sylius/Behat/Resources/config/suites/api/payment/managing_payment_methods.php
- src/Sylius/Behat/Resources/config/suites/api/promotion/applying_promotion_coupon.php
- src/Sylius/Behat/Resources/config/suites/api/product/managing_product_options.php
- src/Sylius/Behat/Resources/config/suites/api/locale/managing_locales.php
- src/Sylius/Behat/Resources/config/suites/api/user/managing_users.php
- src/Sylius/Behat/Resources/config/suites/api/product/viewing_price_history.php
- src/Sylius/Behat/Resources/config/suites/api/promotion/managing_promotions.php
- src/Sylius/Behat/Resources/config/suites/api/currency/viewing_exchange_rates.php
- src/Sylius/Behat/Resources/config/suites/api/shipping/viewing_shipping_methods.php
- src/Sylius/Behat/Resources/config/suites.php
- src/Sylius/Behat/Resources/config/suites/api/currency/managing_currencies.php
- src/Sylius/Behat/Resources/config/suites/api/taxation/managing_tax_rates.php
- src/Sylius/Behat/Resources/config/suites/api/user/managing_administrators.php
- src/Sylius/Behat/Resources/config/suites/api/account/login.php
- src/Sylius/Behat/Resources/config/suites/api/product/managing_product_association_types.php
- src/Sylius/Behat/Resources/config/suites/api/shipping/managing_shipments.php
- src/Sylius/Behat/Resources/config/suites/api/homepage/viewing_products.php
- src/Sylius/Behat/Resources/config/suites/api/addressing/managing_countries.php
- src/Sylius/Behat/Resources/config/suites/api/admin/locale.php
- src/Sylius/Behat/Resources/config/suites/api/promotion/applying_catalog_promotions.php
- src/Sylius/Behat/Resources/config/suites/api/addressing/managing_zones.php
- src/Sylius/Behat/Resources/config/suites/api/product/adding_product_review.php
- src/Sylius/Behat/Resources/config/suites/api/inventory/checkout_inventory.php
- src/Sylius/Behat/Resources/config/suites/api/product/viewing_product_in_admin_panel.php
- src/Sylius/Behat/Resources/config/suites/api/promotion/removing_catalog_promotions.php
- src/Sylius/Behat/Resources/config/suites/api/account/customer_registration.php
- src/Sylius/Behat/Resources/config/suites/api/order/managing_orders.php
- src/Sylius/Behat/Resources/config/suites/api/product/managing_product_attributes.php
- src/Sylius/Behat/Resources/config/suites/api/shipping/managing_shipping_categories.php
- src/Sylius/Behat/Resources/config/suites/api/order/order_history.php
- src/Sylius/Behat/Resources/config/suites/api/contact/requesting_contact.php
- src/Sylius/Behat/Resources/config/suites/api/admin/login.php
- src/Sylius/Behat/Resources/config/suites/api/admin/dashboard.php
- src/Sylius/Behat/Resources/config/suites/api/user/managing_customer_groups.php
- src/Sylius/Behat/Resources/config/suites/api/product/managing_product_variants.php
- src/Sylius/Behat/Resources/config/suites/api/promotion/managing_promotion_coupons.php
src/Sylius/Behat/Resources/config/suites/api/product/viewing_product_reviews.php
Show resolved
Hide resolved
Co-Authored-By: Loïc Frémont <lc.fremont@gmail.com>
d9cbeca to
3238c13
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (4)
src/Sylius/Behat/Resources/config/suites/api/promotion/removing_catalog_promotions.php (1)
18-43: LGTM — the previousTransform/Setupcontext confusion is fully resolved.Both aliases are correctly imported (lines 18–19) and placed in the right sections:
SetupCatalogPromotionContext::classin the setup block (line 35) andTransformCatalogPromotionContext::classin the transform block (line 43). The context ordering (hooks → setup → transform → api),strict_types, trailing commas, and alphabetically sorteduseimports all comply with the coding guidelines.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/Sylius/Behat/Resources/config/suites/api/promotion/removing_catalog_promotions.php` around lines 18 - 43, No change required: both SetupCatalogPromotionContext and TransformCatalogPromotionContext are correctly imported and placed (SetupCatalogPromotionContext::class in setup contexts and TransformCatalogPromotionContext::class in transform contexts), so leave the use lines and their positions in the suite configuration as-is.src/Sylius/Behat/Resources/config/suites/api/product/managing_product_variants.php (1)
31-33:⚠️ Potential issue | 🟠 MajorRemove duplicate Behat contexts to avoid double registration.
sylius.behat.context.setup.localeandsylius.behat.context.transform.channelare each declared twice in the same suite context list.🐛 Proposed fix
'sylius.behat.context.setup.locale', - 'sylius.behat.context.setup.locale', 'sylius.behat.context.setup.order', @@ 'sylius.behat.context.transform.channel', - 'sylius.behat.context.transform.channel', 'sylius.behat.context.transform.currency',Also applies to: 41-43
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/Sylius/Behat/Resources/config/suites/api/product/managing_product_variants.php` around lines 31 - 33, Remove the duplicate Behat context entries by editing the managing_product_variants suite context arrays so each context identifier is declared only once: remove the extra occurrences of 'sylius.behat.context.setup.locale' and 'sylius.behat.context.transform.channel' from the contexts lists (leave a single instance of each), ensuring no context is registered twice.src/Sylius/Behat/Resources/config/suites/api/promotion/receiving_discount.php (1)
60-61: Trailing commas still missing on the closing parentheses ofwithSuiteandwithProfile.Lines 60 and 61 close multi-line argument lists without trailing commas, which violates the PHP style rules.
🛠️ Proposed fix
->withFilter(new TagFilter('@receiving_discount&&@api')) - ) - ) + ), + ), ;As per coding guidelines: Use trailing commas in multi-line PHP arrays and argument lists.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/Sylius/Behat/Resources/config/suites/api/promotion/receiving_discount.php` around lines 60 - 61, The closing parentheses for the multi-line argument lists passed to withSuite and withProfile are missing trailing commas; update the call sites of withSuite(...) and withProfile(...) so each multi-line argument list ends with a trailing comma before the closing parenthesis to conform to the PHP style rules for multi-line argument lists.src/Sylius/Behat/Resources/config/suites/api/shipping/managing_shipping_methods.php (1)
32-33:⚠️ Potential issue | 🔴 CriticalRemove the duplicate
sylius.behat.context.setup.shippingentry.
sylius.behat.context.setup.shippingappears twice (lines 32 and 33). Behat will instantiate and register it twice, causing doubled@BeforeScenario/@AfterScenariohook execution and potential "ambiguous step" conflicts at runtime.🐛 Proposed fix
'sylius.behat.context.setup.product', 'sylius.behat.context.setup.shipping', - 'sylius.behat.context.setup.shipping', 'sylius.behat.context.setup.zone',🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/Sylius/Behat/Resources/config/suites/api/shipping/managing_shipping_methods.php` around lines 32 - 33, The configuration list contains a duplicate entry 'sylius.behat.context.setup.shipping' that will register the same Behat context twice; remove the redundant 'sylius.behat.context.setup.shipping' occurrence from the contexts array (leaving a single entry) and scan the surrounding context list (e.g., the suite's contexts array where 'sylius.behat.context.setup.shipping' appears) to ensure no other accidental duplicates remain.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/Sylius/Behat/Resources/config/suites/api/checkout/paying_for_order.php`:
- Around line 21-23: The Suite constructor call used in the withSuite chain (new
Suite('api_paying_for_order', [ 'javascript' => false, ])) is a multi-line
argument list and needs a trailing comma after the settings array; update the
withSuite((new Suite('api_paying_for_order', [ ... ]), ...) invocation by adding
the trailing comma after the closing ] so the argument list conforms to the
multi-line trailing-comma rule (look for the new Suite(...) and withSuite(...)
expressions to apply the change).
---
Duplicate comments:
In
`@src/Sylius/Behat/Resources/config/suites/api/product/managing_product_variants.php`:
- Around line 31-33: Remove the duplicate Behat context entries by editing the
managing_product_variants suite context arrays so each context identifier is
declared only once: remove the extra occurrences of
'sylius.behat.context.setup.locale' and 'sylius.behat.context.transform.channel'
from the contexts lists (leave a single instance of each), ensuring no context
is registered twice.
In
`@src/Sylius/Behat/Resources/config/suites/api/promotion/receiving_discount.php`:
- Around line 60-61: The closing parentheses for the multi-line argument lists
passed to withSuite and withProfile are missing trailing commas; update the call
sites of withSuite(...) and withProfile(...) so each multi-line argument list
ends with a trailing comma before the closing parenthesis to conform to the PHP
style rules for multi-line argument lists.
In
`@src/Sylius/Behat/Resources/config/suites/api/promotion/removing_catalog_promotions.php`:
- Around line 18-43: No change required: both SetupCatalogPromotionContext and
TransformCatalogPromotionContext are correctly imported and placed
(SetupCatalogPromotionContext::class in setup contexts and
TransformCatalogPromotionContext::class in transform contexts), so leave the use
lines and their positions in the suite configuration as-is.
In
`@src/Sylius/Behat/Resources/config/suites/api/shipping/managing_shipping_methods.php`:
- Around line 32-33: The configuration list contains a duplicate entry
'sylius.behat.context.setup.shipping' that will register the same Behat context
twice; remove the redundant 'sylius.behat.context.setup.shipping' occurrence
from the contexts array (leaving a single entry) and scan the surrounding
context list (e.g., the suite's contexts array where
'sylius.behat.context.setup.shipping' appears) to ensure no other accidental
duplicates remain.
ℹ️ Review info
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (139)
src/Sylius/Behat/Resources/config/suites.phpsrc/Sylius/Behat/Resources/config/suites/api.phpsrc/Sylius/Behat/Resources/config/suites/api.ymlsrc/Sylius/Behat/Resources/config/suites/api/account/address_book.phpsrc/Sylius/Behat/Resources/config/suites/api/account/address_book.ymlsrc/Sylius/Behat/Resources/config/suites/api/account/customer.phpsrc/Sylius/Behat/Resources/config/suites/api/account/customer.ymlsrc/Sylius/Behat/Resources/config/suites/api/account/customer_registration.phpsrc/Sylius/Behat/Resources/config/suites/api/account/customer_registration.ymlsrc/Sylius/Behat/Resources/config/suites/api/account/email_verification.phpsrc/Sylius/Behat/Resources/config/suites/api/account/email_verification.ymlsrc/Sylius/Behat/Resources/config/suites/api/account/login.phpsrc/Sylius/Behat/Resources/config/suites/api/account/login.yamlsrc/Sylius/Behat/Resources/config/suites/api/addressing/managing_countries.phpsrc/Sylius/Behat/Resources/config/suites/api/addressing/managing_countries.yamlsrc/Sylius/Behat/Resources/config/suites/api/addressing/managing_zones.phpsrc/Sylius/Behat/Resources/config/suites/api/addressing/managing_zones.ymlsrc/Sylius/Behat/Resources/config/suites/api/admin/dashboard.phpsrc/Sylius/Behat/Resources/config/suites/api/admin/dashboard.yamlsrc/Sylius/Behat/Resources/config/suites/api/admin/locale.phpsrc/Sylius/Behat/Resources/config/suites/api/admin/locale.yamlsrc/Sylius/Behat/Resources/config/suites/api/admin/login.phpsrc/Sylius/Behat/Resources/config/suites/api/admin/login.ymlsrc/Sylius/Behat/Resources/config/suites/api/admin/security.phpsrc/Sylius/Behat/Resources/config/suites/api/admin/security.ymlsrc/Sylius/Behat/Resources/config/suites/api/cart/accessing_cart.phpsrc/Sylius/Behat/Resources/config/suites/api/cart/accessing_cart.ymlsrc/Sylius/Behat/Resources/config/suites/api/cart/shopping_cart.phpsrc/Sylius/Behat/Resources/config/suites/api/cart/shopping_cart.ymlsrc/Sylius/Behat/Resources/config/suites/api/channel/channels.phpsrc/Sylius/Behat/Resources/config/suites/api/channel/channels.ymlsrc/Sylius/Behat/Resources/config/suites/api/channel/managing_channels.phpsrc/Sylius/Behat/Resources/config/suites/api/channel/managing_channels.ymlsrc/Sylius/Behat/Resources/config/suites/api/checkout/checkout.phpsrc/Sylius/Behat/Resources/config/suites/api/checkout/checkout.ymlsrc/Sylius/Behat/Resources/config/suites/api/checkout/paying_for_order.phpsrc/Sylius/Behat/Resources/config/suites/api/checkout/paying_for_order.ymlsrc/Sylius/Behat/Resources/config/suites/api/contact/requesting_contact.phpsrc/Sylius/Behat/Resources/config/suites/api/contact/requesting_contact.ymlsrc/Sylius/Behat/Resources/config/suites/api/currency/currencies.phpsrc/Sylius/Behat/Resources/config/suites/api/currency/currencies.ymlsrc/Sylius/Behat/Resources/config/suites/api/currency/managing_currencies.phpsrc/Sylius/Behat/Resources/config/suites/api/currency/managing_currencies.ymlsrc/Sylius/Behat/Resources/config/suites/api/currency/managing_exchange_rates.phpsrc/Sylius/Behat/Resources/config/suites/api/currency/managing_exchange_rates.ymlsrc/Sylius/Behat/Resources/config/suites/api/currency/viewing_exchange_rates.phpsrc/Sylius/Behat/Resources/config/suites/api/currency/viewing_exchange_rates.ymlsrc/Sylius/Behat/Resources/config/suites/api/homepage/viewing_products.phpsrc/Sylius/Behat/Resources/config/suites/api/homepage/viewing_products.ymlsrc/Sylius/Behat/Resources/config/suites/api/inventory/cart_inventory.phpsrc/Sylius/Behat/Resources/config/suites/api/inventory/cart_inventory.ymlsrc/Sylius/Behat/Resources/config/suites/api/inventory/checkout_inventory.phpsrc/Sylius/Behat/Resources/config/suites/api/inventory/checkout_inventory.yamlsrc/Sylius/Behat/Resources/config/suites/api/inventory/managing_inventory.phpsrc/Sylius/Behat/Resources/config/suites/api/inventory/managing_inventory.yamlsrc/Sylius/Behat/Resources/config/suites/api/locale/locales.phpsrc/Sylius/Behat/Resources/config/suites/api/locale/locales.yamlsrc/Sylius/Behat/Resources/config/suites/api/locale/managing_locales.phpsrc/Sylius/Behat/Resources/config/suites/api/locale/managing_locales.yamlsrc/Sylius/Behat/Resources/config/suites/api/order/managing_orders.phpsrc/Sylius/Behat/Resources/config/suites/api/order/managing_orders.ymlsrc/Sylius/Behat/Resources/config/suites/api/order/modifying_placed_order_address.phpsrc/Sylius/Behat/Resources/config/suites/api/order/modifying_placed_order_address.yamlsrc/Sylius/Behat/Resources/config/suites/api/order/order_history.phpsrc/Sylius/Behat/Resources/config/suites/api/order/order_history.yamlsrc/Sylius/Behat/Resources/config/suites/api/payment/managing_payment_methods.phpsrc/Sylius/Behat/Resources/config/suites/api/payment/managing_payment_methods.yamlsrc/Sylius/Behat/Resources/config/suites/api/payment/managing_payments.phpsrc/Sylius/Behat/Resources/config/suites/api/payment/managing_payments.ymlsrc/Sylius/Behat/Resources/config/suites/api/product/adding_product_review.phpsrc/Sylius/Behat/Resources/config/suites/api/product/adding_product_review.ymlsrc/Sylius/Behat/Resources/config/suites/api/product/managing_product_association_types.phpsrc/Sylius/Behat/Resources/config/suites/api/product/managing_product_association_types.ymlsrc/Sylius/Behat/Resources/config/suites/api/product/managing_product_attributes.phpsrc/Sylius/Behat/Resources/config/suites/api/product/managing_product_attributes.ymlsrc/Sylius/Behat/Resources/config/suites/api/product/managing_product_options.phpsrc/Sylius/Behat/Resources/config/suites/api/product/managing_product_options.ymlsrc/Sylius/Behat/Resources/config/suites/api/product/managing_product_reviews.phpsrc/Sylius/Behat/Resources/config/suites/api/product/managing_product_reviews.ymlsrc/Sylius/Behat/Resources/config/suites/api/product/managing_product_variants.phpsrc/Sylius/Behat/Resources/config/suites/api/product/managing_product_variants.ymlsrc/Sylius/Behat/Resources/config/suites/api/product/managing_products.phpsrc/Sylius/Behat/Resources/config/suites/api/product/managing_products.ymlsrc/Sylius/Behat/Resources/config/suites/api/product/viewing_price_history.phpsrc/Sylius/Behat/Resources/config/suites/api/product/viewing_price_history.ymlsrc/Sylius/Behat/Resources/config/suites/api/product/viewing_price_history_after_catalog_promotions.phpsrc/Sylius/Behat/Resources/config/suites/api/product/viewing_price_history_after_catalog_promotions.ymlsrc/Sylius/Behat/Resources/config/suites/api/product/viewing_product_in_admin_panel.phpsrc/Sylius/Behat/Resources/config/suites/api/product/viewing_product_in_admin_panel.yamlsrc/Sylius/Behat/Resources/config/suites/api/product/viewing_product_reviews.phpsrc/Sylius/Behat/Resources/config/suites/api/product/viewing_product_reviews.ymlsrc/Sylius/Behat/Resources/config/suites/api/product/viewing_product_variants.phpsrc/Sylius/Behat/Resources/config/suites/api/product/viewing_product_variants.ymlsrc/Sylius/Behat/Resources/config/suites/api/product/viewing_products.phpsrc/Sylius/Behat/Resources/config/suites/api/product/viewing_products.ymlsrc/Sylius/Behat/Resources/config/suites/api/promotion/applying_catalog_promotions.phpsrc/Sylius/Behat/Resources/config/suites/api/promotion/applying_catalog_promotions.ymlsrc/Sylius/Behat/Resources/config/suites/api/promotion/applying_promotion_coupon.phpsrc/Sylius/Behat/Resources/config/suites/api/promotion/applying_promotion_coupon.ymlsrc/Sylius/Behat/Resources/config/suites/api/promotion/applying_promotion_rules.phpsrc/Sylius/Behat/Resources/config/suites/api/promotion/applying_promotion_rules.ymlsrc/Sylius/Behat/Resources/config/suites/api/promotion/managing_catalog_promotions.phpsrc/Sylius/Behat/Resources/config/suites/api/promotion/managing_catalog_promotions.ymlsrc/Sylius/Behat/Resources/config/suites/api/promotion/managing_promotion_coupons.phpsrc/Sylius/Behat/Resources/config/suites/api/promotion/managing_promotion_coupons.ymlsrc/Sylius/Behat/Resources/config/suites/api/promotion/managing_promotions.phpsrc/Sylius/Behat/Resources/config/suites/api/promotion/managing_promotions.ymlsrc/Sylius/Behat/Resources/config/suites/api/promotion/receiving_discount.phpsrc/Sylius/Behat/Resources/config/suites/api/promotion/receiving_discount.ymlsrc/Sylius/Behat/Resources/config/suites/api/promotion/removing_catalog_promotions.phpsrc/Sylius/Behat/Resources/config/suites/api/promotion/removing_catalog_promotions.ymlsrc/Sylius/Behat/Resources/config/suites/api/shipping/applying_shipping_fee.phpsrc/Sylius/Behat/Resources/config/suites/api/shipping/applying_shipping_fee.ymlsrc/Sylius/Behat/Resources/config/suites/api/shipping/applying_shipping_method_rules.phpsrc/Sylius/Behat/Resources/config/suites/api/shipping/applying_shipping_method_rules.ymlsrc/Sylius/Behat/Resources/config/suites/api/shipping/managing_shipments.phpsrc/Sylius/Behat/Resources/config/suites/api/shipping/managing_shipments.ymlsrc/Sylius/Behat/Resources/config/suites/api/shipping/managing_shipping_categories.phpsrc/Sylius/Behat/Resources/config/suites/api/shipping/managing_shipping_categories.ymlsrc/Sylius/Behat/Resources/config/suites/api/shipping/managing_shipping_methods.phpsrc/Sylius/Behat/Resources/config/suites/api/shipping/managing_shipping_methods.ymlsrc/Sylius/Behat/Resources/config/suites/api/shipping/viewing_shipping_methods.phpsrc/Sylius/Behat/Resources/config/suites/api/shipping/viewing_shipping_methods.ymlsrc/Sylius/Behat/Resources/config/suites/api/taxation/applying_taxes.phpsrc/Sylius/Behat/Resources/config/suites/api/taxation/applying_taxes.ymlsrc/Sylius/Behat/Resources/config/suites/api/taxation/managing_tax_categories.phpsrc/Sylius/Behat/Resources/config/suites/api/taxation/managing_tax_categories.ymlsrc/Sylius/Behat/Resources/config/suites/api/taxation/managing_tax_rates.phpsrc/Sylius/Behat/Resources/config/suites/api/taxation/managing_tax_rates.ymlsrc/Sylius/Behat/Resources/config/suites/api/taxon/managing_taxons.phpsrc/Sylius/Behat/Resources/config/suites/api/taxon/managing_taxons.ymlsrc/Sylius/Behat/Resources/config/suites/api/user/managing_administrators.phpsrc/Sylius/Behat/Resources/config/suites/api/user/managing_administrators.ymlsrc/Sylius/Behat/Resources/config/suites/api/user/managing_customer_groups.phpsrc/Sylius/Behat/Resources/config/suites/api/user/managing_customer_groups.ymlsrc/Sylius/Behat/Resources/config/suites/api/user/managing_customers.phpsrc/Sylius/Behat/Resources/config/suites/api/user/managing_customers.ymlsrc/Sylius/Behat/Resources/config/suites/api/user/managing_users.phpsrc/Sylius/Behat/Resources/config/suites/api/user/managing_users.yml
💤 Files with no reviewable changes (69)
- src/Sylius/Behat/Resources/config/suites/api/checkout/paying_for_order.yml
- src/Sylius/Behat/Resources/config/suites/api/admin/locale.yaml
- src/Sylius/Behat/Resources/config/suites/api/shipping/applying_shipping_method_rules.yml
- src/Sylius/Behat/Resources/config/suites/api/taxation/managing_tax_rates.yml
- src/Sylius/Behat/Resources/config/suites/api/product/viewing_price_history.yml
- src/Sylius/Behat/Resources/config/suites/api/account/customer.yml
- src/Sylius/Behat/Resources/config/suites/api/addressing/managing_countries.yaml
- src/Sylius/Behat/Resources/config/suites/api/locale/locales.yaml
- src/Sylius/Behat/Resources/config/suites/api/product/viewing_price_history_after_catalog_promotions.yml
- src/Sylius/Behat/Resources/config/suites/api/user/managing_customers.yml
- src/Sylius/Behat/Resources/config/suites/api/product/managing_product_options.yml
- src/Sylius/Behat/Resources/config/suites/api/payment/managing_payments.yml
- src/Sylius/Behat/Resources/config/suites/api/currency/managing_exchange_rates.yml
- src/Sylius/Behat/Resources/config/suites/api/cart/shopping_cart.yml
- src/Sylius/Behat/Resources/config/suites/api/order/modifying_placed_order_address.yaml
- src/Sylius/Behat/Resources/config/suites/api/shipping/managing_shipping_methods.yml
- src/Sylius/Behat/Resources/config/suites/api/admin/security.yml
- src/Sylius/Behat/Resources/config/suites/api/locale/managing_locales.yaml
- src/Sylius/Behat/Resources/config/suites/api/addressing/managing_zones.yml
- src/Sylius/Behat/Resources/config/suites/api/currency/viewing_exchange_rates.yml
- src/Sylius/Behat/Resources/config/suites/api/product/managing_product_association_types.yml
- src/Sylius/Behat/Resources/config/suites/api/inventory/cart_inventory.yml
- src/Sylius/Behat/Resources/config/suites/api/order/order_history.yaml
- src/Sylius/Behat/Resources/config/suites/api/currency/currencies.yml
- src/Sylius/Behat/Resources/config/suites/api/product/adding_product_review.yml
- src/Sylius/Behat/Resources/config/suites/api/product/viewing_product_variants.yml
- src/Sylius/Behat/Resources/config/suites/api/promotion/receiving_discount.yml
- src/Sylius/Behat/Resources/config/suites/api/shipping/managing_shipments.yml
- src/Sylius/Behat/Resources/config/suites/api/payment/managing_payment_methods.yaml
- src/Sylius/Behat/Resources/config/suites/api/shipping/viewing_shipping_methods.yml
- src/Sylius/Behat/Resources/config/suites/api/account/email_verification.yml
- src/Sylius/Behat/Resources/config/suites/api/shipping/applying_shipping_fee.yml
- src/Sylius/Behat/Resources/config/suites/api/product/managing_product_reviews.yml
- src/Sylius/Behat/Resources/config/suites/api/product/managing_products.yml
- src/Sylius/Behat/Resources/config/suites/api/promotion/applying_promotion_coupon.yml
- src/Sylius/Behat/Resources/config/suites/api/account/address_book.yml
- src/Sylius/Behat/Resources/config/suites/api/user/managing_administrators.yml
- src/Sylius/Behat/Resources/config/suites/api/product/viewing_products.yml
- src/Sylius/Behat/Resources/config/suites/api/promotion/managing_promotions.yml
- src/Sylius/Behat/Resources/config/suites/api/account/customer_registration.yml
- src/Sylius/Behat/Resources/config/suites/api/admin/dashboard.yaml
- src/Sylius/Behat/Resources/config/suites/api/homepage/viewing_products.yml
- src/Sylius/Behat/Resources/config/suites/api/checkout/checkout.yml
- src/Sylius/Behat/Resources/config/suites/api.yml
- src/Sylius/Behat/Resources/config/suites/api/inventory/managing_inventory.yaml
- src/Sylius/Behat/Resources/config/suites/api/currency/managing_currencies.yml
- src/Sylius/Behat/Resources/config/suites/api/channel/channels.yml
- src/Sylius/Behat/Resources/config/suites/api/promotion/applying_catalog_promotions.yml
- src/Sylius/Behat/Resources/config/suites/api/product/managing_product_variants.yml
- src/Sylius/Behat/Resources/config/suites/api/promotion/managing_catalog_promotions.yml
- src/Sylius/Behat/Resources/config/suites/api/promotion/removing_catalog_promotions.yml
- src/Sylius/Behat/Resources/config/suites/api/admin/login.yml
- src/Sylius/Behat/Resources/config/suites/api/product/viewing_product_reviews.yml
- src/Sylius/Behat/Resources/config/suites/api/promotion/managing_promotion_coupons.yml
- src/Sylius/Behat/Resources/config/suites/api/inventory/checkout_inventory.yaml
- src/Sylius/Behat/Resources/config/suites/api/taxation/applying_taxes.yml
- src/Sylius/Behat/Resources/config/suites/api/user/managing_users.yml
- src/Sylius/Behat/Resources/config/suites/api/channel/managing_channels.yml
- src/Sylius/Behat/Resources/config/suites/api/taxation/managing_tax_categories.yml
- src/Sylius/Behat/Resources/config/suites/api/taxon/managing_taxons.yml
- src/Sylius/Behat/Resources/config/suites/api/cart/accessing_cart.yml
- src/Sylius/Behat/Resources/config/suites/api/product/viewing_product_in_admin_panel.yaml
- src/Sylius/Behat/Resources/config/suites/api/contact/requesting_contact.yml
- src/Sylius/Behat/Resources/config/suites/api/order/managing_orders.yml
- src/Sylius/Behat/Resources/config/suites/api/shipping/managing_shipping_categories.yml
- src/Sylius/Behat/Resources/config/suites/api/promotion/applying_promotion_rules.yml
- src/Sylius/Behat/Resources/config/suites/api/user/managing_customer_groups.yml
- src/Sylius/Behat/Resources/config/suites/api/account/login.yaml
- src/Sylius/Behat/Resources/config/suites/api/product/managing_product_attributes.yml
🚧 Files skipped from review as they are similar to previous changes (38)
- src/Sylius/Behat/Resources/config/suites/api/admin/locale.php
- src/Sylius/Behat/Resources/config/suites/api/shipping/managing_shipments.php
- src/Sylius/Behat/Resources/config/suites/api/account/customer.php
- src/Sylius/Behat/Resources/config/suites/api/product/viewing_product_in_admin_panel.php
- src/Sylius/Behat/Resources/config/suites/api/product/managing_product_reviews.php
- src/Sylius/Behat/Resources/config/suites/api/promotion/managing_promotion_coupons.php
- src/Sylius/Behat/Resources/config/suites/api/account/email_verification.php
- src/Sylius/Behat/Resources/config/suites/api/checkout/checkout.php
- src/Sylius/Behat/Resources/config/suites/api/product/viewing_products.php
- src/Sylius/Behat/Resources/config/suites/api/taxation/managing_tax_rates.php
- src/Sylius/Behat/Resources/config/suites/api/account/login.php
- src/Sylius/Behat/Resources/config/suites/api/user/managing_customer_groups.php
- src/Sylius/Behat/Resources/config/suites/api/order/order_history.php
- src/Sylius/Behat/Resources/config/suites/api/admin/security.php
- src/Sylius/Behat/Resources/config/suites/api/account/address_book.php
- src/Sylius/Behat/Resources/config/suites/api/account/customer_registration.php
- src/Sylius/Behat/Resources/config/suites/api/inventory/cart_inventory.php
- src/Sylius/Behat/Resources/config/suites/api/promotion/applying_promotion_rules.php
- src/Sylius/Behat/Resources/config/suites/api/taxation/managing_tax_categories.php
- src/Sylius/Behat/Resources/config/suites/api/product/viewing_product_variants.php
- src/Sylius/Behat/Resources/config/suites/api/product/viewing_product_reviews.php
- src/Sylius/Behat/Resources/config/suites/api/admin/login.php
- src/Sylius/Behat/Resources/config/suites/api/shipping/viewing_shipping_methods.php
- src/Sylius/Behat/Resources/config/suites/api/inventory/managing_inventory.php
- src/Sylius/Behat/Resources/config/suites/api/contact/requesting_contact.php
- src/Sylius/Behat/Resources/config/suites/api/user/managing_administrators.php
- src/Sylius/Behat/Resources/config/suites/api/product/managing_product_attributes.php
- src/Sylius/Behat/Resources/config/suites/api/promotion/applying_promotion_coupon.php
- src/Sylius/Behat/Resources/config/suites/api/shipping/applying_shipping_method_rules.php
- src/Sylius/Behat/Resources/config/suites/api/payment/managing_payment_methods.php
- src/Sylius/Behat/Resources/config/suites/api/currency/currencies.php
- src/Sylius/Behat/Resources/config/suites/api.php
- src/Sylius/Behat/Resources/config/suites/api/product/managing_product_association_types.php
- src/Sylius/Behat/Resources/config/suites/api/taxation/applying_taxes.php
- src/Sylius/Behat/Resources/config/suites/api/currency/managing_currencies.php
- src/Sylius/Behat/Resources/config/suites/api/homepage/viewing_products.php
- src/Sylius/Behat/Resources/config/suites/api/product/managing_products.php
- src/Sylius/Behat/Resources/config/suites/api/promotion/managing_catalog_promotions.php
Summary by CodeRabbit