Skip to content

Commit 0b76442

Browse files
committed
Merge branch 'master' into improveRefResolving
# Conflicts: # src/Utils/ClassNameGenerator.php
2 parents df1abfc + 62d2019 commit 0b76442

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Model/Validator/ExtractedMethodValidator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function __construct(
2929
'validate%s_%s_%s',
3030
str_replace(' ', '', ucfirst($property->getAttribute())),
3131
str_replace('Validator', '', substr(strrchr(static::class, '\\'), 1)),
32-
uniqid(),
32+
md5(json_encode($property->getJsonSchema()->getJson())),
3333
);
3434

3535
parent::__construct($property, $template, $templateValues, $exceptionClass, $exceptionParams);

src/PropertyProcessor/Decorator/TypeHint/TypeHintTransferDecorator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ public function __construct(protected PropertyInterface $property) {}
2020
*/
2121
public function decorate(string $input, bool $outputType = false): string
2222
{
23-
return $this->property->getTypeHint($outputType);
23+
return $this->property->getTypeHint($outputType, [self::class]);
2424
}
2525
}

src/Utils/ClassNameGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function getClassName(
3232
ucfirst(match(true) {
3333
isset($json['title']) => $json['title'],
3434
isset($json['$id']) => basename($json['$id']),
35-
default => ($propertyName . ($currentClassName ? uniqid() : '')),
35+
default => ($propertyName . ($currentClassName ? md5(json_encode($json)) : '')),
3636
}),
3737
);
3838

0 commit comments

Comments
 (0)