Skip to content

Commit

Permalink
Lock file maintenance (#40515)
Browse files Browse the repository at this point in the history
* Lock file maintenance
* Address Phan issues due to php-stubs/wordpress-stubs upgrade
  * Some typecasts to account for better Core type delcarations.
  * Suppress `current_user_can_for_blog` → `current_user_can_for_site`
    until we drop 6.6 support.
* Hack around Core SimplePie renaming

  Core upgraded their copy-pasted SimplePie library, which included
  renaming all the classes. While they did provide back-compat aliases, we
  run into a few problems:

  * A method parameter type of `SimplePie_Item` won't accept
    `SimplePie\Item`, while `SimplePie\Item` won't work on WP 6.6.
  * It's really hard to make Phan happy for both the two runs (with 6.7
    stubs and with 6.6 stubs).

  The best I was able to come up with was this:
  * Turn on `enable_class_alias_support`.
  * Alias `Jetpack\SimplePie\<name>` to the appropriate classes, and use
    those aliases everywhere.
    * Have phan load only one of the two alias files, depending on which
  	run it's doing.
  * Merge all the test mocks into one file and load them from
    bootstrap.php.

---------

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Brad Jorsch <brad.jorsch@automattic.com>

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/12261510871

Upstream-Ref: Automattic/jetpack@ceebd52
  • Loading branch information
anomiex authored and matticbot committed Dec 10, 2024
1 parent 1a762be commit 72cf6ec
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array(), 'version' => '0d9b7c1c5507602fae89');
<?php return array('dependencies' => array(), 'version' => '3d6b6c0a2cee025f46f3');

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

Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('jetpack-script-data', 'react', 'react-jsx-runtime', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => 'bc8ee5ac3a110a6aed54');
<?php return array('dependencies' => array('jetpack-script-data', 'react', 'react-jsx-runtime', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '6ffa09329144f9dbaaed');

Large diffs are not rendered by default.

0 comments on commit 72cf6ec

Please sign in to comment.