Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot use cache because missing method #4125

Closed
snapshotpl opened this issue Nov 25, 2020 · 8 comments
Closed

Cannot use cache because missing method #4125

snapshotpl opened this issue Nov 25, 2020 · 8 comments
Labels

Comments

@snapshotpl
Copy link

Bug report

Run after cache generation I get every time message:
Result cache not used because an error occurred while loading the cache file: Call to undefined static method _HumbugBoxf99c1794c57d\Nette\DI\Definitions\Statement::__set_state().

I have try to clean cache and reinstall vendor.

@mergeable
Copy link

mergeable bot commented Nov 25, 2020

This bug report is missing a link to reproduction on phpstan.org.
It will most likely be closed after manual review.

@ondrejmirtes
Copy link
Member

Please show what you have in your phpstan.neon. Thanks.

@snapshotpl
Copy link
Author

includes:
    - phpstan-baseline.neon
    - vendor/phpstan/phpstan/conf/bleedingEdge.neon
    - vendor/grifart/phpstan-oneline/config.neon

services:
	-
		factory: PHPStan\Type\Doctrine\Descriptors\ReflectionDescriptor('Application\My\Type')
		tags: [phpstan.doctrine.typeDescriptor]

parameters:
    level: max
    paths:
        - ./module
        - ./config
    stubFiles:
        - config/stubs.php
    tmpDir: data/cache/phpstan
    inferPrivatePropertyTypeFromConstructor: true
    fileExtensions:
        - php
    excludes_analyse:
        - config/stubs
        - module/Przelewy24/docs
        - module/Przelewy24/src/LegacyClient/class_przelewy24.php
    doctrine:
    	objectManagerLoader: config/objectManager.php
    compact:
    	format: "{path}:{line}\n ↳ {error}\n" # default
    ergebnis:
    	classesAllowedToBeExtended:
    		- List\Of\Classes
    ignoreErrors:
        - '#List of errors#'

@ondrejmirtes
Copy link
Member

Change it to this:

services:
	-
		factory: PHPStan\Type\Doctrine\Descriptors\ReflectionDescriptor
		arguments:
			- 'Application\My\Type'
		tags: [phpstan.doctrine.typeDescriptor]

@ondrejmirtes
Copy link
Member

Of course this is a bug, but this workaround will work for now.

@snapshotpl
Copy link
Author

I had to remove vendor/grifart/phpstan-oneline/config.neon also to make it work.

@ondrejmirtes
Copy link
Member

Fixed: phpstan/phpstan-src@602c718

@github-actions
Copy link

github-actions bot commented May 6, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants