miserenkov/phpstan-yii2-laravel

Yii2 extension for PHPStan with Laravel proxy

v1.0 2023-04-11 20:06 UTC

This package is auto-updated.

Last update: 2024-11-11 23:28:10 UTC


README

Minimum PHP Version Latest Stable Version Build Status Total Downloads License

What does it do?

  • Provides correct return type for Yii::$container->get('service_id') method,
  • Provides correct methods and properties for Yii::$app->request
  • Ignore common problems with response objects (to be removed).

Compatibility

Installation

composer require --dev miserenkov/phpstan-yii2-laravel

Configuration

Put this into your phpstan.neon config:

includes:
	- vendor/miserenkov/phpstan-yii2-laravel/extension.neon
parameters:
    yii2:
        application_id: api

Limitations

Container closures must have return types.

You have to provide config for yii application in laravel application in key yii.{application_id}