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

Accessible Laravel Package

delormejonathan/accessible

Accessible is a PHP library that uses docblock annotations to automate class behavior: generates getters/setters, validates setter arguments with Symfony Assert, initializes properties in constructors, and manages collections and associations with add/remove helpers.

View on GitHub
Deep Wiki
Context7

Compatibility issues (and how to solve them)

Symfony's PropertyAccess component

By default, the PropertyAccess component does not work with __call. The accessor must be configured to accept it. You can do it this way.

$accessor = PropertyAccess::createPropertyAccessorBuilder()
    ->enableMagicCall()
    ->getPropertyAccessor();

In a Symfony project, just add the following lines in the configuration:

# app/config/config.yml
framework:
    property_access:
        magic_call: true

Twig

Although Twig allows the use of __call, its use of the magic method is different from the one in PropertyAccess. For example, for {{ foo.bar }}, if there is a __call method, Twig will call $foo->bar() while PropertyAccess will call $foo->getBar().

To deal with this logic, you can use Access::CALL to give an access to the property through $foo->bar().

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.
roundly-consulting/kubernetes-api-for-laravel
roundly-consulting/plausible-for-laravel
gvp/gvp-laravel-template
metasyncsite/laravel-metasync-client
roundly-consulting/onboarding-for-laravel
andydefer/laravel-notification
adachsoft/cli-process-tester
jhaskell13/laraflow
sebastienheyd/boilerplate-media-manager
ccast/tagixo-primix
pretendtrue/laravel-builder
sawmainek/laravel-scout-tntsearch-driver
tomshaw/laravel-calendar-table
dibakar/laravel-ownership
steadrun/laravel-monitor
labyrinthe/connect-laravel
elmogy/layan
drewdan/sentinel-client
dskripchenko/laravel-llm
fatryst/nuonuo