Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Maintenance] Deprecate using parentId in TaxonSlugController #15262

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions UPGRADE-1.13.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
1. Class `Sylius\Bundle\ProductBundle\Form\Type\ProductOptionChoiceType` has been deprecated.
Use `Sylius\Bundle\ProductBundle\Form\Type\ProductOptionAutocompleteType` instead.

1. Using `parentId` query parameter to generate slug in `Sylius\Bundle\TaxonomyBundle\Controller\TaxonSlugController` has been deprecated.
Use the `parentCode` query parameter instead.

1. Starting with Sylius 1.13, the `SyliusPriceHistoryPlugin` is included.
If you are currently using the plugin in your project, we recommend following the upgrade guide located [here](UPGRADE-FROM-1.12-WITH-PRICE-HISTORY-PLUGIN-TO-1.13.md).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ private function getParentTaxon(Request $request): ?TaxonInterface

$parentId = $request->query->get('parentId');
if (null !== $parentId) {
trigger_deprecation(
'sylius/taxonomy-bundle',
'1.13',
'Using "parentId" for slug generation is deprecated and will not be possible in 2.0. Use "parentCode" instead.'
);

return $this->taxonRepository->find($parentId);
}

Expand Down