Weave Code
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

antares/accessible

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.
calmfox/watch-sylius
damienfern/grpc-symfony-bundle
atoolo/index-bundle
atoolo/genai-bundle
coprotoai/laravel-ticket
davidjln/llm-carbon-bundle
cryonighter/valid-request-bundle
coolms/taxonomy-bundle
coolms/field-bundle
articulate-orm/symfony
aaix/laravel-tall-architect
ephoto/akeneo-connector
emmanuelballery/eb-plantumlbundle
emielburgman/symfony-visitor-beacon
emielburgman/symfony-visit-storage
emielburgman/symfony-security-headers
emielburgman/symfony-log-viewer
emarref/xdebug-bundle
emarref/pubnub-bundle
elriseio/finance-money-bundle