Skip to content

[Behat][Admin] Update pages config from xml to php#18858

Merged
TheMilek merged 1 commit intoSylius:2.3from
NoResponseMate:behat/update-services-definition-to-php-admin-pages
Feb 23, 2026
Merged

[Behat][Admin] Update pages config from xml to php#18858
TheMilek merged 1 commit intoSylius:2.3from
NoResponseMate:behat/update-services-definition-to-php-admin-pages

Conversation

@NoResponseMate
Copy link
Copy Markdown
Contributor

@NoResponseMate NoResponseMate commented Feb 20, 2026

Q A
Branch? 2.3
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Related tickets partially #18822
License MIT

Summary by CodeRabbit

  • Chores
    • Migrated Behat test configuration from XML to PHP format and consolidated admin page wiring.
    • Restructured dependency injection for admin page objects (create/index/update/etc.) across many modules.
    • Preserved existing behaviors while removing legacy XML configs and standardizing service visibility and registrations.

@NoResponseMate NoResponseMate requested review from a team as code owners February 20, 2026 16:18
@NoResponseMate NoResponseMate added Behat Issues and PRs aimed at improving Behat usage. Maintenance CI configurations, READMEs, releases, etc. labels Feb 20, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 20, 2026

📝 Walkthrough

Walkthrough

Replaced numerous Behat admin page service XML configs with PHP ContainerConfigurator files and updated the main pages import to reference the new pages/admin.php. XML service files under services/pages/admin/*.xml were removed; equivalent *.php service definitions were added.

Changes

Cohort / File(s) Summary
Main import
src/Sylius/Behat/Resources/config/services/pages.xml
Updated import to load pages/admin.php instead of the removed pages/admin.xml.
Admin CRUD base
src/Sylius/Behat/Resources/config/services/pages/admin.php, src/Sylius/Behat/Resources/config/services/pages/admin.xml
Added PHP DI config defining abstract admin CRUD page services (index/create/update) and parameters; removed the old XML equivalent.
Added PHP configs (many)
src/Sylius/Behat/Resources/config/services/pages/admin/*.php
Added a set of PHP ContainerConfigurator files registering page class parameters and private services for admin pages (account, admin_user, catalog_promotion, channel, country, currency, customer, customer_group, dashboard, exchange_rate, impersonate_user, inventory, locale, order, payment, payment_method, price_history, product, product_association_type, product_attribute, product_option, product_review, product_variant, promotion, promotion_coupon, shipment, shipping_category, shipping_method, tax_category, tax_rate, taxon, zone).
Removed XML configs (many)
src/Sylius/Behat/Resources/config/services/pages/admin/*.xml
Deleted the corresponding XML files for the same admin pages listed above, removing their parameter and service declarations. These XML-to-PHP migrations are one-to-one for most services (class params, parents, and constructor args preserved in PHP).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

Admin

Suggested reviewers

  • TheMilek

Poem

🐇 I hopped through configs, nibbling XML away,

Now PHP sprouts where page services play.
Behat blossoms, tidy and neat,
Containers purr — DI is sweet.
Hop-hop! New files make my paws sway.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title '[Behat][Admin] Update pages config from xml to php' accurately and concisely summarizes the main change: converting Behat admin page configuration files from XML format to PHP format, which is the primary objective evident throughout all modified files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 20, 2026

❌ Preview Environment deleted from Bunnyshell

Available commands:

  • 🚀 /bns:deploy to redeploy the environment

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 11

🧹 Nitpick comments (16)
src/Sylius/Behat/Resources/config/services/pages/admin/order.php (1)

14-17: use imports are not sorted alphabetically.

HistoryPage (H) should precede IndexPage (I). As per coding guidelines, use imports must be sorted alphabetically within each type group.

🔤 Proposed fix
-use Sylius\Behat\Page\Admin\Order\IndexPage;
-use Sylius\Behat\Page\Admin\Order\ShowPage;
-use Sylius\Behat\Page\Admin\Order\UpdatePage;
-use Sylius\Behat\Page\Admin\Order\HistoryPage;
+use Sylius\Behat\Page\Admin\Order\HistoryPage;
+use Sylius\Behat\Page\Admin\Order\IndexPage;
+use Sylius\Behat\Page\Admin\Order\ShowPage;
+use Sylius\Behat\Page\Admin\Order\UpdatePage;

As per coding guidelines: "Sort PHP use imports alphabetically and group by type (classes, functions, constants)."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/order.php` around
lines 14 - 17, The four PHP use imports are out of alphabetical order; reorder
the class imports so they are alphabetized (HistoryPage, IndexPage, ShowPage,
UpdatePage) within the use block; update the lines referencing
Sylius\Behat\Page\Admin\Order\HistoryPage, IndexPage, ShowPage, and UpdatePage
so the import list is sorted alphabetically and grouped correctly.
src/Sylius/Behat/Resources/config/services/pages/admin/payment_method.php (1)

26-26: ->defaults()->public() is redundant — every service immediately overrides it to ->private().

Since all three services in this file call ->private(), the global public() default is never actually used. Consider flipping the default or dropping it:

♻️ Proposed simplification
-    $services->defaults()->public();
+    $services->defaults()->private();

     $services
         ->set('sylius.behat.page.admin.payment_method.create', '%sylius.behat.page.admin.payment_method.create.class%')
-        ->private()
         ->parent('sylius.behat.page.admin.crud.create')
         ->args(['sylius_admin_payment_method_create'])
     ;

     $services
         ->set('sylius.behat.page.admin.payment_method.index', '%sylius.behat.page.admin.payment_method.index.class%')
-        ->private()
         ->parent('sylius.behat.page.admin.crud.index')
         ->args(['sylius_admin_payment_method_index'])
     ;

     $services
         ->set('sylius.behat.page.admin.payment_method.update', '%sylius.behat.page.admin.payment_method.update.class%')
-        ->private()
         ->parent('sylius.behat.page.admin.crud.update')
         ->args(['sylius_admin_payment_method_update'])
     ;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/payment_method.php` at
line 26, The defaults call setting services to public is redundant because each
service in this file immediately calls ->private(); update the defaults line so
it matches actual usage by either removing the
"$services->defaults()->public();" line entirely or changing it to
"$services->defaults()->private();" so the default visibility aligns with the
three services that call ->private() (look for the "$services->defaults()" usage
and the service definitions that chain "->private()").
src/Sylius/Behat/Resources/config/services/pages/admin/customer_group.php (1)

24-45: ->defaults()->public() followed by explicit ->private() on each service is the established pattern across all migrated admin page configs

While the logical concern is valid—setting ->defaults()->public() when every service explicitly calls ->private() is redundant—this pattern is consistent across all 30 migrated admin page PHP config files in this directory. Refactoring to use ->defaults()->private() and removing per-service ->private() calls would improve clarity, but should be applied uniformly across the entire migration for consistency rather than as a file-specific fix.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/customer_group.php`
around lines 24 - 45, The file currently calls $services->defaults()->public()
and then marks each service private with ->private(); update the defaults to
$services->defaults()->private() and remove the redundant per-service
->private() calls (affecting services defined via
->set('sylius.behat.page.admin.customer_group.create' / .index / .update) so
they inherit privacy from the defaults); apply this same change consistently
across all migrated admin page config PHP files in the directory rather than
only this file.
src/Sylius/Behat/Resources/config/services/pages/admin/product_variant.php (1)

29-29: defaults()->public() contradicts the intent — this pattern is redundant across all 30 admin page configs.

Setting the container default to public() and then calling ->private() on every single service is repeated boilerplate with no functional benefit. More importantly, the default is never actually used, creating a maintenance trap: any future service added to this file that omits an explicit visibility call will silently become public, leaking Behat-internal services into the container.

This pattern is consistent across all 30 admin page configuration files in this PR. For consistency and safety, change to defaults()->private() or omit the defaults() call entirely:

♻️ Proposed fix
-    $services->defaults()->public();
+    $services->defaults()->private();
 
     $services
         ->set('sylius.behat.page.admin.product_variant.create', '%sylius.behat.page.admin.product_variant.create.class%')
-        ->private()
         ->parent('sylius.behat.page.admin.crud.create')
         ->args(['sylius_admin_product_variant_create'])
     ;
 
     $services
         ->set('sylius.behat.page.admin.product_variant.generate', '%sylius.behat.page.admin.product_variant.generate.class%')
-        ->private()
         ->parent('sylius.behat.symfony_page')
         ->args(['product_variant'])
     ;
 
     $services
         ->set('sylius.behat.page.admin.product_variant.index', '%sylius.behat.page.admin.product_variant.index.class%')
-        ->private()
         ->parent('sylius.behat.page.admin.crud.index')
         ->args(['sylius_admin_product_variant_index'])
     ;
 
     $services
         ->set('sylius.behat.page.admin.product_variant.update', '%sylius.behat.page.admin.product_variant.update.class%')
-        ->private()
         ->parent('sylius.behat.page.admin.crud.update')
         ->args(['sylius_admin_product_variant_update'])
     ;

Apply the same fix to all other admin page configs (zone.php, customer.php, etc.) for consistency.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/product_variant.php`
at line 29, The file sets service defaults to public via
$services->defaults()->public(), which causes redundant per-service ->private()
calls and risks accidental public exposure; change that call to
$services->defaults()->private() (or remove the defaults() call entirely) so
newly added services default to private visibility, and apply the same change
across the other admin page config files (e.g., zone.php, customer.php) to
remove the repeated boilerplate and prevent accidental public services.
src/Sylius/Behat/Resources/config/services/pages/admin/shipping_category.php (1)

26-47: defaults()->public() is redundant — all services are immediately overridden to ->private().

Setting the default visibility to public on Line 26 has no effect here since every service defined in this file explicitly calls ->private(). Either switch the default to ->private() (and drop the per-service call) or remove the defaults line entirely.

♻️ Proposed cleanup
-    $services->defaults()->public();
+    $services->defaults()->private();
 
     $services
         ->set('sylius.behat.page.admin.shipping_category.create', '%sylius.behat.page.admin.shipping_category.create.class%')
-        ->private()
         ->parent('sylius.behat.page.admin.crud.create')
         ->args(['sylius_admin_shipping_category_create'])
     ;
 
     $services
         ->set('sylius.behat.page.admin.shipping_category.index', '%sylius.behat.page.admin.shipping_category.index.class%')
-        ->private()
         ->parent('sylius.behat.page.admin.crud.index')
         ->args(['sylius_admin_shipping_category_index'])
     ;
 
     $services
         ->set('sylius.behat.page.admin.shipping_category.update', '%sylius.behat.page.admin.shipping_category.update.class%')
-        ->private()
         ->parent('sylius.behat.page.admin.crud.update')
         ->args(['sylius_admin_shipping_category_update'])
     ;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/shipping_category.php`
around lines 26 - 47, The defaults()->public() call is redundant because each
service ('sylius.behat.page.admin.shipping_category.create', '...index',
'...update') immediately sets ->private(); change the defaults to ->private()
(defaults()->private()) and remove the per-service ->private() calls OR remove
the defaults() line entirely and keep the per-service ->private() calls; update
the block around defaults() and the service definitions (the set(...) entries)
accordingly so visibility is consistently defined by the chosen approach.
src/Sylius/Behat/Resources/config/services/pages/admin/product_attribute.php (1)

24-24: Remove or change defaults()->public() to defaults()->private() — all services are explicitly private.

Every service in this file is marked ->private(), contradicting the defaults()->public() declaration. This pattern is misleading and appears systematically across most other page config files in the same directory (30 out of 32 files follow this pattern). Align the default to match the actual service visibility: use ->private() or remove the line entirely.

Suggested fix
-    $services->defaults()->public();
+    $services->defaults()->private();

Or remove the line if the container defaults to private for this scope.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/product_attribute.php`
at line 24, The file sets $services->defaults()->public() which contradicts the
explicit ->private() declarations for each service; change the defaults call to
$services->defaults()->private() (or remove the defaults() call entirely) so the
default visibility matches the explicit service definitions; update the line
containing $services->defaults()->public() to use ->private() or delete it to
align with the individual ->private() service entries.
src/Sylius/Behat/Resources/config/services/pages/admin/tax_category.php (1)

24-24: ->defaults()->public() is misleading — every service immediately overrides it with ->private().

Every service defined is private by default in Symfony. Setting the default to public() here is effectively a no-op since all three services below immediately call ->private(). This creates a false impression that the file intends to expose public services.

Consider either removing the ->defaults() call entirely (relying on Symfony's private-by-default) or switching it to ->defaults()->private() to match the actual intent.

♻️ Proposed fix
-    $services->defaults()->public();
+    $services->defaults()->private();
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/tax_category.php` at
line 24, The file sets $services->defaults()->public() which is misleading
because each service below explicitly calls ->private(); change this to match
intent by either removing the $services->defaults() call entirely or replacing
it with $services->defaults()->private() so defaults align with the explicit
->private() on the service definitions (leave the individual ->private() calls
intact for clarity).
src/Sylius/Behat/Resources/config/services/pages/admin/product_review.php (1)

14-18: Add a blank line between use class and use function groups.

The coding guidelines require use imports to be sorted alphabetically and grouped by type (classes, functions, constants). A blank line separator between the class group (lines 14–17) and the function group (line 18) is needed to make the grouping explicit.

♻️ Proposed fix
 use Sylius\Behat\Page\Admin\ProductReview\IndexPage;
 use Sylius\Behat\Page\Admin\ProductReview\UpdatePage;
 use Sylius\Behat\Service\Helper\AutocompleteHelperInterface;
 use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
+
 use function Symfony\Component\DependencyInjection\Loader\Configurator\service;

As per coding guidelines, "Sort PHP use imports alphabetically and group by type (classes, functions, constants)."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/product_review.php`
around lines 14 - 18, Add a blank line separator between the grouped class
imports (use Sylius\Behat\Page\Admin\ProductReview\IndexPage; use
Sylius\Behat\Page\Admin\ProductReview\UpdatePage; use
Sylius\Behat\Service\Helper\AutocompleteHelperInterface;) and the function
import (use function
Symfony\Component\DependencyInjection\Loader\Configurator\service;), keeping the
existing alphabetical order and grouping by type so the class imports remain
together and the function import is visually separated.
src/Sylius/Behat/Resources/config/services/pages/admin/shipping_method.php (1)

23-25: Remove unnecessary *.class DI parameter indirection and use PHP class constants directly.

The *.class parameters are defined and immediately referenced via %…% placeholders within the same file. Since no external code overrides these parameters (common in XML configs for multi-bundle extensibility), the indirection adds complexity without benefit. Replace placeholder references with direct class constants and remove the parameter definitions.

♻️ Proposed simplification
-    $parameters->set('sylius.behat.page.admin.shipping_method.create.class', CreatePage::class);
-    $parameters->set('sylius.behat.page.admin.shipping_method.index.class', IndexPage::class);
-    $parameters->set('sylius.behat.page.admin.shipping_method.update.class', UpdatePage::class);
-
     $services
-        ->set('sylius.behat.page.admin.shipping_method.create', '%sylius.behat.page.admin.shipping_method.create.class%')
+        ->set('sylius.behat.page.admin.shipping_method.create', CreatePage::class)
         ->private()
         ->parent('sylius.behat.page.admin.crud.create')
         ->args(['sylius_admin_shipping_method_create'])
     ;

     $services
-        ->set('sylius.behat.page.admin.shipping_method.index', '%sylius.behat.page.admin.shipping_method.index.class%')
+        ->set('sylius.behat.page.admin.shipping_method.index', IndexPage::class)
         ->private()
         ->parent('sylius.behat.page.admin.crud.index')
         ->args(['sylius_admin_shipping_method_index'])
     ;

     $services
-        ->set('sylius.behat.page.admin.shipping_method.update', '%sylius.behat.page.admin.shipping_method.update.class%')
+        ->set('sylius.behat.page.admin.shipping_method.update', UpdatePage::class)
         ->private()
         ->parent('sylius.behat.page.admin.crud.update')
         ->args(['sylius_admin_shipping_method_update'])
     ;

Also remove the now-unused $parameters variable assignment on line 21.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/shipping_method.php`
around lines 23 - 25, Remove the unnecessary DI parameter indirection for page
classes: delete the three parameter definitions that set
'sylius.behat.page.admin.shipping_method.create.class',
'sylius.behat.page.admin.shipping_method.index.class', and
'sylius.behat.page.admin.shipping_method.update.class'; then update any
references in this config that use the placeholders
%sylius.behat.page.admin.shipping_method.create.class%,
%sylius.behat.page.admin.shipping_method.index.class%, and
%sylius.behat.page.admin.shipping_method.update.class% to use the PHP class
constants CreatePage::class, IndexPage::class, and UpdatePage::class directly;
finally remove the now-unused $parameters variable assignment in this file.
src/Sylius/Behat/Resources/config/services/pages/admin/customer.php (2)

30-30: ->defaults()->public() is immediately negated by ->private() on every service.

All services are private by default in Symfony, so the ->defaults()->public() call on line 30 actively sets a public default that is then overridden back to private on every single service definition. This is both misleading and redundant. Either drop the ->defaults() call entirely, or align it with the actual intent:

♻️ Proposed fix
-    $services->defaults()->public();
+    $services->defaults()->private();

Or simply remove the ->defaults() line altogether, since private is already the Symfony default.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/customer.php` at line
30, The call to ->defaults()->public() sets a public default that is immediately
negated by ->private() on every service; remove the misleading default by
deleting the ->defaults()->public() invocation (or change it to
->defaults()->private() if you prefer an explicit intent) so that service
definitions relying on ->private() are not overridden by a contradictory
default; update any related comments to reflect that services remain private by
default and ensure no other code expects the global default to be public.

14-18: use function import should be separated from class imports.

Per coding guidelines, use imports must be grouped by type (classes, functions, constants) with a blank line between groups. The use function on line 18 is not separated from the class imports above it.

♻️ Proposed fix
 use Sylius\Behat\Page\Admin\Customer\IndexPage;
 use Sylius\Behat\Page\Admin\Customer\ShowPage;
 use Sylius\Behat\Service\Helper\AutocompleteHelperInterface;
 use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
+
 use function Symfony\Component\DependencyInjection\Loader\Configurator\service;

As per coding guidelines: "Sort PHP use imports alphabetically and group by type (classes, functions, constants)."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/customer.php` around
lines 14 - 18, The `use function
Symfony\Component\DependencyInjection\Loader\Configurator\service;` must be
separated from the class imports by a blank line and imports should be grouped
and alphabetized by type; update the import block that currently contains
IndexPage, ShowPage, AutocompleteHelperInterface, ContainerConfigurator and
service so that all class/interface imports (IndexPage, ShowPage,
AutocompleteHelperInterface, ContainerConfigurator) appear together and
alphabetized, then add a blank line and place the `use function ...service;`
after them (alphabetize function imports if there are multiple).
src/Sylius/Behat/Resources/config/services/pages/admin/product.php (2)

37-37: ->defaults()->public() is redundant here — every service immediately overrides it with ->private().

♻️ Proposed fix
-    $services->defaults()->public();
+    $services->defaults()->private();

Or simply remove the ->defaults() line entirely if no shared default is needed.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/product.php` at line
37, The defaults()->public() call is redundant because every service defined
afterwards immediately calls ->private(); remove the
$services->defaults()->public() invocation (or replace it with an appropriate
default if needed) so that services are not given a misleading public
default—search for the literal defaults()->public() and remove that line,
leaving individual ->private() declarations on services (or set a correct shared
default if intended).

33-35: Parameter key ordering inconsistency: update_simple appears before update_configurable.

Lines 34–35 declare update_simple.class before update_configurable.class, which is the opposite of alphabetical order ("Configurable" < "Simple") and the opposite of the order used in the service definitions below (lines 77 vs 87).

♻️ Proposed fix
-    $parameters->set('sylius.behat.page.admin.product.update_simple.class', UpdateSimpleProductPage::class);
-    $parameters->set('sylius.behat.page.admin.product.update_configurable.class', UpdateConfigurableProductPage::class);
+    $parameters->set('sylius.behat.page.admin.product.update_configurable.class', UpdateConfigurableProductPage::class);
+    $parameters->set('sylius.behat.page.admin.product.update_simple.class', UpdateSimpleProductPage::class);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/product.php` around
lines 33 - 35, Parameter ordering is inconsistent: swap the two product update
parameter registrations so
'sylius.behat.page.admin.product.update_configurable.class'
(UpdateConfigurableProductPage::class) is set before
'sylius.behat.page.admin.product.update_simple.class'
(UpdateSimpleProductPage::class) to match alphabetical order and the service
definitions and keep ShowPage::class unchanged.
src/Sylius/Behat/Resources/config/services/pages/admin/account.php (2)

14-16: use imports are not in alphabetical order.

Correct order: LoginPageRequestPasswordResetPageResetPasswordPage.

♻️ Proposed fix
-use Sylius\Behat\Page\Admin\Account\ResetPasswordPage;
-use Sylius\Behat\Page\Admin\Account\LoginPage;
-use Sylius\Behat\Page\Admin\Account\RequestPasswordResetPage;
+use Sylius\Behat\Page\Admin\Account\LoginPage;
+use Sylius\Behat\Page\Admin\Account\RequestPasswordResetPage;
+use Sylius\Behat\Page\Admin\Account\ResetPasswordPage;

As per coding guidelines: "Sort PHP use imports alphabetically and group by type."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/account.php` around
lines 14 - 16, The three PHP use imports for Admin account pages are not
alphabetized; reorder the imports so they are sorted alphabetically by class
name: LoginPage, RequestPasswordResetPage, ResetPasswordPage (replace the
current order in the use block that contains
Sylius\Behat\Page\Admin\Account\ResetPasswordPage / LoginPage /
RequestPasswordResetPage), ensure they remain grouped with other class imports
per coding guidelines, and run your linter/formatter to confirm the change.

24-24: Parameter name sylius.behat.page.admin.reset_password is missing the .class suffix.

Every comparable parameter across this PR and adjacent files uses the .class suffix (e.g., sylius.behat.page.admin.country.create.class, sylius.behat.page.admin.crud.index.class). Without the suffix, the parameter name sylius.behat.page.admin.reset_password is visually indistinguishable from the service ID of the same name (line 42), which creates unnecessary confusion for future maintainers.

♻️ Proposed fix
-    $parameters->set('sylius.behat.page.admin.reset_password', ResetPasswordPage::class);
+    $parameters->set('sylius.behat.page.admin.reset_password.class', ResetPasswordPage::class);
-        ->set('sylius.behat.page.admin.reset_password', '%sylius.behat.page.admin.reset_password%')
+        ->set('sylius.behat.page.admin.reset_password', '%sylius.behat.page.admin.reset_password.class%')

Also applies to: 42-42

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/account.php` at line
24, The parameter name 'sylius.behat.page.admin.reset_password' is missing the
'.class' suffix and may be confused with the service id; update the parameter in
the services config to use 'sylius.behat.page.admin.reset_password.class' so it
matches the convention used by other parameters (reference: the parameter
assignment using ResetPasswordPage::class and the similarly named service id on
line 42) — adjust only the parameter key name wherever it's set to include
'.class' and update any references if necessary.
src/Sylius/Behat/Resources/config/services/pages/admin.php (1)

14-16: use imports are not in alphabetical order.

CreatePage (C) should come before IndexPage (I).

♻️ Proposed fix
-use Sylius\Behat\Page\Admin\Crud\IndexPage;
 use Sylius\Behat\Page\Admin\Crud\CreatePage;
+use Sylius\Behat\Page\Admin\Crud\IndexPage;
 use Sylius\Behat\Page\Admin\Crud\UpdatePage;

As per coding guidelines: "Sort PHP use imports alphabetically and group by type."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/Sylius/Behat/Resources/config/services/pages/admin.php` around lines 14 -
16, The PHP imports in the file are not alphabetically ordered: reorder the use
statements so CreatePage comes before IndexPage and UpdatePage (alphabetical by
class name) and ensure imports are grouped by type per guidelines; specifically
adjust the lines containing IndexPage, CreatePage, and UpdatePage so they appear
in alphabetical order (CreatePage, IndexPage, UpdatePage).
🤖 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/services/pages/admin/admin_user.php`:
- Around line 14-16: Reorder the PHP use statements so they follow the project's
alphabetical/grouping rules: list class imports alphabetically by their full
namespace segment, placing Sylius\Behat\Page\Admin\Administrator\CreatePage and
Sylius\Behat\Page\Admin\Administrator\UpdatePage adjacent and before
Sylius\Behat\Page\Admin\Crud\IndexPage (i.e., Administrator\CreatePage,
Administrator\UpdatePage, then Crud\IndexPage), ensuring class imports remain
grouped and sorted.
- Line 22: Remove the unused local variable $parameters in the service
configuration file: locate the statement that assigns $parameters =
$container->parameters() and delete it since $parameters is never read or used
(no $parameters->set(...) calls); keep using $container directly for any
parameter access if needed and ensure no other code depends on the $parameters
symbol before removing it.

In
`@src/Sylius/Behat/Resources/config/services/pages/admin/catalog_promotion.php`:
- Around line 14-17: The use imports in this file are not alphabetically
ordered; reorder the import statements so that
Sylius\Behat\Page\Admin\CatalogPromotion\ProductVariant\IndexPage comes before
Sylius\Behat\Page\Admin\CatalogPromotion\ShowPage, keeping CreatePage and
UpdatePage in their correct alphabetical positions; update the block containing
CreatePage, ShowPage, IndexPage, and UpdatePage so all four use statements are
sorted lexicographically.
- Around line 30-57: The services in this file
(sylius.behat.page.admin.catalog_promotion.create,
sylius.behat.page.admin.catalog_promotion.index,
sylius.behat.page.admin.catalog_promotion.product_variant.index,
sylius.behat.page.admin.catalog_promotion.update,
sylius.behat.page.admin.catalog_promotion.show) are missing explicit visibility
settings; add $services->defaults()->public(); at the top of the file and chain
->private() onto each ->set(...) call (e.g., the set for
sylius.behat.page.admin.catalog_promotion.create, .index,
.product_variant.index, .update, and .show) so their visibility matches the rest
of the PR and the original XML behavior.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/channel.php`:
- Around line 14-16: The three use statements (CreatePage, UpdatePage,
IndexPage) are not alphabetically ordered; reorder them so imports are sorted by
class name (IndexPage, CreatePage, UpdatePage) or alphabetically as required by
the coding guidelines—specifically ensure the use of IndexPage appears before
UpdatePage and adjust the order of CreatePage/IndexPage/UpdatePage accordingly
in the file (look for the use declarations referencing CreatePage, UpdatePage,
IndexPage).

In `@src/Sylius/Behat/Resources/config/services/pages/admin/impersonate_user.php`:
- Line 17: The configuration closure starting with "return static function
(ContainerConfigurator $container)" is missing a return type; update that
anonymous static function to declare a void return type by adding ": void" to
the signature so it becomes "static function (ContainerConfigurator $container):
void" to match Symfony DI config convention and the project's type-declaration
guideline.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/payment.php`:
- Around line 38-50: The two services
sylius.behat.page.admin.payment.payment_request.index and
sylius.behat.page.admin.payment.payment_request.show are missing ->private() and
thus become public due to $services->defaults()->public(); update both service
definitions (the set(...) calls that configure payment_request.index with
->parent('sylius.behat.page.admin.crud.index') and args([...]) and
payment_request.show with ->parent('sylius.behat.symfony_page')) to include
->private() so they match the privacy of sylius.behat.page.admin.payment.index
and the project's pattern.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/product.php`:
- Around line 19-20: Imports are out of alphabetical order: swap the two use
statements so UpdateConfigurableProductPage comes before
UpdateSimpleProductPage; locate the use declarations referencing
UpdateSimpleProductPage and UpdateConfigurableProductPage and reorder them
alphabetically (classes grouped with other class imports) to comply with the
project's PHP use-import sorting rules.
- Around line 97-101: The service ID sylius.behat.page.admin.product.show_page
does not match the parameter key sylius.behat.page.admin.product.show.class and
breaks the established naming pattern; rename the service to
sylius.behat.page.admin.product.show (replace
sylius.behat.page.admin.product.show_page) so it matches the parameter key and
other show page services, keeping the same class parameter reference and parent
sylius.behat.symfony_page.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/promotion.php`:
- Around line 14-16: The three use imports CreatePage, UpdatePage, and IndexPage
are not alphabetically ordered; reorder them so IndexPage appears before
UpdatePage (alphabetical by class name). Update the use block that currently
lists CreatePage, UpdatePage, IndexPage to be sorted as CreatePage, IndexPage,
UpdatePage (or fully alphabetical if additional imports exist) so that IndexPage
(I) comes before UpdatePage (U).

In `@src/Sylius/Behat/Resources/config/services/pages/admin/tax_category.php`:
- Line 16: The exported closure currently has no return type; update the closure
signature "return static function (ContainerConfigurator $container)" to include
the void return type so it reads "return static function (ContainerConfigurator
$container): void", ensuring the callable follows the project's return-type
coding guidelines and Symfony DI configurator conventions.

---

Nitpick comments:
In `@src/Sylius/Behat/Resources/config/services/pages/admin.php`:
- Around line 14-16: The PHP imports in the file are not alphabetically ordered:
reorder the use statements so CreatePage comes before IndexPage and UpdatePage
(alphabetical by class name) and ensure imports are grouped by type per
guidelines; specifically adjust the lines containing IndexPage, CreatePage, and
UpdatePage so they appear in alphabetical order (CreatePage, IndexPage,
UpdatePage).

In `@src/Sylius/Behat/Resources/config/services/pages/admin/account.php`:
- Around line 14-16: The three PHP use imports for Admin account pages are not
alphabetized; reorder the imports so they are sorted alphabetically by class
name: LoginPage, RequestPasswordResetPage, ResetPasswordPage (replace the
current order in the use block that contains
Sylius\Behat\Page\Admin\Account\ResetPasswordPage / LoginPage /
RequestPasswordResetPage), ensure they remain grouped with other class imports
per coding guidelines, and run your linter/formatter to confirm the change.
- Line 24: The parameter name 'sylius.behat.page.admin.reset_password' is
missing the '.class' suffix and may be confused with the service id; update the
parameter in the services config to use
'sylius.behat.page.admin.reset_password.class' so it matches the convention used
by other parameters (reference: the parameter assignment using
ResetPasswordPage::class and the similarly named service id on line 42) — adjust
only the parameter key name wherever it's set to include '.class' and update any
references if necessary.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/customer_group.php`:
- Around line 24-45: The file currently calls $services->defaults()->public()
and then marks each service private with ->private(); update the defaults to
$services->defaults()->private() and remove the redundant per-service
->private() calls (affecting services defined via
->set('sylius.behat.page.admin.customer_group.create' / .index / .update) so
they inherit privacy from the defaults); apply this same change consistently
across all migrated admin page config PHP files in the directory rather than
only this file.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/customer.php`:
- Line 30: The call to ->defaults()->public() sets a public default that is
immediately negated by ->private() on every service; remove the misleading
default by deleting the ->defaults()->public() invocation (or change it to
->defaults()->private() if you prefer an explicit intent) so that service
definitions relying on ->private() are not overridden by a contradictory
default; update any related comments to reflect that services remain private by
default and ensure no other code expects the global default to be public.
- Around line 14-18: The `use function
Symfony\Component\DependencyInjection\Loader\Configurator\service;` must be
separated from the class imports by a blank line and imports should be grouped
and alphabetized by type; update the import block that currently contains
IndexPage, ShowPage, AutocompleteHelperInterface, ContainerConfigurator and
service so that all class/interface imports (IndexPage, ShowPage,
AutocompleteHelperInterface, ContainerConfigurator) appear together and
alphabetized, then add a blank line and place the `use function ...service;`
after them (alphabetize function imports if there are multiple).

In `@src/Sylius/Behat/Resources/config/services/pages/admin/order.php`:
- Around line 14-17: The four PHP use imports are out of alphabetical order;
reorder the class imports so they are alphabetized (HistoryPage, IndexPage,
ShowPage, UpdatePage) within the use block; update the lines referencing
Sylius\Behat\Page\Admin\Order\HistoryPage, IndexPage, ShowPage, and UpdatePage
so the import list is sorted alphabetically and grouped correctly.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/payment_method.php`:
- Line 26: The defaults call setting services to public is redundant because
each service in this file immediately calls ->private(); update the defaults
line so it matches actual usage by either removing the
"$services->defaults()->public();" line entirely or changing it to
"$services->defaults()->private();" so the default visibility aligns with the
three services that call ->private() (look for the "$services->defaults()" usage
and the service definitions that chain "->private()").

In
`@src/Sylius/Behat/Resources/config/services/pages/admin/product_attribute.php`:
- Line 24: The file sets $services->defaults()->public() which contradicts the
explicit ->private() declarations for each service; change the defaults call to
$services->defaults()->private() (or remove the defaults() call entirely) so the
default visibility matches the explicit service definitions; update the line
containing $services->defaults()->public() to use ->private() or delete it to
align with the individual ->private() service entries.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/product_review.php`:
- Around line 14-18: Add a blank line separator between the grouped class
imports (use Sylius\Behat\Page\Admin\ProductReview\IndexPage; use
Sylius\Behat\Page\Admin\ProductReview\UpdatePage; use
Sylius\Behat\Service\Helper\AutocompleteHelperInterface;) and the function
import (use function
Symfony\Component\DependencyInjection\Loader\Configurator\service;), keeping the
existing alphabetical order and grouping by type so the class imports remain
together and the function import is visually separated.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/product_variant.php`:
- Line 29: The file sets service defaults to public via
$services->defaults()->public(), which causes redundant per-service ->private()
calls and risks accidental public exposure; change that call to
$services->defaults()->private() (or remove the defaults() call entirely) so
newly added services default to private visibility, and apply the same change
across the other admin page config files (e.g., zone.php, customer.php) to
remove the repeated boilerplate and prevent accidental public services.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/product.php`:
- Line 37: The defaults()->public() call is redundant because every service
defined afterwards immediately calls ->private(); remove the
$services->defaults()->public() invocation (or replace it with an appropriate
default if needed) so that services are not given a misleading public
default—search for the literal defaults()->public() and remove that line,
leaving individual ->private() declarations on services (or set a correct shared
default if intended).
- Around line 33-35: Parameter ordering is inconsistent: swap the two product
update parameter registrations so
'sylius.behat.page.admin.product.update_configurable.class'
(UpdateConfigurableProductPage::class) is set before
'sylius.behat.page.admin.product.update_simple.class'
(UpdateSimpleProductPage::class) to match alphabetical order and the service
definitions and keep ShowPage::class unchanged.

In
`@src/Sylius/Behat/Resources/config/services/pages/admin/shipping_category.php`:
- Around line 26-47: The defaults()->public() call is redundant because each
service ('sylius.behat.page.admin.shipping_category.create', '...index',
'...update') immediately sets ->private(); change the defaults to ->private()
(defaults()->private()) and remove the per-service ->private() calls OR remove
the defaults() line entirely and keep the per-service ->private() calls; update
the block around defaults() and the service definitions (the set(...) entries)
accordingly so visibility is consistently defined by the chosen approach.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/shipping_method.php`:
- Around line 23-25: Remove the unnecessary DI parameter indirection for page
classes: delete the three parameter definitions that set
'sylius.behat.page.admin.shipping_method.create.class',
'sylius.behat.page.admin.shipping_method.index.class', and
'sylius.behat.page.admin.shipping_method.update.class'; then update any
references in this config that use the placeholders
%sylius.behat.page.admin.shipping_method.create.class%,
%sylius.behat.page.admin.shipping_method.index.class%, and
%sylius.behat.page.admin.shipping_method.update.class% to use the PHP class
constants CreatePage::class, IndexPage::class, and UpdatePage::class directly;
finally remove the now-unused $parameters variable assignment in this file.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/tax_category.php`:
- Line 24: The file sets $services->defaults()->public() which is misleading
because each service below explicitly calls ->private(); change this to match
intent by either removing the $services->defaults() call entirely or replacing
it with $services->defaults()->private() so defaults align with the explicit
->private() on the service definitions (leave the individual ->private() calls
intact for clarity).

TheMilek
TheMilek previously approved these changes Feb 23, 2026
@NoResponseMate NoResponseMate force-pushed the behat/update-services-definition-to-php-admin-pages branch from 9a18043 to ba52584 Compare February 23, 2026 13:43
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

♻️ Duplicate comments (7)
src/Sylius/Behat/Resources/config/services/pages/admin/admin_user.php (2)

14-16: use imports not sorted alphabetically.

Administrator\UpdatePage should appear before Crud\IndexPage.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/admin_user.php` around
lines 14 - 16, The three use imports (CreatePage, IndexPage, UpdatePage) are not
alphabetized; reorder the use statements so they are sorted alphabetically by
fully-qualified class name (i.e., place
Sylius\Behat\Page\Admin\Administrator\UpdatePage before
Sylius\Behat\Page\Admin\Crud\IndexPage) to satisfy the import ordering
convention.

22-22: Unused $parameters variable.

No $parameters->set(...) calls in this file — remove the assignment.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/admin_user.php` at
line 22, Remove the unused assignment to $parameters created by calling
$container->parameters(); there are no subsequent $parameters->set(...) uses in
this file, so delete the line that declares $parameters (the $parameters =
$container->parameters(); statement) to avoid an unused variable.
src/Sylius/Behat/Resources/config/services/pages/admin/catalog_promotion.php (2)

30-57: Missing ->defaults()->public() and ->private() on each service definition.

This file is the only one in the PR that omits the $services->defaults()->public() call and the ->private() chain on each service. Every other converted file follows that pattern, and the original XML used <defaults public="true" /> with public="false" per service.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/catalog_promotion.php`
around lines 30 - 57, Add the missing service defaults and privacy flags: call
$services->defaults()->public() before these catalog_promotion service
definitions and append ->private() to each service definition chain (e.g. the
services with ids sylius.behat.page.admin.catalog_promotion.create, .index,
.product_variant.index, .update and .show) so each
->set(...)->parent(...)->args(...) (or ->parent(...)) chain ends with
->private(); this mirrors the other converted files and the original XML
defaults/public per-service setup.

14-17: use imports not sorted alphabetically.

ProductVariant\IndexPage should precede ShowPage alphabetically by full namespace.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/catalog_promotion.php`
around lines 14 - 17, The use imports are not alphabetically ordered: reorder
the import lines so
Sylius\Behat\Page\Admin\CatalogPromotion\ProductVariant\IndexPage appears before
Sylius\Behat\Page\Admin\CatalogPromotion\ShowPage; update the sequence of the
existing symbols (CreatePage, IndexPage, ShowPage, UpdatePage) to be
alphabetically sorted by full namespace to satisfy the coding standard.
src/Sylius/Behat/Resources/config/services/pages/admin/channel.php (1)

14-16: use imports not sorted alphabetically.

IndexPage should appear before UpdatePage.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/channel.php` around
lines 14 - 16, The three use imports (CreatePage, UpdatePage, IndexPage) are not
alphabetically ordered; reorder them so IndexPage comes before UpdatePage (i.e.,
CreatePage, IndexPage, UpdatePage) to satisfy the alphabetical sorting
rule—update the use statements for Sylius\Behat\Page\Admin\Channel\CreatePage,
Sylius\Behat\Page\Admin\Channel\IndexPage, and
Sylius\Behat\Page\Admin\Channel\UpdatePage accordingly.
src/Sylius/Behat/Resources/config/services/pages/admin/product.php (2)

19-20: UpdateSimpleProductPage / UpdateConfigurableProductPage imports are still in reverse alphabetical order.

UpdateConfigurableProductPage (C) sorts before UpdateSimpleProductPage (S) and should appear first.

As per coding guidelines: "Sort PHP use imports alphabetically and group by type (classes, functions, constants)."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/product.php` around
lines 19 - 20, The two use imports are out of alphabetical order; swap the order
so UpdateConfigurableProductPage comes before UpdateSimpleProductPage in the use
block (adjust the lines importing UpdateConfigurableProductPage and
UpdateSimpleProductPage) to comply with the project's alphabetical import
ordering for classes.

97-101: 🛠️ Refactor suggestion | 🟠 Major

Service ID show_page is still inconsistent with the parameter key show.class and the convention used across all other show services.

Every other show service follows the pattern <resource>.show (e.g. sylius.behat.page.admin.order.show, sylius.behat.page.admin.shipment.show), but this service uses the suffix show_page. Rename it to sylius.behat.page.admin.product.show.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/product.php` around
lines 97 - 101, Rename the service id sylius.behat.page.admin.product.show_page
to sylius.behat.page.admin.product.show to match the existing convention; update
the definition in the services config (the
->set('sylius.behat.page.admin.product.show_page', ...) call) to
->set('sylius.behat.page.admin.product.show',
'%sylius.behat.page.admin.product.show.class%') and also update any other
references/usages of sylius.behat.page.admin.product.show_page elsewhere to the
new id.
🧹 Nitpick comments (8)
src/Sylius/Behat/Resources/config/services/pages/admin/customer_group.php (1)

24-24: ->defaults()->public() is redundant — all three services explicitly override to ->private().

Since every service in this file immediately calls ->private(), the defaults() public visibility is never applied to any service. If this is intentional boilerplate carried over from a template (e.g., to leave room for future public services), it's fine to keep; otherwise it can be dropped.

♻️ Proposed cleanup
-    $services->defaults()->public();
-
     $services
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/customer_group.php` at
line 24, The defaults() call sets services to public but every service in this
file immediately overrides visibility with ->private(), so remove the redundant
$services->defaults()->public() line; locate the $services->defaults()->public()
statement and delete it, leaving individual service definitions that already
call ->private() unchanged.
src/Sylius/Behat/Resources/config/services/pages/admin/product_variant.php (1)

29-57: ->defaults()->public() contradicts all service definitions that explicitly set ->private().

Setting the default visibility to public while every service in this file explicitly calls ->private() is redundant and misleading. It creates a maintenance risk: any future service added here without an explicit ->private() call will inadvertently become public.

This pattern is consistent across 36+ configuration files in the behat services directory. Consider consolidating to ->defaults()->private() and removing the redundant ->private() calls for clarity and safety.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/product_variant.php`
around lines 29 - 57, Change the service defaults to private and remove
redundant explicit ->private() calls: replace ->defaults()->public() with
->defaults()->private() at the top of this file, and remove the repeated
->private() invocations on the service definitions such as
sylius.behat.page.admin.product_variant.create, .generate, .index, and .update
so visibility is consistently private by default while preserving parents
(sylius.behat.page.admin.crud.create, sylius.behat.symfony_page,
sylius.behat.page.admin.crud.index, sylius.behat.page.admin.crud.update) and
existing ->args() values.
src/Sylius/Behat/Resources/config/services/pages/admin/product_association_type.php (1)

25-46: Remove defaults()->public() — it contradicts and has no effect on every service definition.

Line 25 sets the default visibility to public, but every service definition immediately overrides it with ->private(). The defaults()->public() call is dead code.

This pattern appears uniformly across all 28 admin page config files in src/Sylius/Behat/Resources/config/services/pages/admin/. For consistency, remove the no-op defaults()->public() call from this file (and ideally all sibling files in the same batch).

♻️ Suggested cleanup
-    $services->defaults()->public();
-
     $services
         ->set('sylius.behat.page.admin.product_association_type.create', '%sylius.behat.page.admin.product_association_type.create.class%')
         ->private()
         ->parent('sylius.behat.page.admin.crud.create')
         ->args(['sylius_admin_product_association_type_create'])
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@src/Sylius/Behat/Resources/config/services/pages/admin/product_association_type.php`
around lines 25 - 46, The defaults()->public() call is redundant because every
service explicitly sets ->private(); remove the $services->defaults()->public()
line (the defaults() call) from this file so service definitions like
sylius.behat.page.admin.product_association_type.create / index / update rely
only on their explicit ->private() visibility; repeat the same removal in the
other admin page config files that follow this pattern.
src/Sylius/Behat/Resources/config/services/pages/admin.php (1)

30-52: defaults()->public() is a no-op here — consider removing or aligning intent.

All three services in this file explicitly call ->private(), so the $services->defaults()->public() at line 30 is overridden for every service defined here and has no practical effect. If this pattern is intentional to stay consistent with other page config files (e.g., where some services are genuinely left public), it's fine to keep. Otherwise, it's dead configuration that could mislead readers.

♻️ Proposed cleanup (if consistency with other files is not the intent)
-    $services->defaults()->public();
-
     $services
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/Sylius/Behat/Resources/config/services/pages/admin.php` around lines 30 -
52, The defaults()->public() call at the top is a no-op because every service
here (sylius.behat.page.admin.crud.index, sylius.behat.page.admin.crud.create,
sylius.behat.page.admin.crud.update) explicitly calls ->private(), so remove the
$services->defaults()->public() line unless you intend to keep file-level
defaults for consistency with other page config files; if consistency is
required, add a brief comment explaining why defaults()->public() is retained,
otherwise delete that line to avoid misleading readers.
src/Sylius/Behat/Resources/config/services/pages/admin/product_option.php (1)

24-24: ->defaults()->public() is redundant here — consider removing it.

All three services immediately override this with ->private(), so the public() default has no effect on any service in this file. However, this pattern appears consistently across all admin and shop page config files in the codebase, suggesting it may be an intentional defensive measure rather than an artifact. If removing it, ensure the pattern is cleaned up consistently across similar files.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/product_option.php` at
line 24, Remove the redundant default visibility by deleting the
$services->defaults()->public() call because each service in this file
immediately overrides it with ->private(); update this file by removing that
defaults()->public() line and, if making a broader change, sweep other
admin/shop page config files to remove the same redundant
$services->defaults()->public() where services are explicitly set to ->private()
to keep visibility declarations consistent.
src/Sylius/Behat/Resources/config/services/pages/admin/order.php (1)

14-17: HistoryPage import is out of alphabetical order.

HistoryPage (H) sorts before IndexPage (I), ShowPage (S), and UpdatePage (U), but is placed last. The same inversion appears in the parameter declarations at lines 26–29 (history.class should be the first parameter set).

♻️ Proposed fix
-use Sylius\Behat\Page\Admin\Order\IndexPage;
-use Sylius\Behat\Page\Admin\Order\ShowPage;
-use Sylius\Behat\Page\Admin\Order\UpdatePage;
 use Sylius\Behat\Page\Admin\Order\HistoryPage;
+use Sylius\Behat\Page\Admin\Order\IndexPage;
+use Sylius\Behat\Page\Admin\Order\ShowPage;
+use Sylius\Behat\Page\Admin\Order\UpdatePage;

And correspondingly for the parameters:

-    $parameters->set('sylius.behat.page.admin.order.index.class', IndexPage::class);
-    $parameters->set('sylius.behat.page.admin.order.show.class', ShowPage::class);
-    $parameters->set('sylius.behat.page.admin.order.update.class', UpdatePage::class);
     $parameters->set('sylius.behat.page.admin.order.history.class', HistoryPage::class);
+    $parameters->set('sylius.behat.page.admin.order.index.class', IndexPage::class);
+    $parameters->set('sylius.behat.page.admin.order.show.class', ShowPage::class);
+    $parameters->set('sylius.behat.page.admin.order.update.class', UpdatePage::class);

As per coding guidelines: "Sort PHP use imports alphabetically and group by type (classes, functions, constants)."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/order.php` around
lines 14 - 17, The HistoryPage import and its corresponding service parameter
entry are out of alphabetical order; move the use statement for
Sylius\Behat\Page\Admin\Order\HistoryPage so it appears before IndexPage,
ShowPage, and UpdatePage, and reorder the constructor/service parameters so the
history.class parameter is the first of the Order page parameters (i.e., place
history.class before index.class, show.class, and update.class) to restore
alphabetical ordering and keep imports/parameters consistent.
src/Sylius/Behat/Resources/config/services/pages/admin/product.php (1)

34-35: Parameter declarations for update_configurable / update_simple are in reverse alphabetical order.

update_configurable (…c…) sorts before update_simple (…s…), mirroring the import ordering issue above.

♻️ Proposed fix
-    $parameters->set('sylius.behat.page.admin.product.update_simple.class', UpdateSimpleProductPage::class);
-    $parameters->set('sylius.behat.page.admin.product.update_configurable.class', UpdateConfigurableProductPage::class);
+    $parameters->set('sylius.behat.page.admin.product.update_configurable.class', UpdateConfigurableProductPage::class);
+    $parameters->set('sylius.behat.page.admin.product.update_simple.class', UpdateSimpleProductPage::class);

As per coding guidelines: "Order PHP array keys alphabetically where applicable."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/product.php` around
lines 34 - 35, The two parameter declarations are out of alphabetical order;
swap the calls so the
'sylius.behat.page.admin.product.update_configurable.class' parameter
(UpdateConfigurableProductPage::class) appears before
'sylius.behat.page.admin.product.update_simple.class'
(UpdateSimpleProductPage::class) to maintain alphabetical ordering of parameter
keys.
src/Sylius/Behat/Resources/config/services/pages/admin/customer.php (1)

24-28: Parameter declarations are not in alphabetical order.

update (u) is listed before show (s), breaking the alphabetical sequence (create → index → order_index → show → update).

♻️ Proposed fix
     $parameters->set('sylius.behat.page.admin.customer.create.class', '%sylius.behat.page.admin.crud.create.class%');
     $parameters->set('sylius.behat.page.admin.customer.index.class', IndexPage::class);
     $parameters->set('sylius.behat.page.admin.customer.order_index.class', '%sylius.behat.page.admin.crud.index.class%');
-    $parameters->set('sylius.behat.page.admin.customer.update.class', '%sylius.behat.page.admin.crud.update.class%');
     $parameters->set('sylius.behat.page.admin.customer.show.class', ShowPage::class);
+    $parameters->set('sylius.behat.page.admin.customer.update.class', '%sylius.behat.page.admin.crud.update.class%');

As per coding guidelines: "Order PHP array keys alphabetically where applicable."

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/customer.php` around
lines 24 - 28, The parameter declarations for admin customer pages are out of
alphabetical order: move the 'sylius.behat.page.admin.customer.show.class'
declaration (ShowPage::class) so it appears before
'sylius.behat.page.admin.customer.update.class' (currently using
'%sylius.behat.page.admin.crud.update.class%'), ensuring the parameter keys are
ordered: create → index → order_index → show → update; update the sequence in
the block that sets these parameters (look for the lines setting
sylius.behat.page.admin.customer.create.class, .index.class, .order_index.class,
.show.class, .update.class) to reflect this alphabetical order.
🤖 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/services/pages/admin/account.php`:
- Around line 14-16: The three use-imports in the Account namespace are not
alphabetically ordered; reorder the statements so LoginPage comes first, then
RequestPasswordResetPage, then ResetPasswordPage by modifying the use lines for
Sylius\Behat\Page\Admin\Account\LoginPage,
Sylius\Behat\Page\Admin\Account\RequestPasswordResetPage, and
Sylius\Behat\Page\Admin\Account\ResetPasswordPage accordingly to follow
alphabetical order.
- Around line 26-41: Add the missing defaults public/private visibility to match
other converted files: call $services->defaults()->public() once before the
service definitions and mark each service as private by chaining ->private() on
the three service definitions for 'sylius.behat.page.admin.login'
(LoginPage::class), 'sylius.behat.page.admin.request_password_reset'
(RequestPasswordResetPage::class) and 'sylius.behat.page.admin.reset_password'
(the '%sylius.behat.page.admin.reset_password%' argument), preserving their
existing ->parent(...) and ->args(...) chains.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/channel.php`:
- Around line 29-51: Add the missing visibility defaults and per-service private
visibility: call $services->defaults()->public() before defining the channel
page services, and chain ->private() on each ->set(...) service definition
(e.g., sylius.behat.page.admin.channel.create,
sylius.behat.page.admin.channel.index, sylius.behat.page.admin.channel.update)
so the PHP service definitions match the original XML visibility and the pattern
used in currency.php, exchange_rate.php, and payment_method.php.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/product_option.php`:
- Line 16: The exported closure "static function (ContainerConfigurator
$container)" lacks a return type; update its signature to include the void
return type (i.e., change the closure declaration to "static function
(ContainerConfigurator $container): void") so the anonymous function returning
nothing adheres to the project's return-type convention and matches other
service config closures like those in telemetry.php.

---

Duplicate comments:
In `@src/Sylius/Behat/Resources/config/services/pages/admin/admin_user.php`:
- Around line 14-16: The three use imports (CreatePage, IndexPage, UpdatePage)
are not alphabetized; reorder the use statements so they are sorted
alphabetically by fully-qualified class name (i.e., place
Sylius\Behat\Page\Admin\Administrator\UpdatePage before
Sylius\Behat\Page\Admin\Crud\IndexPage) to satisfy the import ordering
convention.
- Line 22: Remove the unused assignment to $parameters created by calling
$container->parameters(); there are no subsequent $parameters->set(...) uses in
this file, so delete the line that declares $parameters (the $parameters =
$container->parameters(); statement) to avoid an unused variable.

In
`@src/Sylius/Behat/Resources/config/services/pages/admin/catalog_promotion.php`:
- Around line 30-57: Add the missing service defaults and privacy flags: call
$services->defaults()->public() before these catalog_promotion service
definitions and append ->private() to each service definition chain (e.g. the
services with ids sylius.behat.page.admin.catalog_promotion.create, .index,
.product_variant.index, .update and .show) so each
->set(...)->parent(...)->args(...) (or ->parent(...)) chain ends with
->private(); this mirrors the other converted files and the original XML
defaults/public per-service setup.
- Around line 14-17: The use imports are not alphabetically ordered: reorder the
import lines so
Sylius\Behat\Page\Admin\CatalogPromotion\ProductVariant\IndexPage appears before
Sylius\Behat\Page\Admin\CatalogPromotion\ShowPage; update the sequence of the
existing symbols (CreatePage, IndexPage, ShowPage, UpdatePage) to be
alphabetically sorted by full namespace to satisfy the coding standard.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/channel.php`:
- Around line 14-16: The three use imports (CreatePage, UpdatePage, IndexPage)
are not alphabetically ordered; reorder them so IndexPage comes before
UpdatePage (i.e., CreatePage, IndexPage, UpdatePage) to satisfy the alphabetical
sorting rule—update the use statements for
Sylius\Behat\Page\Admin\Channel\CreatePage,
Sylius\Behat\Page\Admin\Channel\IndexPage, and
Sylius\Behat\Page\Admin\Channel\UpdatePage accordingly.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/product.php`:
- Around line 19-20: The two use imports are out of alphabetical order; swap the
order so UpdateConfigurableProductPage comes before UpdateSimpleProductPage in
the use block (adjust the lines importing UpdateConfigurableProductPage and
UpdateSimpleProductPage) to comply with the project's alphabetical import
ordering for classes.
- Around line 97-101: Rename the service id
sylius.behat.page.admin.product.show_page to
sylius.behat.page.admin.product.show to match the existing convention; update
the definition in the services config (the
->set('sylius.behat.page.admin.product.show_page', ...) call) to
->set('sylius.behat.page.admin.product.show',
'%sylius.behat.page.admin.product.show.class%') and also update any other
references/usages of sylius.behat.page.admin.product.show_page elsewhere to the
new id.

---

Nitpick comments:
In `@src/Sylius/Behat/Resources/config/services/pages/admin.php`:
- Around line 30-52: The defaults()->public() call at the top is a no-op because
every service here (sylius.behat.page.admin.crud.index,
sylius.behat.page.admin.crud.create, sylius.behat.page.admin.crud.update)
explicitly calls ->private(), so remove the $services->defaults()->public() line
unless you intend to keep file-level defaults for consistency with other page
config files; if consistency is required, add a brief comment explaining why
defaults()->public() is retained, otherwise delete that line to avoid misleading
readers.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/customer_group.php`:
- Line 24: The defaults() call sets services to public but every service in this
file immediately overrides visibility with ->private(), so remove the redundant
$services->defaults()->public() line; locate the $services->defaults()->public()
statement and delete it, leaving individual service definitions that already
call ->private() unchanged.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/customer.php`:
- Around line 24-28: The parameter declarations for admin customer pages are out
of alphabetical order: move the 'sylius.behat.page.admin.customer.show.class'
declaration (ShowPage::class) so it appears before
'sylius.behat.page.admin.customer.update.class' (currently using
'%sylius.behat.page.admin.crud.update.class%'), ensuring the parameter keys are
ordered: create → index → order_index → show → update; update the sequence in
the block that sets these parameters (look for the lines setting
sylius.behat.page.admin.customer.create.class, .index.class, .order_index.class,
.show.class, .update.class) to reflect this alphabetical order.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/order.php`:
- Around line 14-17: The HistoryPage import and its corresponding service
parameter entry are out of alphabetical order; move the use statement for
Sylius\Behat\Page\Admin\Order\HistoryPage so it appears before IndexPage,
ShowPage, and UpdatePage, and reorder the constructor/service parameters so the
history.class parameter is the first of the Order page parameters (i.e., place
history.class before index.class, show.class, and update.class) to restore
alphabetical ordering and keep imports/parameters consistent.

In
`@src/Sylius/Behat/Resources/config/services/pages/admin/product_association_type.php`:
- Around line 25-46: The defaults()->public() call is redundant because every
service explicitly sets ->private(); remove the $services->defaults()->public()
line (the defaults() call) from this file so service definitions like
sylius.behat.page.admin.product_association_type.create / index / update rely
only on their explicit ->private() visibility; repeat the same removal in the
other admin page config files that follow this pattern.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/product_option.php`:
- Line 24: Remove the redundant default visibility by deleting the
$services->defaults()->public() call because each service in this file
immediately overrides it with ->private(); update this file by removing that
defaults()->public() line and, if making a broader change, sweep other
admin/shop page config files to remove the same redundant
$services->defaults()->public() where services are explicitly set to ->private()
to keep visibility declarations consistent.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/product_variant.php`:
- Around line 29-57: Change the service defaults to private and remove redundant
explicit ->private() calls: replace ->defaults()->public() with
->defaults()->private() at the top of this file, and remove the repeated
->private() invocations on the service definitions such as
sylius.behat.page.admin.product_variant.create, .generate, .index, and .update
so visibility is consistently private by default while preserving parents
(sylius.behat.page.admin.crud.create, sylius.behat.symfony_page,
sylius.behat.page.admin.crud.index, sylius.behat.page.admin.crud.update) and
existing ->args() values.

In `@src/Sylius/Behat/Resources/config/services/pages/admin/product.php`:
- Around line 34-35: The two parameter declarations are out of alphabetical
order; swap the calls so the
'sylius.behat.page.admin.product.update_configurable.class' parameter
(UpdateConfigurableProductPage::class) appears before
'sylius.behat.page.admin.product.update_simple.class'
(UpdateSimpleProductPage::class) to maintain alphabetical ordering of parameter
keys.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9a18043 and ba52584.

📒 Files selected for processing (67)
  • src/Sylius/Behat/Resources/config/services/pages.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin.php
  • src/Sylius/Behat/Resources/config/services/pages/admin.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/account.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/account.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/admin_user.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/admin_user.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/catalog_promotion.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/catalog_promotion.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/channel.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/channel.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/country.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/country.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/currency.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/currency.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/customer.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/customer.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/customer_group.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/customer_group.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/dashboard.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/dashboard.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/exchange_rate.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/exchange_rate.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/impersonate_user.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/impersonate_user.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/inventory.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/inventory.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/locale.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/locale.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/order.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/order.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/payment.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/payment.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/payment_method.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/payment_method.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/price_history.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/price_history.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/product.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/product.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/product_association_type.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/product_association_type.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/product_attribute.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/product_attribute.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/product_option.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/product_option.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/product_review.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/product_review.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/product_variant.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/product_variant.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/promotion.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/promotion.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/promotion_coupon.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/promotion_coupon.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/shipment.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/shipment.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/shipping_category.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/shipping_category.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/shipping_method.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/shipping_method.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/tax_category.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/tax_category.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/tax_rate.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/tax_rate.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/taxon.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/taxon.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/zone.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/zone.xml
💤 Files with no reviewable changes (33)
  • src/Sylius/Behat/Resources/config/services/pages/admin/product_review.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/impersonate_user.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/tax_rate.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/inventory.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/dashboard.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/payment_method.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/promotion.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/tax_category.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/taxon.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/locale.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/shipment.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/currency.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/payment.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/zone.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/admin_user.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/product_variant.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/country.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/product_option.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/shipping_method.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/order.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/promotion_coupon.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/product.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/customer.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/catalog_promotion.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/customer_group.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/price_history.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/channel.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/product_attribute.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/exchange_rate.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/shipping_category.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/account.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin.xml
  • src/Sylius/Behat/Resources/config/services/pages/admin/product_association_type.xml
🚧 Files skipped from review as they are similar to previous changes (16)
  • src/Sylius/Behat/Resources/config/services/pages/admin/dashboard.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/locale.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/impersonate_user.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/inventory.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/product_review.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/promotion.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/shipping_category.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/payment.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/zone.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/shipment.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/shipping_method.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/taxon.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/product_attribute.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/country.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/tax_rate.php
  • src/Sylius/Behat/Resources/config/services/pages/admin/tax_category.php


$parameters->set('sylius.behat.page.admin.dashboard.class', DashboardPage::class);

$services->defaults()->public();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
$services->defaults()->public();

$parameters->set('sylius.behat.page.admin.exchange_rate.create.class', '%sylius.behat.page.admin.crud.create.class%');
$parameters->set('sylius.behat.page.admin.exchange_rate.update.class', '%sylius.behat.page.admin.crud.update.class%');

$services->defaults()->public();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
$services->defaults()->public();


$parameters->set('sylius.behat.page.admin.impersonate_user.class', ImpersonateUserPage::class);

$services->defaults()->public();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
$services->defaults()->public();


return static function (ContainerConfigurator $container) {
$services = $container->services();
$parameters = $container->parameters();
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
$parameters = $container->parameters();

@TheMilek TheMilek merged commit 85334cf into Sylius:2.3 Feb 23, 2026
40 of 47 checks passed
@NoResponseMate NoResponseMate deleted the behat/update-services-definition-to-php-admin-pages branch February 23, 2026 14:33
@NoResponseMate NoResponseMate mentioned this pull request Feb 26, 2026
27 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Behat Issues and PRs aimed at improving Behat usage. Maintenance CI configurations, READMEs, releases, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants