feat: support re-importing objects exported via var_dump#56
Conversation
|
@matthew-inamdar any chance you could look at this? This is preventing us from using |
|
Thanks for this @J0sh0nat0r - I'll take a look at this over the weekend, but it seems like a great addition. |
@matthew-inamdar, any updates on this? I ran into this issue, would be great if we could get it solved. Happy to lend a hand if there's anything outstanding to get it over the line 👍 . |
|
@matthew-inamdar any updates on this yet? |
|
Just want to +1 this as would help out my laravel application greatly 😅 |
|
If you're here in 2025 and you need this patch (probably because you want to run
This will apply this PR to your local after (h/t to someone anonymous on the internet--I can't find the original documentation :( so I'm leaving this here also for my own future reference.) |
|
Here's another alternative I eventually developed to work around this issue, specifically for security schemes: config([
'openapi.collections.default.security' => array_merge(
config('openapi.collections.default.security', []),
[SecurityRequirement::create('apiKey')->securityScheme((new apiKey())->build())]
),
]);This is in the context of a package, so if you only need it in your app, then just this should be sufficient. |
This PR implements the
__set_statemagic method for all objects, which allows them to be re-imported after being exported viavar_export.In addition 2 minor changes were made to the interface:
OAuthFlow::scopesnow handles null correctlyScham::itemsnow acceptsnull, in-line with other methods