| Q |
A |
| Bug report? |
yes |
| Feature request? |
no |
| Library version |
2.8.0 |
If you have a class like this:
readonly class FetchFiltersAction
{
public function __construct(
private FilterOptionsRepository $filterOptionsRepository
) {
}
public function handle(FilterCollection $appliedFilters): FilterOptions
{
return $this->filterOptionsRepository->getFilterOptions($appliedFilters);
}
}
Then the following failure is shown:
- [Side effects] A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 11 and the first side effect is on line 11.
(In this case line 11 references the first line in the code snippet above.)
I believe this might be a php 8.2 issue as readonly classes were only recently introduced.
Thanks :)
If you have a class like this:
Then the following failure is shown:
(In this case line 11 references the first line in the code snippet above.)
I believe this might be a php 8.2 issue as readonly classes were only recently introduced.
Thanks :)