Project

General

Profile

Actions

Bug #91784

closed

Extbase ObjectAcces::isPropertyGettable ArrayAccess logic breaks usability

Added by Till Wimmer over 4 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2020-07-12
Due date:
% Done:

100%

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

Description

Hi there,

Since commit 2a4dcbad895 the logic to check if a property is gettable is somehow reversed...

This implies that a model class implementing ArrayAccess solely has properties which are accessible as array offsets:

    if (($object instanceof \ArrayAccess) && !$object->offsetExists($propertyName)) {
        return false;
    }

This makes it impossible to use the ArrayAccess Interface only for a few properties like in earlier versions. This was handy i.e. to implement some "magic" getters in Fluid.

Actions

Also available in: Atom PDF