Bug #10341

DateTime properties cannot be persisted

Added by Robert Lemke almost 9 years ago. Updated almost 9 years ago.

Status:
Resolved
Priority:
Should have
Assignee:
Category:
Object
Start date:
2010-10-19
Due date:
% Done:

100%

PHP Version:
Has patch:
Complexity:

Description

Using the Blog application with FLOW3 1.0.0 alpha 12 results in an exception when trying to create a new blog post:

#1265367590: Object "DateTime" is not registered. (More information)

F3\FLOW3\Object\Exception\UnknownObjectException thrown in file
Packages/Framework/FLOW3/Classes/Object/Container/AbstractObjectContainer.php in line 267.

The reason for this is that the validation framework tries to figure out if DateTime has the scope prototype (because it wouldn't create a validator for it otherwise). However, DateTime is not a registered object at the Object Manager. The check for prototype was introduced while solving #9862.

The solution is to pre-register (certain) built-in PHP classes, such as DateTime. I'm not sure at this point for which other classes it would make sense, therefore this is just about fixing the DateTime behavior.

Associated revisions

Revision db096250 (diff)
Added by Robert Lemke almost 9 years ago

[+BUGFIX] FLOW3 (Object): Register DateTime at the object management

The PHP-built-in DateTime class is unknown to the Object Manager, yet
it is used at several places, such as the persistence framework. Any
try to get further information about this class (such as what scope
it has), results in an exception thrown by the Object Manager.

This patch pre-registers DateTime and therefore adds Object Manager
support for it.

Resolves: #10341
Change-Id: I2fa63525fd40b838d8bc1464b6b86357e057103e

History

#1 Updated by Robert Lemke almost 9 years ago

  • Status changed from Accepted to Under Review

#2 Updated by Robert Lemke almost 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF