-
Notifications
You must be signed in to change notification settings - Fork 0
fix(PhpUnit): update fixtures. #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
WalkthroughGitHub Actions のアクションバージョンが更新され、テストの期待値が調整され、数多くのテストフィクスチャがメタデータ/URL/埋め込みデータの更新や簡素化・強化で修正されました。さらに、 Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant C as Document::__construct
participant H as getValidEncoding
participant P as DOMDocument
participant X as DOMXPath
C->>H: 1) initial charset (from meta/header)
H-->>C: validated encoding or null
C->>H: 2) html charset re-check (after loadHTML detection)
H-->>C: validated encoding or null
C->>P: create DOMDocument with resolved encoding
P-->>C: DOM parsed
C->>X: initialize DOMXPath
X-->>C: XPath ready
note right of C: フローは従来と同等だが\nエンコーディング検証が集中化され初期化順序を保証
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~30 minutes Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 11
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
tests/fixtures/he-who-photographs-rather-ok.tumblr.com.post-165326273724.php (1)
17-17: RSS フィードURLの更新漏れ他のURL フィールドは
www.tumblr.com形式に更新されていますが、このRSSフィードURLは古いサブドメイン形式のままです。一貫性のために更新する必要があります。次のdiffを適用してください:
- 'https://he-who-photographs-rather-ok.tumblr.com/rss' + 'https://www.tumblr.com/he-who-photographs-rather-ok/rss'
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting
📒 Files selected for processing (52)
.github/workflows/test.yml(1 hunks)tests/DocumentTest.php(1 hunks)tests/fixtures/4pda.to.2022-12-04-406834-sostoyalsya_reliz_clown_of_duty_parodii_na_call_of_duty.php(2 hunks)tests/fixtures/animoto.com.play-gjsj1gu0wdrfr4pgw12xzq.php(1 hunks)tests/fixtures/archive.org.details-dn2015-0220_vid.php(3 hunks)tests/fixtures/codepen.io.zhouzi-pen-jorazp.php(3 hunks)tests/fixtures/drive.google.com.file-d-0b2rwn8wabvswbmfjdudnv2vsttg-view.php(1 hunks)tests/fixtures/en.wikipedia.org.wiki-albert_einstein.php(4 hunks)tests/fixtures/gist.github.com.oscarotero-7749998.php(3 hunks)tests/fixtures/he-who-photographs-rather-ok.tumblr.com.post-165326273724.php(3 hunks)tests/fixtures/i.imgur.com.x6rkcc5.jpg.php(2 hunks)tests/fixtures/ideone.com.whjntg.php(1 hunks)tests/fixtures/imageshack.com.i-ip7wo0v7j.php(3 hunks)tests/fixtures/infogr.am.7743c36a-f3ca-4465-9a80-a8abbd5d8dc4.php(2 hunks)tests/fixtures/jeanjean.bandcamp.com.track-coquin-l-l-phant.php(3 hunks)tests/fixtures/jsfiddle.net.zhm5rjnz.php(2 hunks)tests/fixtures/live.amcharts.com.cznjj.php(1 hunks)tests/fixtures/media.photobucket.com.user-ignwar-media-album-20deserts-moonrisemonumentvalleyutah.jpg.html.c07885ac4c85b35f31f6dc858d4d64b0.php(1 hunks)tests/fixtures/open.spotify.com.album-7s66wu1xj2nsuuwm2nkiuv.php(4 hunks)tests/fixtures/output.jsbin.com.vonesu-10.php(2 hunks)tests/fixtures/pachunka.deviantart.com.art-cope-145564099.php(1 hunks)tests/fixtures/play.cadenaser.com.audio-001rd010000004275766.php(3 hunks)tests/fixtures/polldaddy.com.poll-7012505.php(2 hunks)tests/fixtures/slides.com.alexwalker-responsive-svg.php(1 hunks)tests/fixtures/snipplr.com.view-72914-better-html-5-basic-starter-template.php(2 hunks)tests/fixtures/soundcloud.com.zedsdead-zeds-dead-twin-shadow-lost-you-feat-dangelo-lacy.php(4 hunks)tests/fixtures/twitter.com.pepephone-status-436461658601713664.php(2 hunks)tests/fixtures/vimeo.com.235352744.php(2 hunks)tests/fixtures/wordpress.tv.2013-09-06-dave-ross-optimize-image-files-like-a-pro.php(2 hunks)tests/fixtures/www.23hq.com.zzleeper-photo-16600737.php(2 hunks)tests/fixtures/www.abanca.com.gl.php(1 hunks)tests/fixtures/www.aol.com.video-view-pile-of-recovering-foster-kittens-is-purrfect-595fe75985eb42109b69bedb.php(2 hunks)tests/fixtures/www.bbc.co.uk.news-uk-54222286.php(5 hunks)tests/fixtures/www.dailymotion.com.video-xy0wd.php(2 hunks)tests/fixtures/www.deviantart.com.art-misty-510056679.php(1 hunks)tests/fixtures/www.flickr.com.photos-desescribir-sets-72157650686499888.php(0 hunks)tests/fixtures/www.hookem.com.story-texas-shortstop-joe-baker-arrested-public-intoxication.php(1 hunks)tests/fixtures/www.itmedia.co.jp.news-articles-2410-28-news159.html.php(5 hunks)tests/fixtures/www.kickstarter.com.projects-1452363698-good-seed-craft-veggie-burgers.php(1 hunks)tests/fixtures/www.meetup.com.es-gpul-labs-events-248885422.php(1 hunks)tests/fixtures/www.pinterest.com.pin-106890191127977979.php(2 hunks)tests/fixtures/www.politico.com.story-2013-12-presidents-barack-obama-george-w-bush-second-term-101314.html.php(1 hunks)tests/fixtures/www.reddit.com.r-investing-comments-7pfpeq-buffett_on_cyrptocurrencies_i_can_say_almost_with.php(2 hunks)tests/fixtures/www.scribd.com.doc-110799637-synthesis-of-knowledge-effects-of-fire-and-thinning-treatments-on-understory-vegetation-in-dry-u-s-forests.php(3 hunks)tests/fixtures/www.spreaker.com.user-angelclark-angel-clark-ice-cream-tocos.php(1 hunks)tests/fixtures/www.ted.com.talks-george_monbiot_for_more_wonder_rewild_the_world.07a0d4dfc7fba14d52025577270bbe9c.php(1 hunks)tests/fixtures/www.tiktok.com.a3noticias-video-6806030056956251397.php(2 hunks)tests/fixtures/www.twitch.tv.videos-72749628.php(1 hunks)tests/fixtures/www.ustream.tv.channel-red-shoes-billiards-60803-camera-1.php(2 hunks)tests/fixtures/www.viddler.com.v-bdce8c7.php(1 hunks)tests/fixtures/www.wired.com..1202600986b37d2c6a30336f82c671f8.php(1 hunks)tests/fixtures/www.youtube.com.watch.878f5352b6f0e632a763ebf05fb48b16.php(2 hunks)
💤 Files with no reviewable changes (1)
- tests/fixtures/www.flickr.com.photos-desescribir-sets-72157650686499888.php
🔇 Additional comments (70)
tests/fixtures/www.viddler.com.v-bdce8c7.php (1)
17-18: 問題なしです。
feedsURL の https 化は整合性が取れており、安全性も向上します。tests/fixtures/www.bbc.co.uk.news-uk-54222286.php (1)
17-17: LGTM! フィクスチャデータの更新が適切です。以下の変更が一貫して適用されています:
x-default言語エントリの追加(Line 17)- ロゴURLの更新(Lines 38, 59, 75, 96)
- 記事の説明文の追加(Lines 9, 43, 80)
- 画像サイズの更新(Lines 47-48, 84-85)
すべての変更が
linkedDataとallLinkedDataセクション全体で一貫しており、BBCウェブサイトの現在のメタデータと同期するためのテストフィクスチャの適切な更新です。Also applies to: 38-38, 43-43, 47-48, 59-59, 75-75, 80-80, 84-85, 96-96
tests/fixtures/soundcloud.com.zedsdead-zeds-dead-twin-shadow-lost-you-feat-dangelo-lacy.php (1)
18-18: LGTM! フィクスチャデータが一貫して更新されています。SoundCloudの現在のAPIレスポンスに合わせてフィクスチャデータが適切に更新されています:
- 画像URL(line 18)とサムネイルURL(line 60)が一致しています
- トップレベルのタイトル(line 36)とoEmbedタイトル(line 46)が一致しています
- 文字列のエスケープも正しく処理されています
GitHub Actionsのテストを修正するための適切な変更です。
Also applies to: 36-36, 46-46, 60-60
tests/fixtures/www.dailymotion.com.video-xy0wd.php (2)
15-15: LGTM!アセット参照の更新が正しく反映されています。favicon、icon、imageのURLハッシュとパスが更新されています。これらの変更は、Dailymotionのアセットが更新されたことを反映しており、
code.htmlとoEmbed.html、imageとthumbnail_urlの間で一貫性が維持されています。Also applies to: 17-17, 18-18, 42-42
9-9: iframe URLの末尾の&はDailymotion oEmbedレスポンスと一致しているため、そのままで問題ありませんtests/fixtures/archive.org.details-dn2015-0220_vid.php (2)
46-47: テストフィクスチャの更新を承認します。APIサーバーとディレクトリパスの更新は、archive.orgのインフラ変更を反映しているようです。これらの変更は、Line 803の画像URLにも正しく反映されています。
789-790: メタデータと統計情報の更新を承認します。以下の更新が適切に反映されています:
- ファイルメタデータのMD5ハッシュ更新と新しい
summationフィールドの追加mtimeタイムスタンプの更新- ダウンロード数の増加(132 → 156)
- 月次統計の更新
これらはすべてarchive.org APIからの最新レスポンスに合わせた通常のフィクスチャ更新です。
Also applies to: 794-794, 807-808
tests/fixtures/www.meetup.com.es-gpul-labs-events-248885422.php (2)
9-23: フィクスチャの更新が適切に実施されています。メタデータフィールドの変更は一貫性があり、イベントページからログインページへのリダイレクトを正確に反映しています。
returnUriパラメータが元のイベントURLを適切にエンコードしている点も確認できました。ただし、このフィクスチャを使用するテストが、イベントページではなくログインページの動作をテストすることになる点に注意してください。テストの意図が変わっていないか確認することをお勧めします。
24-52: 構造化データの更新が適切です。
linkedDataとallLinkedDataの変更は一貫性があり、schema.orgのOrganizationスキーマに準拠しています。両方のデータ構造が同一の内容を保持しており、イベントスキーマからOrganizationスキーマへの変更は、ログインページの性質を正確に反映しています。tests/fixtures/www.ustream.tv.channel-red-shoes-billiards-60803-camera-1.php (5)
9-9: LGTM: HTMLコードの更新が一貫しています。
code.html(9行目)とoEmbed.html(40行目)の両方で、リンクテキストが「Live Video Streaming」に更新されており、両フィールド間で一貫性が保たれています。Also applies to: 40-40
14-14: LGTM: 説明文の更新。プロバイダーの現在の説明文に合わせて適切に更新されています。
19-27: LGTM: キーワードメタデータの追加。7つのストリーミング/動画関連のキーワードを追加することで、フィクスチャのメタデータが充実しています。
31-31: LGTM: プロバイダー名の更新。「IBM Watson Media」から「IBM Video Streaming」への変更は、IBMのリブランディングを反映した適切な更新です。
38-51: LGTM: oEmbedメタデータの充実。oEmbedオブジェクトには、タイトル、作成者、サムネイル情報、寸法など、完全なメタデータフィールドが含まれており、標準のoEmbed形式に準拠しています。
tests/fixtures/www.twitch.tv.videos-72749628.php (4)
8-13: アスペクト比の計算が正確です。埋め込みコードの寸法とアスペクト比が正しく一致しています(360/640 × 100 = 56.25)。iframe構造も適切です。
21-50: 言語配列の実装が適切です。全ての言語エントリが一貫したURL構造に従っており、
x-defaultエントリも正しく実装されています。
58-80: schema.org構造が適切に実装されています。VideoObjectの構造が有効で、全ての必須フィールド(description、embedUrl、name、thumbnailUrl、uploadDate、duration、interactionStatistic)が含まれています。ISO 8601形式も正しく使用されています。
82-106: データ構造の重複は意図的と思われます。
allLinkedDataがlinkedDataと同じ構造を持っていますが、これはテストフィクスチャとして異なるコードパスをテストするために意図的である可能性が高いです。両構造間でデータの一貫性が保たれています。tests/fixtures/www.aol.com.video-view-pile-of-recovering-foster-kittens-is-purrfect-595fe75985eb42109b69bedb.php (2)
23-23: テストでのURLアサーションは存在しません
汎用URLへの変更によるテストへの影響はありません。
9-9: descriptionフィールド変更の手動確認を要請
descriptionがnullから文字列に更新されています。この変更によりnullチェックを行うテストが失敗しないか、テストコードを手動でご確認ください。tests/fixtures/he-who-photographs-rather-ok.tumblr.com.post-165326273724.php (1)
41-41: タイムゾーンオフセットの変更を確認してください
datePublishedのタイムゾーンオフセットが-04:00から+00:00に変更されています。これはTumblr APIの応答変更を反映した意図的なフィクスチャ更新である可能性が高いですが、この変更により実質的な時刻が変わることに注意してください(同じ瞬間を表す場合、10:20:35 EDTは14:20:35 UTCになります)。この変更がTumblrの新しいAPI応答形式と一致することを確認してください。
Also applies to: 64-64
tests/fixtures/imageshack.com.i-ip7wo0v7j.php (4)
10-10: LGTM! セキュリティ向上のための変更です。faviconとproviderUrlがHTTPSプロトコルに更新され、セキュアな通信が確保されています。
Also applies to: 19-19
23-23: LGTM! HTTPSへの更新が適切です。メインURLフィールドがHTTPSプロトコルに更新されています。
47-47: LGTM! APIメタデータの更新です。
comments_disabledフィールドがtrueに更新され、現在のAPIレスポンスを反映しています。
71-72: LGTM! 新しいフィールドの追加です。ownerオブジェクトに
allow_followingフィールドが追加され、APIスキーマの更新を反映しています。71行目の末尾カンマも適切に維持されています。tests/fixtures/twitter.com.pepephone-status-436461658601713664.php (1)
34-37: oEmbed.htmlの書式変更は問題ありません。追加された空行は、Twitter/X.comのoEmbed APIの実際のレスポンス形式を反映したものです。機能的な影響はありません。
tests/fixtures/codepen.io.zhouzi-pen-jorazp.php (3)
6-6: LGTM: 作成者URLの更新が一貫しています
authorUrlとauthor_urlの両方から末尾のスラッシュが削除されており、一貫性が保たれています。この変更はCodePenの現在のAPI応答を反映していると思われます。Also applies to: 38-38
9-9: LGTM: 埋め込みHTMLが正しくエンコードされていますiframeの
srcパラメータが適切にURLエンコードされており(default-tabs=js%2Cresult、host=https%3A%2F%2Fcodepen.io)、両方の場所(code.htmlとoEmbed.html)で一貫して更新されています。Also applies to: 44-44
18-18: 画像URLがShots CDNに移行されています
行18・43の画像とサムネイルURLがCodePenの内部URLからShots CDNに更新されています。URL構造は正しいものの、バージョンタイムスタンプ(1467971314)がかなり古いため、実際のCodePen oEmbed APIレスポンスと一致することを手動で確認してください。テスト用フィクスチャで意図的に古いデータを使用している場合は問題ありません。tests/fixtures/snipplr.com.view-72914-better-html-5-basic-starter-template.php (1)
8-8: コンテンツが取得できないことを示すためnullへの変更は妥当です。
codeフィールドがnullになっているのは、元のスニペットが公開アクセスできなくなったことを正確に反映しています。ログインページには埋め込みコードが含まれないため、この変更は論理的に正しいです。tests/fixtures/en.wikipedia.org.wiki-albert_einstein.php (4)
9-9: 説明フィールドの更新を確認しました。より詳細で歴史的文脈を含む説明に更新されています。これはWikipedia APIの現在のレスポンスを反映するための適切な更新です。
46-46: dateModifiedタイムスタンプの一貫性を確認しました。
linkedDataとallLinkedDataの両方で同じタイムスタンプ(2024-06-04T23:38:54Z)に更新されており、データの一貫性が保たれています。Also applies to: 84-84
55-61: extractフィールドのHTML更新を確認しました。より構造化されたHTMLコンテンツに更新されており、ドイツ語のタグ付けやIPA音声表記が適切に含まれています。Wikipedia APIの現在の出力形式を正確に反映したフィクスチャ更新です。
11-13: feeds配列の追加を確認・URL有効性検証完了
リダイレクト後HTTP 200を返しました。問題ありません。tests/fixtures/www.pinterest.com.pin-106890191127977979.php (2)
15-18: アセットURLの更新を確認しました。favicon、icon、imageのURLが更新されており、これらはPinterestのCDN構造またはアセットバージョニングの変更を反映しています:
- faviconとiconのハッシュ値が更新されている
- imageのURLがシンプル化され(
--jack-nicholson-jack-oconnellサフィックスが削除)、基本ハッシュのみになっているこれらの変更は、現在のPinterest APIレスポンスと一致させるための正当なフィクスチャ更新です。
41-41: thumbnail_urlがimageと一貫性を持つようになりました。thumbnail_url(41行目)がimage(18行目)と同じ簡略化されたURL形式を使用するようになり、データの一貫性が向上しています。
tests/fixtures/vimeo.com.235352744.php (4)
29-29: 構造化データの削除を確認してください。
linkedDataとallLinkedDataが空配列に変更されました。これはエラー状態の動画に対して適切ですが、これらのフィールドに依存するテストが空配列を正しく処理できることを確認してください。Also applies to: 41-41
39-39: LGTM!oEmbedの
uriフィールドにサフィックス:ebd66989ccが追加されました。これはVimeo APIからの最新のレスポンスを反映しており、動画の可視性状態やAPI仕様の変更に対応しています。
5-6: エラー状態フィクスチャの意図とテスト検証を確認
titleが "VimeUhOh"、descriptionが "Sorry, we couldn't find that page"、authorName/authorUrl/imageが null(動画非公開時の状態)に更新- このファイルを参照するテストが存在し、エラー状態を正しく検証しているかを手動で確認してください
9-9:clipboard-writeの追加は公式ドキュメントに準拠していますVimeoの最新埋め込みコード例にも
clipboard-writeが含まれているため、この変更は意図した仕様です。問題ありません。tests/fixtures/www.23hq.com.zzleeper-photo-16600737.php (2)
6-6: HTTPS への更新は適切です。これらのURLフィールドのHTTPSへの更新は正しく実施されています。
Also applies to: 10-10, 13-13, 49-49, 56-56, 62-62, 65-65
45-45: providerUrlとoEmbed内のprovider_urlをHTTPSに更新
www.23hq.comはHTTPS(200)対応済みのため、45行目と59行目のURLをそれぞれhttps://www.23hq.com/およびhttps://www.23hq.comに更新してください。tests/fixtures/www.scribd.com.doc-110799637-synthesis-of-knowledge-effects-of-fire-and-thinning-treatments-on-understory-vegetation-in-dry-u-s-forests.php (4)
15-15: アセットURLの更新を確認しました。faviconとimageのURLが更新され、新しいサブドメイン(imgv2-2-f)とハッシュ値が反映されています。これはScribdのCDN構成やアセットバージョンの変更を反映した正当な更新と考えられます。
Also applies to: 18-18
23-23: スペイン語(es)のエントリが削除されました。言語マッピングからスペイン語版が削除され、英語版のみとなっています。この変更がScribd APIの実際のレスポンスを反映しているか確認してください。
39-39: 構造化データの充実化は良い改善です。linkedDataとallLinkedDataに以下のフィールドが追加されました:
author: 著者情報(Person型のschema.org構造)description: ドキュメントの説明url: ドキュメントのURLこれらの追加により、schema.orgの構造化データがより完全になり、検索エンジンやメタデータコンシューマーにとって有用な情報が増えています。
Also applies to: 46-51, 82-82, 89-94
66-66: oEmbedデータの更新を確認しました。thumbnail_urlが新しい画像パスに更新され、scriptタグの閉じタグも適切に処理されています。これらの変更は、oEmbedレスポンスの最新の形式を反映しています。
Also applies to: 71-71
tests/fixtures/ideone.com.whjntg.php (1)
15-15: LGTM! ファビコンURLの更新は適切です。IdeoneのファビコンURLをCloudFrontホスティングに移行する変更は、より安定したCDN配信に移行するための適切な更新です。
tests/fixtures/jsfiddle.net.zhm5rjnz.php (1)
10-10: LGTM! HTTPSへのプロトコル更新は適切です。JSFiddleのファビコン、プロバイダURL、メインURLをHTTPSに更新する変更は、セキュリティとモダンなウェブ標準に準拠した適切な更新です。
Also applies to: 28-28, 32-32
tests/fixtures/slides.com.alexwalker-responsive-svg.php (2)
9-9: LGTM! HTTPSへの更新は適切です。iframeの埋め込みURL、ファビコン、プロバイダURL、メインURLをHTTPSに更新する変更は、セキュリティとモダンなウェブ標準に準拠した適切な更新です。
Also applies to: 15-15, 24-24, 28-28
20-20: LGTM! 言語メタデータの追加は適切です。
languageフィールドに'en'を設定する変更は、メタデータの品質を向上させる適切な更新です。tests/fixtures/www.abanca.com.gl.php (1)
27-28: LGTM! バスク語のサポート追加は適切です。
languagesマップに'eu'(バスク語)エントリを追加する変更は、ロケールサポートを拡張する適切な更新です。配列の末尾カンマの追加もPHPのベストプラクティスに準拠しています。tests/fixtures/drive.google.com.file-d-0b2rwn8wabvswbmfjdudnv2vsttg-view.php (2)
10-10: LGTM! ファビコンURLの標準化は適切です。Google DriveのファビコンURLをメインドメインのURLに標準化する変更は、データの一貫性を向上させる適切な更新です。
18-18: プロバイダ名とタイトルの変更を手動で確認
providerNameが'Google Docs'→'Google'、titleが特定ファイル名→nullに変更された点が実際のGoogle Driveの挙動に沿い、これらを参照するテストに影響がないことを手動で確認してください。tests/fixtures/i.imgur.com.x6rkcc5.jpg.php (3)
24-24: プロバイダURLの変更を確認してください。
providerUrlがhttps://imgur.comからhttps://i.imgur.com(CDN特定のドメイン)に変更されています。この変更が意図的なものか確認してください。
30-30: oEmbedデータの削除を確認してください。
oEmbedフィールドが詳細なオブジェクトから空配列に変更されています。oEmbedデータに依存するテストが影響を受けないことを確認してください。
9-12: 埋め込みコードの変更によるテストへの影響を手動で確認してください。
tests/内で対象フィクスチャ(i.imgur.com.x6rkcc5.jpg)やwidth/height/ratioフィールドへの参照は検出されませんでしたが、他の依存箇所も含めて影響範囲を必ず確認してください。.github/workflows/test.yml (1)
26-26: actions/checkout@v4 と actions/cache@v4 へのアップグレード後は互換性検証を行ってください
- self-hosted runner を利用する場合、ランナーが 2.231.0 以上か確認
- pinned SHA を v4.2.0 等の推奨バージョンまたは @v4 タグに更新
- actions/cache は restore/save 分割(actions/cache/restore@v4 / actions/cache/save@v4)を検討
- 全ランナー(ubuntu, windows, mac, self-hosted, コンテナ)で checkout と cache の正常動作をテスト
- fetch-depth/sparse-checkout、コンテナ環境の Node/GLIBC 依存、origin/HEAD 参照スクリプト等の影響を確認
GitHub公式の破壊的変更・移行ガイドを参照してください
tests/fixtures/media.photobucket.com.user-ignwar-media-album-20deserts-moonrisemonumentvalleyutah.jpg.html.c07885ac4c85b35f31f6dc858d4d64b0.php (1)
9-23: メタデータ更新を確認しました。新しい Photobucket ドメインと各種フィールドの整合性が取れており、フィクスチャ構造も従来どおりです。
tests/fixtures/www.politico.com.story-2013-12-presidents-barack-obama-george-w-bush-second-term-101314.html.php (1)
5-26: 正規化されたフィールドを確認しました。不要なメタ情報が整理され、null/空配列の使い方も他フィクスチャと整合しています。
tests/fixtures/www.youtube.com.watch.878f5352b6f0e632a763ebf05fb48b16.php (1)
6-102: 更新された YouTube メタデータを確認しました。iframe 属性強化と schema.org の追加が既存テスト期待に沿っており、全フィールドの整合性も問題ありません。
tests/fixtures/wordpress.tv.2013-09-06-dave-ross-optimize-image-files-like-a-pro.php (1)
9-78: リッチ埋め込みへの更新を確認しました。WordPress の標準埋め込み HTML に合わせた差し替えで、type も
richに整合しています。tests/fixtures/animoto.com.play-gjsj1gu0wdrfr4pgw12xzq.php (1)
5-55: 拡張されたメタデータを確認しました。サイト/動画の schema.org 情報と RSS 追加に矛盾はなく、oEmbed エラー表現も期待どおりです。
tests/fixtures/www.deviantart.com.art-misty-510056679.php (1)
5-64: DeviantArtフィクスチャ更新の確認著者情報の補完と oEmbed ブロックの追加を含む差分が既存スキーマと整合していることを確認しました。問題ありません。
tests/fixtures/www.tiktok.com.a3noticias-video-6806030056956251397.php (1)
9-47: TikTokフィクスチャ差分問題なし埋め込み HTML の更新や追加メタデータが最新レスポンスに基づき整合しており、テストスキーマとも齟齬ありません。
tests/fixtures/gist.github.com.oscarotero-7749998.php (1)
9-338: Gistフィクスチャの新マークアップ確認最新の gist 埋め込み構造とスタイルシートに更新されており、期待されるフィールド構成を維持しているため問題ありません。
tests/fixtures/live.amcharts.com.cznjj.php (1)
6-26: amChartsフィクスチャ更新の確認コード/oEmbed が null となる現行レスポンスに合わせた差分であり、他フィールドも整合が取れているため問題ありません。
tests/fixtures/open.spotify.com.album-7s66wu1xj2nsuuwm2nkiuv.php (1)
9-117: Spotifyフィクスチャ差分問題なし埋め込み iframe やメタデータの更新が現行 API の内容と一致しており、既存のテスト構造にも影響はありません。
tests/DocumentTest.php (1)
31-34: キャッシュフィクスチャの更新を確認してください。期待値を 3 に変更していますが、
tests/cache配下の Wired ページのキャッシュが同じ段落数に更新されていない場合、このテストは引き続き 23 件を返して失敗します。新しい HTML を反映しているか確認し、必要であればキャッシュフィクスチャも更新してください。tests/fixtures/www.wired.com..1202600986b37d2c6a30336f82c671f8.php (2)
26-37: schema.org構造は正しく実装されています。
linkedDataがOrganizationタイプに更新され、適切なschema.org構造に従っています。ロゴのイメージURLがnewsletter-signup-hub.jpgを使用していますが、テストフィクスチャとしては問題ありません。
38-38: oEmbedの空配列は適切です。ホームページレベルのコンテンツではoEmbedデータが提供されないことが一般的です。この変更は妥当です。
| 'url' => 'https://www.tumblr.com/he-who-photographs-rather-ok/165326273724', | ||
| 'linkedData' => [ | ||
| '@type' => 'SocialMediaPosting', | ||
| 'url' => 'https://he-who-photographs-rather-ok.tumblr.com/post/165326273724', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
linkedData内のURLの更新漏れ
他のURLフィールド(6行目、36行目、48行目、53行目)は www.tumblr.com 形式に更新されていますが、linkedData.url は古いサブドメイン形式のままです。
次のdiffを適用してください:
- 'url' => 'https://he-who-photographs-rather-ok.tumblr.com/post/165326273724',
+ 'url' => 'https://www.tumblr.com/he-who-photographs-rather-ok/165326273724',📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| 'url' => 'https://he-who-photographs-rather-ok.tumblr.com/post/165326273724', | |
| 'url' => 'https://www.tumblr.com/he-who-photographs-rather-ok/165326273724', |
🤖 Prompt for AI Agents
In tests/fixtures/he-who-photographs-rather-ok.tumblr.com.post-165326273724.php
around line 39, linkedData.url is still using the old subdomain form; update
that value to the canonical www.tumblr.com URL to match the other URL fields
(e.g., change
'https://he-who-photographs-rather-ok.tumblr.com/post/165326273724' to
'https://www.tumblr.com/post/165326273724' or the appropriate www.tumblr.com
path used elsewhere in this fixture).
| @@ -61,7 +61,7 @@ | |||
| '@type' => 'SocialMediaPosting', | |||
| 'url' => 'https://he-who-photographs-rather-ok.tumblr.com/post/165326273724', | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
allLinkedData内のURLの更新漏れ
allLinkedData 配列内のURLも古いサブドメイン形式のままです。39行目の linkedData.url と同様に、一貫性のために更新する必要があります。
次のdiffを適用してください:
- 'url' => 'https://he-who-photographs-rather-ok.tumblr.com/post/165326273724',
+ 'url' => 'https://www.tumblr.com/he-who-photographs-rather-ok/165326273724',📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| 'url' => 'https://he-who-photographs-rather-ok.tumblr.com/post/165326273724', | |
| 'url' => 'https://www.tumblr.com/he-who-photographs-rather-ok/165326273724', |
🤖 Prompt for AI Agents
In tests/fixtures/he-who-photographs-rather-ok.tumblr.com.post-165326273724.php
around line 62, the URL in the allLinkedData array still uses the old subdomain
format; update that 'url' entry so it matches the updated linkedData.url used at
line 39 (replace the old subdomain form with the new one used there), ensuring
both entries are identical.
| 'feeds' => [], | ||
| 'icon' => null, | ||
| 'image' => 'http://imagizer.imageshack.com/img673/0/imagizer.imageshack.com/img673/9643/7wO0v7.jpg', | ||
| 'image' => 'https://imagizer.imageshack.com/img673/0/imagizer.imageshack.com/img673/9643/7wO0v7.jpg', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion | 🟠 Major
🧩 Analysis chain
URLの構造を検証してください。
画像URLのパス内にドメイン名が重複して含まれているように見えます:img673/0/imagizer.imageshack.com/img673/9643/7wO0v7.jpg
一方、32行目のdirect_linkはimagizer.imageshack.com/img673/9643/7wO0v7.jpgというシンプルな構造になっています。
この構造が実際のAPIレスポンスと一致しているか確認してください。もし不正確な場合は、修正が必要です。
以下のスクリプトを実行して、同様のURL構造を持つ他のフィクスチャを確認できます:
🏁 Script executed:
#!/bin/bash
# Description: ImageShackフィクスチャ内の画像URL構造を検証
# Test: 他のImageShackフィクスチャで同様のURL構造パターンを検索
rg -n "imagizer\.imageshack\.com.*imagizer\.imageshack\.com" tests/fixtures/Length of output: 154
テストフィクスチャの画像URLを修正
13行目のURLから余分なimagizer.imageshack.com/を削除し、以下のように修正してください。
'image' => 'https://imagizer.imageshack.com/img673/9643/7wO0v7.jpg',🤖 Prompt for AI Agents
In tests/fixtures/imageshack.com.i-ip7wo0v7j.php around line 13, the image URL
includes an extra "imagizer.imageshack.com/" segment; edit that line to remove
the duplicate path so the URL becomes the shorter valid path (keep the
surrounding quotes and trailing comma intact), save the file and run tests to
confirm the fixture loads correctly.
| 'height' => 240, | ||
| 'ratio' => 75.0 | ||
| ], | ||
| 'code' => null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
埋め込みデータの削除を確認してください。
codeフィールドが詳細なオブジェクトからnullに、oEmbedフィールドが詳細なオブジェクトから空配列に変更されています。これらの変更が実際のサービスの動作を反映しているか、またこれらのフィールドに依存するテストが影響を受けないことを確認してください。
以下のスクリプトを実行して、これらのフィールドを使用しているテストを確認してください:
Also applies to: 25-25
🏁 Script executed:
#!/bin/bash
# 説明: code フィールドまたは oEmbed フィールドを使用しているテストを検索
# output.jsbin.com フィクスチャを参照しているテストファイルを検索
rg -n --type=php -C3 'output\.jsbin\.com\.vonesu-10'
# code フィールドや oEmbed フィールドにアクセスしているコードを検索
rg -n --type=php -C3 "\['code'\]|\['oEmbed'\]" tests/Length of output: 438
oEmbed 空配列化に伴うテスト修正
tests/PagesTestCase.php:105 の $data['oEmbed'] = $extractor->getOEmbed()->all(); が空配列を扱えるか確認し、必要であればテストを更新してください。code フィールドはテスト内で参照されていません。
🤖 Prompt for AI Agents
In tests/fixtures/output.jsbin.com.vonesu-10.php around line 8, the fixture
returns 'code' => null but the test at tests/PagesTestCase.php line 105 uses
$data['oEmbed'] = $extractor->getOEmbed()->all(); which may now be an empty
array; update the test to accept an empty oEmbed array by asserting it's an
array (and allowing it to be empty) and remove or stop asserting on the
non-existent 'code' field, or adapt assertions to check for keys only when
oEmbed is non-empty so the test passes with empty oEmbed results.
| 'title' => 'Snipplr - Login', | ||
| 'url' => 'https://snipplr.com/login/', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
フィクスチャの名前と内容の不一致を解消してください。
このフィクスチャのファイル名は特定のスニペット(view-72914-better-html-5-basic-starter-template)を示していますが、実際の内容はログインページを表しています。この意味的な不一致により、以下の問題が発生します:
- テストが本来テストすべき機能(スニペットの埋め込み)をテストしていない
- フィクスチャ名から期待される動作と実際の動作が異なる
- スニペット埋め込み機能のバグが検出されない可能性がある
以下のいずれかの対応を検討してください:
- 公開アクセス可能な別のスニペットURLでフィクスチャを更新する
- このフィクスチャを削除し、テストケースを調整する
- 認証が必要な場合の動作を明示的にテストするようフィクスチャ名を変更する(例:
snipplr.com.requires-authentication.php)
元のスニペットが恒久的に利用できなくなったのか、それとも一時的な問題なのかを確認するため、以下のスクリプトを実行してください:
🏁 Script executed:
#!/bin/bash
# Description: Verify if the original snippet URL is permanently unavailable or temporarily inaccessible.
# Check if the original URL redirects to login
echo "Checking original snippet URL..."
curl -sI "https://snipplr.com/view/72914/better-html-5-basic-starter-template" | head -n 10
# Check if there are any publicly accessible snippet examples
echo -e "\nSearching for other publicly accessible snippets..."
curl -s "https://snipplr.com" | grep -oP 'href="/view/[0-9]+/[^"]*"' | head -n 5Length of output: 438
フィクスチャ名と内容の不一致を解消してください。
tests/fixtures/snipplr.com.view-72914-better-html-5-basic-starter-template.php のスニペットURLがログイン画面にリダイレクトされ、本来のスニペットがテストされていません。以下から対応方法を選択してください:
- 公開アクセス可能なスニペットURLに更新
- 該当フィクスチャを削除し、テストケースを調整
- フィクスチャ名を
snipplr.com.requires-authentication.phpなどに変更し、認証が必要な動作を明示的にテスト
🤖 Prompt for AI Agents
tests/fixtures/snipplr.com.view-72914-better-html-5-basic-starter-template.php
lines 22-23: 現在のフィクスチャ名と中身が不一致で、記載の URL
がログイン画面にリダイレクトされて本来のスニペットがテストされていません。対応策としていずれかを実施してください — 公開アクセス可能なスニペットの正しい
URL に 'url' を更新する、またはこのフィクスチャを削除して該当するテストケースを修正する、あるいはファイル名を
snipplr.com.requires-authentication.php
のように変更して「認証が必要」な挙動を明示的にテストするためにテストコード側で認証フローや期待結果を合わせる(どれを選ぶかを PR
コメントで明示してください)。
| 'authorName' => null, | ||
| 'authorUrl' => null, | ||
| 'cms' => null, | ||
| 'code' => [ | ||
| 'html' => '<iframe src="https://www.kickstarter.com/projects/1452363698/good-seed-craft-veggie-burgers/widget/video.html" height="270.0" width="480" frameborder="0" scrolling="no"></iframe>', | ||
| 'width' => 480, | ||
| 'height' => 270, | ||
| 'ratio' => 56.25 | ||
| ], | ||
| 'description' => 'Nutrient-dense Real Food! Good Seed hemp patties transform the veggie burger with bold flavor blends & sprouted superfood ingredients.', | ||
| 'code' => null, | ||
| 'description' => null, | ||
| 'favicon' => 'https://www.kickstarter.com/favicon.ico', | ||
| 'feeds' => [], | ||
| 'icon' => null, | ||
| 'image' => 'https://ksr-ugc.imgix.net/assets/011/647/643/9e80f11b5b125b5b50d1694cbf7f0ba0_original.jpg?ixlib=rb-2.1.0&crop=faces&w=560&h=315&fit=crop&v=1463686200&auto=format&frame=1&q=92&s=551e5f9430e497f3954a21ab81b30c6a', | ||
| 'image' => null, | ||
| 'keywords' => [], | ||
| 'language' => 'en', | ||
| 'language' => 'en-US', | ||
| 'languages' => [], | ||
| 'license' => null, | ||
| 'providerName' => 'Kickstarter', | ||
| 'providerUrl' => 'https://www.kickstarter.com/', | ||
| 'providerUrl' => 'https://www.kickstarter.com', | ||
| 'publishedTime' => null, | ||
| 'redirect' => null, | ||
| 'title' => 'Good Seed Craft Veggie Burgers', | ||
| 'title' => 'Just a moment...', | ||
| 'url' => 'https://www.kickstarter.com/projects/1452363698/good-seed-craft-veggie-burgers', | ||
| 'linkedData' => [], | ||
| 'oEmbed' => [ | ||
| 'version' => '1.0', | ||
| 'type' => 'rich', | ||
| 'provider_name' => 'Kickstarter', | ||
| 'provider_url' => 'https://www.kickstarter.com/', | ||
| 'title' => 'Good Seed Craft Veggie Burgers', | ||
| 'author_name' => 'Oliver Ponce and Erin Shotwell', | ||
| 'author_url' => 'https://www.kickstarter.com/profile/1452363698', | ||
| 'thumbnail_url' => 'https://ksr-ugc.imgix.net/assets/011/647/643/9e80f11b5b125b5b50d1694cbf7f0ba0_original.jpg?ixlib=rb-2.1.0&crop=faces&w=560&h=315&fit=crop&v=1463686200&auto=format&frame=1&q=92&s=551e5f9430e497f3954a21ab81b30c6a', | ||
| 'thumbnail_width' => 560, | ||
| 'thumbnail_height' => 315.0, | ||
| 'width' => 480, | ||
| 'height' => 270.0, | ||
| 'html' => '<iframe src="https://www.kickstarter.com/projects/1452363698/good-seed-craft-veggie-burgers/widget/video.html" height="270.0" width="480" frameborder="0" scrolling="no"></iframe>' | ||
| ], | ||
| 'oEmbed' => [], | ||
| 'allLinkedData' => [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cloudflare待ちページが記録されており、Fixture品質が大幅に劣化しています
この差分ではtitleが「Just a moment...」になり、codeやoEmbedが空配列になっています。Kickstarterが返す本来のプロジェクト情報ではなく、Cloudflareのウォール待ちページをキャプチャした結果に置き換わっており、実際の埋め込みデータを検証できなくなっています。このままではKickstarter用の解析ロジックを正しくカバーできず、テストの網羅性が大きく低下します。適切なUser-AgentやCookieを設定するなどして本来のコンテンツを再取得し、以前同様に埋め込みHTMLやoEmbed情報を含むFixtureへ差し戻してください。
🤖 Prompt for AI Agents
tests/fixtures/www.kickstarter.com.projects-1452363698-good-seed-craft-veggie-burgers.php
lines 5-26: The fixture currently contains a Cloudflare interstitial ("Just a
moment...") instead of the real Kickstarter project payload, so re-fetch the
page using the same approach that avoids Cloudflare blocking (e.g., set an
appropriate browser-like User-Agent, include any required cookies, or use a
headless browser/Playwright to execute JS) and replace the fixture content with
the genuine project response including embedded HTML and oEmbed data; ensure the
fetched response is deterministic (capture and persist any needed
cookies/headers or strip transient data) so tests reliably validate Kickstarter
parsing logic.
| ], | ||
| 'description' => 'Apr 21, 2012 - This Pin was discovered by Leslie Carruthers. Discover (and save!) your own Pins on Pinterest', | ||
| 'favicon' => 'https://s.pinimg.com/webapp/favicon-54a5b2af.png', | ||
| 'description' => null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
descriptionがnullに変更された理由を確認してください。
descriptionフィールドが文字列からnullに変更されています。これはPinterestのAPIレスポンスの変更を反映したものと思われますが、実際のピンから説明が削除されたのか、APIの動作変更なのかを確認してください。
以下のスクリプトを実行して、実際のPinterest APIレスポンスを確認できます:
🏁 Script executed:
#!/bin/bash
# Description: Verify if the Pinterest pin actually has no description
# Test: Fetch the actual Pinterest pin page and check for description
curl -sL "https://www.pinterest.com/pin/106890191127977979/" | grep -i "description\|og:description" | head -5Length of output: 294912
descriptionがnullに変更された理由を確認してください。
tests/fixtures/www.pinterest.com.pin-106890191127977979.php の description が null にされていますが、取得したページのHTML/metaおよび埋め込みJSON(v3GetPinQuery)には非nullの description(例: "Jack" / "Sono Davide ...")が含まれています。フィクスチャを元の説明に戻すか、nullにした正当な理由を提示してください。
🤖 Prompt for AI Agents
tests/fixtures/www.pinterest.com.pin-106890191127977979.php around line 14: the
fixture sets 'description' => null but the captured page HTML/meta and embedded
JSON (v3GetPinQuery) contain non-null description values (e.g. "Jack" / "Sono
Davide ..."); either restore the fixture to the original description string(s)
from the recorded HTML/JSON or, if null is intentional, add a short comment in
the fixture and the PR description explaining the reason (e.g., normalization,
privacy stripping, or test-specific override) and link to the source evidence;
to fix, open the fixture, replace null with the exact description value from the
saved HTML/JSON or add the explanatory comment and update tests/PR text
accordingly.
| 'redirect' => null, | ||
| 'title' => 'Synthesis of Knowledge: Effects of Fire and Thinning Treatments on Understory Vegetation in Dry U.S. Forests', | ||
| 'url' => 'https://www.scribd.com/document/110799637/Synthesis-of-Knowledge-Effects-of-Fire-and-Thinning-Treatments-on-Understory-Vegetation-in-Dry-U-S-Forests', | ||
| 'url' => 'http://www.scribd.com/doc/110799637/Synthesis-of-Knowledge-Effects-of-Fire-and-Thinning-Treatments-on-Understory-Vegetation-in-Dry-U-S-Forests', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
HTTPSからHTTPへのプロトコルダウングレードを確認してください。
URLがhttps://www.scribd.com/document/...からhttp://www.scribd.com/doc/...に変更されています。これには以下の2つの変更が含まれます:
- HTTPSからHTTPへのプロトコルダウングレード(セキュリティ懸念)
- URLパスの変更(/document/から/doc/へ)
テストフィクスチャとして実際のプロバイダーレスポンスを正確に反映する必要がありますが、Scribdが実際にHTTPのURLを返しているか検証してください。可能であれば、HTTPSバージョンが利用可能かどうかも確認することをお勧めします。
以下のスクリプトを実行して、実際のScribd oEmbedエンドポイントのレスポンスを確認してください:
Also applies to: 72-72
🏁 Script executed:
#!/bin/bash
# Scribd oEmbed APIの実際のレスポンスを確認
# ドキュメントURLのプロトコルとパスを検証
DOC_URL="https://www.scribd.com/document/110799637/Synthesis-of-Knowledge-Effects-of-Fire-and-Thinning-Treatments-on-Understory-Vegetation-in-Dry-U-S-Forests"
ENCODED_URL=$(python3 -c "import urllib.parse; print(urllib.parse.quote('$DOC_URL', safe=''))")
echo "Fetching oEmbed data for document 110799637..."
curl -s "https://www.scribd.com/services/oembed?url=${ENCODED_URL}&format=json" | jq '.url'
echo ""
echo "Checking if HTTP doc URL redirects to HTTPS..."
curl -I -L "http://www.scribd.com/doc/110799637" 2>&1 | grep -i "location:"Length of output: 306
テストフィクスチャの URL を HTTPS および /document/... パスに修正してください
- Scribd は HTTP → HTTPS にリダイレクトし、
/doc/...も/document/...に転送します - oEmbed API では
urlフィールドが返されないため、テストでは正しい最終 URL を直接指定する必要があります
修正例(31行目と72行目):
'url' => 'https://www.scribd.com/document/110799637/Synthesis-of-Knowledge-Effects-of-Fire-and-Thinning-Treatments-on-Understory-Vegetation-in-Dry-U-S-Forests',| 'redirect' => null, | ||
| 'title' => 'Review: Yi 4K Action Camera', | ||
| 'title' => 'WIRED - The Latest in Technology, Science, Culture and Business', | ||
| 'url' => 'https://www.wired.com/?p=2064839', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
URLとメタデータの不整合を検証してください。
URLに?p=2064839というクエリパラメータが含まれていますが、他のすべてのメタデータ(title、description、linkedDataなど)はホームページレベルのデータを示しています。テストフィクスチャがホームページを表すことを意図している場合、URLからクエリパラメータを削除することを検討してください。
以下のスクリプトを実行して、このフィクスチャファイルの使用方法を確認してください:
🏁 Script executed:
#!/bin/bash
# このフィクスチャファイルがテストでどのように使用されているかを確認
# フィクスチャのハッシュ名でテストファイルを検索
rg -n "1202600986b37d2c6a30336f82c671f8" --type=php -C3Length of output: 0
テストコード内でフィクスチャの使用状況を確認するため、以下のスクリプトを実行してください。
🏁 Script executed:
#!/bin/bash
# tests/fixtures 以下およびテストコード全体で対象 URL と記事 ID を検索
rg -n "https://www.wired.com" --type=php -C3
rg -n "2064839" --type=php -C3Length of output: 302446
フィクスチャのURL('?p=2064839')がホームページ内容と不整合 — 修正してください
tests/fixtures/www.wired.com..1202600986b37d2c6a30336f82c671f8.php の 'url' が '?p=2064839' を指していますが、ファイル内の meta/linkedData はホームページ(canonical https://www.wired.com/、CollectionPage/ItemList)を示しています。参照キャッシュ(tests/cache/...php 行25,83)には CloudFront リダイレクトの痕跡があります。対応案:ホームページを表すなら 'url' を 'https://www.wired.com/' に更新する。リダイレクトを意図しているならその意図をコメント/ファイル名で明示してください。
場所:tests/fixtures/www.wired.com..1202600986b37d2c6a30336f82c671f8.php (行25)、tests/cache/www.wired.com..1202600986b37d2c6a30336f82c671f8.php (行25,83)
🤖 Prompt for AI Agents
In tests/fixtures/www.wired.com..1202600986b37d2c6a30336f82c671f8.php around
line 25 (and note related entries in
tests/cache/www.wired.com..1202600986b37d2c6a30336f82c671f8.php at lines 25 and
83), the 'url' value '?p=2064839' contradicts the file's metadata which
represents the homepage (canonical https://www.wired.com/,
CollectionPage/ItemList); update the 'url' to 'https://www.wired.com/' to match
the meta/linkedData, and if the file is meant to represent a redirect instead,
add a clear comment or adjust the fixture filename to indicate the redirect
intent rather than leaving the mismatched query parameter.
| 'allLinkedData' => [ | ||
| [ | ||
| 'publisher' => [ | ||
| '@type' => 'Organization', | ||
| 'name' => 'WIRED', | ||
| 'logo' => [ | ||
| '@type' => 'ImageObject', | ||
| 'url' => 'https://www.wired.com/wp-content/themes/Phoenix/assets/images/article-icon.jpg', | ||
| 'width' => '1024 px', | ||
| 'height' => '1024 px' | ||
| ] | ||
| ], | ||
| '@context' => 'http://schema.org', | ||
| '@type' => 'NewsArticle', | ||
| 'mainEntityOfPage' => [ | ||
| '@type' => 'WebPage', | ||
| '@id' => 'https://www.wired.com/2016/07/review-yi-4k-action-camera/' | ||
| ], | ||
| 'headline' => 'Review: Yi 4K Action Camera', | ||
| 'datePublished' => '2016-07-29T07:00:38+00:00', | ||
| 'dateModified' => '2017-06-12T18:27:35+00:00', | ||
| 'keywords' => [ | ||
| '4k' | ||
| ], | ||
| 'url' => 'https://www.wired.com/2016/07/review-yi-4k-action-camera/', | ||
| 'articleSection' => 'gear', | ||
| 'author' => [ | ||
| '@type' => 'Person', | ||
| 'name' => 'Brent Rose' | ||
| ], | ||
| 'description' => 'For nearly two years GoPro’s Hero4 Black has been the standard-bearer for action cameras. But there\'s a new contender.', | ||
| 'image' => [ | ||
| '@type' => 'ImageObject', | ||
| 'url' => 'https://www.wired.com/wp-content/uploads/2016/07/Yi-4KHP.jpg', | ||
| 'height' => 2680, | ||
| 'width' => 1507 | ||
| ] | ||
| ], | ||
| [ | ||
| 'publisher' => [ | ||
| '@type' => 'Organization', | ||
| 'name' => 'WIRED', | ||
| 'logo' => [ | ||
| '@type' => 'ImageObject', | ||
| 'url' => 'https://www.wired.com/wp-content/themes/Phoenix/assets/images/article-icon.jpg', | ||
| 'width' => '1024 px', | ||
| 'height' => '1024 px' | ||
| ] | ||
| ], | ||
| '@context' => 'http://schema.org', | ||
| '@type' => 'NewsArticle', | ||
| 'mainEntityOfPage' => [ | ||
| '@type' => 'WebPage', | ||
| '@id' => 'https://www.wired.com/2021/04/geeks-guide-the-dispossessed/' | ||
| ], | ||
| 'headline' => '‘The Dispossessed’ Is Still One of Sci-Fi’s Smartest Books', | ||
| 'datePublished' => '2021-04-02T11:36:39+00:00', | ||
| 'dateModified' => '2021-04-02T11:36:39+00:00', | ||
| 'keywords' => [ | ||
| 'geeks-guide-to-the-galaxy' | ||
| ], | ||
| 'url' => 'https://www.wired.com/2021/04/geeks-guide-the-dispossessed/', | ||
| 'articleSection' => 'culture', | ||
| 'author' => [ | ||
| '@type' => 'Person', | ||
| 'name' => 'Geek\'s Guide to the Galaxy' | ||
| ], | ||
| 'description' => 'Ursula K. Le Guin\'s 1974 novel, about a society with no government or laws, remains a thoughtful exploration of politics and economics decades later.', | ||
| 'image' => [ | ||
| '@type' => 'ImageObject', | ||
| 'url' => 'https://www.wired.com/wp-content/uploads/2021/04/Science_geeksguide_2CDFJY0.jpg', | ||
| 'height' => 2400, | ||
| 'width' => 1600 | ||
| ] | ||
| ], | ||
| [ | ||
| 'publisher' => [ | ||
| '@type' => 'Organization', | ||
| 'name' => 'WIRED', | ||
| 'logo' => [ | ||
| '@type' => 'ImageObject', | ||
| 'url' => 'https://www.wired.com/wp-content/themes/Phoenix/assets/images/article-icon.jpg', | ||
| 'width' => '1024 px', | ||
| 'height' => '1024 px' | ||
| ] | ||
| ], | ||
| '@context' => 'http://schema.org', | ||
| '@type' => 'NewsArticle', | ||
| 'mainEntityOfPage' => [ | ||
| '@type' => 'WebPage', | ||
| '@id' => 'https://www.wired.com/2021/03/geeks-guide-adventure-games/' | ||
| ], | ||
| 'headline' => 'It’s Never Been Easier to Make an Adventure Game', | ||
| 'datePublished' => '2021-03-26T11:40:18+00:00', | ||
| 'dateModified' => '2021-03-26T14:24:40+00:00', | ||
| 'keywords' => [ | ||
| 'geeks-guide-to-the-galaxy' | ||
| ], | ||
| 'url' => 'https://www.wired.com/2021/03/geeks-guide-adventure-games/', | ||
| 'articleSection' => 'culture', | ||
| 'author' => [ | ||
| '@type' => 'Person', | ||
| 'name' => 'Geek\'s Guide to the Galaxy' | ||
| ], | ||
| 'description' => 'The story-driven genre is enjoying an indie renaissance, thanks to new tools that are making the coding process simpler than ever.', | ||
| 'image' => [ | ||
| '@type' => 'ImageObject', | ||
| 'url' => 'https://www.wired.com/wp-content/uploads/2021/03/Culture_geeksguide_clip_boathouse_larger.jpg', | ||
| 'height' => 1200, | ||
| 'width' => 800 | ||
| ] | ||
| ], | ||
| [ | ||
| 'publisher' => [ | ||
| '@type' => 'Organization', | ||
| 'name' => 'WIRED', | ||
| 'logo' => [ | ||
| '@type' => 'ImageObject', | ||
| 'url' => 'https://www.wired.com/wp-content/themes/Phoenix/assets/images/article-icon.jpg', | ||
| 'width' => '1024 px', | ||
| 'height' => '1024 px' | ||
| ] | ||
| ], | ||
| '@context' => 'http://schema.org', | ||
| '@type' => 'NewsArticle', | ||
| 'mainEntityOfPage' => [ | ||
| '@type' => 'WebPage', | ||
| '@id' => 'https://www.wired.com/2021/03/geeks-guide-griffin-mcelroy/' | ||
| ], | ||
| 'headline' => 'Starting a Podcast Is Harder Than It Looks', | ||
| 'datePublished' => '2021-03-19T11:38:11+00:00', | ||
| 'dateModified' => '2021-03-19T11:38:11+00:00', | ||
| 'keywords' => [ | ||
| 'geeks-guide-to-the-galaxy' | ||
| ], | ||
| 'url' => 'https://www.wired.com/2021/03/geeks-guide-griffin-mcelroy/', | ||
| 'articleSection' => 'culture', | ||
| 'author' => [ | ||
| '@type' => 'Person', | ||
| 'name' => 'Geek\'s Guide to the Galaxy' | ||
| ], | ||
| 'description' => 'But Everybody Has a Podcast (Except You) author Griffin McElroy can help.', | ||
| 'image' => [ | ||
| '@type' => 'ImageObject', | ||
| 'url' => 'https://www.wired.com/wp-content/uploads/2021/03/Culture_podcast_1250239031.jpg', | ||
| 'height' => 2400, | ||
| 'width' => 1800 | ||
| ] | ||
| ], | ||
| [ | ||
| 'publisher' => [ | ||
| '@type' => 'Organization', | ||
| 'name' => 'WIRED', | ||
| 'logo' => [ | ||
| '@type' => 'ImageObject', | ||
| 'url' => 'https://www.wired.com/wp-content/themes/Phoenix/assets/images/article-icon.jpg', | ||
| 'width' => '1024 px', | ||
| 'height' => '1024 px' | ||
| ] | ||
| ], | ||
| '@context' => 'http://schema.org', | ||
| '@type' => 'NewsArticle', | ||
| 'mainEntityOfPage' => [ | ||
| '@type' => 'WebPage', | ||
| '@id' => 'https://www.wired.com/2021/03/geeks-guide-amazon-upload/' | ||
| ], | ||
| 'headline' => 'What If the Afterlife Had In-App Purchases?', | ||
| 'datePublished' => '2021-03-12T11:48:08+00:00', | ||
| 'dateModified' => '2021-03-12T11:48:08+00:00', | ||
| 'keywords' => [ | ||
| 'geeks-guide-to-the-galaxy' | ||
| ], | ||
| 'url' => 'https://www.wired.com/2021/03/geeks-guide-amazon-upload/', | ||
| 'articleSection' => 'culture', | ||
| 'author' => [ | ||
| '@type' => 'Person', | ||
| 'name' => 'Geek\'s Guide to the Galaxy' | ||
| ], | ||
| 'description' => 'The Amazon series Upload shows a comedic—and probably more realistic—version of what would happen if humans could live online after they die.', | ||
| 'image' => [ | ||
| '@type' => 'ImageObject', | ||
| 'url' => 'https://www.wired.com/wp-content/uploads/2021/03/Science_upload-UPLO_S1_Unit_108_0110RC_FNL_rgb.jpg', | ||
| 'height' => 2400, | ||
| 'width' => 1600 | ||
| ] | ||
| ], | ||
| [ | ||
| 'publisher' => [ | ||
| '@type' => 'Organization', | ||
| 'name' => 'WIRED', | ||
| 'logo' => [ | ||
| '@type' => 'ImageObject', | ||
| 'url' => 'https://www.wired.com/wp-content/themes/Phoenix/assets/images/article-icon.jpg', | ||
| 'width' => '1024 px', | ||
| 'height' => '1024 px' | ||
| ] | ||
| ], | ||
| '@context' => 'http://schema.org', | ||
| '@type' => 'NewsArticle', | ||
| 'mainEntityOfPage' => [ | ||
| '@type' => 'WebPage', | ||
| '@id' => 'https://www.wired.com/2021/03/geeks-guide-drawing-chainmail/' | ||
| ], | ||
| 'headline' => 'Yes, Chainmail Is Really Hard to Draw', | ||
| 'datePublished' => '2021-03-05T11:30:34+00:00', | ||
| 'dateModified' => '2021-03-05T11:30:34+00:00', | ||
| 'keywords' => [ | ||
| 'geeks-guide-to-the-galaxy' | ||
| ], | ||
| 'url' => 'https://www.wired.com/2021/03/geeks-guide-drawing-chainmail/', | ||
| 'articleSection' => 'culture', | ||
| 'author' => [ | ||
| '@type' => 'Person', | ||
| 'name' => 'Geek\'s Guide to the Galaxy' | ||
| ], | ||
| 'description' => 'Ultima artist Denis Loubet knows this for a fact.', | ||
| 'image' => [ | ||
| '@type' => 'ImageObject', | ||
| 'url' => 'https://www.wired.com/wp-content/uploads/2021/03/Culture_GeeksGuide_2BXF8JA-1.png', | ||
| 'height' => 2400, | ||
| 'width' => 1800 | ||
| ] | ||
| ], | ||
| [ | ||
| 'publisher' => [ | ||
| '@type' => 'Organization', | ||
| 'name' => 'WIRED', | ||
| 'logo' => [ | ||
| '@type' => 'ImageObject', | ||
| 'url' => 'https://www.wired.com/wp-content/themes/Phoenix/assets/images/article-icon.jpg', | ||
| 'width' => '1024 px', | ||
| 'height' => '1024 px' | ||
| ] | ||
| ], | ||
| '@context' => 'http://schema.org', | ||
| '@type' => 'NewsArticle', | ||
| 'mainEntityOfPage' => [ | ||
| '@type' => 'WebPage', | ||
| '@id' => 'https://www.wired.com/2021/02/geeks-guide-blood-of-zeus/' | ||
| ], | ||
| 'headline' => '‘Blood of Zeus’ Combines Myth With Saturday Morning Cartoons', | ||
| 'datePublished' => '2021-02-26T11:34:19+00:00', | ||
| 'dateModified' => '2021-02-26T11:34:19+00:00', | ||
| 'keywords' => [ | ||
| 'geeks-guide-to-the-galaxy', | ||
| 'netflix' | ||
| ], | ||
| 'url' => 'https://www.wired.com/2021/02/geeks-guide-blood-of-zeus/', | ||
| 'articleSection' => 'culture', | ||
| 'author' => [ | ||
| '@type' => 'Person', | ||
| 'name' => 'Geek\'s Guide to the Galaxy' | ||
| ], | ||
| 'description' => 'The new Netflix animated series puts a new spin on old tales.', | ||
| 'image' => [ | ||
| '@type' => 'ImageObject', | ||
| 'url' => 'https://www.wired.com/wp-content/uploads/2021/02/culture_BloodofZeus_Season1_Episode1_00_13_58_20.jpg', | ||
| 'height' => 1620, | ||
| 'width' => 1080 | ||
| ] | ||
| ], | ||
| [ | ||
| 'publisher' => [ | ||
| '@type' => 'Organization', | ||
| 'name' => 'WIRED', | ||
| 'logo' => [ | ||
| '@type' => 'ImageObject', | ||
| 'url' => 'https://www.wired.com/wp-content/themes/Phoenix/assets/images/article-icon.jpg', | ||
| 'width' => '1024 px', | ||
| 'height' => '1024 px' | ||
| ] | ||
| ], | ||
| '@context' => 'http://schema.org', | ||
| '@type' => 'NewsArticle', | ||
| 'mainEntityOfPage' => [ | ||
| '@type' => 'WebPage', | ||
| '@id' => 'https://www.wired.com/2021/02/geeks-guide-settle-alien-worlds/' | ||
| ], | ||
| 'headline' => 'What Would It Take to Actually Settle an Alien World?', | ||
| 'datePublished' => '2021-02-19T11:59:02+00:00', | ||
| 'dateModified' => '2021-02-19T12:13:00+00:00', | ||
| 'keywords' => [ | ||
| 'geeks-guide-to-the-galaxy' | ||
| ], | ||
| 'url' => 'https://www.wired.com/2021/02/geeks-guide-settle-alien-worlds/', | ||
| 'articleSection' => 'culture', | ||
| 'author' => [ | ||
| '@type' => 'Person', | ||
| 'name' => 'Geek\'s Guide to the Galaxy' | ||
| ], | ||
| 'description' => 'David Gerrold\'s new novel Hella is about a low-gravity planet inhabited by dinosaur-like aliens. It does deep on the logistics of settling an alien planet.', | ||
| 'image' => [ | ||
| '@type' => 'ImageObject', | ||
| 'url' => 'https://www.wired.com/wp-content/uploads/2021/02/geeks-guide-alien-planet.jpg', | ||
| 'height' => 2400, | ||
| 'width' => 1350 | ||
| ] | ||
| ], | ||
| [ | ||
| 'publisher' => [ | ||
| '@type' => 'Organization', | ||
| 'name' => 'WIRED', | ||
| 'logo' => [ | ||
| '@type' => 'ImageObject', | ||
| 'url' => 'https://www.wired.com/wp-content/themes/Phoenix/assets/images/article-icon.jpg', | ||
| 'width' => '1024 px', | ||
| 'height' => '1024 px' | ||
| ] | ||
| ], | ||
| '@context' => 'http://schema.org', | ||
| '@type' => 'NewsArticle', | ||
| 'mainEntityOfPage' => [ | ||
| '@type' => 'WebPage', | ||
| '@id' => 'https://www.wired.com/2021/02/geeks-guide-his-dark-materials-2/' | ||
| ], | ||
| 'headline' => 'Mrs. Coulter Is One of the Best Villains on TV', | ||
| 'datePublished' => '2021-02-12T11:52:57+00:00', | ||
| 'dateModified' => '2021-02-12T11:52:57+00:00', | ||
| 'keywords' => [ | ||
| 'geeks-guide-to-the-galaxy' | ||
| ], | ||
| 'url' => 'https://www.wired.com/2021/02/geeks-guide-his-dark-materials-2/', | ||
| 'articleSection' => 'culture', | ||
| 'author' => [ | ||
| '@type' => 'Person', | ||
| 'name' => 'Geek\'s Guide to the Galaxy' | ||
| ], | ||
| 'description' => 'Ruth Wilson\'s character is the highlight of HBO\'s His Dark Materials.', | ||
| 'image' => [ | ||
| '@type' => 'ImageObject', | ||
| 'url' => 'https://www.wired.com/wp-content/uploads/2021/02/Culture_GeeksGuide_ruth-wilson_1.jpg', | ||
| 'height' => 1444, | ||
| 'width' => 963 | ||
| ] | ||
| ], | ||
| [ | ||
| 'publisher' => [ | ||
| '@type' => 'Organization', | ||
| 'name' => 'WIRED', | ||
| 'logo' => [ | ||
| '@type' => 'ImageObject', | ||
| 'url' => 'https://www.wired.com/wp-content/themes/Phoenix/assets/images/article-icon.jpg', | ||
| 'width' => '1024 px', | ||
| 'height' => '1024 px' | ||
| ] | ||
| ], | ||
| '@context' => 'http://schema.org', | ||
| '@type' => 'NewsArticle', | ||
| 'mainEntityOfPage' => [ | ||
| '@type' => 'WebPage', | ||
| '@id' => 'https://www.wired.com/2019/09/apple-iphone-event-liveblog/' | ||
| ], | ||
| 'headline' => 'Apple Event Liveblog: All the iPhone News as It Happens', | ||
| 'datePublished' => '2019-09-10T06:00:17+00:00', | ||
| 'dateModified' => '2019-09-10T12:00:57+00:00', | ||
| 'keywords' => [ | ||
| 'apple', | ||
| 'iphone' | ||
| ], | ||
| 'url' => 'https://www.wired.com/2019/09/apple-iphone-event-liveblog/', | ||
| 'articleSection' => 'gear', | ||
| 'author' => [ | ||
| '@type' => 'Person', | ||
| 'name' => 'Michael Calore' | ||
| ], | ||
| 'description' => 'Join us for live commentary beginning at 1 pm Eastern, 10 am Pacific.', | ||
| 'image' => [ | ||
| '@type' => 'ImageObject', | ||
| 'url' => 'https://www.wired.com/wp-content/uploads/2019/09/Gear-Apple-Liveblog-FA-1157988242.jpg', | ||
| 'height' => 2400, | ||
| 'width' => 1679 | ||
| ] | ||
| ], | ||
| [ | ||
| 'publisher' => [ | ||
| '@type' => 'Organization', | ||
| 'name' => 'WIRED', | ||
| 'logo' => [ | ||
| '@type' => 'ImageObject', | ||
| 'url' => 'https://www.wired.com/wp-content/themes/Phoenix/assets/images/article-icon.jpg', | ||
| 'width' => '1024 px', | ||
| 'height' => '1024 px' | ||
| ] | ||
| ], | ||
| '@context' => 'http://schema.org', | ||
| '@type' => 'NewsArticle', | ||
| 'mainEntityOfPage' => [ | ||
| '@type' => 'WebPage', | ||
| '@id' => 'https://www.wired.com/2019/06/apple-wwdc-2019-liveblog/' | ||
| ], | ||
| 'headline' => 'WWDC 2019 Liveblog: All the Apple News as It Happens', | ||
| 'datePublished' => '2019-06-03T06:01:54+00:00', | ||
| 'dateModified' => '2019-06-03T14:09:28+00:00', | ||
| 'keywords' => [ | ||
| 'apple', | ||
| 'liveblog', | ||
| 'wwdc' | ||
| ], | ||
| 'url' => 'https://www.wired.com/2019/06/apple-wwdc-2019-liveblog/', | ||
| 'articleSection' => 'gear', | ||
| 'author' => [ | ||
| '@type' => 'Person', | ||
| 'name' => 'Wired Staff' | ||
| ], | ||
| 'description' => 'Apple\'s developer conference kicks off June 3 at 10 am Pacific. Follow along with us for analysis and commentary from WIRED\'s editors.', | ||
| 'image' => [ | ||
| '@type' => 'ImageObject', | ||
| 'url' => 'https://www.wired.com/wp-content/uploads/2019/06/gear_wwdc_967230896.jpg', | ||
| 'height' => 2400, | ||
| 'width' => 1800 | ||
| ] | ||
| ], | ||
| [ | ||
| 'publisher' => [ | ||
| '@type' => 'Organization', | ||
| 'name' => 'WIRED', | ||
| 'logo' => [ | ||
| '@type' => 'ImageObject', | ||
| 'url' => 'https://www.wired.com/wp-content/themes/Phoenix/assets/images/article-icon.jpg', | ||
| 'width' => '1024 px', | ||
| 'height' => '1024 px' | ||
| ] | ||
| ], | ||
| '@context' => 'http://schema.org', | ||
| '@type' => 'NewsArticle', | ||
| 'mainEntityOfPage' => [ | ||
| '@type' => 'WebPage', | ||
| '@id' => 'https://www.wired.com/2021/03/geeks-guide-adventure-games/' | ||
| ], | ||
| 'headline' => 'It’s Never Been Easier to Make an Adventure Game', | ||
| 'datePublished' => '2021-03-26T11:40:18+00:00', | ||
| 'dateModified' => '2021-03-26T14:24:40+00:00', | ||
| 'keywords' => [ | ||
| 'geeks-guide-to-the-galaxy' | ||
| ], | ||
| 'url' => 'https://www.wired.com/2021/03/geeks-guide-adventure-games/', | ||
| 'articleSection' => 'culture', | ||
| 'author' => [ | ||
| '@type' => 'Person', | ||
| 'name' => 'Geek\'s Guide to the Galaxy' | ||
| ], | ||
| 'description' => 'The story-driven genre is enjoying an indie renaissance, thanks to new tools that are making the coding process simpler than ever.', | ||
| 'image' => [ | ||
| '@context' => 'https://schema.org', | ||
| '@type' => 'Organization', | ||
| 'name' => 'WIRED', | ||
| 'logo' => [ | ||
| '@type' => 'ImageObject', | ||
| 'url' => 'https://www.wired.com/wp-content/uploads/2021/03/Culture_geeksguide_clip_boathouse_larger.jpg', | ||
| 'height' => 1200, | ||
| 'width' => 800 | ||
| ] | ||
| ], | ||
| [ | ||
| 'publisher' => [ | ||
| '@type' => 'Organization', | ||
| 'name' => 'WIRED', | ||
| 'logo' => [ | ||
| '@type' => 'ImageObject', | ||
| 'url' => 'https://www.wired.com/wp-content/themes/Phoenix/assets/images/article-icon.jpg', | ||
| 'width' => '1024 px', | ||
| 'height' => '1024 px' | ||
| ] | ||
| ], | ||
| '@context' => 'http://schema.org', | ||
| '@type' => 'NewsArticle', | ||
| 'mainEntityOfPage' => [ | ||
| '@type' => 'WebPage', | ||
| '@id' => 'https://www.wired.com/2019/04/facebook-f8-liveblog-2019/' | ||
| 'url' => 'https://www.wired.com/verso/static/wired-us/assets/newsletter-signup-hub.jpg', | ||
| 'width' => '500px', | ||
| 'height' => '100px' | ||
| ], | ||
| 'headline' => 'F8 Liveblog: All the Facebook News as It Happens', | ||
| 'datePublished' => '2019-04-30T11:39:17+00:00', | ||
| 'dateModified' => '2019-04-30T13:03:50+00:00', | ||
| 'keywords' => [ | ||
| 'f8', | ||
| 'facebook', | ||
| 'liveblog' | ||
| ], | ||
| 'url' => 'https://www.wired.com/2019/04/facebook-f8-liveblog-2019/', | ||
| 'articleSection' => 'gear', | ||
| 'author' => [ | ||
| '@type' => 'Person', | ||
| 'name' => 'Wired Staff' | ||
| ], | ||
| 'description' => 'When Facebook kicks off its annual developer conference with a keynote address on Tuesday morning, we\'ll be liveblogging it right here.', | ||
| 'image' => [ | ||
| '@type' => 'ImageObject', | ||
| 'url' => 'https://www.wired.com/wp-content/uploads/2019/04/f8-953545066.jpg', | ||
| 'height' => 2399, | ||
| 'width' => 1823 | ||
| ] | ||
| 'url' => 'https://www.wired.com' | ||
| ], | ||
| [ | ||
| 'publisher' => [ | ||
| '@type' => 'Organization', | ||
| 'name' => 'WIRED', | ||
| 'logo' => [ | ||
| '@type' => 'ImageObject', | ||
| 'url' => 'https://www.wired.com/wp-content/themes/Phoenix/assets/images/article-icon.jpg', | ||
| 'width' => '1024 px', | ||
| 'height' => '1024 px' | ||
| ] | ||
| ], | ||
| '@context' => 'http://schema.org', | ||
| '@type' => 'NewsArticle', | ||
| 'mainEntityOfPage' => [ | ||
| '@type' => 'WebPage', | ||
| '@id' => 'https://www.wired.com/2019/03/apple-media-event-liveblog/' | ||
| ], | ||
| 'headline' => 'Apple Event Liveblog: All the News, as It Happens', | ||
| 'datePublished' => '2019-03-25T06:00:04+00:00', | ||
| 'dateModified' => '2019-03-25T12:05:50+00:00', | ||
| 'keywords' => [ | ||
| 'apple', | ||
| 'apple-event' | ||
| ], | ||
| 'url' => 'https://www.wired.com/2019/03/apple-media-event-liveblog/', | ||
| 'articleSection' => 'gear', | ||
| 'author' => [ | ||
| '@type' => 'Person', | ||
| 'name' => 'Wired Staff' | ||
| ], | ||
| 'description' => 'On Monday morning, Apple hosts an event to outline plans for its news distribution and media streaming services. Our live coverage starts at 9 am Pacific.', | ||
| 'image' => [ | ||
| '@type' => 'ImageObject', | ||
| 'url' => 'https://www.wired.com/wp-content/uploads/2019/03/timcook-967356920.jpg', | ||
| 'height' => 2400, | ||
| 'width' => 1800 | ||
| ] | ||
| ], | ||
| [ | ||
| 'publisher' => [ | ||
| '@type' => 'Organization', | ||
| 'name' => 'WIRED', | ||
| 'logo' => [ | ||
| '@type' => 'ImageObject', | ||
| 'url' => 'https://www.wired.com/wp-content/themes/Phoenix/assets/images/article-icon.jpg', | ||
| 'width' => '1024 px', | ||
| 'height' => '1024 px' | ||
| '@context' => 'https://schema.org', | ||
| '@type' => 'WebSite', | ||
| 'url' => 'https://www.wired.com', | ||
| 'name' => 'WIRED', | ||
| 'headline' => 'WIRED - The Latest in Technology, Science, Culture and Business', | ||
| 'potentialAction' => [ | ||
| '@type' => 'SearchAction', | ||
| 'target' => 'https://www.wired.com/search?q={search_term_string}', | ||
| 'query-input' => 'required name=search_term_string' | ||
| ] | ||
| ], | ||
| [ | ||
| '@context' => 'https://schema.org', | ||
| '@type' => 'ItemList', | ||
| 'itemListElement' => [ | ||
| [ | ||
| '@context' => 'https://schema.org', | ||
| '@type' => 'ListItem', | ||
| 'name' => 'Sam Altman Says the GPT-5 Haters Got It All Wrong', | ||
| 'url' => 'https://www.wired.com/story/sam-altman-says-the-gpt-5-haters-got-it-all-wrong/', | ||
| 'position' => 1 | ||
| ], | ||
| [ | ||
| '@context' => 'https://schema.org', | ||
| '@type' => 'ListItem', | ||
| 'name' => 'ICE Wants to Build Out a 24/7 Social Media Surveillance Team', | ||
| 'url' => 'https://www.wired.com/story/ice-social-media-surveillance-24-7-contract/', | ||
| 'position' => 2 | ||
| ], | ||
| [ | ||
| '@context' => 'https://schema.org', | ||
| '@type' => 'ListItem', | ||
| 'name' => 'At a Conspiracy Conference in Rural Ireland, Charlie Kirk Was the Star', | ||
| 'url' => 'https://www.wired.com/story/conspiracy-conference-rural-ireland-charlie-kirk-quantum-clones/', | ||
| 'position' => 3 | ||
| ], | ||
| [ | ||
| '@context' => 'https://schema.org', | ||
| '@type' => 'ListItem', | ||
| 'name' => 'Government Workers Say Their Out-of-Office Replies Were Forcibly Changed to Blame Democrats for Shutdown', | ||
| 'url' => 'https://www.wired.com/story/government-workers-say-their-out-of-office-replies-were-forcibly-changed-to-blame-democrats-for-shutdown/', | ||
| 'position' => 4 | ||
| ], | ||
| [ | ||
| '@context' => 'https://schema.org', | ||
| '@type' => 'ListItem', | ||
| 'name' => 'Inside the Contentious World of Luigi Mangione Supporters', | ||
| 'url' => 'https://www.wired.com/story/inside-the-contentious-world-of-luigi-mangione-supporters/', | ||
| 'position' => 5 | ||
| ], | ||
| [ | ||
| '@context' => 'https://schema.org', | ||
| '@type' => 'ListItem', | ||
| 'name' => 'Why Are Car Software Updates Still So Bad?', | ||
| 'url' => 'https://www.wired.com/story/why-are-car-software-updates-still-so-bad/', | ||
| 'position' => 6 | ||
| ], | ||
| [ | ||
| '@context' => 'https://schema.org', | ||
| '@type' => 'ListItem', | ||
| 'name' => 'Watch Our Livestream Replay: Tech Went All In on Trump. Now What?', | ||
| 'url' => 'https://www.wired.com/story/livestream-tech-went-all-in-on-trump-now-what/', | ||
| 'position' => 7 | ||
| ], | ||
| [ | ||
| '@context' => 'https://schema.org', | ||
| '@type' => 'ListItem', | ||
| 'name' => 'Gear News of the Week: Adobe Premiere Lands on iPhone, and Nothing Lets You Design Your Own Widgets', | ||
| 'url' => 'https://www.wired.com/story/gear-news-of-the-week-adobe-premiere-lands-on-iphone-and-nothing-lets-you-design-your-own-widgets/', | ||
| 'position' => 8 | ||
| ], | ||
| [ | ||
| '@context' => 'https://schema.org', | ||
| '@type' => 'ListItem', | ||
| 'name' => 'The Vision Pro Was an Expensive Misstep. Now Apple Has to Catch Up With Smart Glasses', | ||
| 'url' => 'https://www.wired.com/story/the-vision-pro-was-an-expensive-misstep-now-apple-has-to-catch-up-with-smart-glasses/', | ||
| 'position' => 9 | ||
| ], | ||
| [ | ||
| '@context' => 'https://schema.org', | ||
| '@type' => 'ListItem', | ||
| 'name' => 'Lenovo’s Streamlined Gaming Handheld Is $120 Off', | ||
| 'url' => 'https://www.wired.com/story/legion-go-s-deal-1025/', | ||
| 'position' => 10 | ||
| ], | ||
| [ | ||
| '@context' => 'https://schema.org', | ||
| '@type' => 'ListItem', | ||
| 'name' => 'Bad Bunny Has MAGA All Worked Up', | ||
| 'url' => 'https://www.wired.com/story/bad-bunny-has-maga-all-worked-up/', | ||
| 'position' => 11 | ||
| ], | ||
| [ | ||
| '@context' => 'https://schema.org', | ||
| '@type' => 'ListItem', | ||
| 'name' => 'China Is Leading the World in the Clean Energy Transition. Here\'s What That Looks Like', | ||
| 'url' => 'https://www.wired.com/story/china-clean-energy-un-climate-summit-goals/', | ||
| 'position' => 12 | ||
| ], | ||
| [ | ||
| '@context' => 'https://schema.org', | ||
| '@type' => 'ListItem', | ||
| 'name' => 'China Rolls Out Its First Talent Visa as the US Retreats on H-1Bs', | ||
| 'url' => 'https://www.wired.com/story/china-talent-immigration-visa-h1-b-policy/', | ||
| 'position' => 13 | ||
| ], | ||
| [ | ||
| '@context' => 'https://schema.org', | ||
| '@type' => 'ListItem', | ||
| 'name' => 'Chatbots Play With Your Emotions to Avoid Saying Goodbye', | ||
| 'url' => 'https://www.wired.com/story/chatbots-play-with-emotions-to-avoid-saying-goodbye/', | ||
| 'position' => 14 | ||
| ], | ||
| [ | ||
| '@context' => 'https://schema.org', | ||
| '@type' => 'ListItem', | ||
| 'name' => 'The Post–Chuck Schumer Era', | ||
| 'url' => 'https://www.wired.com/story/chuck-schumer-government-shutdown/', | ||
| 'position' => 15 | ||
| ], | ||
| [ | ||
| '@context' => 'https://schema.org', | ||
| '@type' => 'ListItem', | ||
| 'name' => 'OpenAI Is Preparing to Launch a Social App for AI-Generated Videos', | ||
| 'url' => 'https://www.wired.com/story/openai-launches-sora-2-tiktok-like-app/', | ||
| 'position' => 16 | ||
| ], | ||
| [ | ||
| '@context' => 'https://schema.org', | ||
| '@type' => 'ListItem', | ||
| 'name' => 'Broadcast TV Is a \'Melting Ice Cube.’ Kimmel Just Turned Up the Heat', | ||
| 'url' => 'https://www.wired.com/story/broadcast-tv-fcc-carr-kimmel/', | ||
| 'position' => 17 | ||
| ], | ||
| [ | ||
| '@context' => 'https://schema.org', | ||
| '@type' => 'ListItem', | ||
| 'name' => 'The Trump Administration Is Coming for Nonprofits. They\'re Getting Ready', | ||
| 'url' => 'https://www.wired.com/story/the-trump-administration-is-coming-for-nonprofits-theyre-getting-ready/', | ||
| 'position' => 18 | ||
| ], | ||
| [ | ||
| '@context' => 'https://schema.org', | ||
| '@type' => 'ListItem', | ||
| 'name' => 'Federal Workers Are Being Told to Blame Democrats for the Shutdown', | ||
| 'url' => 'https://www.wired.com/story/government-employees-out-of-office-email-replies/', | ||
| 'position' => 19 | ||
| ], | ||
| [ | ||
| '@context' => 'https://schema.org', | ||
| '@type' => 'ListItem', | ||
| 'name' => 'Armed Guards and Muscle Milk: Senate Investigation Reveals DOGE Takeover Details', | ||
| 'url' => 'https://www.wired.com/story/armed-guards-muscle-milk-senate-investigation-doge-takeover-details/', | ||
| 'position' => 20 | ||
| ] | ||
| ], | ||
| '@context' => 'http://schema.org', | ||
| '@type' => 'NewsArticle', | ||
| 'numberOfItems' => 20, | ||
| 'mainEntityOfPage' => [ | ||
| '@type' => 'WebPage', | ||
| '@id' => 'https://www.wired.com/2021/04/geeks-guide-the-dispossessed/' | ||
| ], | ||
| 'headline' => '‘The Dispossessed’ Is Still One of Sci-Fi’s Smartest Books', | ||
| 'datePublished' => '2021-04-02T11:36:39+00:00', | ||
| 'dateModified' => '2021-04-02T11:36:39+00:00', | ||
| 'keywords' => [ | ||
| 'geeks-guide-to-the-galaxy' | ||
| ], | ||
| 'url' => 'https://www.wired.com/2021/04/geeks-guide-the-dispossessed/', | ||
| 'articleSection' => 'culture', | ||
| 'author' => [ | ||
| '@type' => 'Person', | ||
| 'name' => 'Geek\'s Guide to the Galaxy' | ||
| ], | ||
| 'description' => 'Ursula K. Le Guin\'s 1974 novel, about a society with no government or laws, remains a thoughtful exploration of politics and economics decades later.', | ||
| 'image' => [ | ||
| '@type' => 'ImageObject', | ||
| 'url' => 'https://www.wired.com/wp-content/uploads/2021/04/Science_geeksguide_2CDFJY0.jpg', | ||
| 'height' => 2400, | ||
| 'width' => 1600 | ||
| ] | ||
| ], | ||
| [ | ||
| '@context' => 'http://schema.org/', | ||
| '@type' => 'Review', | ||
| 'itemReviewed' => [ | ||
| '@type' => 'Thing', | ||
| 'name' => 'Yi 4K Action Camera' | ||
| ], | ||
| 'author' => [ | ||
| '@type' => 'Person', | ||
| 'name' => 'Brent Rose' | ||
| ], | ||
| 'reviewRating' => [ | ||
| '@type' => 'Rating', | ||
| 'ratingValue' => '8', | ||
| 'bestRating' => '10' | ||
| ], | ||
| 'publisher' => [ | ||
| '@type' => 'Organization', | ||
| 'name' => 'Wired' | ||
| '@context' => 'https://schema.org', | ||
| '@type' => 'CollectionPage', | ||
| '@id' => 'https://www.wired.com' | ||
| ] | ||
| ] | ||
| ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧹 Nitpick | 🔵 Trivial
allLinkedDataの構造は正しく実装されています。
allLinkedDataがschema.orgの標準に従って適切に構造化されています:
- Organization、WebSite、ItemListの3つの主要ブロックが含まれています
- 20件のListItemが適切に実装されています
- SearchActionが含まれており、SEOに有効です
- mainEntityOfPageがCollectionPageタイプを使用しています
注:各ListItem内で@contextが繰り返されていますが、schema.org的には有効です。最適化する場合は、個々のListItemから@contextを削除し、親のItemListレベルでのみ定義することもできます。
🤖 Prompt for AI Agents
In tests/fixtures/www.wired.com..1202600986b37d2c6a30336f82c671f8.php around
lines 39 to 216 the allLinkedData structure is correct but repeats '@context'
inside every ListItem; to optimize, remove the redundant '@context' entries from
each ListItem and keep a single '@context' at the parent ItemList level (or at
the top-level object) so the JSON-LD is more concise while remaining
schema.org-compliant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting
📒 Files selected for processing (1)
src/Document.php(1 hunks)
🧰 Additional context used
🪛 PHPMD (2.15.0)
src/Document.php
43-43: Avoid using static access to class '\HtmlParser\Parser' in method '__construct'. (undefined)
(StaticAccess)
71-73: The method getValidEncoding uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. (undefined)
(ElseExpression)
🔇 Additional comments (3)
src/Document.php (3)
34-34: エンコーディング検証のリファクタリングが適切です。インライン検証ロジックを専用メソッド
getValidEncoding()に抽出することで、コードの再利用性と保守性が向上しています。Also applies to: 40-40
47-58: ドキュメンテーションが明確で包括的です。メソッドのdocblockはPHPバージョン間の違いを明確に説明しており、将来のメンテナンスのためのTODOコメントも適切です。
42-45:Parser::parseが null エンコーディングを安全に処理するか確認してください。エンコーディング解決後にドキュメントとXPathを初期化する変更は適切ですが、
$encodingがnullの場合の挙動を明示的に検証してください。
| private function getValidEncoding(?string $encoding): ?string | ||
| { | ||
| if (PHP_VERSION_ID < 80000) { | ||
| // PHP 7.4: Check return value (false = invalid encoding) | ||
| // Need to check empty() first to avoid Warning | ||
| // TODO: Remove this entire branch when PHP 7.4 support is dropped | ||
| if (empty($encoding)) { | ||
| return null; | ||
| } | ||
| $ret = mb_encoding_aliases($encoding); | ||
| if ($ret === false) { | ||
| return null; | ||
| } else { | ||
| return $encoding; | ||
| } | ||
| } else { | ||
| // PHP 8.0+: ValueError exception is thrown for invalid/empty encoding | ||
| try { | ||
| $ret = mb_encoding_aliases($encoding ?? ''); | ||
| if ($ret === false) { | ||
| $encoding = null; | ||
| } | ||
| $aliases = mb_encoding_aliases($encoding ?? ''); | ||
| // Check if aliases array is not empty (valid encoding should have at least one alias) | ||
| return !empty($aliases) ? $encoding : null; | ||
| } catch (\ValueError $exception) { | ||
| $encoding = null; | ||
| return null; | ||
| } | ||
| } | ||
| $this->document = !empty($html) ? Parser::parse($html, $encoding) : new DOMDocument(); | ||
| $this->initXPath(); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PHP 8.0+ ブランチのエンコーディング検証ロジックに潜在的な問題があります。
Line 79 の !empty($aliases) チェックは、エイリアスを持たない有効なエンコーディングを誤って拒否する可能性があります。PHP 8.0+ では、mb_encoding_aliases() が ValueError をスローしない場合、そのエンコーディングは有効です。エイリアス配列が空でも、エンコーディング自体は有効である可能性があります。
以下の修正を適用してください:
} else {
// PHP 8.0+: ValueError exception is thrown for invalid/empty encoding
try {
$aliases = mb_encoding_aliases($encoding ?? '');
- // Check if aliases array is not empty (valid encoding should have at least one alias)
- return !empty($aliases) ? $encoding : null;
+ // If no ValueError thrown, encoding is valid (even if aliases array is empty)
+ return $encoding;
} catch (\ValueError $exception) {
return null;
}
}任意の改善として、PHP 7.4 ブランチの else 句を簡略化できます:
$ret = mb_encoding_aliases($encoding);
- if ($ret === false) {
- return null;
- } else {
- return $encoding;
- }
+ return $ret === false ? null : $encoding;📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| private function getValidEncoding(?string $encoding): ?string | |
| { | |
| if (PHP_VERSION_ID < 80000) { | |
| // PHP 7.4: Check return value (false = invalid encoding) | |
| // Need to check empty() first to avoid Warning | |
| // TODO: Remove this entire branch when PHP 7.4 support is dropped | |
| if (empty($encoding)) { | |
| return null; | |
| } | |
| $ret = mb_encoding_aliases($encoding); | |
| if ($ret === false) { | |
| return null; | |
| } else { | |
| return $encoding; | |
| } | |
| } else { | |
| // PHP 8.0+: ValueError exception is thrown for invalid/empty encoding | |
| try { | |
| $ret = mb_encoding_aliases($encoding ?? ''); | |
| if ($ret === false) { | |
| $encoding = null; | |
| } | |
| $aliases = mb_encoding_aliases($encoding ?? ''); | |
| // Check if aliases array is not empty (valid encoding should have at least one alias) | |
| return !empty($aliases) ? $encoding : null; | |
| } catch (\ValueError $exception) { | |
| $encoding = null; | |
| return null; | |
| } | |
| } | |
| $this->document = !empty($html) ? Parser::parse($html, $encoding) : new DOMDocument(); | |
| $this->initXPath(); | |
| } | |
| private function getValidEncoding(?string $encoding): ?string | |
| { | |
| if (PHP_VERSION_ID < 80000) { | |
| // PHP 7.4: Check return value (false = invalid encoding) | |
| // Need to check empty() first to avoid Warning | |
| // TODO: Remove this entire branch when PHP 7.4 support is dropped | |
| if (empty($encoding)) { | |
| return null; | |
| } | |
| $ret = mb_encoding_aliases($encoding); | |
| return $ret === false ? null : $encoding; | |
| } else { | |
| // PHP 8.0+: ValueError exception is thrown for invalid/empty encoding | |
| try { | |
| $aliases = mb_encoding_aliases($encoding ?? ''); | |
| // If no ValueError thrown, encoding is valid (even if aliases array is empty) | |
| return $encoding; | |
| } catch (\ValueError $exception) { | |
| return null; | |
| } | |
| } | |
| } |
🧰 Tools
🪛 PHPMD (2.15.0)
71-73: The method getValidEncoding uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. (undefined)
(ElseExpression)
74-83: The method getValidEncoding uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them. (undefined)
(ElseExpression)
🤖 Prompt for AI Agents
In src/Document.php around lines 59 to 84, the PHP 8.0+ branch incorrectly
rejects encodings whose mb_encoding_aliases() returns an empty array; instead of
checking !empty($aliases) you should treat any non-exception return as a valid
encoding and simply return $encoding (or null on ValueError). Update the
try/catch to return $encoding when no exception is thrown and only return null
inside the catch; optionally simplify the PHP 7.4 branch else clause to just
return $encoding when $ret !== false.
fix GHA.
Summary by CodeRabbit