parameters: level: 9 tmpDir: ../../temp/phpstan bootstrapFiles: - ../../vendor/autoload.php - bootstrap.php - vendor/php-stubs/woocommerce-stubs/woocommerce-stubs.php - vendor/php-stubs/woocommerce-stubs/woocommerce-packages-stubs.php - ../../vendor/codeception/codeception/autoload.php - ../../vendor/codeception/verify/src/Codeception/function.php - ../../vendor/codeception/verify/src/Codeception/Verify/Verify.php - ../../tests/_support/_generated/AcceptanceTesterActions.php - ../../tests/_support/_generated/IntegrationTesterActions.php - ../../tests/_support/_generated/UnitTesterActions.php scanDirectories: - ../../tests/_support - ../../tests/acceptance - ../../tests/integration - ../../tests/unit scanFiles: - PremiumContainerConfigurator.php - ../../vendor-prefixed/twig/twig/src/Extension/CoreExtension.php # phpstan can't find \MailPoetVendor\twig_include function - vendor/php-stubs/woocommerce-stubs/woocommerce-stubs.php - custom-stubs.php inferPrivatePropertyTypeFromConstructor: true parallel: processTimeout: 300.0 maximumNumberOfProcesses: 4 ignoreErrors: - '#Function members_register_.+ not found#' - '#Call to an undefined method MailPoetVendor\\Idiorm\\IdiormResultSet::set\(\)#' - '#Argument of an invalid type MailPoetVendor\\pQuery\\IQuery supplied for foreach, only iterables are supported#' # exclude level 6 errors (but keep them for Automation) - '/(Method|Property|Function) (?!MailPoet\\Automation\\).*has no (return )?type specified/' - '/(Method|Function) (?!MailPoet\\Automation\\).*has parameter (\$[_A-Z]{1}[_a-z]+)? with no type (specified)?/i' - # Primary keys ScheduledTaskSubscriberEntity of are foreign keys and foreign keys may be null because of missing related record message: '#Property MailPoet\\Entities\\[a-zA-Z]+::\$[a-z]+ type mapping mismatch: property can contain MailPoet\\Entities\\[a-zA-Z]+\|null but database expects MailPoet\\Entities\\[a-zA-Z]+.#' path: ../../lib/Entities/ScheduledTaskSubscriberEntity.php count: 2 - '/Parameter #1 \$cssOrXPath of method AcceptanceTester::moveMouseOver\(\) expects string\|null, array given./' - '/Function expect invoked with 1 parameter, 0 required\./' - '/Call to method getName\(\) on an unknown class _generated\\([a-zA-Z])*Cookie/' # codeception generate incorrect return type in ../../tests/_support/_generated - message: "#^Cannot cast string|void to string\\.$#" count: 10 path: ../../lib/Automation/Engine/Storage/AutomationRunStorage.php - message: "#^Cannot cast string|void to string\\.$#" count: 12 path: ../../lib/Automation/Engine/Storage/AutomationStorage.php - message: '/^Call to static method get_orders_table_name\(\) on an unknown class Automattic\\WooCommerce\\Internal\\DataStores\\Orders\\OrdersTableDataStore\.$/' count: 1 path: ../../lib/WooCommerce/Helper.php - message: '/^Call to static method get_addresses_table_name\(\) on an unknown class Automattic\\WooCommerce\\Internal\\DataStores\\Orders\\OrdersTableDataStore\.$/' count: 1 path: ../../lib/WooCommerce/Helper.php - message: '/^Call to function method_exists\(\) with/' count: 2 path: ../../lib/WooCommerce/Helper.php - # WooCommerce stubs contains stubs for older ActionScheduler version message: '/^Function as_schedule_recurring_action invoked with 6 parameters, 3-5 required.$/' count: 1 path: ../../lib/Cron/ActionScheduler/ActionScheduler.php - # WooCommerce stubs contains stubs for older ActionScheduler version message: '/^Function as_schedule_single_action invoked with 5 parameters, 2-4 required.$/' count: 1 path: ../../lib/Cron/ActionScheduler/ActionScheduler.php - message: '/^Cannot call method get\(\) on mixed.$/' count: 1 path: ../../lib/PostEditorBlocks/WooCommerceBlocksIntegration.php - message: '/^Call to an undefined method Codeception\\TestInterface::getName()./' count: 1 path: ../../tests/_support/CheckSkippedTestsExtension.php - message: '/Parameter \$record of method MailPoet\\Logging\\PluginVersionProcessor::__invoke\(\) has invalid type MailPoetVendor\\Monolog\\Processor\\Record/' count: 1 path: ../../lib/Logging/PluginVersionProcessor.php - message: '/Return type \(array\) of method MailPoet\\Logging\\PluginVersionProcessor::__invoke\(\) should be compatible with return type \(MailPoetVendor\\Monolog\\Processor\\Record\) of method MailPoetVendor\\Monolog\\Processor\\ProcessorInterface::__invoke\(\)/' count: 1 path: ../../lib/Logging/PluginVersionProcessor.php - # Can be removed once https://github.com/woocommerce/woocommerce/pull/36104 is merged. WooCommerce docblock for this method is outdated. message: '/^Parameter #2 \$args of static method Automattic\\WooCommerce\\Admin\\Features\\OnboardingTasks\\TaskLists::add_task\(\) expects array, MailPoet\\WooCommerce\\MailPoetTask given.$/' count: 1 path: ../../lib/Config/HooksWooCommerce.php - message: "#^Cannot cast string|void to string\\.$#" count: 3 path: ../../lib/Automation/Integrations/WooCommerce/Fields/CustomerOrderFieldsFactory.php - message: "#^Cannot cast string|void to string\\.$#" count: 2 path: ../../lib/Automation/Integrations/WooCommerce/Fields/CustomerReviewFieldsFactory.php - # WP annotates parameter as callable, but passes empty string as a default. message: '/function add_(sub)?menu_page expects callable\(\): mixed, ''''\|\(callable\(\): mixed\) given/' count: 2 path: ../../lib/WP/Functions.php reportUnmatchedIgnoredErrors: true dynamicConstantNames: - MAILPOET_PREMIUM_INITIALIZED doctrine: objectManagerLoader: create-entity-manager.php # exclude level 6 errors checkMissingIterableValueType: false excludePaths: analyseAndScan: - ../../lib/Config/PopulatorData/Templates # analysis of templates is extremely slow, let's skip them for now - ../../tests/_support/_generated - ../../tests/unit/Entities/SubscriberEntityTest.php - vendor/php-stubs/wordpress-stubs/wordpress-stubs.php # does not yet offer support for PHP 8.1 includes: - extensions/CodeceptionExtension/extension.neon - vendor/phpstan/phpstan-doctrine/extension.neon - vendor/phpstan/phpstan-phpunit/extension.neon - vendor/phpstan/phpstan-doctrine/rules.neon - vendor/szepeviktor/phpstan-wordpress/extension.neon - php-version-dependent-config.php # PHP version detection + configuraton dependent on PHP version - phpstan-baseline-fix-lib.php # include baseline files