Skip to content
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

Incorrect Doctrine deprecation flagged on OpenApi attributes #259

Closed
mbabker opened this issue Feb 6, 2023 · 0 comments
Closed

Incorrect Doctrine deprecation flagged on OpenApi attributes #259

mbabker opened this issue Feb 6, 2023 · 0 comments
Labels

Comments

@mbabker
Copy link

mbabker commented Feb 6, 2023

In one of our projects, we are using https://github.com/zircote/swagger-php to document our API with their attribute classes.

Using this example minimal schema:

<?php

namespace App\Http\Resources\Reports;

use Illuminate\Http\Resources\Json\ResourceCollection;
use OpenApi\Attributes as OA;

#[OA\Schema(
    schema: 'example_report_list',
    type: 'object',
)]
final class ExampleReportResourceCollection extends ResourceCollection {}

In PhpStorm, the type property is being flagged with a deprecation notice based on a deprecation from the Doctrine ORM.

[Annotations] Deprecated: Use {@link JsonType} instead. 
Inspection info:
Reports deprecations of the type Doctrine\ORM\Mapping\Column::type based on the underlying type class

I'd suggest that this deprecation should only apply to Doctrine mapping annotations/attributes to avoid false positives.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants