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 <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>
  • Loading branch information
3 people authored Dec 10, 2024
1 parent c4ce87e commit ceebd52
Show file tree
Hide file tree
Showing 62 changed files with 3,304 additions and 2,509 deletions.
166 changes: 82 additions & 84 deletions composer.lock

Large diffs are not rendered by default.

3,350 changes: 2,005 additions & 1,345 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: fixed
Comment: Add a cast to make Phan happy. Should be no change to functionality.


2 changes: 1 addition & 1 deletion projects/packages/image-cdn/src/class-image-cdn.php
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ public static function filter_the_content( $content ) {
* present all attributes as double-quoted attributes and include at
* most one copy of each attribute, escaping all values appropriately.
*/
$tag_name = strtolower( $processor->get_tag() );
$tag_name = strtolower( (string) $processor->get_tag() );
$tag = new \WP_HTML_Tag_Processor( "<{$tag_name}>" );
$tag->next_tag();
foreach ( $processor->get_attribute_names_with_prefix( '' ) ?? array() as $name ) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Updated package dependencies.
114 changes: 57 additions & 57 deletions projects/plugins/automattic-for-agencies-client/composer.lock

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
@@ -0,0 +1,4 @@
Significance: patch
Type: changed

Updated package dependencies.
Loading

0 comments on commit ceebd52

Please sign in to comment.