Is your feature request related to a problem? Please describe the problem.
microsoft/kiota-abstractions-php (including latest 2.0.1) requires
doctrine/annotations via its composer.json. That package is marked as
abandoned on Packagist ("Package doctrine/annotations is abandoned, you
should avoid using it. No replacement was suggested."), which surfaces as
a warning on every composer install/update in any project that uses
microsoft/microsoft-graph (or any Kiota-generated PHP client).
doctrine/annotations parses PHPDoc annotations at runtime, which has
been obsoleted by native PHP 8 attributes. Staying on it long-term
exposes consumers to an unmaintained dependency for parsing request
metadata.
Client library/SDK language
PHP
Describe the solution you'd like
Replace the doc-block annotation usage in
src/RequestInformation.php (uses Doctrine\Common\Annotations\AnnotationReader
on lines 7/50/66) with native PHP 8.1+ attributes (#[QueryParameter]
etc.) and drop the doctrine/annotations require from composer.json.
The PHP generator in Kiota would need to emit attribute-based metadata
on request configuration classes instead of PHPDoc annotations, and
the abstractions package would use ReflectionClass::getAttributes()
to read them.
Additional context
- composer.json still pins
doctrine/annotations: ^1.13 || ^2.0
as of microsoft/kiota-abstractions-php 2.0.1
microsoft/kiota-abstractions-php has issues disabled, so reporting
here against the parent project
- PHP 8.1 is already the minimum supported version of
kiota-abstractions-php 2.x, so native attributes are available
without raising requirements
- doctrine/annotations was officially abandoned:
https://github.com/doctrine/annotations (README notice)
Is your feature request related to a problem? Please describe the problem.
microsoft/kiota-abstractions-php(including latest 2.0.1) requiresdoctrine/annotationsvia its composer.json. That package is marked asabandoned on Packagist ("Package doctrine/annotations is abandoned, you
should avoid using it. No replacement was suggested."), which surfaces as
a warning on every
composer install/updatein any project that usesmicrosoft/microsoft-graph(or any Kiota-generated PHP client).doctrine/annotations parses PHPDoc annotations at runtime, which has
been obsoleted by native PHP 8 attributes. Staying on it long-term
exposes consumers to an unmaintained dependency for parsing request
metadata.
Client library/SDK language
PHP
Describe the solution you'd like
Replace the doc-block annotation usage in
src/RequestInformation.php(usesDoctrine\Common\Annotations\AnnotationReaderon lines 7/50/66) with native PHP 8.1+ attributes (
#[QueryParameter]etc.) and drop the
doctrine/annotationsrequire from composer.json.The PHP generator in Kiota would need to emit attribute-based metadata
on request configuration classes instead of PHPDoc annotations, and
the abstractions package would use
ReflectionClass::getAttributes()to read them.
Additional context
doctrine/annotations: ^1.13 || ^2.0as of
microsoft/kiota-abstractions-php2.0.1microsoft/kiota-abstractions-phphas issues disabled, so reportinghere against the parent project
kiota-abstractions-php 2.x, so native attributes are available
without raising requirements
https://github.com/doctrine/annotations (README notice)