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

ActivePhpstan-extension

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 4w ago

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

22

—

LowBetter than 23% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity37

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

1675d 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

[larastan/larastan

Larastan - Discover bugs in your code without running it. A phpstan/phpstan extension for Laravel

6.4k43.5M5.2k](/packages/larastan-larastan)[phpstan/phpstan-symfony

Symfony Framework extensions and rules for PHPStan

78268.9M1.5k](/packages/phpstan-phpstan-symfony)[phpstan/phpstan-doctrine

Doctrine extensions for PHPStan

66466.6M1.0k](/packages/phpstan-phpstan-doctrine)[fluidtypo3/vhs

This is a collection of ViewHelpers for performing rendering tasks that are not natively provided by TYPO3's Fluid templating engine.

1954.1M48](/packages/fluidtypo3-vhs)[ticketswap/phpstan-error-formatter

A minimalistic error formatter for PHPStan

87578.8k35](/packages/ticketswap-phpstan-error-formatter)[netresearch/rte-ckeditor-image

Image support in CKEditor for the TYPO3 ecosystem - by Netresearch

63991.3k4](/packages/netresearch-rte-ckeditor-image)

PHPackages © 2026

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