A Symfony 8+ bundle for Bootstrap-first business datatables driven by PHP definitions.
Early development. Not production-ready.
- PHP-first datatable definitions.
- PHP attributes.
- Bootstrap-first rendering.
- Twig templates.
- Stimulus Ajax refresh.
- Vanilla JavaScript.
- Doctrine ORM provider.
- Declarative actions.
- Native Symfony translations.
- Extensible provider architecture.
- PHP 8.4+
- Symfony 8+
- Composer 2+
Doctrine ORM is optional at package level, but required for Doctrine-backed datatables.
Installation instructions are documented in docs/installation.md.
Basic usage is documented in docs/basic-usage.md.
Expected direction:
<?php
declare(strict_types=1);
namespace App\Datatable;
use App\Entity\User;
use Zhortein\DatatableBundle\Attribute\AsDatatable;
use Zhortein\DatatableBundle\Contract\DatatableInterface;
use Zhortein\DatatableBundle\Definition\DatatableDefinition;
use Zhortein\DatatableBundle\Enum\FilterOperator;
#[AsDatatable(name: 'users')]
final class UserDatatable implements DatatableInterface
{
public function buildDatatable(DatatableDefinition $definition): void
{
$definition
->setEntityClass(User::class)
->setTranslationDomain('user')
->addColumn('e.id', visible: false, sortable: false, searchable: false)
->addColumn('e.email')
->addColumn('e.displayName')
->addColumn('e.createdAt', searchable: false)
->addPermanentFilter('e.deletedAt', FilterOperator::IsNull)
;
}
}Expected Twig usage:
{{ zhortein_datatable('users') }}With runtime options:
{{ zhortein_datatable('users', {
search: true
}) }}- Documentation index
- Installation
- Basic usage
- Configuration
- Development workflow
- CI matrix and dependency strategy
- Release workflow
- First pre-release checklist
- Fresh Symfony smoke test plan
- Packagist readiness
- Features
- Architecture
- Documentation review checklist
- Roadmap
- First end-to-end flow
- Doctrine-backed datatables
- Actions and typed cell rendering
- Routes
- Stimulus and AssetMapper integration
- Table controls and interactions
- Column visibility and preferences
- User-facing filters
- Server-side exports
- Twig templates and overrides
- Template context reference
- Optional icon rendering strategy
- Cell template reference
- Theming and rendering customization
- Action security and visibility
- Changelog strategy
- Public API review
- 0001 - Legacy code as functional reference only
- 0002 - Initial public datatable API
- 0003 - Bootstrap rendering strategy
- 0004 - Vanilla Stimulus interaction model
- 0005 - Doctrine ORM provider architecture
composer install
composer qaWith the local Docker tooling:
make installdeps
make qaThe project must pass:
- PHPUnit;
- PHPStan at maximum level;
- PHP-CS-Fixer with Symfony-oriented rules;
- twigcs when Twig templates are present;
- GitHub Actions CI.
This bundle is released under the MIT License.