Skip to content

Commit

Permalink
Merge pull request #16 from soderlind:add/phpstan
Browse files Browse the repository at this point in the history
Housekeeping
  • Loading branch information
soderlind authored Jul 19, 2024
2 parents 58f61cd + 0663468 commit 6894d9f
Show file tree
Hide file tree
Showing 11 changed files with 427 additions and 33 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
node_modules
vendor
vendor-bin
.phplint.cache
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Changelog

### 2.3.2

- Housekeeping

### 2.3.1

- Catch errors in the cache handler. If the cache file is corrupt, update the file and return the .mo file.
Expand Down
4 changes: 2 additions & 2 deletions a-faster-load-textdomain.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Plugin Name: A faster load_textdomain
* Version: 2.3.1
* Version: 2.3.2
* Description: Cache the .mo file as an PHP array, and load the array instead of the .mo file.
* Author: Per Soderlind
* Author URI: https://soderlind.no
Expand Down Expand Up @@ -111,7 +111,7 @@ function a_faster_load_textdomain( $loaded, $domain, $mofile, $locale = null ) {
\add_filter( 'override_load_textdomain', __NAMESPACE__ . '\a_faster_load_textdomain', 0, 3 );
}
if ( version_compare( $GLOBALS['wp_version'], '6.5', '>=' ) ) {
// admin messages
// admin messages.
\add_action(
'admin_notices',
function () {
Expand Down
21 changes: 20 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,24 @@
"description": "A faster load_textdomain",
"type": "wordpress-plugin",
"homepage": "https://github.com/soderlind/a-faster-load-textdomain",
"license": "GPL-2.0-or-later"
"license": "GPL-2.0-or-later",
"require-dev": {
"szepeviktor/phpstan-wordpress": "^1.3",
"phpstan/extension-installer": "^1.4",
"bamarni/composer-bin-plugin": "^1.8"
},
"config": {
"allow-plugins": {
"phpstan/extension-installer": true,
"bamarni/composer-bin-plugin": true
}
},
"scripts": {
"test": [
"composer phplint",
"composer phpstan"
],
"phpstan": "phpstan analyse --configuration=phpstan.neon --memory-limit=1G",
"phplint": "phplint --no-cache --exclude=vendor ."
}
}
Loading

0 comments on commit 6894d9f

Please sign in to comment.