Skip to content

Failing test case for bug with memoizing property hook that is read is reported as not written#308

Closed
ruudk wants to merge 1 commit intoshipmonk-rnd:masterfrom
ruudk:memoized-error
Closed

Failing test case for bug with memoizing property hook that is read is reported as not written#308
ruudk wants to merge 1 commit intoshipmonk-rnd:masterfrom
ruudk:memoized-error

Conversation

@ruudk
Copy link
Copy Markdown
Contributor

@ruudk ruudk commented Mar 5, 2026

This produces:

Property PropertyHooks13\MemoizedProperty::$id is never written

But it's not true. It's written, on read.

See failing test.

This produces:
> Property PropertyHooks13\MemoizedProperty::$id is never written

But it's not true. It's written, on read.
@janedbal
Copy link
Copy Markdown
Member

janedbal commented Mar 5, 2026

This is caused by this condition, which is there to avoid transitivity trigger towards set hook (because self-referencing property access is NOT calling such property hook). But this is wrong for your case, so I need to figure out how to distinguish those two. Currently a property-write always means "set hook called".

@janedbal
Copy link
Copy Markdown
Member

janedbal commented Mar 6, 2026

Fixed in 0.15.1

@ruudk
Copy link
Copy Markdown
Contributor Author

ruudk commented Mar 6, 2026

Thank you!! 🚀

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.

2 participants