api-platform / api-platform/core

Use tagged instead of CompilerPass

Open
#3,172 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
PHP
Stars
2.6k
Forks
980
Avg merge
2d 4h
Merged PRs (30d)
49

Description

**Description**
Instead of using compiler pass for getting tagged services in `ApiPlatform\Core\Bridge\Symfony\Bundle\DependencyInjection\Compiler` for:
- Filters
- GraphQL mutation resolvers
- GraphQL query resolvers
- GraphQL types

We should use the tagged services feature of Symfony: https://symfony.com/doc/3.4/service_container/tags.html#reference-tagged-services

It allows to set priorities of the tagged services and it's less code to maintain.

**Example**
For the GraphQL types, in `graphql.xml` it will become:
```diff
-
-
-


-
+

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.