Skip to content

Conversation

@alongosz
Copy link
Member

🎫 Issue n/a

Related PRs:

Description:

ATM extracting translations for ibexa_core config via:

php ./bin/console jms:translation:extract -c ibexa_core

fails with the following error:

In TypeContextFactory.php line 273:
                                               
  Cannot resolve "TIOHandlersMap" type alias.  
                                               

In StringTypeResolver.php line 90:
                                                 
  Cannot resolve "array<string, THandlerType>".  
                                                 

In StringTypeResolver.php line 342:
                                        
  Unhandled "THandlerType" identifier. 

due to combination of @template and @phpstan-type introduced with #613 changes.

Root cause:
symfony/symfony#61715

For now, I propose this workaround.

Note that this occurs in some specific scenarios and seems this is the only one existing edge case. Simply combining @phpstan-type and @template is not enough to trigger the error.

@alongosz alongosz force-pushed the workaround-handler-registry-translation-extraction branch from 5127309 to 83bc2ee Compare September 12, 2025 14:19
@sonarqubecloud
Copy link

@alongosz alongosz merged commit a56a539 into main Sep 12, 2025
15 checks passed
@alongosz alongosz deleted the workaround-handler-registry-translation-extraction branch September 12, 2025 16:17
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.

8 participants