Skip to content

Occasional Errors In Pipeline #316

Open
@dmanners

Description

@dmanners

While running phpstan in the context of our Magento project locally we get no errors, but occasionally with the same code base running in a ci/cd pipeline we will get errors that will either change or disappear on a re-run.

The errors that do appear seem to only occur with extension attributes.

71 Call to method getSuppliers() on an unknown class
Magento\Sales\Api\Data\OrderExtensionInterface.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols

In our pipeline and also lokally we are running

./vendor/bin/phpstan analyse --memory-limit=4G --configuration=.dev/tests/static/testsuite/Magento/Test/Php/_files/phpstan/db-systel.neon

With the config

parameters:
	level: 4
	treatPhpDocTypesAsCertain: false
	paths:
		- %currentWorkingDirectory%/app/code
		- %currentWorkingDirectory%/app/design
	magento:
		magentoRoot: %currentWorkingDirectory%
	ignoreErrors:
		-
			# reason: false positive magic methods
			message: '#Call to an undefined method [a-zA-Z0-9\\_]+::setData|hasData|unsetData|getData|toArray\(\)#'
		-
			# reason: false positive with CartInterface
			message: '#Call to an undefined method Magento\\Quote\\Api\\Data\\CartInterface::getAllVisibleItems\(\).#'
		-
			message: '#Call to an undefined method Magento\\Quote\\Api\\Data\\CartInterface::getGrandTotal\(\).#'
		-
			message: '#Call to an undefined method Magento\\Quote\\Api\\Data\\CartInterface::getPayment\(\).#'

I have tried clearing the phpstan cache both locally and in the pipeline as well as locally clearing the generated folder as in the pipeline we have no generated folder.

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