You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When loading from the code (PhpFile::fromCode($content)), attribute arguments are not loaded as expected: arguments are "duplicated".
For instance, with this attribute:
#[AnAttribute(foo: 'bar')]
The loaded arguments will be:
$args = ['foo' => newLiteral("foo: 'bar'")];
Expected Behavior
The loaded arguments should be:
$args = ['foo' => newLiteral("'bar'")];
Possible Solution
The issue comes from the call to getReformattedContents which gets everything inside the attribute as raw. It shouldn't be the case when loading content.
The text was updated successfully, but these errors were encountered:
Version: 3.6.4
Bug Description
When loading from the code (
PhpFile::fromCode($content)
), attribute arguments are not loaded as expected: arguments are "duplicated".For instance, with this attribute:
The loaded arguments will be:
Expected Behavior
The loaded arguments should be:
Possible Solution
The issue comes from the call to
getReformattedContents
which gets everything inside the attribute as raw. It shouldn't be the case when loading content.The text was updated successfully, but these errors were encountered: