Skip to content

Commit e5f110b

Browse files
gzioloclaude
andcommitted
AI: Remove dead polyfills.php from php-ai-client.
Trac ticket: https://core.trac.wordpress.org/ticket/64591 The file is never loaded because the generated autoloader only handles class autoloading, and the four polyfilled functions (`array_is_list`, `str_starts_with`, `str_contains`, `str_ends_with`) are already provided by WordPress Core in `wp-includes/compat.php`. Also updates `installer.sh` to strip the file during future library updates. Co-Authored-By: Claude Opus 4.6 <[email protected]>
1 parent 6c22d69 commit e5f110b

2 files changed

Lines changed: 3 additions & 91 deletions

File tree

src/wp-includes/php-ai-client/src/polyfills.php

Lines changed: 0 additions & 91 deletions
This file was deleted.

tools/php-ai-client/installer.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,9 @@ for path in "${REMOVE_PATHS[@]}"; do
225225
rm -rf "$TARGET_DIR/third-party/$path"
226226
done
227227

228+
# Remove polyfills.php — WordPress Core already provides these functions in compat.php.
229+
rm -f "$TARGET_DIR/src/polyfills.php"
230+
228231
# ---------------------------------------------------------------------------
229232
# Generate autoload.php
230233
# ---------------------------------------------------------------------------

0 commit comments

Comments
 (0)