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
@@ -76,12 +87,23 @@ Because code conventions between different tech stacks might differ, it's possib
76
87
Let's say there's a form in HTML that has name `user_name`, but in the backend our model has parameter `$userName`. This can be automatically converted, by supplying the parameters `$enforcePropertyNameCasing` and `$convertFromParamKeyCasing`:
77
88
78
89
```php
79
-
$resolvedSet->add(
80
-
new Concrete(
81
-
$identifier,
82
-
fn () => new ObjectResolver(Casing::camel, Casing::snake)
83
-
)
84
-
);
90
+
final class ObjectResolverServiceProvider implements ServiceProviderInterface {
91
+
#[Override]
92
+
public function provides(string $identifier): bool {
93
+
return $identifier === ObjectResolver::class;
94
+
}
95
+
96
+
/** @throws InvalidArgumentException */
97
+
#[Override]
98
+
public function register(string $identifier, DefinitionSet $resolvedSet): void {
99
+
$resolvedSet->add(
100
+
new Concrete(
101
+
$identifier,
102
+
fn () => new ObjectResolver(Casing::camel, Casing::snake)
0 commit comments