Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Peek And Poke

Peek And Poke Laravel Package

sebastian/peek-and-poke

sebastian/peek-and-poke is a small PHP utility that uses reflection to peek at and poke into objects. It lets you read and write private and protected properties, making it handy for tests that need to inspect or set up object state without changing production code.

View on GitHub
Deep Wiki
Context7

sebastian/peek-and-poke is a small PHP library that uses reflection to peek at and poke into the private and protected members of objects. By wrapping an object in a Proxy, you can read or write otherwise inaccessible properties and invoke non-public methods without modifying the class under test—ideal for unit testing legacy or tightly encapsulated code.

$proxy = new SebastianBergmann\PeekAndPoke\Proxy($object);
$proxy->privateProperty = 'value'; // poke
echo $proxy->privateProperty;      // peek
  • Access private/protected properties for reading and writing
  • Call non-public methods through the proxy
  • No source changes or code generation required
  • Lightweight, reflection-based implementation
  • Seamlessly integrates with PHPUnit test suites
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource