Skip to content

Commit

Permalink
Use latest readme parser
Browse files Browse the repository at this point in the history
  • Loading branch information
ernilambar committed Nov 14, 2024
1 parent d6551d0 commit ae470ee
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 7 deletions.
14 changes: 11 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"require": {
"php": ">=7.2.24",
"ext-json": "*",
"afragen/wordpress-plugin-readme-parser": "dev-master#67fba498d0b112acf84386b95e4905c539a33f0b",
"afragen/wordpress-plugin-readme-parser": "dev-master#c3758599348148be684b3c4ad1105d09b6230d51",
"automattic/vipwpcs": "^3.0.0",
"composer/installers": "^2.2",
"dealerdirect/phpcodesniffer-composer-installer": "^1.0.0",
Expand All @@ -25,7 +25,8 @@
"wp-cli/wp-cli-tests": "^4.2.9",
"wp-cli/language-command": "^2.0",
"wp-cli/i18n-command": "^2.6",
"wp-cli/entity-command": "^2.8"
"wp-cli/entity-command": "^2.8",
"cweagans/composer-patches": "^1.7"
},
"repositories": [
{
Expand All @@ -51,14 +52,21 @@
"config": {
"allow-plugins": {
"composer/installers": true,
"cweagans/composer-patches": false,
"cweagans/composer-patches": true,
"dealerdirect/phpcodesniffer-composer-installer": true,
"phpstan/extension-installer": true
},
"platform": {
"php": "7.2.24"
}
},
"extra": {
"patches": {
"afragen/wordpress-plugin-readme-parser": {
"fix readme parser":"patches/readme-parser.patch"
}
}
},
"scripts": {
"behat": "BEHAT_FEATURES_FOLDER=tests/behat/features run-behat-tests",
"behat-rerun": "BEHAT_FEATURES_FOLDER=tests/behat/features rerun-behat-tests",
Expand Down
56 changes: 52 additions & 4 deletions composer.lock

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

13 changes: 13 additions & 0 deletions patches/readme-parser.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/class-parser.php b/class-parser.php
index 4b13dc1..2d78de2 100644
--- a/class-parser.php
+++ b/class-parser.php
@@ -714,7 +714,7 @@ class Parser {

// In the event that something invalid is used, we'll ignore it (Example: 'Joe Bloggs (Australian Translation)')
if ( ! $user ) {
- $this->warnings['contributor_ignored'] ??= [];
+ $this->warnings['contributor_ignored'] = isset( $this->warnings['contributor_ignored'] ) ? $this->warnings['contributor_ignored'] : [];
$this->warnings['contributor_ignored'][] = $name;
unset( $users[ $i ] );
continue;

0 comments on commit ae470ee

Please sign in to comment.