PHPackages                             tastaturberuf/contao-lazy-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. tastaturberuf/contao-lazy-bundle

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tastaturberuf/contao-lazy-bundle
================================

Helper and Utilities for lazy Contao developers

1.1.0(8mo ago)01MITPHPPHP ^8.4CI failing

Since Oct 7Pushed 8mo agoCompare

[ Source](https://github.com/Tastaturberuf/contao-lazy-bundle)[ Packagist](https://packagist.org/packages/tastaturberuf/contao-lazy-bundle)[ RSS](/packages/tastaturberuf-contao-lazy-bundle/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (15)Versions (3)Used By (0)

Contao Lazy Bundle
==================

[](#contao-lazy-bundle)

Note

**Contao** is an Open Source PHP Content Management System for people who want a professional website that is easy to maintain. Visit the [project website](https://contao.org) for more information.

You can be more lazy than ever when you follow the Contao best practices that are provided with this bundle.

Install
-------

[](#install)

```
composer require tastaturberuf/contao-lazy-bundle
```

Features
--------

[](#features)

Here are some of the features that this bundle provides:

### Lazy bundle setup

[](#lazy-bundle-setup)

The bundle provides a `LazyBundle` class that you can use to create your own bundle. You dont need to create a `Plugin` class anymore. At this time you have to manuel set the plugin class in your `composer.json`.

```
# /src/YourBundleName.php

namespace Vendor\YourBundleName;

use Tastaturberuf\ContaoLazyDevBundle\LazyBundle;

class YourBundleNameBundle extends LazyBundle {
}
```

This must be the namespace of your bundle class in your `composer.json`:.

```
{
    "extra": {
        "contao-manager-plugin": "Vendor\\YourBundleName\\YourBundleNameBundle"
    }
}
```

I plan to skip this step in the future too.

### Auto configuration

[](#auto-configuration)

All config files in `/config/*.{php,yaml}` will be automatically loaded. Except `/config/routes.{php,yaml}` will be registered as routes. Also all files in `/config/routes/*.{php,xml}` will be registered as routes.

### Register Contao models

[](#register-contao-models)

This method ensures that the provided model class exists, is a subclass of the base `Model` class, and optionally forces registration even if it is already registered. The model will be assigned to the global `$GLOBALS['TL_MODELS']` array using its table name as the key.

```
# /contao/config/config.php

use Tastaturberuf\ContaoLazyDevBundle\Contao\ContaoConfig;

ContaoConfig::registerModel(YourModel::class);

ContaoConfig::registerModels(YourModel::class, YourOtherModel::class);
```

### Lazy ScopeMatcher

[](#lazy-scopematcher)

Instead of injecting two services for scope matching, you can use the `LazyScopeMatcher` class as wrapper. As default the taken request is the current one. Since Contao 5.4 you dont need this anymore, you csn use the default ScopeMatcher without needing the RequestStack.

```
# /src/Services/YourService.php

use Tastaturberuf\ContaoLazyDevBundle\Contao\LazyScopeMatcher;

class YourService {
   public function __construct(LazyScopeMatcher $scopeMatcher) {
        $scopeMatcher->isFrontendRequest();
        $scopeMatcher->isBackendRequest();
        $scopeMatcher->isContaoRequest();
    }
}
```

### Lazy Alias Generator

[](#lazy-alias-generator)

You hate generating an alias? Me too. Just use the `LazyAliasGenerator` class to generate the alias in an oneliner.

```
# /src/DataContainer/YourDataContainer.php

use Contao\CoreBundle\DependencyInjection\Attribute\AsCallback;
use Tastaturberuf\ContaoLazyBundle\Contao\LazyAliasGenerator;

#[AsCallback('my_table', 'fields.alias.save')]
public function generateAlias(string $alias, DC_Table $dc): string
{
    return $this->lazyAliasGenerator->generate($dc->getActiveRecord()['name'], $alias, $dc, 'alias', 'custom-prefix-');
}
```

That's all. The Service checks for null values, trim strings, check for duplicates and numerical alias. It's awesome easy to use.

Maintainer
----------

[](#maintainer)

[![Daniel Rick](https://avatars.githubusercontent.com/u/1027521?s=128)](https://github.com/tastaturberuf)

[![Tastaturberuf](https://camo.githubusercontent.com/cd78ff9d7d8b18eecc3da4e9fe33626af3616653d17185e74d54c9ce4c2905d5/68747470733a2f2f746173746174757262657275662e64652f66696c65732f696d672f6c6f676f2f323031372e706e67)](https://tastaturberuf.de)

**PHP with ♥ and Contao**

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance58

Moderate activity, may be stable

Popularity1

Limited adoption so far

Community6

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

Total

2

Last Release

269d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1027521?v=4)[Daniel Rick](/maintainers/Tastaturberuf)[@Tastaturberuf](https://github.com/Tastaturberuf)

---

Top Contributors

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

---

Tags

contaocontao-bundlelazy

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Rector

Type Coverage Yes

### Embed Badge

![Health badge](/badges/tastaturberuf-contao-lazy-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/tastaturberuf-contao-lazy-bundle/health.svg)](https://phpackages.com/packages/tastaturberuf-contao-lazy-bundle)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)[symfony/framework-bundle

Provides a tight integration between Symfony components and the Symfony full-stack framework

3.6k251.7M11.6k](/packages/symfony-framework-bundle)[contao-community-alliance/dc-general

Universal data container for Contao

1680.8k92](/packages/contao-community-alliance-dc-general)[contao/manager-bundle

Provides the Contao Managed Edition

181.3M75](/packages/contao-manager-bundle)[shopware/storefront

Storefront for Shopware

684.6M235](/packages/shopware-storefront)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M572](/packages/shopware-core)

PHPackages © 2026

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