Skip to content

Commit

Permalink
Add missing phpstan extension installer
Browse files Browse the repository at this point in the history
  • Loading branch information
pedro-mendonca committed Oct 17, 2024
1 parent 41c87a9 commit 92d680f
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 7 deletions.
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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
},
Expand Down
50 changes: 49 additions & 1 deletion composer.lock

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

4 changes: 2 additions & 2 deletions gp-format-csv.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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. */
Expand Down
2 changes: 1 addition & 1 deletion phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
-->
</rule>

<config name="minimum_supported_wp_version" value="4.9"/>
<config name="minimum_supported_wp_version" value="5.1"/>

<!--
To get the optimal benefits of using WPCS, we should add a couple of custom properties.
Expand Down
2 changes: 0 additions & 2 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
includes:
- vendor/szepeviktor/phpstan-wordpress/extension.neon
parameters:
level: max
inferPrivatePropertyTypeFromConstructor: true
Expand Down

0 comments on commit 92d680f

Please sign in to comment.