-
-
Notifications
You must be signed in to change notification settings - Fork 868
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
feat: add an ApiResource PHP 8 attribute #3851
Conversation
5b37fc6
to
6a7d09d
Compare
6a7d09d
to
11dafa5
Compare
|
||
foreach ($defaults as $option => $value) { | ||
if (\in_array($option, $rootLevelOptions, true)) { | ||
if (isset($publicProperties[$option])) { |
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.
if (isset($publicProperties[$option])) { | |
if ($publicProperties[$option] ?? false) { |
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.
it's longer :p
@@ -598,7 +598,7 @@ private function addDefaultsSection(ArrayNodeDefinition $rootNode): void | |||
return $normalizedDefaults; | |||
}); | |||
|
|||
foreach (ApiResource::CONFIGURABLE_DEFAULTS as $attribute) { | |||
foreach (ApiResource::getConfigMetadata()[1] as $attribute => $_) { |
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.
[1] isn't so clear, I wish we could [, $configurableAttributes]; $configurableAttributes as ... :/
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.
We don't have something better for now.
b8dc849
to
8a5494d
Compare
PHP 8 has been released today, let's celebrate!