Bug #37357

Task #55953: Repair and streamline ValueObject support

more suitable ValueObject hash creation for DateTime cases

Added by Adrian Föder about 3 years ago. Updated 6 months ago.

Status:Resolved Start date:2012-05-21
Priority:Should have Due date:
Assigned To:Adrian Föder % Done:

100%

Category:Persistence
Target version:-
PHP Version: Complexity:easy
Has patch:Yes Affected Flow version:(any)

Description

currently, DateTime objects are only represented by their ("unix-") Timestamp, which may result in unpredictable behavior when server time (zone) or Daylight Saving Time changes.
An RFC850 formatted date seems to be more appropriate, it says e.g. Monday, 15-Aug-05 15:52:01 UTC or Monday, 21-May-12 14:19:41 CEST (note the s in CEST that indicates summer time).

Otherwise, both, for example, British Summer Time (+01:00) and Central European Time (non-summer) would be +01:00, but representing very different actual Dates.

Associated revisions

Revision 2d6a0dfd
Added by Philipp Maier 6 months ago

[!!!][BUGFIX] Generate Value Object hash from property values

This changes the Value Objects' hash generation algorithm to
use the actual properties of the Value Object, not only the
constructor arguments which lead to duplicate hashes in cases
where arguments were empty.

Furthermore the initial approach disregarded everything that
can be done within the constructor (such as trimming, calculations,
etc.).

This patch delays the generation of the value hash to just after
instantiation, where the Value Object is completely initialized.
The final object properties names and values are then hashed.

Additionally, the handling of DateTime objects has been improved.
The generated ValueHash now also includes information about the
timezone.

This might be breaking in the unlikely case where the initial
hash calculation leads to the same hash as the new calculation,
for different VOs. Besides, it might lead to duplicate VOs in the
database because the "same" VO can become a new hash due to the
changed hashing algorithm.

Change-Id: Iaf4d2a28bcd8fc5bf2c749f8021171456616e45c
Fixes: #51236
Fixes: #37357
Releases: master

History

#1 Updated by Gerrit Code Review about 3 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11368

#2 Updated by Karsten Dambekalns about 3 years ago

  • Target version changed from 1.1 beta 2 to 2.0 beta 1

#3 Updated by Gerrit Code Review about 3 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11368

#4 Updated by Karsten Dambekalns over 2 years ago

  • Target version changed from 2.0 beta 1 to 2.1
  • Affected Flow version changed from Git master to (any)

#5 Updated by Gerrit Code Review over 2 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/11368

#6 Updated by Gerrit Code Review over 2 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/11368

#7 Updated by Robert Lemke about 2 years ago

  • Target version deleted (2.1)

#8 Updated by Gerrit Code Review almost 2 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23241

#9 Updated by Gerrit Code Review almost 2 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23241

#10 Updated by Gerrit Code Review almost 2 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23241

#11 Updated by Gerrit Code Review almost 2 years ago

Patch set 6 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/23241

#12 Updated by Adrian Föder over 1 year ago

  • Parent task set to #55953

#13 Updated by Gerrit Code Review over 1 year ago

Patch set 7 for branch master of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at https://review.typo3.org/23241

#14 Updated by Gerrit Code Review 7 months ago

Patch set 8 for branch master of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at http://review.typo3.org/23241

#15 Updated by Gerrit Code Review 7 months ago

Patch set 9 for branch master of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at http://review.typo3.org/23241

#16 Updated by Gerrit Code Review 6 months ago

Patch set 10 for branch master of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at http://review.typo3.org/23241

#17 Updated by Gerrit Code Review 6 months ago

Patch set 11 for branch master of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at http://review.typo3.org/23241

#18 Updated by Gerrit Code Review 6 months ago

Patch set 12 for branch master of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at http://review.typo3.org/23241

#19 Updated by Gerrit Code Review 6 months ago

Patch set 13 for branch master of project Packages/TYPO3.Flow has been pushed to the review server.
It is available at http://review.typo3.org/23241

#20 Updated by Philipp Maier 6 months ago

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

Also available in: Atom PDF