exporter
exporter copied to clipboard
Use enableMagicCall when creating the propertyAccessor to make the exporter more flexible
Feature Request
Is there a reason not to enable use of methods accessed via magic __call() in the exporter?
Since everything has to be done through a property string, it's not possible to pass in arguments. Enabling use of __call() makes the exporter more flexible and gives power to the user to decide how to use it.
The change is relatively simple:
public function __construct(
protected array $fields,
protected string $dateTimeFormat = 'r',
protected bool $useBackedEnumValue = true
) {
// original version:
// $this->propertyAccessor = PropertyAccess::createPropertyAccessor();
$this->propertyAccessor = PropertyAccess::createPropertyAccessorBuilder()
->enableMagicCall()
->getPropertyAccessor()
;
}
Feel free to provide a PR (with a test) and I wont see a reason to refuse it
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.