PHPackages                             schnitzler/phpstan-typo3-extbase - 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. schnitzler/phpstan-typo3-extbase

ActivePhpstan-extension[Utility &amp; Helpers](/categories/utility)

schnitzler/phpstan-typo3-extbase
================================

A PHPStan package that supports working with Extbase

0.1.1(4y ago)51.4k1[1 issues](https://github.com/alexanderschnitzler/phpstan-typo3-extbase/issues)MITPHPPHP ^7.2

Since Oct 6Pushed 4y ago3 watchersCompare

[ Source](https://github.com/alexanderschnitzler/phpstan-typo3-extbase)[ Packagist](https://packagist.org/packages/schnitzler/phpstan-typo3-extbase)[ GitHub Sponsors](https://github.com/alexanderschnitzler)[ RSS](/packages/schnitzler-phpstan-typo3-extbase/feed)WikiDiscussions develop Synced today

READMEChangelogDependencies (3)Versions (4)Used By (0)

PHPStan for Extbase
===================

[](#phpstan-for-extbase)

This package provides a couple of stubs and services to make your life easier when working with PHPStan and Extbase.

Examples
--------

[](#examples)

```
class Item extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {}

/**
 * @template TEntityClass of Item
 * @template-extends Repository
 */
class ItemRepository extends \TYPO3\CMS\Extbase\Persistence\Repository {}

class ItemController
{
    private ItemRepository $itemRepository;

    public function listAction()
    {
        # this call does not longer generate a "call getFirst() on array" error
        $this->itemRepository->findAll()->getFirst();

        # PHPStan does now understand that this is a collection of Item classes.
        # This is made possible with @template and @template-extends annotations on your repositories
        $items = $this->itemRepository->findAll();

        foreach($this->itemRepository->findAll() as $item) {
            # PHPStan does now know that $item is an instance of Item which does not have method getFoo() defined.
            $item->getFoo();
        }

        # PHPStan does now know that $item can be null
        $item = $this->itemRepository->findByUid(1);

        #PHPStan does no longer report an error for such comparisons due to the former detection
        if ($item !== null) {
        }

        # PHPStan understands that $query deals with Item objects
        $query = $this->itemRepository->createQuery();

        # PHPStan does now know that execute returns a QueryResult with the argument set to false.
        $queryResult = $query->execute(false);

        # PHPStan does now know that execute returns an array of arrays (array) with the argument set to true.
        $array = $query->execute(true);
    }
}
```

Installation
------------

[](#installation)

```
composer require schnitzler/phpstan-typo3-extbase
```

```
# phpstan.neon

includes:
	- vendor/schnitzler/phpstan-typo3-extbase/extension.neon

```

Why yet another package?
------------------------

[](#why-yet-another-package)

Well, that's because it's easier for me to work on it with my own pace. Also, this package is not feature complete yet. I am in contact and will continue to be with other package maintainers and maybe there will once be just one package for all TYPO3 needs. But for now, this is the way to go.

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

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

Total

2

Last Release

1729d ago

### Community

Maintainers

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

---

Top Contributors

[![alexanderschnitzler](https://avatars.githubusercontent.com/u/711459?v=4)](https://github.com/alexanderschnitzler "alexanderschnitzler (5 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/schnitzler-phpstan-typo3-extbase/health.svg)

```
[![Health](https://phpackages.com/badges/schnitzler-phpstan-typo3-extbase/health.svg)](https://phpackages.com/packages/schnitzler-phpstan-typo3-extbase)
```

###  Alternatives

[typo3/cms-install

TYPO3 CMS Install Tool - The Install Tool is used for installation, upgrade, system administration and setup tasks.

1812.3M492](/packages/typo3-cms-install)[ticketswap/phpstan-error-formatter

A minimalistic error formatter for PHPStan

87718.9k55](/packages/ticketswap-phpstan-error-formatter)[yoast-seo-for-typo3/yoast_seo

Yoast SEO for TYPO3

511.7M9](/packages/yoast-seo-for-typo3-yoast-seo)[ergebnis/rector-rules

Provides rules for rector/rector.

10245.6k51](/packages/ergebnis-rector-rules)[eliashaeussler/typo3-form-consent

Extension for TYPO3 CMS that adds double opt-in functionality to EXT:form

1595.5k](/packages/eliashaeussler-typo3-form-consent)[tomasvotruba/ctor

Prefer constructor over always called setters

1524.9k19](/packages/tomasvotruba-ctor)

PHPackages © 2026

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