-
Notifications
You must be signed in to change notification settings - Fork 19
Update phpcr-shell to Symfony 7 #224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
1ce300e
d97d2b9
f1737d0
382a754
57f5bb8
afd82bb
0f9adaa
4a39311
80ec380
9b9b3c8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,14 +39,21 @@ public function getNotes() | |
return $this->notes; | ||
} | ||
|
||
public function getSupportedTypes(?string $format): array | ||
{ | ||
return [ | ||
NodeInterface::class => true, | ||
]; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function normalize($node, $format = null, array $context = []) | ||
public function normalize($object, $format = null, array $context = []): array | ||
{ | ||
$res = []; | ||
|
||
foreach ($node->getProperties() as $property) { | ||
foreach ($object->getProperties() as $property) { | ||
if (false === $this->isPropertyEditable($property)) { | ||
continue; | ||
} | ||
|
@@ -85,15 +92,15 @@ public function normalize($node, $format = null, array $context = []) | |
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function supportsNormalization($data, $format = null) | ||
public function supportsNormalization($data, $format = null, array $context = []): bool | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. technical a bc break but I think we could ignore it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is to adjust to symfony 7 BC breaks, right? it would only be an issue if somebody extended the NodeNormalizer class. for this component imo that is not expected, agree that we don't do a new major version for that change. |
||
{ | ||
return is_object($data) && $data instanceof NodeInterface; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function denormalize($data, $class, $format = null, array $context = []) | ||
public function denormalize($data, $class, $format = null, array $context = []): mixed | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. technical a bc break but I think we could ignore it? |
||
{ | ||
if (!$data) { | ||
throw new \InvalidArgumentException( | ||
|
@@ -166,7 +173,7 @@ public function denormalize($data, $class, $format = null, array $context = []) | |
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function supportsDenormalization($data, $type, $format = null) | ||
public function supportsDenormalization($data, $type, $format = null, array $context = []): bool | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. technical a bc break but I think we could ignore it? |
||
{ | ||
return $type === 'PHPCR\NodeInterface'; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we try the dev version for now, to avoid a broken release of phpcr-utils?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did apply this in the CI to test against
@dev
dependencies. We still are blocked by phpspec and behat here to test fully against Symfony 7: