PHPackages                             wedrix/watchtower-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. wedrix/watchtower-bundle

ActiveSymfony-bundle[API Development](/categories/api)

wedrix/watchtower-bundle
========================

Symfony bundle for watchtower

v3.0.1(3mo ago)186MITPHPPHP ^8.0CI passing

Since Jul 9Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/Wedrix/watchtower-symfony-bundle)[ Packagist](https://packagist.org/packages/wedrix/watchtower-bundle)[ RSS](/packages/wedrix-watchtower-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (7)Dependencies (6)Versions (8)Used By (0)

WedrixWatchtowerBundle integrates [Watchtower](https://github.com/Wedrix/watchtower) with Symfony so you can expose a GraphQL API from Doctrine entities with minimal setup.

Requirements
============

[](#requirements)

- PHP `8.0+`
- Symfony `5.4`, `6.4`, or `7.x`
- `wedrix/watchtower` `^10.0`

Installation
============

[](#installation)

1. Enable Symfony contrib recipes (once per project):

    ```
     composer config extra.symfony.allow-contrib true

    ```
2. Install the bundle:

    ```
     composer require wedrix/watchtower-bundle

    ```
3. Generate your initial schema:

    ```
     php bin/console watchtower:schema:generate

    ```

Your GraphQL endpoint is served through the configured `endpoint` path (commonly `/graphql.json`).

When calling the endpoint from browsers, make sure CORS is configured if needed (for example with [NelmioCorsBundle](https://symfony.com/bundles/NelmioCorsBundle/current/index.html)).

Quick Start
===========

[](#quick-start)

Run a query:

```
curl -X POST 'http://localhost:8000/graphql.json' \
  -H 'Content-Type: application/json' \
  -d '{"query":"{ __typename }"}'
```

The route accepts `POST` requests only.

Configuration
=============

[](#configuration)

Configure the bundle in `config/packages/wedrix_watchtower_bundle.yaml`:

```
wedrix_watchtower_bundle:
    endpoint: '/graphql.json'
    schema_file: '%kernel.project_dir%/resources/graphql/schema.graphql'
    plugins_directory: '%kernel.project_dir%/resources/graphql/plugins'
    scalar_type_definitions_directory: '%kernel.project_dir%/resources/graphql/scalar_type_definitions'
    cache_directory: '%kernel.cache_dir%/watchtower'
    optimize: false
    debug: '%kernel.debug%'
    context:
        entity_manager: 'doctrine.orm.entity_manager'
```

Options:

- `endpoint`: GraphQL endpoint path.
- `schema_file`: GraphQL schema file path.
- `plugins_directory`: directory containing Watchtower plugins.
- `scalar_type_definitions_directory`: directory containing scalar type definition files.
- `cache_directory`: directory used for Watchtower cache artifacts.
- `optimize`: enables cache-first execution mode; run `watchtower:cache:generate` after schema/plugin/scalar changes.
- `debug`: includes GraphQL debug details in responses.
- `context`: map of context keys to Symfony service IDs; resolved services are exposed to plugins via `Node::context()`.

At runtime, plugins also receive these built-in context entries:

- `request`: current `Symfony\Component\HttpFoundation\Request`
- `response`: current `Symfony\Component\HttpFoundation\Response`

Console Commands
================

[](#console-commands)

- `watchtower:schema:generate`: generate a new schema file from Doctrine metadata.
- `watchtower:schema:update`: currently invalidates schema cache; it does not rewrite the schema file yet.
- `watchtower:cache:generate`: generate cache files used by optimize mode.
- `watchtower:plugins:add`: generate plugin boilerplate interactively.
- `watchtower:plugins:list`: list configured plugins.
- `watchtower:scalar-type-definitions:add`: generate scalar type definition boilerplate.
- `watchtower:scalar-type-definitions:list`: list configured scalar type definitions.

`watchtower:plugins:add` supports:

- `constraint`
- `root_constraint`
- `filter`
- `ordering`
- `selector`
- `resolver`
- `authorizor`
- `root_authorizor`
- `mutation`
- `subscription`

For plugin conventions and feature details, see the upstream Watchtower docs:

- Plugins:
- Scalar types:
- Full feature docs:

Development
===========

[](#development)

Run tests:

```
composer test
```

CI runs a dependency matrix across supported PHP, Symfony, and Doctrine ORM combinations (including lowest and latest lanes for key baselines).

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance82

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~158 days

Recently: every ~183 days

Total

7

Last Release

93d ago

Major Versions

v1.0.0 → v2.0.02023-11-20

v2.0.3 → v3.0.02026-02-13

### Community

Maintainers

![](https://www.gravatar.com/avatar/c3a6171510e69ce95521df83ee63c51cac340cc835268454bfb0a4dc5dadcdc2?d=identicon)[Wedrix](/maintainers/Wedrix)

---

Top Contributors

[![Wedrix](https://avatars.githubusercontent.com/u/41763329?v=4)](https://github.com/Wedrix "Wedrix (22 commits)")

---

Tags

graphqlgraphql-phpsymfonysymfony-bundlesymfony6

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/wedrix-watchtower-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/wedrix-watchtower-bundle/health.svg)](https://phpackages.com/packages/wedrix-watchtower-bundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

7310.3k29](/packages/open-dxp-opendxp)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1714.8k8](/packages/2lenet-crudit-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
