api-platform / api-platform/core

Use tagged instead of CompilerPass

Offen
#3,172 1 Kommentar 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
PHP
Sterne
2.6k
Forks
980
Ø Merge
2 T. 4 Std.
Gemergte PRs (30 T.)
49

Beschreibung

**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
-
-
-


-
+

```

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.