Skip to content

Can't use phpstan-yii2 if there are helper functions in config #12

@ddinchev

Description

@ddinchev

This is my phpstan.neon.

includes:
	- vendor/proget-hq/phpstan-yii2/extension.neon
parameters:
    autoload_files:
        - %rootDir%/../../../common/helpers.php
    yii2:
        config_path: %rootDir%/../../../config/web.php

I use functions defined in %rootDir%/../../../common/helpers.php in my config file, however phpstan-yii2's services seem to be executed before that file is included and it fails with a message that no such function exists.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions