Skip to content

Commit 3fe314b

Browse files
authored
Merge pull request #3481 from adrientiburce/bug-3464
Fix mispelling in hydra spec : writable to writeable
2 parents 960f62f + e25afbb commit 3fe314b

File tree

3 files changed

+22
-22
lines changed

3 files changed

+22
-22
lines changed

features/bootstrap/HydraContext.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ public function assertPropertyIsNotReadable(string $propertyName, string $classN
192192
*/
193193
public function assertPropertyIsWritable(string $propertyName, string $className)
194194
{
195-
if (!$this->getPropertyInfo($propertyName, $className)->{'hydra:writable'}) {
195+
if (!$this->getPropertyInfo($propertyName, $className)->{'hydra:writeable'}) {
196196
throw new ExpectationFailedException(sprintf('Property "%s" of class "%s" is not writable', $propertyName, $className));
197197
}
198198
}

src/Hydra/Serializer/DocumentationNormalizer.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ private function populateEntrypointProperties(string $resourceClass, ResourceMet
116116
],
117117
'hydra:title' => "The collection of $shortName resources",
118118
'hydra:readable' => true,
119-
'hydra:writable' => false,
119+
'hydra:writeable' => false,
120120
];
121121

122122
if ($resourceMetadata->getCollectionOperationAttribute('GET', 'deprecation_reason', null, true)) {
@@ -416,7 +416,7 @@ private function getClasses(array $entrypointProperties, array $classes): array
416416
'hydra:title' => 'propertyPath',
417417
'hydra:description' => 'The property path of the violation',
418418
'hydra:readable' => true,
419-
'hydra:writable' => false,
419+
'hydra:writeable' => false,
420420
],
421421
[
422422
'@type' => 'hydra:SupportedProperty',
@@ -430,7 +430,7 @@ private function getClasses(array $entrypointProperties, array $classes): array
430430
'hydra:title' => 'message',
431431
'hydra:description' => 'The message associated with the violation',
432432
'hydra:readable' => true,
433-
'hydra:writable' => false,
433+
'hydra:writeable' => false,
434434
],
435435
],
436436
];
@@ -454,7 +454,7 @@ private function getClasses(array $entrypointProperties, array $classes): array
454454
'hydra:title' => 'violations',
455455
'hydra:description' => 'The violations',
456456
'hydra:readable' => true,
457-
'hydra:writable' => false,
457+
'hydra:writeable' => false,
458458
],
459459
],
460460
];
@@ -486,7 +486,7 @@ private function getProperty(PropertyMetadata $propertyMetadata, string $propert
486486
'hydra:title' => $propertyName,
487487
'hydra:required' => $propertyMetadata->isRequired(),
488488
'hydra:readable' => $propertyMetadata->isReadable(),
489-
'hydra:writable' => $propertyMetadata->isWritable() || $propertyMetadata->isInitializable(),
489+
'hydra:writeable' => $propertyMetadata->isWritable() || $propertyMetadata->isInitializable(),
490490
];
491491

492492
if (null !== $range = $this->getRange($propertyMetadata)) {

tests/Hydra/Serializer/DocumentationNormalizerTest.php

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ private function doTestNormalize(OperationMethodResolverInterface $operationMeth
164164
'hydra:title' => 'name',
165165
'hydra:required' => false,
166166
'hydra:readable' => true,
167-
'hydra:writable' => true,
167+
'hydra:writeable' => true,
168168
'hydra:description' => 'name',
169169
],
170170
[
@@ -179,7 +179,7 @@ private function doTestNormalize(OperationMethodResolverInterface $operationMeth
179179
'hydra:title' => 'description',
180180
'hydra:required' => false,
181181
'hydra:readable' => true,
182-
'hydra:writable' => true,
182+
'hydra:writeable' => true,
183183
'hydra:description' => 'description',
184184
],
185185
[
@@ -194,7 +194,7 @@ private function doTestNormalize(OperationMethodResolverInterface $operationMeth
194194
'hydra:title' => 'name_converted',
195195
'hydra:required' => false,
196196
'hydra:readable' => true,
197-
'hydra:writable' => true,
197+
'hydra:writeable' => true,
198198
'hydra:description' => 'name converted',
199199
],
200200
[
@@ -209,7 +209,7 @@ private function doTestNormalize(OperationMethodResolverInterface $operationMeth
209209
'hydra:title' => 'relatedDummy',
210210
'hydra:required' => false,
211211
'hydra:readable' => true,
212-
'hydra:writable' => true,
212+
'hydra:writeable' => true,
213213
'hydra:description' => 'This is a name.',
214214
],
215215
],
@@ -287,7 +287,7 @@ private function doTestNormalize(OperationMethodResolverInterface $operationMeth
287287
],
288288
'hydra:title' => 'The collection of dummy resources',
289289
'hydra:readable' => true,
290-
'hydra:writable' => false,
290+
'hydra:writeable' => false,
291291
],
292292
],
293293
'hydra:supportedOperation' => [
@@ -314,7 +314,7 @@ private function doTestNormalize(OperationMethodResolverInterface $operationMeth
314314
'hydra:title' => 'propertyPath',
315315
'hydra:description' => 'The property path of the violation',
316316
'hydra:readable' => true,
317-
'hydra:writable' => false,
317+
'hydra:writeable' => false,
318318
],
319319
[
320320
'@type' => 'hydra:SupportedProperty',
@@ -328,7 +328,7 @@ private function doTestNormalize(OperationMethodResolverInterface $operationMeth
328328
'hydra:title' => 'message',
329329
'hydra:description' => 'The message associated with the violation',
330330
'hydra:readable' => true,
331-
'hydra:writable' => false,
331+
'hydra:writeable' => false,
332332
],
333333
],
334334
],
@@ -350,7 +350,7 @@ private function doTestNormalize(OperationMethodResolverInterface $operationMeth
350350
'hydra:title' => 'violations',
351351
'hydra:description' => 'The violations',
352352
'hydra:readable' => true,
353-
'hydra:writable' => false,
353+
'hydra:writeable' => false,
354354
],
355355
],
356356
],
@@ -470,7 +470,7 @@ public function testNormalizeInputOutputClass()
470470
'hydra:title' => 'a',
471471
'hydra:required' => false,
472472
'hydra:readable' => true,
473-
'hydra:writable' => true,
473+
'hydra:writeable' => true,
474474
'hydra:description' => 'a',
475475
],
476476
[
@@ -485,7 +485,7 @@ public function testNormalizeInputOutputClass()
485485
'hydra:title' => 'b',
486486
'hydra:required' => false,
487487
'hydra:readable' => true,
488-
'hydra:writable' => true,
488+
'hydra:writeable' => true,
489489
'hydra:description' => 'b',
490490
],
491491
[
@@ -500,7 +500,7 @@ public function testNormalizeInputOutputClass()
500500
'hydra:title' => 'c',
501501
'hydra:required' => false,
502502
'hydra:readable' => true,
503-
'hydra:writable' => true,
503+
'hydra:writeable' => true,
504504
'hydra:description' => 'c',
505505
],
506506
[
@@ -515,7 +515,7 @@ public function testNormalizeInputOutputClass()
515515
'hydra:title' => 'd',
516516
'hydra:required' => false,
517517
'hydra:readable' => true,
518-
'hydra:writable' => true,
518+
'hydra:writeable' => true,
519519
'hydra:description' => 'd',
520520
],
521521
],
@@ -597,7 +597,7 @@ public function testNormalizeInputOutputClass()
597597
],
598598
'hydra:title' => 'The collection of dummy resources',
599599
'hydra:readable' => true,
600-
'hydra:writable' => false,
600+
'hydra:writeable' => false,
601601
],
602602
],
603603
'hydra:supportedOperation' => [
@@ -624,7 +624,7 @@ public function testNormalizeInputOutputClass()
624624
'hydra:title' => 'propertyPath',
625625
'hydra:description' => 'The property path of the violation',
626626
'hydra:readable' => true,
627-
'hydra:writable' => false,
627+
'hydra:writeable' => false,
628628
],
629629
[
630630
'@type' => 'hydra:SupportedProperty',
@@ -638,7 +638,7 @@ public function testNormalizeInputOutputClass()
638638
'hydra:title' => 'message',
639639
'hydra:description' => 'The message associated with the violation',
640640
'hydra:readable' => true,
641-
'hydra:writable' => false,
641+
'hydra:writeable' => false,
642642
],
643643
],
644644
],
@@ -660,7 +660,7 @@ public function testNormalizeInputOutputClass()
660660
'hydra:title' => 'violations',
661661
'hydra:description' => 'The violations',
662662
'hydra:readable' => true,
663-
'hydra:writable' => false,
663+
'hydra:writeable' => false,
664664
],
665665
],
666666
],

0 commit comments

Comments
 (0)