Skip to content

Conversation

JakovKnezovicc
Copy link
Contributor

  • adds ezmatrix field schema provider
  • adds ezmatrix field value visitor

@pspanja pspanja requested a review from emodric July 25, 2025 09:47
netgen.openapi_ibexa.ibexa.field_value_schema_provider.matrix:
class: Netgen\OpenApiIbexa\OpenApi\SchemaProvider\Ibexa\FieldValue\MatrixFieldValueSchemaProvider
tags:
- { name: netgen.openapi_ibexa.ibexa.field_value_schema_provider, identifier: ezmatrix }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing empty line at EOF

Copy link
Contributor Author

@JakovKnezovicc JakovKnezovicc Jul 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing empty line at EOF

Added in 8a9fba3

@pspanja
Copy link
Member

pspanja commented Jul 25, 2025

@JakovKnezovicc please resolve PHPStan errors

{
return new Schema\ArraySchema(
new Schema\ObjectSchema(
properties: [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't use named parameters, we don't use them here.

I don't have anything against them, but I'd rather keep the code style consistent.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adjusted in c84f0a4

public function visit(object $value, OutputVisitor $outputVisitor, array $parameters = []): array
{
return array_map(
static fn ($row) => $row->getCells(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can add a return typehint to the arrow function.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added in e39cd3c

@emodric
Copy link
Member

emodric commented Jul 25, 2025

PHPStan needs to be fixed. It is failing because it can't find the classes for Matrix field type.

It should be enough to add the matrix field type bundle to require-dev section in composer.json.

Scratch that, I see that we already ignore errors based on unavailable field types, so just add an exclusion to phpstan.neon.

@emodric
Copy link
Member

emodric commented Jul 25, 2025

Thanks @JakovKnezovicc !

@emodric emodric merged commit 62cf836 into master Jul 25, 2025
2 checks passed
@emodric emodric deleted the PROSTORIA-534-add-matrix-field-support branch July 25, 2025 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants