Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[WIP] Recursively resolve array definitions #490
I was using PHP-DI and noticed that array definitions are only resolved at the first level of the array. For example:
return [ 's3.config' => [ 'version' => 'latest', 'region' => DI\env('S3_REGION'), // this resolves 'bucket' => 'stuff', 'credentials' => [ 'key' => DI\env('S3_KEY'), 'secret' => DI\env('S3_SECRET'), // these don't ], ], // ... ];
To make this work I changed the ArrayResolver to recurse and added a test.
It looks like