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

[BUGFIX] Create contentRecordRenderer via API #431

Merged
merged 4 commits into from
Aug 8, 2023

Conversation

KaiGrosz
Copy link
Contributor

@KaiGrosz KaiGrosz commented Aug 3, 2023

Replace the Implementing of the ContentRecordRenderer with API. T3-Version-Switch not necessary.

Replace the Implementing of the ContentRecordRenderer with API. T3-Version-Switch not necessary.
@achimfritz
Copy link
Contributor

Thanks for PR, but CI is not happy,

  • cs-fixer: "no_unused_imports" (needs to rm unused use statement))
  • php-stan: "Ignored error pattern" (needs to adapt Build/phpstan.*.neon)

@nhovratov
Copy link
Contributor

This fix works for me.

@ervaude
Copy link
Contributor

ervaude commented Aug 8, 2023

Resolves: #433

@ervaude ervaude requested a review from achimfritz August 8, 2023 08:57
@ervaude
Copy link
Contributor

ervaude commented Aug 8, 2023

@achimfritz - please merge

$contentRecordRenderer->setContentObjectRenderer($cObj);
$contentRecordRenderer->setRequest($this->getRequest());
$contentRecordRenderer = $cObj->getContentObject('RECORDS');
if ($contentRecordRenderer === null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

@ervaude when can this occure? (cannot imaging?) i would prefer to remove this check, and the Exception?

Copy link
Contributor

Choose a reason for hiding this comment

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

The check is only "useful" for phpstan because $cObj->getContentObject('RECORDS'); could return null.

But if the RECORDS cObject is not registered TYPO3 would not function at all.

When we remove the check we'll need a phpstan ignore-error entry.

@achimfritz achimfritz merged commit a0e08f5 into b13:master Aug 8, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants