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

Fix PHPStan check of required file #550

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bin/phpstan/constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* @package GTM Kit
*/

define( 'GTMKIT_FILE', '/gtm-kit.php' );
define( 'GTMKIT_PATH', '/' );
define( 'GTMKIT_FILE', './gtm-kit.php' );
define( 'GTMKIT_PATH', './' );
define( 'GTMKIT_BASENAME', '/gtm-kit.php' );
define( 'GTMKIT_URL', '/gtm-kit.php' );
define( 'GTMKIT_ADMIN_SLUG', 'gtmkit_' );
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"php-stubs/woocommerce-stubs": "^9.2",
"phpcompatibility/phpcompatibility-wp": "*",
"phpstan/extension-installer": "^1.4.2",
"phpstan/phpstan": "^1.12.0",
"phpstan/phpstan": "^1.12",
"phpstan/phpstan-deprecation-rules": "^1.2",
"szepeviktor/phpstan-wordpress": "^v1.3.5",
"wp-coding-standards/wpcs": "^3.1"
Expand Down
68 changes: 34 additions & 34 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ parameters:
- gtm-kit.php
- src/
- uninstall.php
ignoreErrors:
- '#Path in require_once.*plugin#'
2 changes: 1 addition & 1 deletion src/Installation/PluginDataImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ private function get_google_tag_manager(): array {
private function is_plugin_active( string $plugin ): bool {
if ( ! function_exists( 'is_plugin_active' ) ) {

include_once ABSPATH . 'wp-admin/includes/plugin.php';
require_once ABSPATH . 'wp-admin/includes/plugin.php';

}

Expand Down
2 changes: 1 addition & 1 deletion src/Options.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ public function pre_update_option( $new_value, $old_value ): ?array {
public static function get_defaults(): array {

if ( ! function_exists( 'is_plugin_active' ) ) {
include_once ABSPATH . 'wp-admin/includes/plugin.php';
require_once ABSPATH . 'wp-admin/includes/plugin.php';
}

$map = self::$map;
Expand Down
4 changes: 2 additions & 2 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'name' => 'tlamedia/gtm-kit',
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => '12e7711143893383db41f72c329ee58fa26b6819',
'reference' => '8f779ad9f08f3aeba4a68076cd25114917840707',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand All @@ -13,7 +13,7 @@
'tlamedia/gtm-kit' => array(
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'reference' => '12e7711143893383db41f72c329ee58fa26b6819',
'reference' => '8f779ad9f08f3aeba4a68076cd25114917840707',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand Down
Loading