shopware / shopware/shopware

Explicitly reset ids on Criteria disallowed

Open
#5,458 6 comments 0 reactions 0 assignees View on GitHub
component/core domain/framework Platform(Default) priority/low
Dominant language
PHP
Stars
3.4k
Forks
1.2k
Avg merge
2d 23h
Merged PRs (30d)
433

Description

*PHP Version:* 8.2 | *Shopware Version:* 6.6.7.1 | *Affected area / extension:* Platform(Default)

----

*_Expected behaviour:_*

```
$categoryCriteria = clone $this->categoryCriteria;
$categoryCriteria->setTitle('ww::hide-categories::product-count');
$categoryCriteria->setIds([]);
```

I want to be able to clone a Criteria and then reset the ids.

*_Actual behaviour:_*

![Image](https://github.com/user-attachments/assets/bfd84e0c-1385-439c-87a5-7d52d2e77d2e)

*_How to reproduce:_*

See above.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.