|
Some checks failed
Continuous Integration (Minimal) / Tests (MariaDB) (push) Has been cancelled
Continuous Integration (Minimal) / Static checks (push) Has been cancelled
Continuous Integration (Minimal) / Tests (MySQL) (push) Has been cancelled
Continuous Integration (Minimal) / Javascript Tests (MySQL) (push) Has been cancelled
Continuous Integration (Minimal) / Tests (PostgreSQL) (push) Has been cancelled
Continuous Integration (Minimal) / Frontend (push) Has been cancelled
Continuous Integration (Minimal) / Packages (push) Has been cancelled
| Q | A
|-----------------|-----
| Branch? | 2.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | yes
| Related tickets | none
| License | MIT
This PR removes the dependency of `PayumPayResponseProvider` on
`RequestConfiguration` (from `Sylius\Bundle\ResourceBundle\Controller`)
to retrieve the after-pay redirect route.
Previously, the redirect route used to build the Payum capture/authorize
token was read at runtime from the `_sylius` routing metadata via
`$requestConfiguration->getParameters()->get('redirect')`. This approach
was coupled to the ResourceBundle routing convention and required the
route definition to carry this information through the request
lifecycle.
---
### Changes
**`PayumPayResponseProvider`**
- Added two constructor parameters: `?string $afterPayUrlRoute` and
`array $afterPayUrlParameters`, injected at compile time.
- Removed the dynamic reading of
`$requestConfiguration->getParameters()->get('redirect')` at runtime.
- Simplified `provideTokenBasedOnPayment()` to use the injected
parameters directly, eliminating its `$redirectOptions` argument.
**`ShopBundle` configuration** (`Configuration.php`)
- Added two new `order_pay` configuration keys dedicated to Payum:
`payum_after_pay_route` (default: `sylius_shop_order_after_pay`) and
`payum_after_pay_route_parameters` (default: `[]`).
- These are intentionally separate from the existing `after_pay_route`
and `after_pay_route_parameters` keys, which are reserved for the
Payment Request flow and carry Payment Request-specific defaults (e.g.
`hash: paymentRequest.getHash()`).
**`ShopBundle` extension** (`SyliusShopExtension.php`)
- Exposes `%sylius_shop.order_pay.payum_after_pay_route%` and
`%sylius_shop.order_pay.payum_after_pay_route_parameters%` as container
parameters.
**`PayumBundle` service definition**
(`integrations/sylius_shop/order_pay/providers.php`)
- The `sylius_shop.provider.order_pay.pay_response.payum` service now
explicitly injects `%sylius_shop.order_pay.payum_after_pay_route%` and
`%sylius_shop.order_pay.payum_after_pay_route_parameters%` as
constructor arguments.
**`ShopBundle` routing** (`order.yml`)
- Removed the `_sylius.redirect` block from the `sylius_shop_order_pay`
route, which is no longer needed since the redirect route is now
resolved through the container parameter.
**`UPGRADE-2.3.md`**
- Documented the routing change and the migration path for projects that
customized the after-pay redirect route via the `_sylius` routing
metadata.
---
### Motivation
- Decouples `PayumPayResponseProvider` from the ResourceBundle
controller infrastructure (`RequestConfiguration`).
- Makes the after-pay redirect route an explicit, inspectable, and
overridable service configuration rather than an implicit routing
convention.
- Aligns with the ongoing effort to reduce reliance on
`Sylius\Bundle\ResourceBundle\Controller` in the PaymentRequest feature.
---
### Backward Compatibility
> ⚠️ The `_sylius: redirect:` block on `sylius_shop_order_pay` is
removed from the routing. Projects that relied on overriding this
routing parameter to customize the Payum after-pay redirect route should
now use the dedicated `sylius_shop` bundle configuration keys instead:
>
> ```yaml
> sylius_shop:
> order_pay:
> payum_after_pay_route: sylius_shop_order_after_pay
> payum_after_pay_route_parameters: []
> ```
>
> Note: `after_pay_route` and `after_pay_route_parameters` are reserved
for the Payment Request flow and should not be used to configure the
Payum redirect.
>
> See `UPGRADE-2.3.md` for details.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Documentation**
* Added a migration note explaining that Payum after-pay redirects no
longer rely on `_sylius: redirect:` routing metadata and how to
configure the replacement options.
* **New Features**
* Introduced `sylius_shop.order_pay.payum_after_pay_route` and
`sylius_shop.order_pay.payum_after_pay_route_parameters` to customize
the Payum after-pay redirect target and parameters.
* **Refactor**
* Removed the automatic redirect from `sylius_shop_order_pay`; Payum
after-pay redirect is now driven by the new configuration.
* **Tests**
* Added/updated PHPUnit coverage for the new configuration defaults and
Payum after-pay redirect behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
|
||
|---|---|---|
| .bunnyshell | ||
| .docker | ||
| .github | ||
| adr | ||
| bin | ||
| config | ||
| etc/build | ||
| features | ||
| public | ||
| src | ||
| templates | ||
| tests | ||
| translations | ||
| .babelrc | ||
| .dockerignore | ||
| .editorconfig | ||
| .env | ||
| .env.test | ||
| .env.test_cached | ||
| .env.test_cached_payum | ||
| .gitattributes | ||
| .gitignore | ||
| .npmignore | ||
| .readthedocs.yaml | ||
| AGENTS.md | ||
| behat.dist.php | ||
| CHANGELOG-2.0.md | ||
| CHANGELOG-2.1.md | ||
| CHANGELOG-2.2.md | ||
| CLAUDE.md | ||
| composer-require-checker.json | ||
| composer.json | ||
| CONFLICTS.md | ||
| docker-compose.test.yml | ||
| docker-compose.yml | ||
| ecs.php | ||
| eslint.config.mjs | ||
| LICENSE | ||
| LICENSE_OF_TRADEMARK_AND_LOGO | ||
| Makefile | ||
| monorepo-builder.php | ||
| package.json | ||
| phparkitect.php | ||
| phpstan-baseline.neon | ||
| phpstan.neon.dist | ||
| phpunit.xml.dist | ||
| README.md | ||
| rector.php | ||
| SECURITY.md | ||
| symfony.lock | ||
| UPGRADE-2.0.md | ||
| UPGRADE-2.1.md | ||
| UPGRADE-2.2.md | ||
| UPGRADE-2.3.md | ||
| UPGRADE-API-2.0.md | ||
| UPGRADE-API-2.1.md | ||
| UPGRADE-API-2.2.md | ||
| webpack.config.js | ||
Sylius is an Open Source eCommerce framework on top of Symfony.
The highest quality of code, strong testing culture, built-in Agile (BDD) workflow and exceptional flexibility make it the best solution for applications tailored to your business requirements. Powerful REST API allows for easy integrations and creating unique customer experience on any device.
We're using full-stack Behavior-Driven-Development, with PHPUnit and Behat.
Enjoy being an eCommerce Developer again!
⚙️ Installation
Install Sylius with Composer (see requirements details).
Follow the Getting started with Sylius tutorial!
📖 Documentation
Documentation is available at docs.sylius.com.
➕ Sylius Plus
Sylius Plus offers modular features like OnePageCheckout and a B2B suite, alongside advanced capabilities such as multi-store management, partial order fulfillment, smooth returns handling, a loyalty system and multi-source inventory. Pick and choose the modules you need to supercharge your eCommerce projects effortlessly.
🤝 Community
Get Sylius support on Slack or Stack Overflow or get professional SLA-backed support and Project Success Assistance with Sylius Plus license! Learn more.
Stay updated by following our Twitter and Facebook.
Would like to help us and build the most developer-friendly eCommerce framework? Start from reading our Contributing Guide!
👮 Security issues
If you think that you have found a security issue in Sylius, please do not use the issue tracker and do not post it publicly.
Instead, all security issues must be sent to security@sylius.com.
📦 Plugins and Extensions: Sylius Store
You can find Sylius plugins on our Sylius Store which is a Marketplace with Sylius extensions.
Or search for packages marked as sylius-plugin on Packagist.
📃 License
Sylius is completely free and released under the MIT License.
✍️ Authors
Sylius was originally created by Paweł Jędrzejewski.
Kudos to all Sylius contributors 🙏
... and others!
See the full list of contributors from our awesome community.





























































































