Skip to content
This repository was archived by the owner on Jan 14, 2023. It is now read-only.

Conversation

@carlos-granados
Copy link

@carlos-granados carlos-granados commented Apr 24, 2020

In most modern PHP applications the majority of class fields will be private or protected and there will be a set of getters to access those fields. This makes it difficult to use expressions in snapshots or logpoints because many times the information that interests you will be held in a private or protected field, so you will not be able to use a expression like $object->privateMember because you will not have access. By default you cannot call any method in an object and there is no way to whitelist method calls.

In this PR we add a new PHP ini setting stackdriver_debugger.method_whitelist that will allow you to whitelist a list of class methods. This provides us with a way to whitelist method calls so that we can use expressions like $object->getPrivateMember(). By default no method call is allowed but if we know that some of them are safe we should be able to whitelist them, the same way that we do for generic functions using the stackdriver_debugger.function_whitelist

Fixes #51

@carlos-granados carlos-granados changed the title Allow whitelisting function methods Allow whitelisting class methods Apr 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow whitelisting class methods

1 participant