Project

General

Profile

Actions

Bug #92148

closed

Serialization of Repository is broken

Added by Raphael Mutschler over 3 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2020-09-01
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

In v10 when serializing a Domainmodel with an injected Repository the following exception is thrown:

(1/1) Exception
Serialization of 'Closure' is not allowed

Example Code

Model:

namespace FreyhauerTeam\FySeminars\Domain\Model;

class Lecturer extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
{

  /**
   * timeslotRepository
   *
   * @var \FreyhauerTeam\FySeminars\Domain\Repository\TimeslotRepository
   * @TYPO3\CMS\Extbase\Annotation\Inject
   */
  protected $timeslotRepository = null;

  [...]
}

Controller:

// $lecturer = Class Lecturer
serialize($lecturer)

Actions

Also available in: Atom PDF