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(7mo ago)00MITPHPPHP ^8.4CI passing

Since Oct 7Pushed 7mo 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 1mo ago

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

33

—

LowBetter than 75% of packages

Maintenance64

Regular maintenance activity

Popularity0

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

216d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8e0fd208a574250c1bafe47661a7505a0ad9cf5c09045c4d747b47165793345c?d=identicon)[Tastaturberuf](/maintainers/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

[codefog/contao-haste

haste extension for Contao Open Source CMS

42650.8k139](/packages/codefog-contao-haste)[contao/manager-bundle

Provides the Contao Managed Edition

181.3M61](/packages/contao-manager-bundle)[netgen/layouts-core

Netgen Layouts enables you to build and manage complex web pages in a simpler way and with less coding. This is the core of Netgen Layouts, its heart and soul.

3689.4k10](/packages/netgen-layouts-core)[codefog/contao-news_categories

News Categories bundle for Contao Open Source CMS

3183.3k6](/packages/codefog-contao-news-categories)[terminal42/dcawizard

dcaWizard extension for Contao Open Source CMS

10370.7k15](/packages/terminal42-dcawizard)[contao-community-alliance/dc-general

Universal data container for Contao

1578.3k86](/packages/contao-community-alliance-dc-general)

PHPackages © 2026

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