diff --git a/composer.json b/composer.json index 9fcda60..6e0711b 100644 --- a/composer.json +++ b/composer.json @@ -28,6 +28,7 @@ "phpmd/phpmd": "^2.15.0", "sirbrillig/phpcs-variable-analysis": "^2.11.19", "szepeviktor/phpstan-wordpress": "^1.3.5", + "phpstan/extension-installer": "^1.4.3", "wp-coding-standards/wpcs": "^3.1.0" }, "archive": { @@ -38,7 +39,8 @@ "config": { "allow-plugins": { "dealerdirect/phpcodesniffer-composer-installer": true, - "ergebnis/composer-normalize": true + "ergebnis/composer-normalize": true, + "phpstan/extension-installer": true }, "optimize-autoloader": true }, diff --git a/composer.lock b/composer.lock index f7bd5bb..470ba55 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ef588120c909f5a10ee6adb2cf2e9277", + "content-hash": "864d423562d03d4338e0f2595b488375", "packages": [], "packages-dev": [ { @@ -1453,6 +1453,54 @@ ], "time": "2023-12-11T08:22:20+00:00" }, + { + "name": "phpstan/extension-installer", + "version": "1.4.3", + "source": { + "type": "git", + "url": "https://github.com/phpstan/extension-installer.git", + "reference": "85e90b3942d06b2326fba0403ec24fe912372936" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/85e90b3942d06b2326fba0403ec24fe912372936", + "reference": "85e90b3942d06b2326fba0403ec24fe912372936", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^2.0", + "php": "^7.2 || ^8.0", + "phpstan/phpstan": "^1.9.0 || ^2.0" + }, + "require-dev": { + "composer/composer": "^2.0", + "php-parallel-lint/php-parallel-lint": "^1.2.0", + "phpstan/phpstan-strict-rules": "^0.11 || ^0.12 || ^1.0" + }, + "type": "composer-plugin", + "extra": { + "class": "PHPStan\\ExtensionInstaller\\Plugin" + }, + "autoload": { + "psr-4": { + "PHPStan\\ExtensionInstaller\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Composer plugin for automatic installation of PHPStan extensions", + "keywords": [ + "dev", + "static analysis" + ], + "support": { + "issues": "https://github.com/phpstan/extension-installer/issues", + "source": "https://github.com/phpstan/extension-installer/tree/1.4.3" + }, + "time": "2024-09-04T20:21:43+00:00" + }, { "name": "phpstan/phpstan", "version": "1.12.6", diff --git a/gp-format-csv.php b/gp-format-csv.php index 4ad3f61..9649237 100644 --- a/gp-format-csv.php +++ b/gp-format-csv.php @@ -13,7 +13,7 @@ * Plugin URI: https://wordpress.org/plugins/gp-format-csv/ * Description: Adds the CSV format to GlotPress to export/import translations and originals. * Version: 1.0.2 - * Requires at least: 4.9 + * Requires at least: 5.1 * Tested up to: 6.6 * Requires PHP: 7.4 * Requires Plugins: glotpress @@ -139,7 +139,7 @@ function gp_format_csv_disabled_notice() { // Show aditional update link if on WP version 5.1 or higher. // Capability added in WP 5.1: https://core.trac.wordpress.org/ticket/44457. // Introduced in WP 5.1: https://developer.wordpress.org/reference/functions/wp_get_update_php_url/. - if ( current_user_can( 'update_php' ) && version_compare( $GLOBALS['wp_version'], '5.1', '>=' ) ) { + if ( current_user_can( 'update_php' ) ) { echo ' ' . sprintf( wp_kses_post( /* translators: %s: URL to Update PHP page. */ diff --git a/phpcs.xml.dist b/phpcs.xml.dist index f428bcb..d92c0cc 100644 --- a/phpcs.xml.dist +++ b/phpcs.xml.dist @@ -38,7 +38,7 @@ --> - +