Adjust PHP stan configs to use wordpress extension
[MAILPOET-2837]
This commit is contained in:
committed by
Veljko V
parent
332dd6ea58
commit
0bc0dd1808
@@ -1,21 +1,11 @@
|
||||
<?php
|
||||
|
||||
// Constants
|
||||
define('ABSPATH', getenv('WP_ROOT') . '/');
|
||||
define('WPINC', 'wp-includes');
|
||||
define('WP_DEBUG', false);
|
||||
define('WP_LANG_DIR', 'wp-content/languages');
|
||||
define('WP_PLUGIN_DIR', 'wp-content/plugins');
|
||||
define('WP_MEMORY_LIMIT', 268435456);
|
||||
define('WP_MAX_MEMORY_LIMIT', 268435456);
|
||||
define('ARRAY_A', 'ARRAY_A');
|
||||
define('OBJECT', 'OBJECT');
|
||||
define('MINUTE_IN_SECONDS', 60);
|
||||
define('HOUR_IN_SECONDS', 60 * MINUTE_IN_SECONDS);
|
||||
define('DAY_IN_SECONDS', 24 * HOUR_IN_SECONDS);
|
||||
define('WEEK_IN_SECONDS', 7 * DAY_IN_SECONDS);
|
||||
define('MONTH_IN_SECONDS', 30 * DAY_IN_SECONDS);
|
||||
define('YEAR_IN_SECONDS', 365 * DAY_IN_SECONDS);
|
||||
define('MAILPOET_VERSION', '1.0.0');
|
||||
define('DB_HOST', 'localhost');
|
||||
define('DB_NAME', 'wordpress');
|
||||
@@ -30,8 +20,8 @@ $dbConfig->defineTables();
|
||||
MailPoet\Config\Env::$dbPrefix = 'wp_';
|
||||
|
||||
// Classes needed in runtime
|
||||
MailPoet\Mailer\WordPress\PHPMailerLoader::load();
|
||||
require_once(ABSPATH . 'wp-includes/class-wp-widget.php'); // We extend this class it is need in runtime
|
||||
class_alias(\PHPMailer\PHPMailer\PHPMailer::class, 'PHPMailer');
|
||||
class_alias(\PHPMailer\PHPMailer\Exception::class, 'phpmailerException');
|
||||
// Load tracy
|
||||
$tracyPath = __DIR__ . '/../../tools/vendor/tracy.phar';
|
||||
require_once($tracyPath);
|
||||
|
Reference in New Issue
Block a user