Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Chemaclass
Copy link
Member

πŸ”– Changes

  • Replace DocBlockResolverAwareTrait usages with the new cached ServiceResolverAwareTrait
  • Introduce the #[ServiceMap] attribute

@Chemaclass Chemaclass self-assigned this Nov 3, 2025
@Chemaclass Chemaclass added the enhancement New feature or request label Nov 3, 2025
@Chemaclass Chemaclass enabled auto-merge November 3, 2025 12:17
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

πŸ’‘ Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with πŸ‘.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 113 to 121
private function searchClassOverAttributes(ReflectionClass $reflectionClass, string $method): ?string
{
$attributes = $reflectionClass->getAttributes(Doc::class, ReflectionAttribute::IS_INSTANCEOF);
$attributes = $reflectionClass->getAttributes(ServiceMap::class, ReflectionAttribute::IS_INSTANCEOF);

foreach ($attributes as $attribute) {
/** @var Doc $instance */
/** @var ServiceMap $instance */
$instance = $attribute->newInstance();
if ($instance->method === $method) {
return $instance->className;

Choose a reason for hiding this comment

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

P1 Badge Preserve backward compatibility for Doc attributes

The resolver now only inspects #[ServiceMap] attributes and the Doc attribute class was removed entirely. Any existing application using the published #[Doc] attribute will no longer autoload (class not found) and even if the class were available it would be ignored by searchClassOverAttributes, causing runtime failures when resolving services. Consider retaining Doc as a subclass/alias of ServiceMap and checking both attribute names so current users are not broken while migrating.

Useful? React with πŸ‘Β / πŸ‘Ž.

@Chemaclass Chemaclass merged commit c139654 into main Nov 3, 2025
16 checks passed
@Chemaclass Chemaclass deleted the chore/ServiceResolverAwareTrait branch November 3, 2025 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Development

Successfully merging this pull request may close these issues.

3 participants