PHPackages                             jeandanyel/crud-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. jeandanyel/crud-bundle

ActiveLibrary

jeandanyel/crud-bundle
======================

A flexible Symfony bundle that provides automatic generation of Create, Read, Update, and Delete actions for entities, along with list management and customizable templates.

v0.1.2(1y ago)151MITPHPPHP ^8.2

Since Nov 15Pushed 1y ago1 watchersCompare

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

READMEChangelog (3)Dependencies (10)Versions (4)Used By (0)

crud-bundle
===========

[](#crud-bundle)

The CRUD Bundle provides a quick and easy way to generate Create, Read, Update, and Delete actions for any given entity in your Symfony projects. This bundle is designed to simplify entity management by automating CRUD operations while remaining flexible and easy to customize.

Additionally, it integrates list generation through the [jeandanyel/list-bundle](https://www.github.com/jeandanyel/list-bundle), offering a customizable solution for displaying and managing your data.

This bundle is actively under development, with upcoming features such as role management and event handling. Contributions to the project are always welcome 🥳.

Usage
-----

[](#usage)

To use this bundle, simply create an **Entity**, its corresponding **Repository**, a **FormType**, a **ListType** and a **Controller** that extends the abstract class [`AbstractCrudController`](./src/Controller/AbstractCrudController.php).

Use the [`CrudController`](./src/Attribute/CrudController.php) attribute to specify the **Entity**, **FormType**, and **ListType** classes as parameters.

```
namespace App\Controller;

use App\Entity\Article;
use App\Form\ArticleType;
use App\List\ArticleListType;
use Jeandanyel\CrudBundle\Attribute\CrudController;
use Jeandanyel\CrudBundle\Controller\AbstractCrudController;

#[CrudController(entityClass: Article::class, formTypeClass: ArticleType::class, listTypeClass: ArticleListType::class)]
class ArticleController extends AbstractCrudController
{
}
```

This configuration will automatically set up CRUD actions for the `Article` entity.

Routes
------

[](#routes)

The routes for the CRUD actions are automatically generated by the bundle using the [`RouteLoader`](./src/Routing/RouteLoader.php). This means you don't have to manually configure the routes for each entity.

Templates
---------

[](#templates)

The bundle provides default templates used for the `list`, `create`, and `update` actions.

If these templates do not meet your needs, you can create your own custom templates by following the naming convention based on your entity and the desired action. Your custom template will take priority over the default ones.

The format to follow for your custom templates is `templates/{entity}/{action}.html.twig`.

For example, if you want to create a custom template for the `Article` entity and the `update` action, the Twig file should be created at `templates/article/update.html.twig`.

CRUD actions list
-----------------

[](#crud-actions-list)

MethodRoute nameRouteTemplate`AbstractCrudController::list`crud\_{entity}\_list/{entity}/list[@JeandanyelCrud/crud/list.html.twig](../templates/crud/list.html.twig)`AbstractCrudController::create`crud\_{entity}\_create/{entity}/create[@JeandanyelCrud/crud/create.html.twig](../templates/crud/create.html.twig)`AbstractCrudController::update`crud\_{entity}\_update/{entity}/update/{id}[@JeandanyelCrud/crud/update.html.twig](../templates/crud/update.html.twig)`AbstractCrudController::delete`crud\_{entity}\_delete/{entity}/delete/{id}-Events
------

[](#events)

The CRUD includes events that allow developers to hook into specific CRUD actions, such as saving an entity. These events are dispatched during CRUD operations and can be used to perform additional logic or validations.

### Available events

[](#available-events)

Event NameDescription[`EntityBeforeSaveEvent`](./src/Event/EntityBeforeSaveEvent.php)Triggered **before** an entity is saved to the database.[`EntityAfterSaveEvent`](./src/Event/EntityAfterSaveEvent.php)Triggered **after** an entity has been saved to the database.### Usage example

[](#usage-example)

The following example demonstrates how to use `EntityBeforeSaveEvent` to perform operations before an entity is saved:

```
namespace App\EventListener;

use App\Entity\Article;
use Jeandanyel\CrudBundle\Event\EntityBeforeSaveEvent;
use Symfony\Component\EventDispatcher\Attribute\AsEventListener;

#[AsEventListener(EntityBeforeSaveEvent::class)]
class ArticleCrudBeforeSaveListener
{
    public function __invoke(EntityBeforeSaveEvent $event)
    {
        $entity = $event->getEntity();

        if ($entity instanceof Article) {
            // Perform operations before saving the Article entity.
        }
    }
}
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance42

Moderate activity, may be stable

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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 ~36 days

Total

3

Last Release

469d ago

PHP version history (2 changes)v0.1.0PHP ^8.0

v0.1.1PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/5bb6d3d0b05175cfc2fc1b11b432208a3248605723601c72fdd835847e620867?d=identicon)[jeandanyel](/maintainers/jeandanyel)

---

Top Contributors

[![jeandanyel](https://avatars.githubusercontent.com/u/15878787?v=4)](https://github.com/jeandanyel "jeandanyel (10 commits)")

### Embed Badge

![Health badge](/badges/jeandanyel-crud-bundle/health.svg)

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

###  Alternatives

[sylius/sylius

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

8.4k5.6M651](/packages/sylius-sylius)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k16.7M310](/packages/easycorp-easyadmin-bundle)[sulu/sulu

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

1.3k1.3M152](/packages/sulu-sulu)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[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)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)

PHPackages © 2026

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