repo
stringlengths
5
53
pr_number
int32
1
321k
task_type
stringclasses
2 values
issue_text
stringlengths
0
81.2k
pr_title
stringlengths
1
319
pr_body
stringlengths
0
105k
base_sha
stringlengths
40
40
head_sha
stringlengths
40
40
gold_diff
stringlengths
0
202M
changed_files
listlengths
0
100
review_threads
listlengths
0
100
test_patch
stringlengths
0
23.4M
merged
bool
1 class
yiisoft/yii2
20,910
issue_to_patch
Fix changelog sorting when there are fix intries instead of bug
| Q | A | ------------- | --- | Is bugfix? | ✔️ | New feature? | ❌ | Breaks BC? | ❌ | Fixed issues | -
dc66de6f7af49927aace4bd778cb1761eba19087
640f803e40ae12a75adbe18ee12c140bb68af05e
diff --git a/build/controllers/ReleaseController.php b/build/controllers/ReleaseController.php index 4ffa7142f05..b5f53881186 100644 --- a/build/controllers/ReleaseController.php +++ b/build/controllers/ReleaseController.php @@ -913,6 +913,7 @@ protected function resortChangelog($changelog) // cleanup whitespa...
[ "build/controllers/ReleaseController.php", "tests/framework/ReleaseControllerTest.php" ]
[]
diff --git a/tests/framework/ReleaseControllerTest.php b/tests/framework/ReleaseControllerTest.php new file mode 100644 index 00000000000..4197ecd16d5 --- /dev/null +++ b/tests/framework/ReleaseControllerTest.php @@ -0,0 +1,57 @@ +<?php + +/** + * @link https://www.yiiframework.com/ + * @copyright Copyright (c) 2008 Yi...
true
yiisoft/yii2
20,903
issue_to_patch
Fix `yii\helpers\Url::current()` and `yii\helpers\Url::canonical()` to fall back to `Application::$requestedRoute` when no controller is active, supporting standalone actions.
| Q | A | ------------- | --- | Is bugfix? | ✔️ | New feature? | ❌ | Breaks BC? | ❌
04bb96d928c06b3e12e87ab8100cdefeb0905212
15ddf5a4235ef05fc20e8d4396ec4674556b9db7
diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 31153757114..b500b9a0520 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -72,6 +72,7 @@ Yii Framework 2 Change Log - Chg: Drop dead SQL Server `< 2017` branches from MSSQL `Schema::loadColumnSchema()` (terabytesoftw) - Chg: Drop de...
[ "framework/CHANGELOG.md", "framework/UPGRADE-22.md", "framework/base/Module.php", "framework/helpers/BaseUrl.php", "tests/framework/base/StandaloneActionTest.php", "tests/framework/base/stub/standalone/LifecycleRecordingAction.php", "tests/framework/helpers/UrlTest.php", "tests/framework/web/WebAction...
[ { "comment": "_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_\n\n**Use PHP method-call syntax in the route example.**\n\n`parent.runAction('child/ping')` is not valid PHP notation and may mislead readers during migration. Prefer a PHP-style call or explicitly mark it as pseudocode.\n\n<details>\n<summary>Sugg...
diff --git a/tests/framework/base/StandaloneActionTest.php b/tests/framework/base/StandaloneActionTest.php index b88eef03e71..4a32492b922 100644 --- a/tests/framework/base/StandaloneActionTest.php +++ b/tests/framework/base/StandaloneActionTest.php @@ -10,6 +10,7 @@ namespace yiiunit\framework\base; +use PHPUnit\F...
true
yiisoft/yii2
20,903
comment_to_fix
Fix `yii\helpers\Url::current()` and `yii\helpers\Url::canonical()` to fall back to `Application::$requestedRoute` when no controller is active, supporting standalone actions.
_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_ **Use PHP method-call syntax in the route example.** `parent.runAction('child/ping')` is not valid PHP notation and may mislead readers during migration. Prefer a PHP-style call or explicitly mark it as pseudocode. <details> <summary>Suggested doc tweak</summary> ``...
04bb96d928c06b3e12e87ab8100cdefeb0905212
15ddf5a4235ef05fc20e8d4396ec4674556b9db7
diff --git a/framework/UPGRADE-22.md b/framework/UPGRADE-22.md index ce3eebf3396..05f26a4e368 100644 --- a/framework/UPGRADE-22.md +++ b/framework/UPGRADE-22.md @@ -471,10 +471,14 @@ extension points (`removeItemSoftCascade()`, `removeItemManualCascade()`, `updat `updateRuleManualCascade()`, `removeRuleManualCascade()...
[ "framework/UPGRADE-22.md" ]
[ { "comment": "_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_\n\n**Use PHP method-call syntax in the route example.**\n\n`parent.runAction('child/ping')` is not valid PHP notation and may mislead readers during migration. Prefer a PHP-style call or explicitly mark it as pseudocode.\n\n<details>\n<summary>Sugg...
true
yiisoft/yii2
20,903
comment_to_fix
Fix `yii\helpers\Url::current()` and `yii\helpers\Url::canonical()` to fall back to `Application::$requestedRoute` when no controller is active, supporting standalone actions.
_🧹 Nitpick_ | _🔵 Trivial_ | _💤 Low value_ **Move module construction inside the `try` for consistent `$_SERVER` cleanup.** Here the `Module` is created (Line 241-243) before the `try` while `REQUEST_METHOD` is already mutated (Line 238-239). If construction ever throws, `restoreRequestMethod()` won't run and the G...
04bb96d928c06b3e12e87ab8100cdefeb0905212
15ddf5a4235ef05fc20e8d4396ec4674556b9db7
diff --git a/tests/framework/web/WebActionTest.php b/tests/framework/web/WebActionTest.php index 4bbcbe6e58c..12969303bc7 100644 --- a/tests/framework/web/WebActionTest.php +++ b/tests/framework/web/WebActionTest.php @@ -14,8 +14,15 @@ use Yii; use yii\base\Module; use yii\web\BadRequestHttpException; +use yii\web\M...
[ "tests/framework/web/WebActionTest.php" ]
[ { "comment": "_🧹 Nitpick_ | _🔵 Trivial_ | _💤 Low value_\n\n**Move module construction inside the `try` for consistent `$_SERVER` cleanup.**\n\nHere the `Module` is created (Line 241-243) before the `try` while `REQUEST_METHOD` is already mutated (Line 238-239). If construction ever throws, `restoreRequestMet...
true
yiisoft/yii2
20,904
issue_to_patch
Refactor tutorial on standalone actions.
| Q | A | ------------- | --- | Is bugfix? | ✔️ | New feature? | ❌ | Breaks BC? | ❌
9feb259c6425c29eda97788a67311f2e0025b53e
2d5631b63e7f878db5b4f9d875c350e0c196669f
diff --git a/docs/guide/tutorial-standalone-actions.md b/docs/guide/tutorial-standalone-actions.md index d4185389759..a4442d28a0b 100644 --- a/docs/guide/tutorial-standalone-actions.md +++ b/docs/guide/tutorial-standalone-actions.md @@ -2,68 +2,25 @@ > Available since version 22.0. -This tutorial introduces the st...
[ "docs/guide/tutorial-standalone-actions.md" ]
[ { "comment": "_⚠️ Potential issue_ | _🟠 Major_ | _⚡ Quick win_\n\n**Make the CSRF filter snippet copy-paste safe by explicitly referencing `BadRequestHttpException` (and `Yii`).**\n\nThe snippet throws `BadRequestHttpException` and references `Yii::$app` without imports/FQCN, so pasted code in a namespace won’...
true
yiisoft/yii2
20,904
comment_to_fix
Refactor tutorial on standalone actions.
_⚠️ Potential issue_ | _🟠 Major_ | _⚡ Quick win_ **Make the CSRF filter snippet copy-paste safe by explicitly referencing `BadRequestHttpException` (and `Yii`).** The snippet throws `BadRequestHttpException` and references `Yii::$app` without imports/FQCN, so pasted code in a namespace won’t resolve `BadRequestHttpE...
9feb259c6425c29eda97788a67311f2e0025b53e
2d5631b63e7f878db5b4f9d875c350e0c196669f
diff --git a/docs/guide/tutorial-standalone-actions.md b/docs/guide/tutorial-standalone-actions.md index d4185389759..a4442d28a0b 100644 --- a/docs/guide/tutorial-standalone-actions.md +++ b/docs/guide/tutorial-standalone-actions.md @@ -2,68 +2,25 @@ > Available since version 22.0. -This tutorial introduces the st...
[ "docs/guide/tutorial-standalone-actions.md" ]
[ { "comment": "_⚠️ Potential issue_ | _🟠 Major_ | _⚡ Quick win_\n\n**Make the CSRF filter snippet copy-paste safe by explicitly referencing `BadRequestHttpException` (and `Yii`).**\n\nThe snippet throws `BadRequestHttpException` and references `Yii::$app` without imports/FQCN, so pasted code in a namespace won’...
true
yiisoft/yii2
20,904
comment_to_fix
Refactor tutorial on standalone actions.
_⚠️ Potential issue_ | _🟠 Major_ | _⚡ Quick win_ <details> <summary>🧩 Analysis chain</summary> 🏁 Script executed: ```shell #!/bin/bash set -euo pipefail FILE="docs/guide/tutorial-standalone-actions.md" # Show line ranges around the mentioned locations with line numbers sed -n '80,160p' "$FILE" | cat -n echo "--...
9feb259c6425c29eda97788a67311f2e0025b53e
2d5631b63e7f878db5b4f9d875c350e0c196669f
diff --git a/docs/guide/tutorial-standalone-actions.md b/docs/guide/tutorial-standalone-actions.md index d4185389759..a4442d28a0b 100644 --- a/docs/guide/tutorial-standalone-actions.md +++ b/docs/guide/tutorial-standalone-actions.md @@ -2,68 +2,25 @@ > Available since version 22.0. -This tutorial introduces the st...
[ "docs/guide/tutorial-standalone-actions.md" ]
[ { "comment": "_⚠️ Potential issue_ | _🟠 Major_ | _⚡ Quick win_\n\n<details>\n<summary>🧩 Analysis chain</summary>\n\n🏁 Script executed:\n\n```shell\n#!/bin/bash\nset -euo pipefail\n\nFILE=\"docs/guide/tutorial-standalone-actions.md\"\n\n# Show line ranges around the mentioned locations with line numbers\nsed ...
true
yiisoft/yii2
20,892
issue_to_patch
Sync to master brach.
| Q | A | ------------- | --- | Is bugfix? | ✔️ | New feature? | ❌ | Breaks BC? | ❌
1b37da4fd1d4bfd0ab1a23eee5618efd45dbaf96
446ae2532595144a53d3205825e9f5f953f230f6
diff --git a/build/controllers/MimeTypeController.php b/build/controllers/MimeTypeController.php index d8709cdca6e..2549f67ea23 100644 --- a/build/controllers/MimeTypeController.php +++ b/build/controllers/MimeTypeController.php @@ -47,6 +47,7 @@ class MimeTypeController extends Controller 'application/bmp' =>...
[ "build/controllers/MimeTypeController.php", "framework/CHANGELOG.md", "framework/helpers/mimeAliases.php", "framework/web/JsonParser.php", "framework/web/Request.php", "framework/web/RequestParserInterface.php", "tests/framework/helpers/FileHelperTest.php" ]
[]
diff --git a/tests/framework/helpers/FileHelperTest.php b/tests/framework/helpers/FileHelperTest.php index 9a9fe8870ac..41dbd8f5af0 100644 --- a/tests/framework/helpers/FileHelperTest.php +++ b/tests/framework/helpers/FileHelperTest.php @@ -1301,6 +1301,18 @@ public static function getExtensionsByMimeTypeProvider(): ar...
true
yiisoft/yii2
20,891
issue_to_patch
Fix the types in the PHPDoc annotations for `JsonParser`, `Request`, and `RequestParserInterface`
| Q | A | ------------- | --- | Is bugfix? | ✔️ | New feature? | ❌ | Breaks BC? | ❌ | Fixed issues | <!-- comma-separated list of tickets # fixed by the PR, if any -->
1b2fc6812bae97674d885021c64b20f8616710e3
7c76543e65eb30ff3603c7ab6d9133c6b478888c
diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index b355f2e7d36..4bba8cbfa39 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -13,6 +13,9 @@ Yii Framework 2 Change Log - Bug #20878: Fix `@var` annotation for `yii\db\Query::$from` (mspirkov) - Enh #7616: Add `yii\web\ErrorHandler::EVE...
[ "framework/CHANGELOG.md", "framework/web/JsonParser.php", "framework/web/Request.php", "framework/web/RequestParserInterface.php" ]
[ { "comment": "_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_\n\n**Complete the type-doc update for `bodyParams` to avoid conflicting contracts.**\n\nThese new `mixed` annotations conflict with existing docs that still state `array|object` (Line 44 `@property $bodyParams`, Line 595 `getBodyParams()` return). ...
true
yiisoft/yii2
20,891
comment_to_fix
Fix the types in the PHPDoc annotations for `JsonParser`, `Request`, and `RequestParserInterface`
_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_ **Complete the type-doc update for `bodyParams` to avoid conflicting contracts.** These new `mixed` annotations conflict with existing docs that still state `array|object` (Line 44 `@property $bodyParams`, Line 595 `getBodyParams()` return). Please align those remaini...
1b2fc6812bae97674d885021c64b20f8616710e3
7c76543e65eb30ff3603c7ab6d9133c6b478888c
diff --git a/framework/web/Request.php b/framework/web/Request.php index 86694222f75..59b9f0cb7c9 100644 --- a/framework/web/Request.php +++ b/framework/web/Request.php @@ -41,7 +41,7 @@ * @property-read string|null $authUser The username sent via HTTP authentication, `null` if the username is * not given. * @pro...
[ "framework/web/Request.php" ]
[ { "comment": "_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_\n\n**Complete the type-doc update for `bodyParams` to avoid conflicting contracts.**\n\nThese new `mixed` annotations conflict with existing docs that still state `array|object` (Line 44 `@property $bodyParams`, Line 595 `getBodyParams()` return). ...
true
yiisoft/yii2
20,884
issue_to_patch
Can we add an additional mime-type for RAR? The list of mime-types at https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types and in the framework only includes the `application/x-rar-compressed` type. https://github.com/yiisoft/yii2/blob/22889d314ab4ea20df00e594d4ef7fb09fa55f5a/framework/helpers/mim...
Fix #20497: Add alias for application/x-rar-compressed (#20884)
| Q | A | ------------- | --- | Is bugfix? | ❌ | New feature? | ❌ | Tests added? | ✔️ | Breaks BC? | ❌ | Fixed issues | #20497 ## What does this PR do? Adds `application/x-rar` as an alias for `application/x-rar-compressed` so `FileHelper::getExtensionsByMimeType()` resolves both varian...
7d6cf45aeb1f119cc4e23132190437ce5391cf7f
029a8d30920a8287478561eade0d9ee39c016ab7
diff --git a/build/controllers/MimeTypeController.php b/build/controllers/MimeTypeController.php index d8709cdca6e..2549f67ea23 100644 --- a/build/controllers/MimeTypeController.php +++ b/build/controllers/MimeTypeController.php @@ -47,6 +47,7 @@ class MimeTypeController extends Controller 'application/bmp' =>...
[ "build/controllers/MimeTypeController.php", "framework/CHANGELOG.md", "framework/helpers/mimeAliases.php", "tests/framework/helpers/FileHelperTest.php" ]
[ { "comment": "_🧹 Nitpick_ | _🔵 Trivial_ | _💤 Low value_\n\n**Consider adding test cases with `preferShort=true` for completeness.**\n\nWhile the current test cases with `preferShort=false` are correct, adding test cases with `preferShort=true` would provide more comprehensive coverage. Since `rar` is already...
diff --git a/tests/framework/helpers/FileHelperTest.php b/tests/framework/helpers/FileHelperTest.php index 785e22ae25d..f365cc4d273 100644 --- a/tests/framework/helpers/FileHelperTest.php +++ b/tests/framework/helpers/FileHelperTest.php @@ -1308,6 +1308,18 @@ public static function getExtensionsByMimeTypeProvider(): ar...
true
yiisoft/yii2
20,884
comment_to_fix
Fix #20497: Add alias for application/x-rar-compressed (#20884)
_🧹 Nitpick_ | _🔵 Trivial_ | _💤 Low value_ **Consider adding test cases with `preferShort=true` for completeness.** While the current test cases with `preferShort=false` are correct, adding test cases with `preferShort=true` would provide more comprehensive coverage. Since `rar` is already 3 characters (meeting the...
7d6cf45aeb1f119cc4e23132190437ce5391cf7f
029a8d30920a8287478561eade0d9ee39c016ab7
diff --git a/tests/framework/helpers/FileHelperTest.php b/tests/framework/helpers/FileHelperTest.php index 785e22ae25d..f365cc4d273 100644 --- a/tests/framework/helpers/FileHelperTest.php +++ b/tests/framework/helpers/FileHelperTest.php @@ -1308,6 +1308,18 @@ public static function getExtensionsByMimeTypeProvider(): ar...
[ "tests/framework/helpers/FileHelperTest.php" ]
[ { "comment": "_🧹 Nitpick_ | _🔵 Trivial_ | _💤 Low value_\n\n**Consider adding test cases with `preferShort=true` for completeness.**\n\nWhile the current test cases with `preferShort=false` are correct, adding test cases with `preferShort=true` would provide more comprehensive coverage. Since `rar` is already...
true
yiisoft/yii2
20,883
issue_to_patch
Extend tutorial-standalone-actions.md with URL generation guidance.
| Q | A | ------------- | --- | Is bugfix? | ✔️ | New feature? | ❌ | Breaks BC? | ❌
fe2a0a269bab6e3f63687e1a8dda2575e61fecaa
c3a65b3c75a3c5fa1f6c7a662508aa1e3d43432e
diff --git a/docs/guide/tutorial-standalone-actions.md b/docs/guide/tutorial-standalone-actions.md index 1d42d86a2be..d4185389759 100644 --- a/docs/guide/tutorial-standalone-actions.md +++ b/docs/guide/tutorial-standalone-actions.md @@ -200,12 +200,12 @@ For projects that prefer a separate root for standalone actions (...
[ "docs/guide/tutorial-standalone-actions.md" ]
[ { "comment": "_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_\n\n**Fix typo: remove trailing 's'.**\n\nThe line ends with \"switch.s\" which should be \"switch.\" (remove the trailing 's').\n\n\n<details>\n<summary>📝 Proposed fix</summary>\n\n```diff\n-switch.s\n+switch.\n```\n</details>\n\n<!-- suggestion_s...
true
yiisoft/yii2
20,883
comment_to_fix
Extend tutorial-standalone-actions.md with URL generation guidance.
_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_ **Fix typo: remove trailing 's'.** The line ends with "switch.s" which should be "switch." (remove the trailing 's'). <details> <summary>📝 Proposed fix</summary> ```diff -switch.s +switch. ``` </details> <!-- suggestion_start --> <details> <summary>📝 Committabl...
fe2a0a269bab6e3f63687e1a8dda2575e61fecaa
c3a65b3c75a3c5fa1f6c7a662508aa1e3d43432e
diff --git a/docs/guide/tutorial-standalone-actions.md b/docs/guide/tutorial-standalone-actions.md index 1d42d86a2be..d4185389759 100644 --- a/docs/guide/tutorial-standalone-actions.md +++ b/docs/guide/tutorial-standalone-actions.md @@ -200,12 +200,12 @@ For projects that prefer a separate root for standalone actions (...
[ "docs/guide/tutorial-standalone-actions.md" ]
[ { "comment": "_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_\n\n**Fix typo: remove trailing 's'.**\n\nThe line ends with \"switch.s\" which should be \"switch.\" (remove the trailing 's').\n\n\n<details>\n<summary>📝 Proposed fix</summary>\n\n```diff\n-switch.s\n+switch.\n```\n</details>\n\n<!-- suggestion_s...
true
yiisoft/yii2
20,881
issue_to_patch
Sync to master brach.
| Q | A | ------------- | --- | Is bugfix? | ✔️ | New feature? | ❌ | Breaks BC? | ❌
2ab8eaf777bff2ba6c942f4d1b77a5929d4246ee
645d7d54f0a1570a0e88e72844141e4a684c6558
diff --git a/composer.lock b/composer.lock index f9f75af4753..595956640b4 100644 --- a/composer.lock +++ b/composer.lock @@ -389,16 +389,16 @@ }, { "name": "composer/composer", - "version": "2.9.7", + "version": "2.9.8", "source": { "typ...
[ "composer.lock", "docs/guide/test-fixtures.md", "framework/CHANGELOG.md", "framework/db/BaseActiveRecord.php", "framework/db/Query.php", "phpstan-baseline.neon", "phpstan.dist.neon", "tests/base/db/BaseActiveQuery.php", "tests/base/db/BaseActiveRecord.php", "tests/base/db/BaseCommand.php", "test...
[ { "comment": "_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_\n\n<details>\n<summary>🧩 Analysis chain</summary>\n\n🏁 Script executed:\n\n```shell\n#!/bin/bash\n# Verify where isMariaDb() is called and what static type is used nearby.\nrg -n -C3 '\\bisMariaDb\\s*\\(' tests/framework/db/mysql/QueryBuilderTest...
diff --git a/tests/base/db/BaseActiveQuery.php b/tests/base/db/BaseActiveQuery.php index 70ffda75a38..32c29f5b897 100644 --- a/tests/base/db/BaseActiveQuery.php +++ b/tests/base/db/BaseActiveQuery.php @@ -296,9 +296,7 @@ public function testGetTableNamesWontFillFrom(): void */ public function testDeeplyNeste...
true
yiisoft/yii2
20,881
comment_to_fix
Sync to master brach.
_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_ <details> <summary>🧩 Analysis chain</summary> 🏁 Script executed: ```shell #!/bin/bash # Verify where isMariaDb() is called and what static type is used nearby. rg -n -C3 '\bisMariaDb\s*\(' tests/framework/db/mysql/QueryBuilderTest.php rg -n -C3 'class QueryBuilder|...
2ab8eaf777bff2ba6c942f4d1b77a5929d4246ee
645d7d54f0a1570a0e88e72844141e4a684c6558
diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 3f78050b8ad..a7a2f9b5440 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -450,774 +450,12 @@ parameters: count: 1 path: framework/test/DbFixture.php - - - message: '#^Access to an undefined property yiiunit\\data\\ar\\Catego...
[ "phpstan-baseline.neon" ]
[ { "comment": "_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_\n\n<details>\n<summary>🧩 Analysis chain</summary>\n\n🏁 Script executed:\n\n```shell\n#!/bin/bash\n# Verify where isMariaDb() is called and what static type is used nearby.\nrg -n -C3 '\\bisMariaDb\\s*\\(' tests/framework/db/mysql/QueryBuilderTest...
true
yiisoft/yii2
20,881
comment_to_fix
Sync to master brach.
_⚠️ Potential issue_ | _🟠 Major_ | _⚡ Quick win_ **Incorrect type annotation for `$custom` property.** The `getCustom()` method returns `Order::find()`, which is an `ActiveQuery` object (or `ActiveQueryInterface`), not an `Order` instance. The PHPDoc should reflect the query object type, not the model type. <det...
2ab8eaf777bff2ba6c942f4d1b77a5929d4246ee
645d7d54f0a1570a0e88e72844141e4a684c6558
diff --git a/tests/data/ar/OrderItem.php b/tests/data/ar/OrderItem.php index 65747e34444..46446b0c1fc 100644 --- a/tests/data/ar/OrderItem.php +++ b/tests/data/ar/OrderItem.php @@ -17,6 +17,12 @@ * @property int $item_id * @property int $quantity * @property string $subtotal + * + * @property Order $order + * @pr...
[ "tests/data/ar/OrderItem.php" ]
[ { "comment": "_⚠️ Potential issue_ | _🟠 Major_ | _⚡ Quick win_\n\n**Incorrect type annotation for `$custom` property.**\n\nThe `getCustom()` method returns `Order::find()`, which is an `ActiveQuery` object (or `ActiveQueryInterface`), not an `Order` instance. The PHPDoc should reflect the query object type, no...
true
yiisoft/yii2
20,881
comment_to_fix
Sync to master brach.
_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_ **Add missing `is_deleted` property to PHPDoc.** The `is_deleted` column is added to the `bool_user` table at line 148 and is used in test assertions at lines 157-159, but it's not documented in the PHPDoc block. <details> <summary>📝 Add the missing property anno...
2ab8eaf777bff2ba6c942f4d1b77a5929d4246ee
645d7d54f0a1570a0e88e72844141e4a684c6558
diff --git a/tests/framework/db/pgsql/ActiveRecordTest.php b/tests/framework/db/pgsql/ActiveRecordTest.php index 1a0366ff6a6..549eaab62d1 100644 --- a/tests/framework/db/pgsql/ActiveRecordTest.php +++ b/tests/framework/db/pgsql/ActiveRecordTest.php @@ -33,9 +33,6 @@ class ActiveRecordTest extends BaseActiveRecord ...
[ "tests/framework/db/pgsql/ActiveRecordTest.php" ]
[ { "comment": "_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_\n\n**Add missing `is_deleted` property to PHPDoc.**\n\nThe `is_deleted` column is added to the `bool_user` table at line 148 and is used in test assertions at lines 157-159, but it's not documented in the PHPDoc block.\n\n\n\n\n<details>\n<summary>...
true
yiisoft/yii2
20,880
issue_to_patch
Namespace inconsistencies in fixtures (From yiisoft/yii2-app-basic#155) According to [Yii2 Testing Documentation](http://www.yiiframework.com/doc-2.0/guide-test-fixtures.html#using-fixtures), test fixtures are supposed to be located under the following namespace: ```php app\tests\fixtures ``` But then the s...
Clarify fixture namespace defaults in the testing guide.
| Q | A | ------------- | --- | Is bugfix? | ✔️ | New feature? | ❌ | Breaks BC? | ❌ | Fixed issues | #15769
203323d048432ff491db1a8078719e90565d77f8
2fd8058825cb2239b727b34a7d206b78a3bc33af
diff --git a/docs/guide/test-fixtures.md b/docs/guide/test-fixtures.md index 414a3db9e3f..ac655725930 100644 --- a/docs/guide/test-fixtures.md +++ b/docs/guide/test-fixtures.md @@ -36,6 +36,10 @@ class UserFixture extends ActiveFixture } ``` +These examples use the `app\tests\fixtures` namespace because the fixture...
[ "docs/guide/test-fixtures.md" ]
[ { "comment": "_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_\n\n**Fix markdownlint MD028 in blockquote formatting.**\n\nLine 42 introduces a blank-line pattern inside the blockquote sequence, triggering `MD028 (no-blanks-blockquote)`. Keep the blockquote contiguous or split into separate non-blank blockquote...
true
yiisoft/yii2
20,880
comment_to_fix
Clarify fixture namespace defaults in the testing guide.
_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_ **Fix markdownlint MD028 in blockquote formatting.** Line 42 introduces a blank-line pattern inside the blockquote sequence, triggering `MD028 (no-blanks-blockquote)`. Keep the blockquote contiguous or split into separate non-blank blockquote blocks. <details> <summ...
203323d048432ff491db1a8078719e90565d77f8
2fd8058825cb2239b727b34a7d206b78a3bc33af
diff --git a/docs/guide/test-fixtures.md b/docs/guide/test-fixtures.md index 414a3db9e3f..ac655725930 100644 --- a/docs/guide/test-fixtures.md +++ b/docs/guide/test-fixtures.md @@ -36,6 +36,10 @@ class UserFixture extends ActiveFixture } ``` +These examples use the `app\tests\fixtures` namespace because the fixture...
[ "docs/guide/test-fixtures.md" ]
[ { "comment": "_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_\n\n**Fix markdownlint MD028 in blockquote formatting.**\n\nLine 42 introduces a blank-line pattern inside the blockquote sequence, triggering `MD028 (no-blanks-blockquote)`. Keep the blockquote contiguous or split into separate non-blank blockquote...
true
yiisoft/yii2
20,878
issue_to_patch
Analyze the `yiiunit\framework\db` namespace using PHPStan
| Q | A | ------------- | --- | Is bugfix? | ✔️ | New feature? | ✔️ | Breaks BC? | ❌ | Fixed issues | <!-- comma-separated list of tickets # fixed by the PR, if any -->
ff66e6a8548034043c416b71cbd572ce811e8f23
a75e4ce0bade2864f790126a6aa2b83099167c9e
diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index a1ae1155dc9..d220536ddb5 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -4,11 +4,13 @@ Yii Framework 2 Change Log 2.0.56 under development ------------------------ -- Bug #20783: Fix PHPDoc annotations for the `yii\log\Target::$...
[ "framework/CHANGELOG.md", "framework/db/BaseActiveRecord.php", "framework/db/Query.php", "phpstan-baseline-7x.neon", "phpstan.dist.neon", "tests/data/ar/Category.php", "tests/data/ar/Customer.php", "tests/data/ar/CustomerQuery.php", "tests/data/ar/CustomerWithAlias.php", "tests/data/ar/DefaultPk.p...
[ { "comment": "_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_\n\n**Fix PHPDoc type mismatch for `orderItems2`.**\n\nLine 37 documents `@property-read Item[] $orderItems2`, but `getOrderItems2()` (Line 104-108) returns `hasMany(OrderItem::class, ...)`. This gives wrong type info to PHPStan and IDEs.\n\n<detail...
diff --git a/tests/data/ar/Category.php b/tests/data/ar/Category.php index 7472cfe7068..158862635cb 100644 --- a/tests/data/ar/Category.php +++ b/tests/data/ar/Category.php @@ -13,6 +13,11 @@ * * @property int $id * @property string $name + * + * @property-read Item[] $items + * @property-read Item[] $limitedItem...
true
yiisoft/yii2
20,878
comment_to_fix
Analyze the `yiiunit\framework\db` namespace using PHPStan
_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_ **Fix PHPDoc type mismatch for `orderItems2`.** Line 37 documents `@property-read Item[] $orderItems2`, but `getOrderItems2()` (Line 104-108) returns `hasMany(OrderItem::class, ...)`. This gives wrong type info to PHPStan and IDEs. <details> <summary>Suggested diff</...
ff66e6a8548034043c416b71cbd572ce811e8f23
a75e4ce0bade2864f790126a6aa2b83099167c9e
diff --git a/tests/data/ar/Customer.php b/tests/data/ar/Customer.php index 92321e8aa77..c3d78850105 100644 --- a/tests/data/ar/Customer.php +++ b/tests/data/ar/Customer.php @@ -21,8 +21,21 @@ * @property string $email * @property string $address * @property int $status + * @property 1|0|'1'|'0'|bool $bool_status ...
[ "tests/data/ar/Customer.php" ]
[ { "comment": "_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_\n\n**Fix PHPDoc type mismatch for `orderItems2`.**\n\nLine 37 documents `@property-read Item[] $orderItems2`, but `getOrderItems2()` (Line 104-108) returns `hasMany(OrderItem::class, ...)`. This gives wrong type info to PHPStan and IDEs.\n\n<detail...
true
yiisoft/yii2
20,878
comment_to_fix
Analyze the `yiiunit\framework\db` namespace using PHPStan
_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_ <details> <summary>🧩 Analysis chain</summary> 🏁 Script executed: ```shell #!/bin/bash # Search for queryOne signature and implementation to confirm parameter behavior rg -n -A 10 'function queryOne' --type=php framework/db/Command.php ``` Repository: yiisoft/yii2 ...
ff66e6a8548034043c416b71cbd572ce811e8f23
a75e4ce0bade2864f790126a6aa2b83099167c9e
diff --git a/tests/framework/db/CommandTest.php b/tests/framework/db/CommandTest.php index 38b5ac5d5b8..ada47dd1067 100644 --- a/tests/framework/db/CommandTest.php +++ b/tests/framework/db/CommandTest.php @@ -17,11 +17,13 @@ use ArrayObject; use yii\caching\ArrayCache; use yii\db\Connection; +use yii\db\ConstraintFi...
[ "tests/framework/db/CommandTest.php" ]
[ { "comment": "_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_\n\n<details>\n<summary>🧩 Analysis chain</summary>\n\n🏁 Script executed:\n\n```shell\n#!/bin/bash\n# Search for queryOne signature and implementation to confirm parameter behavior\nrg -n -A 10 'function queryOne' --type=php framework/db/Command.ph...
true
yiisoft/yii2
20,878
comment_to_fix
Analyze the `yiiunit\framework\db` namespace using PHPStan
_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_ **`default_true/default_false` PHPDoc is too narrow for new records.** Line 310 and Line 311 should allow `null` because this file explicitly asserts null values before `loadDefaultValues()`. <details> <summary>Proposed fix</summary> ```diff - * `@property` bool $de...
ff66e6a8548034043c416b71cbd572ce811e8f23
a75e4ce0bade2864f790126a6aa2b83099167c9e
diff --git a/tests/framework/db/pgsql/ActiveRecordTest.php b/tests/framework/db/pgsql/ActiveRecordTest.php index 545b6808165..6d149c9995b 100644 --- a/tests/framework/db/pgsql/ActiveRecordTest.php +++ b/tests/framework/db/pgsql/ActiveRecordTest.php @@ -29,9 +29,6 @@ class ActiveRecordTest extends \yiiunit\framework\db\...
[ "tests/framework/db/pgsql/ActiveRecordTest.php" ]
[ { "comment": "_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_\n\n**`default_true/default_false` PHPDoc is too narrow for new records.**\n\nLine 310 and Line 311 should allow `null` because this file explicitly asserts null values before `loadDefaultValues()`.\n\n<details>\n<summary>Proposed fix</summary>\n\n`...
true
yiisoft/yii2
20,878
comment_to_fix
Analyze the `yiiunit\framework\db` namespace using PHPStan
_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_ **`$id` should be documented as scalar, not array.** Line 354 documents `id` as `array`, which misleads static analysis for a primary-key field. <details> <summary>Proposed fix</summary> ```diff - * `@property` array $id + * `@property` int $id ``` </details> <!-- ...
ff66e6a8548034043c416b71cbd572ce811e8f23
a75e4ce0bade2864f790126a6aa2b83099167c9e
diff --git a/tests/framework/db/pgsql/ActiveRecordTest.php b/tests/framework/db/pgsql/ActiveRecordTest.php index 545b6808165..6d149c9995b 100644 --- a/tests/framework/db/pgsql/ActiveRecordTest.php +++ b/tests/framework/db/pgsql/ActiveRecordTest.php @@ -29,9 +29,6 @@ class ActiveRecordTest extends \yiiunit\framework\db\...
[ "tests/framework/db/pgsql/ActiveRecordTest.php" ]
[ { "comment": "_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_\n\n**`$id` should be documented as scalar, not array.**\n\nLine 354 documents `id` as `array`, which misleads static analysis for a primary-key field.\n\n<details>\n<summary>Proposed fix</summary>\n\n```diff\n- * `@property` array $id\n+ * `@proper...
true
yiisoft/yii2
20,878
comment_to_fix
Analyze the `yiiunit\framework\db` namespace using PHPStan
_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_ **Incorrect PHPDoc type for primary key `id`.** Line 41 should use a scalar PK type instead of `array`. <details> <summary>Proposed fix</summary> ```diff - * `@property` array $id + * `@property` int $id ``` </details> <!-- suggestion_start --> <details> <summary>...
ff66e6a8548034043c416b71cbd572ce811e8f23
a75e4ce0bade2864f790126a6aa2b83099167c9e
diff --git a/tests/framework/db/pgsql/BaseActiveRecordTest.php b/tests/framework/db/pgsql/BaseActiveRecordTest.php index c0af29e83f1..dad892a4749 100644 --- a/tests/framework/db/pgsql/BaseActiveRecordTest.php +++ b/tests/framework/db/pgsql/BaseActiveRecordTest.php @@ -38,8 +38,8 @@ public function testJsonDirtyAttribut...
[ "tests/framework/db/pgsql/BaseActiveRecordTest.php" ]
[ { "comment": "_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_\n\n**Incorrect PHPDoc type for primary key `id`.**\n\nLine 41 should use a scalar PK type instead of `array`.\n\n<details>\n<summary>Proposed fix</summary>\n\n```diff\n- * `@property` array $id\n+ * `@property` int $id\n```\n</details>\n\n<!-- sugg...
true
yiisoft/yii2
20,879
issue_to_patch
Sync to master brach.
| Q | A | ------------- | --- | Is bugfix? | ✔️ | New feature? | ❌ | Breaks BC? | ❌
e025cd97731311208922912d674c7e2797ce652d
64156437d608fc6897f285e60471aff515434005
diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index d6d48dff3fd..efe898b3051 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -80,6 +80,7 @@ Yii Framework 2 Change Log - Bug #20785: Fix `@return` annotation for `yii\base\Model::getErrors()` (mspirkov) - Bug #20785: Fix `@var` annotat...
[ "framework/CHANGELOG.md" ]
[]
true
yiisoft/yii2
20,877
issue_to_patch
Fix #7616: Add `yii\web\ErrorHandler::EVENT_AFTER_RENDER` and `yii\web\ErrorHandlerRenderEvent` to post-process rendered HTML error output
| Q | A | ------------- | --- | Is bugfix? | ❌ | New feature? | ✔️ | Breaks BC? | ❌ | Fixed issues | #7616
95d8df577f6d0e49b2b3539b67cbbf8fc8de0514
c360844a44762d80f3c92151e0b136a84a1b6987
diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 0d83c0d7557..a1ae1155dc9 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -9,6 +9,7 @@ Yii Framework 2 Change Log - Bug #20785: Fix `@return` annotation for `yii\base\Model::getErrors()` (mspirkov) - Bug #20785: Fix `@var` annotatio...
[ "framework/CHANGELOG.md", "framework/web/ErrorHandler.php", "framework/web/ErrorHandlerRenderEvent.php", "tests/framework/web/ErrorHandlerTest.php" ]
[]
diff --git a/tests/framework/web/ErrorHandlerTest.php b/tests/framework/web/ErrorHandlerTest.php index 06022646645..1e98bb3e9aa 100644 --- a/tests/framework/web/ErrorHandlerTest.php +++ b/tests/framework/web/ErrorHandlerTest.php @@ -13,6 +13,7 @@ use yii\base\ErrorException; use yii\web\Application; use Yii; +use yi...
true
yiisoft/yii2
20,876
issue_to_patch
Sync to master brach.
| Q | A | ------------- | --- | Is bugfix? | ✔️ | New feature? | ❌ | Breaks BC? | ❌
532d02f22f4df59ec9cec3a3c8ae27b4585841fa
fd73f904838fd358b2920a4f171d6997545858d5
diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs index ce85e65af96..881b51a65e3 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -24,3 +24,5 @@ da20adc82aef3eb5ae0bad3889fe6695e6424f06 7a7d2a9c06c099de8064729ca3fc95fb24241b75 # Fixed error PHPCS latest version in `PHP 8.5` f66d5c886471...
[ ".git-blame-ignore-revs", "build/controllers/MimeTypeController.php", "build/controllers/PhpDocController.php", "composer.lock", "framework/CHANGELOG.md", "framework/base/Model.php", "framework/base/View.php", "framework/db/Connection.php", "framework/log/Target.php", "framework/validators/Compare...
[ { "comment": "_⚠️ Potential issue_ | _🟠 Major_ | _⚡ Quick win_\n\n**Harden savepoint test cleanup to avoid state leakage on failure.**\n\nThis test only deletes inserted data on the happy path. If an assertion/DB call fails earlier, rows can leak and destabilize later tests.\n\n \n<details>\n<summary>Proposed ...
diff --git a/tests/base/log/BaseDbTarget.php b/tests/base/log/BaseDbTarget.php index 7594e83d671..0292973f28f 100644 --- a/tests/base/log/BaseDbTarget.php +++ b/tests/base/log/BaseDbTarget.php @@ -9,8 +9,6 @@ namespace yiiunit\base\log; use yii\console\Application; -use yii\console\Controller; -use yii\base\Invalid...
true
yiisoft/yii2
20,876
comment_to_fix
Sync to master brach.
_⚠️ Potential issue_ | _🟠 Major_ | _⚡ Quick win_ **Harden savepoint test cleanup to avoid state leakage on failure.** This test only deletes inserted data on the happy path. If an assertion/DB call fails earlier, rows can leak and destabilize later tests. <details> <summary>Proposed fix</summary> ```diff public...
532d02f22f4df59ec9cec3a3c8ae27b4585841fa
fd73f904838fd358b2920a4f171d6997545858d5
diff --git a/tests/framework/db/mssql/SchemaTest.php b/tests/framework/db/mssql/SchemaTest.php index b847556b70b..71f1b10c545 100644 --- a/tests/framework/db/mssql/SchemaTest.php +++ b/tests/framework/db/mssql/SchemaTest.php @@ -10,8 +10,10 @@ use yii\base\NotSupportedException; use yii\db\Connection; +use yii\db\C...
[ "tests/framework/db/mssql/SchemaTest.php" ]
[ { "comment": "_⚠️ Potential issue_ | _🟠 Major_ | _⚡ Quick win_\n\n**Harden savepoint test cleanup to avoid state leakage on failure.**\n\nThis test only deletes inserted data on the happy path. If an assertion/DB call fails earlier, rows can leak and destabilize later tests.\n\n \n<details>\n<summary>Proposed ...
true
yiisoft/yii2
20,876
comment_to_fix
Sync to master brach.
_⚠️ Potential issue_ | _🟠 Major_ | _⚡ Quick win_ **Use isolated PK values and guaranteed cleanup in composite PK insert test.** Fixed PK values (`id=100`, `department_id=1`) can collide with pre-existing/leaked data, causing non-deterministic failures. <details> <summary>Proposed fix</summary> ```diff public fu...
532d02f22f4df59ec9cec3a3c8ae27b4585841fa
fd73f904838fd358b2920a4f171d6997545858d5
diff --git a/tests/framework/db/mssql/SchemaTest.php b/tests/framework/db/mssql/SchemaTest.php index b847556b70b..71f1b10c545 100644 --- a/tests/framework/db/mssql/SchemaTest.php +++ b/tests/framework/db/mssql/SchemaTest.php @@ -10,8 +10,10 @@ use yii\base\NotSupportedException; use yii\db\Connection; +use yii\db\C...
[ "tests/framework/db/mssql/SchemaTest.php" ]
[ { "comment": "_⚠️ Potential issue_ | _🟠 Major_ | _⚡ Quick win_\n\n**Use isolated PK values and guaranteed cleanup in composite PK insert test.**\n\nFixed PK values (`id=100`, `department_id=1`) can collide with pre-existing/leaked data, causing non-deterministic failures.\n\n \n<details>\n<summary>Proposed fix...
true
yiisoft/yii2
20,876
comment_to_fix
Sync to master brach.
_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_ **Type mismatch between docblock and method signature.** The docblock now specifies `false` for `$pagination` and `$sort` parameters, but the method signature on lines 83-84 uses `bool`. This inconsistency can confuse static analysis tools and developers. Since the t...
532d02f22f4df59ec9cec3a3c8ae27b4585841fa
fd73f904838fd358b2920a4f171d6997545858d5
diff --git a/tests/framework/rest/IndexActionTest.php b/tests/framework/rest/IndexActionTest.php index 11919269e50..077fd71a147 100644 --- a/tests/framework/rest/IndexActionTest.php +++ b/tests/framework/rest/IndexActionTest.php @@ -72,9 +72,12 @@ public function testPrepareSearchQueryAttribute(): void /** *...
[ "tests/framework/rest/IndexActionTest.php" ]
[ { "comment": "_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_\n\n**Type mismatch between docblock and method signature.**\n\nThe docblock now specifies `false` for `$pagination` and `$sort` parameters, but the method signature on lines 83-84 uses `bool`. This inconsistency can confuse static analysis tools an...
true
yiisoft/yii2
20,876
comment_to_fix
Sync to master brach.
_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_ **Rename short variable to satisfy PHPMD rule.** Line 116 uses `$ds`, which violates the configured minimum variable-name length and may fail static checks. Rename it to a descriptive name (for example `$dirSeparatorPattern`) and update Line 118 accordingly. <details...
532d02f22f4df59ec9cec3a3c8ae27b4585841fa
fd73f904838fd358b2920a4f171d6997545858d5
diff --git a/tests/framework/web/ErrorActionTest.php b/tests/framework/web/ErrorActionTest.php index f36761369f2..6a492a18b8f 100644 --- a/tests/framework/web/ErrorActionTest.php +++ b/tests/framework/web/ErrorActionTest.php @@ -113,13 +113,12 @@ public function testDefaultView(): void public function testLayout...
[ "tests/framework/web/ErrorActionTest.php" ]
[ { "comment": "_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_\n\n**Rename short variable to satisfy PHPMD rule.**\n\nLine 116 uses `$ds`, which violates the configured minimum variable-name length and may fail static checks. Rename it to a descriptive name (for example `$dirSeparatorPattern`) and update Line ...
true
yiisoft/yii2
20,876
comment_to_fix
Sync to master brach.
_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_ **Fix conflicting return PHPDoc for a `never` method.** Line 11 declares `@return self`, but `build()` is typed as `never` and always throws. This docblock is inconsistent and should be removed or changed to `@return never`. <details> <summary>Suggested patch</su...
532d02f22f4df59ec9cec3a3c8ae27b4585841fa
fd73f904838fd358b2920a4f171d6997545858d5
diff --git a/tests/framework/web/stubs/ModelBindingStub.php b/tests/framework/web/stubs/ModelBindingStub.php index 39cd37dbdc0..395999f08fd 100644 --- a/tests/framework/web/stubs/ModelBindingStub.php +++ b/tests/framework/web/stubs/ModelBindingStub.php @@ -8,8 +8,8 @@ class ModelBindingStub extends ActiveRecord { ...
[ "tests/framework/web/stubs/ModelBindingStub.php" ]
[ { "comment": "_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_\n\n**Fix conflicting return PHPDoc for a `never` method.**\n\nLine 11 declares `@return self`, but `build()` is typed as `never` and always throws. This docblock is inconsistent and should be removed or changed to `@return never`.\n\n \n\n<details...
true
yiisoft/yii2
20,875
issue_to_patch
Analyze the `yiiunit\framework\validators` namespace using PHPStan
| Q | A | ------------- | --- | Is bugfix? | ✔️ | New feature? | ✔️ | Breaks BC? | ❌ | Fixed issues | <!-- comma-separated list of tickets # fixed by the PR, if any -->
0f5774ae62b22c9724a12e520cea8adb7ac83785
280fd066b1c55490d88bf3e3a72a8ee143dfa4f9
diff --git a/build/controllers/PhpDocController.php b/build/controllers/PhpDocController.php index b0da27b75ad..bc4f3ea5f09 100644 --- a/build/controllers/PhpDocController.php +++ b/build/controllers/PhpDocController.php @@ -713,13 +713,14 @@ protected function updateDocComment($doc, $properties, $className) ...
[ "build/controllers/PhpDocController.php", "framework/CHANGELOG.md", "framework/base/Model.php", "framework/validators/CompareValidator.php", "framework/validators/Validator.php", "phpstan.dist.neon", "tests/data/validators/models/FakedValidationModel.php", "tests/data/validators/models/ValidatorTestMa...
[ { "comment": "_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_\n\n<details>\n<summary>🧩 Analysis chain</summary>\n\n🏁 Script executed:\n\n```shell\n#!/bin/bash\n# Inspect how `total` is declared in the Order/order-table migrations & SQL fixtures.\nfd -t f -e php -e sql . tests/data | xargs rg -n -C2 -i \"'to...
diff --git a/tests/data/validators/models/FakedValidationModel.php b/tests/data/validators/models/FakedValidationModel.php index 0f2cf644cb3..e6f5a8a597b 100644 --- a/tests/data/validators/models/FakedValidationModel.php +++ b/tests/data/validators/models/FakedValidationModel.php @@ -10,6 +10,33 @@ use yii\base\Mode...
true
yiisoft/yii2
20,875
comment_to_fix
Analyze the `yiiunit\framework\validators` namespace using PHPStan
_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_ **Document `attr_image` and `attr_images` too for PHPStan completeness.** The docblock omits two dynamic `attr*` fields that are actively used in `rules()` (`attr_image`, `attr_images`). Adding them keeps the dynamic-property map consistent and avoids residual static-...
0f5774ae62b22c9724a12e520cea8adb7ac83785
280fd066b1c55490d88bf3e3a72a8ee143dfa4f9
diff --git a/tests/data/validators/models/FakedValidationModel.php b/tests/data/validators/models/FakedValidationModel.php index 0f2cf644cb3..e6f5a8a597b 100644 --- a/tests/data/validators/models/FakedValidationModel.php +++ b/tests/data/validators/models/FakedValidationModel.php @@ -10,6 +10,33 @@ use yii\base\Mode...
[ "tests/data/validators/models/FakedValidationModel.php" ]
[ { "comment": "_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_\n\n**Document `attr_image` and `attr_images` too for PHPStan completeness.**\n\nThe docblock omits two dynamic `attr*` fields that are actively used in `rules()` (`attr_image`, `attr_images`). Adding them keeps the dynamic-property map consistent a...
true
yiisoft/yii2
20,875
comment_to_fix
Analyze the `yiiunit\framework\validators` namespace using PHPStan
_⚠️ Potential issue_ | _🔴 Critical_ | _⚡ Quick win_ **Critical: `assertObjectHasProperty` is incompatible with `DynamicModel`.** All the added `assertObjectHasProperty` assertions are failing because `DynamicModel` stores attributes in an internal array and exposes them via magic methods (`__get`, `__set`), not as a...
0f5774ae62b22c9724a12e520cea8adb7ac83785
280fd066b1c55490d88bf3e3a72a8ee143dfa4f9
diff --git a/tests/framework/validators/SafeValidatorTest.php b/tests/framework/validators/SafeValidatorTest.php index 079cda410a7..c4eafa9243c 100644 --- a/tests/framework/validators/SafeValidatorTest.php +++ b/tests/framework/validators/SafeValidatorTest.php @@ -30,6 +30,7 @@ public function testValidateAttributeDoes...
[ "tests/framework/validators/SafeValidatorTest.php" ]
[ { "comment": "_⚠️ Potential issue_ | _🔴 Critical_ | _⚡ Quick win_\n\n**Critical: `assertObjectHasProperty` is incompatible with `DynamicModel`.**\n\nAll the added `assertObjectHasProperty` assertions are failing because `DynamicModel` stores attributes in an internal array and exposes them via magic methods (`...
true
yiisoft/yii2
20,875
comment_to_fix
Analyze the `yiiunit\framework\validators` namespace using PHPStan
_⚠️ Potential issue_ | _🔴 Critical_ | _⚡ Quick win_ **Critical: `assertObjectHasProperty` is incompatible with `DynamicModel`.** All the added `assertObjectHasProperty` assertions are failing because `DynamicModel` stores attributes in an internal array and exposes them via magic methods (`__get`, `__set`), not as a...
0f5774ae62b22c9724a12e520cea8adb7ac83785
280fd066b1c55490d88bf3e3a72a8ee143dfa4f9
diff --git a/tests/framework/validators/TrimValidatorTest.php b/tests/framework/validators/TrimValidatorTest.php index ed054276bdf..5523679200d 100644 --- a/tests/framework/validators/TrimValidatorTest.php +++ b/tests/framework/validators/TrimValidatorTest.php @@ -32,6 +32,7 @@ public function testTrimWhitespace(): voi...
[ "tests/framework/validators/TrimValidatorTest.php" ]
[ { "comment": "_⚠️ Potential issue_ | _🔴 Critical_ | _⚡ Quick win_\n\n**Critical: `assertObjectHasProperty` is incompatible with `DynamicModel`.**\n\nAll the added `assertObjectHasProperty` assertions are failing because `DynamicModel` stores attributes in an internal array and exposes them via magic methods (`...
true
yiisoft/yii2
20,874
issue_to_patch
Analyze more tests using PHPStan
| Q | A | ------------- | --- | Is bugfix? | ❌ | New feature? | ❌ | Breaks BC? | ❌ | Fixed issues | <!-- comma-separated list of tickets # fixed by the PR, if any -->
fad5fd58eb61e4bf937db4646bf2389f7f32f1dd
98c8351236517d49aba592befd3e20c520c87d8f
diff --git a/phpstan.dist.neon b/phpstan.dist.neon index 51e87b57398..c369f29ed19 100644 --- a/phpstan.dist.neon +++ b/phpstan.dist.neon @@ -17,9 +17,6 @@ parameters: - tests/framework/*/mocks/* # TODO: Analyze these directories - tests/framework/db - - tests/framework/...
[ "phpstan.dist.neon", "tests/framework/grid/GridViewTest.php", "tests/framework/helpers/ArrayHelperTest.php", "tests/framework/helpers/ConsoleTest.php", "tests/framework/helpers/HtmlTest.php", "tests/framework/helpers/JsonTest.php", "tests/framework/helpers/UrlTest.php", "tests/framework/helpers/stubs/...
[ { "comment": "_🧹 Nitpick_ | _🔵 Trivial_ | _⚡ Quick win_\n\n**Add explicit return type for PHPStan compliance.**\n\nThe `customError()` method should declare its return type as `:string` to improve static analysis and code clarity, aligning with the PR's goal of PHPStan compliance.\n\n\n\n\n<details>\n<summary...
diff --git a/tests/framework/grid/GridViewTest.php b/tests/framework/grid/GridViewTest.php index 3229e7ca57d..aa626cfa2b3 100644 --- a/tests/framework/grid/GridViewTest.php +++ b/tests/framework/grid/GridViewTest.php @@ -190,15 +190,18 @@ public function testHeaderLabels(): void ], ]); + ...
true
yiisoft/yii2
20,874
comment_to_fix
Analyze more tests using PHPStan
_🧹 Nitpick_ | _🔵 Trivial_ | _⚡ Quick win_ **Add explicit return type for PHPStan compliance.** The `customError()` method should declare its return type as `:string` to improve static analysis and code clarity, aligning with the PR's goal of PHPStan compliance. <details> <summary>✨ Proposed fix</summary> ```di...
fad5fd58eb61e4bf937db4646bf2389f7f32f1dd
98c8351236517d49aba592befd3e20c520c87d8f
diff --git a/tests/framework/helpers/stubs/HtmlTestModel.php b/tests/framework/helpers/stubs/HtmlTestModel.php new file mode 100644 index 00000000000..078e10da545 --- /dev/null +++ b/tests/framework/helpers/stubs/HtmlTestModel.php @@ -0,0 +1,47 @@ +<?php + +/** + * @link https://www.yiiframework.com/ + * @copyright Cop...
[ "tests/framework/helpers/stubs/HtmlTestModel.php" ]
[ { "comment": "_🧹 Nitpick_ | _🔵 Trivial_ | _⚡ Quick win_\n\n**Add explicit return type for PHPStan compliance.**\n\nThe `customError()` method should declare its return type as `:string` to improve static analysis and code clarity, aligning with the PR's goal of PHPStan compliance.\n\n\n\n\n<details>\n<summary...
true
yiisoft/yii2
20,873
issue_to_patch
Analyze the `yiiunit\framework\log` namespace using PHPStan
| Q | A | ------------- | --- | Is bugfix? | ✔️ | New feature? | ❌ | Breaks BC? | ❌ | Fixed issues | <!-- comma-separated list of tickets # fixed by the PR, if any -->
f52efd863a5b91939844280d8e9385d20fe3271f
3810dbf11837fa8405cac8eba30a6fcb1abf8ec3
diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 27b0954258b..2296dfc0938 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -4,7 +4,7 @@ Yii Framework 2 Change Log 2.0.56 under development ------------------------ -- no changes in this release. +- Bug #20783: Fix PHPDoc annotatio...
[ "framework/CHANGELOG.md", "framework/log/Target.php", "phpstan.dist.neon", "tests/framework/log/DbTargetTest.php", "tests/framework/log/DispatcherTest.php", "tests/framework/log/EmailTargetTest.php", "tests/framework/log/LoggerTest.php", "tests/framework/log/SyslogTargetTest.php", "tests/framework/l...
[ { "comment": "_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_\n\n**Add the missing list marker for the new changelog item.**\n\nLine 7 should use the same bullet-list format as other entries (`- ...`) to keep changelog formatting consistent.\n\n \n\n<details>\n<summary>Suggested fix</summary>\n\n```diff\n-Bug...
diff --git a/tests/framework/log/DbTargetTest.php b/tests/framework/log/DbTargetTest.php index fe7e5fa7d5f..b5026d13e9e 100644 --- a/tests/framework/log/DbTargetTest.php +++ b/tests/framework/log/DbTargetTest.php @@ -16,6 +16,7 @@ use Yii; use yii\db\Connection; use yii\db\Query; +use yii\log\DbTarget; use yii\log\...
true
yiisoft/yii2
20,873
comment_to_fix
Analyze the `yiiunit\framework\log` namespace using PHPStan
_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_ **Add the missing list marker for the new changelog item.** Line 7 should use the same bullet-list format as other entries (`- ...`) to keep changelog formatting consistent. <details> <summary>Suggested fix</summary> ```diff -Bug `#20783`: Fix PHPDoc annotations ...
f52efd863a5b91939844280d8e9385d20fe3271f
3810dbf11837fa8405cac8eba30a6fcb1abf8ec3
diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 27b0954258b..2296dfc0938 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -4,7 +4,7 @@ Yii Framework 2 Change Log 2.0.56 under development ------------------------ -- no changes in this release. +- Bug #20783: Fix PHPDoc annotatio...
[ "framework/CHANGELOG.md" ]
[ { "comment": "_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_\n\n**Add the missing list marker for the new changelog item.**\n\nLine 7 should use the same bullet-list format as other entries (`- ...`) to keep changelog formatting consistent.\n\n \n\n<details>\n<summary>Suggested fix</summary>\n\n```diff\n-Bug...
true
yiisoft/yii2
20,873
comment_to_fix
Analyze the `yiiunit\framework\log` namespace using PHPStan
_⚠️ Potential issue_ | _🟠 Major_ | _⚡ Quick win_ **`testFlushWithoutDispatcher()` now uses a real `Dispatcher` subtype and breaks the test’s intent.** Switching to `createMock(Dispatcher::class)` means `Logger::flush()` can legitimately call `dispatch()`, which conflicts with the existing `never()` expectation and n...
f52efd863a5b91939844280d8e9385d20fe3271f
3810dbf11837fa8405cac8eba30a6fcb1abf8ec3
diff --git a/tests/framework/log/LoggerTest.php b/tests/framework/log/LoggerTest.php index 5475a37fde4..605f3b261c9 100644 --- a/tests/framework/log/LoggerTest.php +++ b/tests/framework/log/LoggerTest.php @@ -8,6 +8,8 @@ namespace yiiunit\framework\log; +use PHPUnit\Framework\MockObject\MockObject; +use stdClass; ...
[ "tests/framework/log/LoggerTest.php" ]
[ { "comment": "_⚠️ Potential issue_ | _🟠 Major_ | _⚡ Quick win_\n\n**`testFlushWithoutDispatcher()` now uses a real `Dispatcher` subtype and breaks the test’s intent.**\n\nSwitching to `createMock(Dispatcher::class)` means `Logger::flush()` can legitimately call `dispatch()`, which conflicts with the existing `...
true
yiisoft/yii2
20,786
issue_to_patch
Add unit tests for mutex classes
| Q | A | ------------- | --- | Is bugfix? | ❌ | New feature? | ❌ | Tests added? | ✔️ | Breaks BC? | ❌ | Fixed issues | ## What does this PR do? Adds unit tests for `Mutex`, `DbMutex`, and `OracleMutex`. ### Coverage | File | Tests | Lines | MSI | |---|---|---|---| | `framework/...
cef4122784b39a2e4aae6b65a8e2b5c508f1afa2
e7f28131f4cf0688070ccfda579a1d6046897a45
[ "tests/framework/mutex/DbMutexTest.php", "tests/framework/mutex/MutexTest.php", "tests/framework/mutex/OracleMutexTest.php" ]
[]
diff --git a/tests/framework/mutex/DbMutexTest.php b/tests/framework/mutex/DbMutexTest.php new file mode 100644 index 00000000000..3392c9ac549 --- /dev/null +++ b/tests/framework/mutex/DbMutexTest.php @@ -0,0 +1,72 @@ +<?php + +/** + * @link https://www.yiiframework.com/ + * @copyright Copyright (c) 2008 Yii Software L...
true
yiisoft/yii2
20,795
issue_to_patch
Strengthen MSSQL `QueryBuilderTest` and `SchemaTest` coverage
| Q | A | ------------- | --- | Is bugfix? | ❌ | New feature? | ❌ | Tests added? | ✔️ | Breaks BC? | ❌ | Fixed issues | ## What does this PR do? Adds tests for previously uncovered methods in MSSQL QueryBuilder, Schema and InConditionBuilder. ### Coverage | File | Before | After |...
a271aeee800a3e5dcda705180e72f3168973b7aa
583dfe6e06550015f221383fa0f0f8f9d7f4d2be
[ "tests/framework/db/mssql/QueryBuilderTest.php", "tests/framework/db/mssql/SchemaTest.php" ]
[]
diff --git a/tests/framework/db/mssql/QueryBuilderTest.php b/tests/framework/db/mssql/QueryBuilderTest.php index 3d626dacd58..6624729524b 100644 --- a/tests/framework/db/mssql/QueryBuilderTest.php +++ b/tests/framework/db/mssql/QueryBuilderTest.php @@ -855,4 +855,159 @@ public static function buildFromDataProvider(): a...
true
yiisoft/yii2
20,872
issue_to_patch
Analyze more tests using PHPStan
| Q | A | ------------- | --- | Is bugfix? | ❌ | New feature? | ❌ | Breaks BC? | ❌ | Fixed issues | <!-- comma-separated list of tickets # fixed by the PR, if any -->
8d024ec5bed740af370f93782a75c1241d382f5b
3e46c59446d107631c900122ef33ed6a2c6a3030
diff --git a/phpstan.dist.neon b/phpstan.dist.neon index 4f6666327d7..20abc47d15b 100644 --- a/phpstan.dist.neon +++ b/phpstan.dist.neon @@ -13,25 +13,14 @@ parameters: excludePaths: analyse: - tests/data - - tests/framework/base/stub - - tests/framework/console/stubs - ...
[ "phpstan.dist.neon", "tests/framework/base/ComponentTest.php", "tests/framework/base/ModelTest.php", "tests/framework/base/stubs/AnonymousComponentClass.php", "tests/framework/base/stubs/AnonymousModelClass.php", "tests/framework/mail/BaseMailerTest.php", "tests/framework/mail/BaseMessageTest.php", "t...
[ { "comment": "_⚠️ Potential issue_ | _🟠 Major_ | _⚡ Quick win_\n\n**Docblock types for `$pagination`/`$sort` are incorrect for actual data-provider inputs.**\n\nOn Line 75 and Line 76, both params are documented as `array`, but this test also passes `Pagination|false` and `Sort|false`. This mismatch will reduc...
diff --git a/tests/framework/base/ComponentTest.php b/tests/framework/base/ComponentTest.php index a63aa5da36b..5b2f5750b03 100644 --- a/tests/framework/base/ComponentTest.php +++ b/tests/framework/base/ComponentTest.php @@ -507,7 +507,7 @@ public function testDetachNotAttachedHandler(): void */ public funct...
true
yiisoft/yii2
20,872
comment_to_fix
Analyze more tests using PHPStan
_⚠️ Potential issue_ | _🟠 Major_ | _⚡ Quick win_ **Docblock types for `$pagination`/`$sort` are incorrect for actual data-provider inputs.** On Line 75 and Line 76, both params are documented as `array`, but this test also passes `Pagination|false` and `Sort|false`. This mismatch will reduce PHPStan accuracy in the ...
8d024ec5bed740af370f93782a75c1241d382f5b
3e46c59446d107631c900122ef33ed6a2c6a3030
diff --git a/tests/framework/rest/IndexActionTest.php b/tests/framework/rest/IndexActionTest.php index e56f37cf827..555e9c94e3f 100644 --- a/tests/framework/rest/IndexActionTest.php +++ b/tests/framework/rest/IndexActionTest.php @@ -72,9 +72,12 @@ public function testPrepareSearchQueryAttribute(): void /** *...
[ "tests/framework/rest/IndexActionTest.php" ]
[ { "comment": "_⚠️ Potential issue_ | _🟠 Major_ | _⚡ Quick win_\n\n**Docblock types for `$pagination`/`$sort` are incorrect for actual data-provider inputs.**\n\nOn Line 75 and Line 76, both params are documented as `array`, but this test also passes `Pagination|false` and `Sort|false`. This mismatch will reduc...
true
yiisoft/yii2
20,871
issue_to_patch
Analyze the `yiiunit\framework\web` and `yiiunit\framework\widgets` namespaces using PHPStan
| Q | A | ------------- | --- | Is bugfix? | ❌ | New feature? | ❌ | Breaks BC? | ❌ | Fixed issues | <!-- comma-separated list of tickets # fixed by the PR, if any -->
d0a0f0f93e8a382549775ae5970e193bda1bc5b8
9c520a46189032b5b5a9c5dd6c1e54fcdaa99c90
diff --git a/phpstan.dist.neon b/phpstan.dist.neon index 4728321b2fe..4f6666327d7 100644 --- a/phpstan.dist.neon +++ b/phpstan.dist.neon @@ -14,8 +14,11 @@ parameters: analyse: - tests/data - tests/framework/base/stub + - tests/framework/console/stubs - tests/f...
[ "phpstan.dist.neon", "tests/data/ar/Cat.php", "tests/framework/console/ControllerTest.php", "tests/framework/console/stubs/FakeController.php", "tests/framework/console/stubs/FakeHelpController.php", "tests/framework/console/stubs/FakeHelpControllerWithoutOutput.php", "tests/framework/console/stubs/Fake...
[ { "comment": "_⚠️ Potential issue_ | _🟠 Major_ | _🏗️ Heavy lift_\n\n**New exclusions contradict the PR’s analysis scope.**\n\nAdding `tests/framework/web/mocks` and `tests/framework/web/stubs` to `excludePaths.analyse` narrows analysis for the exact `web` area this PR is meant to cover. Please keep these path...
diff --git a/tests/data/ar/Cat.php b/tests/data/ar/Cat.php index 494294edeaa..e4856b05a3f 100644 --- a/tests/data/ar/Cat.php +++ b/tests/data/ar/Cat.php @@ -33,7 +33,7 @@ public static function populateRecord($record, $row): void /** * This is to test if __isset catches the exception. - * @throw Divisi...
true
yiisoft/yii2
20,871
comment_to_fix
Analyze the `yiiunit\framework\web` and `yiiunit\framework\widgets` namespaces using PHPStan
_⚠️ Potential issue_ | _🟠 Major_ | _🏗️ Heavy lift_ **New exclusions contradict the PR’s analysis scope.** Adding `tests/framework/web/mocks` and `tests/framework/web/stubs` to `excludePaths.analyse` narrows analysis for the exact `web` area this PR is meant to cover. Please keep these paths analyzed and address the...
d0a0f0f93e8a382549775ae5970e193bda1bc5b8
9c520a46189032b5b5a9c5dd6c1e54fcdaa99c90
diff --git a/phpstan.dist.neon b/phpstan.dist.neon index 4728321b2fe..4f6666327d7 100644 --- a/phpstan.dist.neon +++ b/phpstan.dist.neon @@ -14,8 +14,11 @@ parameters: analyse: - tests/data - tests/framework/base/stub + - tests/framework/console/stubs - tests/f...
[ "phpstan.dist.neon" ]
[ { "comment": "_⚠️ Potential issue_ | _🟠 Major_ | _🏗️ Heavy lift_\n\n**New exclusions contradict the PR’s analysis scope.**\n\nAdding `tests/framework/web/mocks` and `tests/framework/web/stubs` to `excludePaths.analyse` narrows analysis for the exact `web` area this PR is meant to cover. Please keep these path...
true
yiisoft/yii2
20,871
comment_to_fix
Analyze the `yiiunit\framework\web` and `yiiunit\framework\widgets` namespaces using PHPStan
_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_ **Use standard exception PHPDoc tag (`@throws`).** `@throw` is not a standard PHPDoc tag; tools typically expect `@throws`. Please update it to keep static-analysis metadata effective. <details> <summary>Suggested fix</summary> ```diff - * `@throw` NotFoundHt...
d0a0f0f93e8a382549775ae5970e193bda1bc5b8
9c520a46189032b5b5a9c5dd6c1e54fcdaa99c90
diff --git a/tests/framework/web/stubs/ModelBindingStub.php b/tests/framework/web/stubs/ModelBindingStub.php index 165bf461745..db822995b34 100644 --- a/tests/framework/web/stubs/ModelBindingStub.php +++ b/tests/framework/web/stubs/ModelBindingStub.php @@ -8,8 +8,8 @@ class ModelBindingStub extends ActiveRecord { ...
[ "tests/framework/web/stubs/ModelBindingStub.php" ]
[ { "comment": "_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_\n\n**Use standard exception PHPDoc tag (`@throws`).**\n\n`@throw` is not a standard PHPDoc tag; tools typically expect `@throws`. Please update it to keep static-analysis metadata effective.\n\n \n\n<details>\n<summary>Suggested fix</summary>\n\n``...
true
yiisoft/yii2
20,871
comment_to_fix
Analyze the `yiiunit\framework\web` and `yiiunit\framework\widgets` namespaces using PHPStan
_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_ <details> <summary>🧩 Analysis chain</summary> 🏁 Script executed: ```shell #!/bin/bash # Verify the mocked time fallback operator used with nullable time. rg -n 'UserTest::\$time\s*\?:\s*\\time\(\)|UserTest::\$time\s*\?\?\s*\\time\(\)' tests/framework/web/UserTest.p...
d0a0f0f93e8a382549775ae5970e193bda1bc5b8
9c520a46189032b5b5a9c5dd6c1e54fcdaa99c90
diff --git a/tests/framework/web/UserTest.php b/tests/framework/web/UserTest.php index 4eac43307d7..90ededa3eed 100644 --- a/tests/framework/web/UserTest.php +++ b/tests/framework/web/UserTest.php @@ -14,7 +14,7 @@ */ function time() { - return \yiiunit\framework\web\UserTest::$time ?: \time(); + return \yiiu...
[ "tests/framework/web/UserTest.php" ]
[ { "comment": "_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_\n\n<details>\n<summary>🧩 Analysis chain</summary>\n\n🏁 Script executed:\n\n```shell\n#!/bin/bash\n# Verify the mocked time fallback operator used with nullable time.\nrg -n 'UserTest::\\$time\\s*\\?:\\s*\\\\time\\(\\)|UserTest::\\$time\\s*\\?\\?\...
true
yiisoft/yii2
20,871
comment_to_fix
Analyze the `yiiunit\framework\web` and `yiiunit\framework\widgets` namespaces using PHPStan
_🧹 Nitpick_ | _🔵 Trivial_ | _⚡ Quick win_ **Rename variable to be more descriptive.** The variable `$a` is too short and doesn't convey its purpose. Consider a more descriptive name like `$rendered` or `$renderedAttribute`. <details> <summary>♻️ Proposed refactor</summary> ```diff - $a = $detailView...
d0a0f0f93e8a382549775ae5970e193bda1bc5b8
9c520a46189032b5b5a9c5dd6c1e54fcdaa99c90
diff --git a/tests/framework/widgets/DetailViewTest.php b/tests/framework/widgets/DetailViewTest.php index 1ecc72376c7..992b32b63ed 100644 --- a/tests/framework/widgets/DetailViewTest.php +++ b/tests/framework/widgets/DetailViewTest.php @@ -19,9 +19,6 @@ */ class DetailViewTest extends TestCase { - /** @var Deta...
[ "tests/framework/widgets/DetailViewTest.php" ]
[ { "comment": "_🧹 Nitpick_ | _🔵 Trivial_ | _⚡ Quick win_\n\n**Rename variable to be more descriptive.**\n\nThe variable `$a` is too short and doesn't convey its purpose. Consider a more descriptive name like `$rendered` or `$renderedAttribute`.\n\n\n\n\n<details>\n<summary>♻️ Proposed refactor</summary>\n\n```...
true
yiisoft/yii2
20,871
comment_to_fix
Analyze the `yiiunit\framework\web` and `yiiunit\framework\widgets` namespaces using PHPStan
_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_ **Fix typo in controller map key.** The key `'fake_witout_output'` has a typo—it's missing the 'h' in "without". Since this line is being changed for the namespace update, this is a good opportunity to correct it. <details> <summary>📝 Proposed fix</summary> ```di...
d0a0f0f93e8a382549775ae5970e193bda1bc5b8
9c520a46189032b5b5a9c5dd6c1e54fcdaa99c90
diff --git a/tests/framework/console/ControllerTest.php b/tests/framework/console/ControllerTest.php index e9932ceca9f..610be16a74e 100644 --- a/tests/framework/console/ControllerTest.php +++ b/tests/framework/console/ControllerTest.php @@ -18,6 +18,10 @@ use yii\console\Application; use yii\console\Request; use yii...
[ "tests/framework/console/ControllerTest.php" ]
[ { "comment": "_⚠️ Potential issue_ | _🟡 Minor_ | _⚡ Quick win_\n\n**Fix typo in controller map key.**\n\nThe key `'fake_witout_output'` has a typo—it's missing the 'h' in \"without\". Since this line is being changed for the namespace update, this is a good opportunity to correct it.\n\n\n\n<details>\n<summary...
true
yt-dlp/yt-dlp
16,948
issue_to_patch
[youtube] yt-dlp occasionally only fetches the first 100 vids of a playlist ### Checklist - [x] I'm reporting that yt-dlp is broken on a **supported** site - [x] I've verified that I have **updated yt-dlp to nightly or master** ([update instructions](https://github.com/yt-dlp/yt-dlp#update-channels)) - [x] I've check...
[ie/youtube:tab] Fix pagination
Closes #16692 Closes #16943 <details open><summary>Template</summary> <!-- OPEN is intentional --> ### Before submitting a *pull request* make sure you have: - [x] At least skimmed through [contributing guidelines](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#developer-instructions) including [y...
9055188250348c3e6e29eee53e5fb3dc2c951977
6e6bbb28ac54af9c9ba05de637160d9824ebae42
diff --git a/yt_dlp/extractor/youtube/_base.py b/yt_dlp/extractor/youtube/_base.py index d3e4ab11767e..59a470ff6d81 100644 --- a/yt_dlp/extractor/youtube/_base.py +++ b/yt_dlp/extractor/youtube/_base.py @@ -1037,8 +1037,10 @@ def _extract_continuation(cls, renderer): return next_continuation ret...
[ "yt_dlp/extractor/youtube/_base.py", "yt_dlp/extractor/youtube/_tab.py" ]
[ { "comment": "fyi: creepy bible banger channel got taken down", "path": "yt_dlp/extractor/youtube/_tab.py", "hunk": "@@ -1139,90 +1138,89 @@ class YoutubeTabIE(YoutubeTabBaseInfoExtractor):\n 'playlist_count': 0,\n }, {\n 'note': 'Home tab',\n- 'url': 'https://www.youtube.com/...
true
yt-dlp/yt-dlp
16,931
issue_to_patch
[utils] Deprecate `make_dir` in favor of `make_parent_dirs`
<!-- **IMPORTANT**: PRs without the template will be CLOSED Due to the high volume of pull requests, it may be a while before your PR is reviewed. Please try to keep your pull request focused on a single bugfix or new feature. Pull requests with a vast scope and/or very large diff will take mu...
707537a03946fbc5707e22be429545c670cd8ec2
7ce44d0916125e6c71d910288cf0c5223806661d
diff --git a/pyproject.toml b/pyproject.toml index 8128fb31a85a..ccbfa74404e5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -395,6 +395,7 @@ banned-from = [ "yt_dlp.utils.bytes_to_intlist".msg = "Use `list` instead." "yt_dlp.utils.intlist_to_bytes".msg = "Use `bytes` instead." "yt_dlp.utils.jwt_encode_hs256".m...
[ "pyproject.toml", "yt_dlp/YoutubeDL.py", "yt_dlp/postprocessor/movefilesafterdownload.py", "yt_dlp/utils/_deprecated.py", "yt_dlp/utils/_utils.py" ]
[ { "comment": "can move this to `yt_dlp.utils._deprecated`, have it import `make_parent_dirs` locally, and add it to `tool.ruff.flake8-tidy-import.banned-api` in pyproject.toml", "path": "yt_dlp/utils/_utils.py", "hunk": "@@ -4713,15 +4713,18 @@ def random_uuidv4():\n return re.sub(r'[xy]', lambda x:...
true
yt-dlp/yt-dlp
16,931
comment_to_fix
[utils] Deprecate `make_dir` in favor of `make_parent_dirs`
can move this to `yt_dlp.utils._deprecated`, have it import `make_parent_dirs` locally, and add it to `tool.ruff.flake8-tidy-import.banned-api` in pyproject.toml
707537a03946fbc5707e22be429545c670cd8ec2
7ce44d0916125e6c71d910288cf0c5223806661d
diff --git a/yt_dlp/utils/_utils.py b/yt_dlp/utils/_utils.py index 43ee53729ebb..4cc7a76d17f5 100644 --- a/yt_dlp/utils/_utils.py +++ b/yt_dlp/utils/_utils.py @@ -4713,16 +4713,9 @@ def random_uuidv4(): return re.sub(r'[xy]', lambda x: _HEX_TABLE[random.randint(0, 15)], 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx') ...
[ "yt_dlp/utils/_utils.py" ]
[ { "comment": "can move this to `yt_dlp.utils._deprecated`, have it import `make_parent_dirs` locally, and add it to `tool.ruff.flake8-tidy-import.banned-api` in pyproject.toml", "path": "yt_dlp/utils/_utils.py", "hunk": "@@ -4713,15 +4713,18 @@ def random_uuidv4():\n return re.sub(r'[xy]', lambda x:...
true
yt-dlp/yt-dlp
16,931
comment_to_fix
[utils] Deprecate `make_dir` in favor of `make_parent_dirs`
I think this should work ```suggestion from . import make_parent_dirs ```
707537a03946fbc5707e22be429545c670cd8ec2
7ce44d0916125e6c71d910288cf0c5223806661d
diff --git a/yt_dlp/utils/_deprecated.py b/yt_dlp/utils/_deprecated.py index 4797cfef5363..9fada27fd888 100644 --- a/yt_dlp/utils/_deprecated.py +++ b/yt_dlp/utils/_deprecated.py @@ -46,4 +46,16 @@ def jwt_encode_hs256(payload_data, key, headers={}): return header_b64 + b'.' + payload_b64 + b'.' + signature_b64 ...
[ "yt_dlp/utils/_deprecated.py" ]
[ { "comment": "I think this should work\r\n```suggestion\r\n from . import make_parent_dirs\r\n```", "path": "yt_dlp/utils/_deprecated.py", "hunk": "@@ -46,4 +46,16 @@ def jwt_encode_hs256(payload_data, key, headers={}):\n return header_b64 + b'.' + payload_b64 + b'.' + signature_b64\n \n \n+def m...
true
yt-dlp/yt-dlp
16,941
issue_to_patch
[ie/bandcamp:weekly] Fix metadata extraction
Fix bug in a541df1ea5a593abf3ceaf94ed806e4b52a2c459 <details open><summary>Template</summary> <!-- OPEN is intentional --> ### Before submitting a *pull request* make sure you have: - [x] At least skimmed through [contributing guidelines](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#dev...
a2483524fbf9c1f5406774622d8d048430b320e9
7a93bdffe8e392174b83c5305ce41e5eec1c8984
diff --git a/yt_dlp/extractor/bandcamp.py b/yt_dlp/extractor/bandcamp.py index e1e2a5edb02b..4892912e2301 100644 --- a/yt_dlp/extractor/bandcamp.py +++ b/yt_dlp/extractor/bandcamp.py @@ -420,10 +420,11 @@ class BandcampWeeklyIE(BandcampIE): # XXX: Do not subclass from concrete IE 'info_dict': { '...
[ "yt_dlp/extractor/bandcamp.py" ]
[]
true
yt-dlp/yt-dlp
16,873
issue_to_patch
[ie/peertube] Support password-protected videos
- [x] At least skimmed through [contributing guidelines](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#developer-instructions) including [yt-dlp coding conventions](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#yt-dlp-coding-conventions) - [x] [Searched](https://github.com/yt-dlp/yt-dlp/s...
707537a03946fbc5707e22be429545c670cd8ec2
65c44b0ed952faf17d2208ca14dfe689e5e454ca
diff --git a/yt_dlp/extractor/peertube.py b/yt_dlp/extractor/peertube.py index 4445485ccf2a..40312cf7dcde 100644 --- a/yt_dlp/extractor/peertube.py +++ b/yt_dlp/extractor/peertube.py @@ -4,6 +4,7 @@ from .common import InfoExtractor from ..utils import ( OnDemandPagedList, + filter_dict, format_field, ...
[ "yt_dlp/extractor/peertube.py" ]
[ { "comment": "could keep it lean with `filter_dict` (import from `..utils`)\r\n```suggestion\r\n def _get_headers(self):\r\n return filter_dict({'x-peertube-video-password': self.get_param('videopassword')})\r\n```", "path": "yt_dlp/extractor/peertube.py", "hunk": "@@ -1492,6 +1522,13 @@ def _...
true
yt-dlp/yt-dlp
16,873
comment_to_fix
[ie/peertube] Support password-protected videos
could keep it lean with `filter_dict` (import from `..utils`) ```suggestion def _get_headers(self): return filter_dict({'x-peertube-video-password': self.get_param('videopassword')}) ```
707537a03946fbc5707e22be429545c670cd8ec2
65c44b0ed952faf17d2208ca14dfe689e5e454ca
diff --git a/yt_dlp/extractor/peertube.py b/yt_dlp/extractor/peertube.py index 4445485ccf2a..40312cf7dcde 100644 --- a/yt_dlp/extractor/peertube.py +++ b/yt_dlp/extractor/peertube.py @@ -4,6 +4,7 @@ from .common import InfoExtractor from ..utils import ( OnDemandPagedList, + filter_dict, format_field, ...
[ "yt_dlp/extractor/peertube.py" ]
[ { "comment": "could keep it lean with `filter_dict` (import from `..utils`)\r\n```suggestion\r\n def _get_headers(self):\r\n return filter_dict({'x-peertube-video-password': self.get_param('videopassword')})\r\n```", "path": "yt_dlp/extractor/peertube.py", "hunk": "@@ -1492,6 +1522,13 @@ def _...
true
yt-dlp/yt-dlp
3,435
issue_to_patch
add '--client-certificate some.pem' to authenticate a site user to the remote machine ### Checklist - [X] I'm reporting a feature request - [X] I've looked through the [README](https://github.com/yt-dlp/yt-dlp#readme) - [X] I've verified that I'm running yt-dlp version **2022.03.08.1** ([update instructions](https://...
Add support for client certificate authentication
## Please follow the guide below - You will be asked some questions, please read them **carefully** and answer honestly - Put an `x` into all the boxes [ ] relevant to your *pull request* (like that [x]) - Use *Preview* tab to see how your *pull request* will actually look like --- ### Before submitting a *p...
afac4caa7db30804bebac33e53c3cb0237958224
c8d5c5ee3bd7d1a86d73c1537f6ca090ab5a06e6
diff --git a/README.md b/README.md index 448b5c884f19..f8813cbb6dcd 100644 --- a/README.md +++ b/README.md @@ -840,6 +840,15 @@ You can also fork the project on github and run your fork's [build workflow](.gi interactively --ap-list-mso List all supported mu...
[ "README.md", "test/test_http.py", "test/testdata/certificate/ca.crt", "test/testdata/certificate/ca.key", "test/testdata/certificate/ca.srl", "test/testdata/certificate/client.crt", "test/testdata/certificate/client.csr", "test/testdata/certificate/client.key", "test/testdata/certificate/clientencry...
[ { "comment": "imo, it should be `--client-certificate`, `--client-certificate-key`, `--client-certificate-password`.\r\n\r\nAlso, it would be great if password (if not given) can be obtained from netrc", "path": "README.md", "hunk": "@@ -835,6 +835,9 @@ You can also fork the project on github and run yo...
diff --git a/test/test_http.py b/test/test_http.py index d99be8be4e04..fb8c9f4e9da6 100644 --- a/test/test_http.py +++ b/test/test_http.py @@ -85,6 +85,50 @@ def test_nocheckcertificate(self): self.assertEqual(r['entries'][0]['url'], 'https://127.0.0.1:%d/vid.mp4' % self.port) +class TestClientCert(unittes...
true
yt-dlp/yt-dlp
3,435
comment_to_fix
Add support for client certificate authentication
imo, it should be `--client-certificate`, `--client-certificate-key`, `--client-certificate-password`. Also, it would be great if password (if not given) can be obtained from netrc
afac4caa7db30804bebac33e53c3cb0237958224
c8d5c5ee3bd7d1a86d73c1537f6ca090ab5a06e6
diff --git a/README.md b/README.md index 448b5c884f19..f8813cbb6dcd 100644 --- a/README.md +++ b/README.md @@ -840,6 +840,15 @@ You can also fork the project on github and run your fork's [build workflow](.gi interactively --ap-list-mso List all supported mu...
[ "README.md" ]
[ { "comment": "imo, it should be `--client-certificate`, `--client-certificate-key`, `--client-certificate-password`.\r\n\r\nAlso, it would be great if password (if not given) can be obtained from netrc", "path": "README.md", "hunk": "@@ -835,6 +835,9 @@ You can also fork the project on github and run yo...
true
yt-dlp/yt-dlp
3,435
comment_to_fix
Add support for client certificate authentication
```suggestion ydl = YoutubeDL({ 'logger': FakeLogger(), # Disable client-side validation of unacceptable self-signed testcert.pem # The test is of a check on the server side, so unaffected 'nocheckcertificate': True, **params, }) ```
afac4caa7db30804bebac33e53c3cb0237958224
c8d5c5ee3bd7d1a86d73c1537f6ca090ab5a06e6
diff --git a/test/test_http.py b/test/test_http.py index d99be8be4e04..fb8c9f4e9da6 100644 --- a/test/test_http.py +++ b/test/test_http.py @@ -85,6 +85,50 @@ def test_nocheckcertificate(self): self.assertEqual(r['entries'][0]['url'], 'https://127.0.0.1:%d/vid.mp4' % self.port) +class TestClientCert(unittes...
[ "test/test_http.py" ]
[ { "comment": "```suggestion\r\n ydl = YoutubeDL({\r\n 'logger': FakeLogger(),\r\n # Disable client-side validation of unacceptable self-signed testcert.pem\r\n # The test is of a check on the server side, so unaffected\r\n 'nocheckcertificate': True,\r\n ...
true
yt-dlp/yt-dlp
3,435
comment_to_fix
Add support for client certificate authentication
similar to above ```suggestion client_certificate: Path to client certificate file in PEM format. May include the private key. client_certificate_key: Path to private key file for client certificate client_certificate_pass: Password for certificate private key, if encrypted. ...
afac4caa7db30804bebac33e53c3cb0237958224
c8d5c5ee3bd7d1a86d73c1537f6ca090ab5a06e6
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py index 50342c2ca753..1766ff37996c 100644 --- a/yt_dlp/YoutubeDL.py +++ b/yt_dlp/YoutubeDL.py @@ -319,6 +319,10 @@ class YoutubeDL: legacyserverconnect: Explicitly allow HTTPS connection to servers that do not support RFC 5746 secure rene...
[ "yt_dlp/YoutubeDL.py" ]
[ { "comment": "similar to above\r\n```suggestion\r\n client_certificate: Path to client certificate file in PEM format. May include the private key.\r\n client_certificate_key: Path to private key file for client certificate\r\n client_certificate_pass: Password for certificate private key, if encryp...
true
yt-dlp/yt-dlp
16,926
issue_to_patch
[Patreon] fails to download video ### Checklist - [x] I'm reporting that yt-dlp is broken on a **supported** site - [x] I've verified that I have **updated yt-dlp to nightly or master** ([update instructions](https://github.com/yt-dlp/yt-dlp#update-channels)) - [x] I've checked that all provided URLs are playable in ...
[ie/Patreon] Fix _VALID_URL
<!-- **IMPORTANT**: PRs without the template will be CLOSED Due to the high volume of pull requests, it may be a while before your PR is reviewed. Please try to keep your pull request focused on a single bugfix or new feature. Pull requests with a vast scope and/or very large diff will take mu...
7937a139cf3e1e1ccd1b277f18ab73fc6dec06a7
b9984f04145ae34d0663d102a84dda21011de74e
diff --git a/yt_dlp/extractor/patreon.py b/yt_dlp/extractor/patreon.py index 1828b81c5211..94cf425f2d46 100644 --- a/yt_dlp/extractor/patreon.py +++ b/yt_dlp/extractor/patreon.py @@ -65,8 +65,9 @@ def _call_api(self, ep, item_id, query=None, headers=None, fatal=True, note=None class PatreonIE(PatreonBaseIE): IE...
[ "yt_dlp/extractor/patreon.py" ]
[ { "comment": "Don't comment out lines in failing tests. If we need to fix them, then we want them to be failing. Add a `FIXME` comment above like you did for the `scottfalco` test case below", "path": "yt_dlp/extractor/patreon.py", "hunk": "@@ -74,7 +74,7 @@ class PatreonIE(PatreonBaseIE):\n ...
true
yt-dlp/yt-dlp
16,926
comment_to_fix
[ie/Patreon] Fix _VALID_URL
Don't comment out lines in failing tests. If we need to fix them, then we want them to be failing. Add a `FIXME` comment above like you did for the `scottfalco` test case below
7937a139cf3e1e1ccd1b277f18ab73fc6dec06a7
b9984f04145ae34d0663d102a84dda21011de74e
diff --git a/yt_dlp/extractor/patreon.py b/yt_dlp/extractor/patreon.py index 1828b81c5211..94cf425f2d46 100644 --- a/yt_dlp/extractor/patreon.py +++ b/yt_dlp/extractor/patreon.py @@ -65,8 +65,9 @@ def _call_api(self, ep, item_id, query=None, headers=None, fatal=True, note=None class PatreonIE(PatreonBaseIE): IE...
[ "yt_dlp/extractor/patreon.py" ]
[ { "comment": "Don't comment out lines in failing tests. If we need to fix them, then we want them to be failing. Add a `FIXME` comment above like you did for the `scottfalco` test case below", "path": "yt_dlp/extractor/patreon.py", "hunk": "@@ -74,7 +74,7 @@ class PatreonIE(PatreonBaseIE):\n ...
true
yt-dlp/yt-dlp
16,926
comment_to_fix
[ie/Patreon] Fix _VALID_URL
same here
7937a139cf3e1e1ccd1b277f18ab73fc6dec06a7
b9984f04145ae34d0663d102a84dda21011de74e
diff --git a/yt_dlp/extractor/patreon.py b/yt_dlp/extractor/patreon.py index 1828b81c5211..94cf425f2d46 100644 --- a/yt_dlp/extractor/patreon.py +++ b/yt_dlp/extractor/patreon.py @@ -65,8 +65,9 @@ def _call_api(self, ep, item_id, query=None, headers=None, fatal=True, note=None class PatreonIE(PatreonBaseIE): IE...
[ "yt_dlp/extractor/patreon.py" ]
[ { "comment": "same here", "path": "yt_dlp/extractor/patreon.py", "hunk": "@@ -169,7 +169,7 @@ class PatreonIE(PatreonBaseIE):\n 'upload_date': '20191218',\n 'thumbnail': r're:^https?://.*$',\n 'uploader_url': 'https://www.patreon.com/loish',\n- 'description...
true
yt-dlp/yt-dlp
16,926
comment_to_fix
[ie/Patreon] Fix _VALID_URL
Marking this as `skip` is correct but I would rephrase the reason to be more clear: ```suggestion 'skip': 'HTTP Error 401 for m3u8 request; site now requires login to play the video', ```
7937a139cf3e1e1ccd1b277f18ab73fc6dec06a7
b9984f04145ae34d0663d102a84dda21011de74e
diff --git a/yt_dlp/extractor/patreon.py b/yt_dlp/extractor/patreon.py index 1828b81c5211..94cf425f2d46 100644 --- a/yt_dlp/extractor/patreon.py +++ b/yt_dlp/extractor/patreon.py @@ -65,8 +65,9 @@ def _call_api(self, ep, item_id, query=None, headers=None, fatal=True, note=None class PatreonIE(PatreonBaseIE): IE...
[ "yt_dlp/extractor/patreon.py" ]
[ { "comment": "Marking this as `skip` is correct but I would rephrase the reason to be more clear:\r\n```suggestion\r\n 'skip': 'HTTP Error 401 for m3u8 request; site now requires login to play the video',\r\n```", "path": "yt_dlp/extractor/patreon.py", "hunk": "@@ -220,6 +220,7 @@ class PatreonIE...
true
yt-dlp/yt-dlp
16,926
comment_to_fix
[ie/Patreon] Fix _VALID_URL
this is perfect
7937a139cf3e1e1ccd1b277f18ab73fc6dec06a7
b9984f04145ae34d0663d102a84dda21011de74e
diff --git a/yt_dlp/extractor/patreon.py b/yt_dlp/extractor/patreon.py index 1828b81c5211..94cf425f2d46 100644 --- a/yt_dlp/extractor/patreon.py +++ b/yt_dlp/extractor/patreon.py @@ -65,8 +65,9 @@ def _call_api(self, ep, item_id, query=None, headers=None, fatal=True, note=None class PatreonIE(PatreonBaseIE): IE...
[ "yt_dlp/extractor/patreon.py" ]
[ { "comment": "this is perfect", "path": "yt_dlp/extractor/patreon.py", "hunk": "@@ -285,6 +287,7 @@ class PatreonIE(PatreonBaseIE):\n },\n 'params': {'getcomments': True},\n }, {\n+ # FIXME: Error: No supported media found in this post", "resolving_sha": "b9984f04145ae34d0...
true
yt-dlp/yt-dlp
16,926
comment_to_fix
[ie/Patreon] Fix _VALID_URL
For which test case do we need to this? If it's for the new test URL you're adding, then it should be a full-fledged test with an info dict instead of `only_matching`
7937a139cf3e1e1ccd1b277f18ab73fc6dec06a7
b9984f04145ae34d0663d102a84dda21011de74e
diff --git a/yt_dlp/extractor/patreon.py b/yt_dlp/extractor/patreon.py index 1828b81c5211..94cf425f2d46 100644 --- a/yt_dlp/extractor/patreon.py +++ b/yt_dlp/extractor/patreon.py @@ -65,8 +65,9 @@ def _call_api(self, ep, item_id, query=None, headers=None, fatal=True, note=None class PatreonIE(PatreonBaseIE): IE...
[ "yt_dlp/extractor/patreon.py" ]
[ { "comment": "For which test case do we need to this? If it's for the new test URL you're adding, then it should be a full-fledged test with an info dict instead of `only_matching`", "path": "yt_dlp/extractor/patreon.py", "hunk": "@@ -367,7 +374,7 @@ def _real_extract(self, url):\n attributes = ...
true
yt-dlp/yt-dlp
16,926
comment_to_fix
[ie/Patreon] Fix _VALID_URL
Is this in response to the login-required m3u8 returning a 401 error? If so, I would omit this change from this PR
7937a139cf3e1e1ccd1b277f18ab73fc6dec06a7
b9984f04145ae34d0663d102a84dda21011de74e
diff --git a/yt_dlp/extractor/patreon.py b/yt_dlp/extractor/patreon.py index 1828b81c5211..94cf425f2d46 100644 --- a/yt_dlp/extractor/patreon.py +++ b/yt_dlp/extractor/patreon.py @@ -65,8 +65,9 @@ def _call_api(self, ep, item_id, query=None, headers=None, fatal=True, note=None class PatreonIE(PatreonBaseIE): IE...
[ "yt_dlp/extractor/patreon.py" ]
[ { "comment": "Is this in response to the login-required m3u8 returning a 401 error? If so, I would omit this change from this PR", "path": "yt_dlp/extractor/patreon.py", "hunk": "@@ -454,7 +461,7 @@ def _real_extract(self, url):\n })\n elif name == 'video' or determine_ext(po...
true
yt-dlp/yt-dlp
16,926
comment_to_fix
[ie/Patreon] Fix _VALID_URL
As mentioned in my other review comment, it would be nice to have real test data instead of just `only_matching` for this
7937a139cf3e1e1ccd1b277f18ab73fc6dec06a7
b9984f04145ae34d0663d102a84dda21011de74e
diff --git a/yt_dlp/extractor/patreon.py b/yt_dlp/extractor/patreon.py index 1828b81c5211..94cf425f2d46 100644 --- a/yt_dlp/extractor/patreon.py +++ b/yt_dlp/extractor/patreon.py @@ -65,8 +65,9 @@ def _call_api(self, ep, item_id, query=None, headers=None, fatal=True, note=None class PatreonIE(PatreonBaseIE): IE...
[ "yt_dlp/extractor/patreon.py" ]
[ { "comment": "As mentioned in my other review comment, it would be nice to have real test data instead of just `only_matching` for this", "path": "yt_dlp/extractor/patreon.py", "hunk": "@@ -304,6 +307,10 @@ class PatreonIE(PatreonBaseIE):\n 'timestamp': 1767061800,\n 'upload_date...
true
yt-dlp/yt-dlp
16,926
comment_to_fix
[ie/Patreon] Fix _VALID_URL
```suggestion _VALID_URL = r'https?://(?:www\.)?patreon\.com/(?:creation\?hid=|(?:[^/?#]+/)?posts/(?:[\w-]+-)?)(?P<id>\d+)' ```
7937a139cf3e1e1ccd1b277f18ab73fc6dec06a7
b9984f04145ae34d0663d102a84dda21011de74e
diff --git a/yt_dlp/extractor/patreon.py b/yt_dlp/extractor/patreon.py index 1828b81c5211..94cf425f2d46 100644 --- a/yt_dlp/extractor/patreon.py +++ b/yt_dlp/extractor/patreon.py @@ -65,8 +65,9 @@ def _call_api(self, ep, item_id, query=None, headers=None, fatal=True, note=None class PatreonIE(PatreonBaseIE): IE...
[ "yt_dlp/extractor/patreon.py" ]
[ { "comment": "```suggestion\r\n _VALID_URL = r'https?://(?:www\\.)?patreon\\.com/(?:creation\\?hid=|(?:[^/?#]+/)?posts/(?:[\\w-]+-)?)(?P<id>\\d+)'\r\n```", "path": "yt_dlp/extractor/patreon.py", "hunk": "@@ -65,7 +65,7 @@ def _call_api(self, ep, item_id, query=None, headers=None, fatal=True, note=Non...
true
yt-dlp/yt-dlp
16,926
comment_to_fix
[ie/Patreon] Fix _VALID_URL
I meant that the test should be left in a failing state, meaning that we should keep the `description` line and add a `FIXME` comment. Also, I would only begin the comment with `Error:` if that is the actual error given by yt-dlp ```suggestion # FIXME: Fails due to no description extracted 'url': 'ht...
7937a139cf3e1e1ccd1b277f18ab73fc6dec06a7
b9984f04145ae34d0663d102a84dda21011de74e
diff --git a/yt_dlp/extractor/patreon.py b/yt_dlp/extractor/patreon.py index 1828b81c5211..94cf425f2d46 100644 --- a/yt_dlp/extractor/patreon.py +++ b/yt_dlp/extractor/patreon.py @@ -65,8 +65,9 @@ def _call_api(self, ep, item_id, query=None, headers=None, fatal=True, note=None class PatreonIE(PatreonBaseIE): IE...
[ "yt_dlp/extractor/patreon.py" ]
[ { "comment": "I meant that the test should be left in a failing state, meaning that we should keep the `description` line and add a `FIXME` comment. Also, I would only begin the comment with `Error:` if that is the actual error given by yt-dlp\r\n```suggestion\r\n # FIXME: Fails due to no description ext...
true
yt-dlp/yt-dlp
16,926
comment_to_fix
[ie/Patreon] Fix _VALID_URL
same thing here
7937a139cf3e1e1ccd1b277f18ab73fc6dec06a7
b9984f04145ae34d0663d102a84dda21011de74e
diff --git a/yt_dlp/extractor/patreon.py b/yt_dlp/extractor/patreon.py index 1828b81c5211..94cf425f2d46 100644 --- a/yt_dlp/extractor/patreon.py +++ b/yt_dlp/extractor/patreon.py @@ -65,8 +65,9 @@ def _call_api(self, ep, item_id, query=None, headers=None, fatal=True, note=None class PatreonIE(PatreonBaseIE): IE...
[ "yt_dlp/extractor/patreon.py" ]
[ { "comment": "same thing here", "path": "yt_dlp/extractor/patreon.py", "hunk": "@@ -157,6 +157,7 @@ class PatreonIE(PatreonBaseIE):\n },\n 'skip': 'Patron-only content',\n }, {\n+ # FIXME: Error: No Description Available\n # m3u8 video (https://github.com/yt-dlp/yt-dlp...
true
yt-dlp/yt-dlp
16,926
comment_to_fix
[ie/Patreon] Fix _VALID_URL
If we're adding a `FIXME` comment then we shouldn't skip this ```suggestion ```
7937a139cf3e1e1ccd1b277f18ab73fc6dec06a7
b9984f04145ae34d0663d102a84dda21011de74e
diff --git a/yt_dlp/extractor/patreon.py b/yt_dlp/extractor/patreon.py index 1828b81c5211..94cf425f2d46 100644 --- a/yt_dlp/extractor/patreon.py +++ b/yt_dlp/extractor/patreon.py @@ -65,8 +65,9 @@ def _call_api(self, ep, item_id, query=None, headers=None, fatal=True, note=None class PatreonIE(PatreonBaseIE): IE...
[ "yt_dlp/extractor/patreon.py" ]
[ { "comment": "If we're adding a `FIXME` comment then we shouldn't skip this\r\n```suggestion\r\n```", "path": "yt_dlp/extractor/patreon.py", "hunk": "@@ -304,6 +307,27 @@ class PatreonIE(PatreonBaseIE):\n 'timestamp': 1767061800,\n 'upload_date': '20251230',\n },\n+ ...
true
yt-dlp/yt-dlp
16,926
comment_to_fix
[ie/Patreon] Fix _VALID_URL
```suggestion # FIXME: need to extract description ```
7937a139cf3e1e1ccd1b277f18ab73fc6dec06a7
b9984f04145ae34d0663d102a84dda21011de74e
diff --git a/yt_dlp/extractor/patreon.py b/yt_dlp/extractor/patreon.py index 1828b81c5211..94cf425f2d46 100644 --- a/yt_dlp/extractor/patreon.py +++ b/yt_dlp/extractor/patreon.py @@ -65,8 +65,9 @@ def _call_api(self, ep, item_id, query=None, headers=None, fatal=True, note=None class PatreonIE(PatreonBaseIE): IE...
[ "yt_dlp/extractor/patreon.py" ]
[ { "comment": "```suggestion\r\n # FIXME: need to extract description\r\n```", "path": "yt_dlp/extractor/patreon.py", "hunk": "@@ -304,6 +307,27 @@ class PatreonIE(PatreonBaseIE):\n 'timestamp': 1767061800,\n 'upload_date': '20251230',\n },\n+ 'skip': 'No sup...
true
yt-dlp/yt-dlp
16,926
comment_to_fix
[ie/Patreon] Fix _VALID_URL
```suggestion 'uploader_url': 'https://www.patreon.com/loish', 'description': 'md5:e2693e97ee299c8ece47ffdb67e7d9d2', ```
7937a139cf3e1e1ccd1b277f18ab73fc6dec06a7
b9984f04145ae34d0663d102a84dda21011de74e
diff --git a/yt_dlp/extractor/patreon.py b/yt_dlp/extractor/patreon.py index 1828b81c5211..94cf425f2d46 100644 --- a/yt_dlp/extractor/patreon.py +++ b/yt_dlp/extractor/patreon.py @@ -65,8 +65,9 @@ def _call_api(self, ep, item_id, query=None, headers=None, fatal=True, note=None class PatreonIE(PatreonBaseIE): IE...
[ "yt_dlp/extractor/patreon.py" ]
[ { "comment": "```suggestion\r\n 'uploader_url': 'https://www.patreon.com/loish',\r\n 'description': 'md5:e2693e97ee299c8ece47ffdb67e7d9d2',\r\n```", "path": "yt_dlp/extractor/patreon.py", "hunk": "@@ -169,7 +171,6 @@ class PatreonIE(PatreonBaseIE):\n 'upload_date': '201...
true
yt-dlp/yt-dlp
16,922
issue_to_patch
[downloader/external] Add support for dev version of curl
<!-- **IMPORTANT**: PRs without the template will be CLOSED Due to the high volume of pull requests, it may be a while before your PR is reviewed. Please try to keep your pull request focused on a single bugfix or new feature. Pull requests with a vast scope and/or very large diff will take mu...
cb309b3293c9919cfb55f5d9ffa2c8c109a5f1eb
ca634426adf245f4ac19e1ab96033d75870407b5
diff --git a/yt_dlp/downloader/external.py b/yt_dlp/downloader/external.py index 2f127c0f8746..2c62f1dd38e8 100644 --- a/yt_dlp/downloader/external.py +++ b/yt_dlp/downloader/external.py @@ -209,7 +209,7 @@ def available(cls, path=None): return False cls.exe = path - cls._curl_version = v...
[ "yt_dlp/downloader/external.py" ]
[ { "comment": "could you check if this works?\r\n```suggestion\r\n cls._curl_version = version_tuple(parts[1], lenient=True)\r\n```", "path": "yt_dlp/downloader/external.py", "hunk": "@@ -209,7 +209,10 @@ def available(cls, path=None):\n return False\n \n cls.exe = path\n- ...
true
yt-dlp/yt-dlp
16,046
issue_to_patch
Youtube audio tracks labeled as "Klingon" get mislabeled after yt-dlp writes the file ### Checklist - [x] I'm reporting that yt-dlp is broken on a **supported** site - [x] I've verified that I have **updated yt-dlp to nightly or master** ([update instructions](https://github.com/yt-dlp/yt-dlp#update-channels)) - [x] ...
[pp/FFmpegMetadata] Avoid erroneous ISO 639 conversions
Closes #16045 <details open><summary>Template</summary> <!-- OPEN is intentional --> ### Before submitting a *pull request* make sure you have: - [x] At least skimmed through [contributing guidelines](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#developer-instructions) including [yt-dlp coding ...
a6791415e04aaf4bb4c105991ceb3ca6b24afc18
a80d213b5dd2fdcda2b6c9d6de5dd5633464a8b5
diff --git a/yt_dlp/postprocessor/ffmpeg.py b/yt_dlp/postprocessor/ffmpeg.py index 0de39351e5c5..a25d40ff7ef5 100644 --- a/yt_dlp/postprocessor/ffmpeg.py +++ b/yt_dlp/postprocessor/ffmpeg.py @@ -777,7 +777,16 @@ def add(meta_list, info_list=None): stream_idx = 0 for fmt in info.get('requested_formats'...
[ "yt_dlp/postprocessor/ffmpeg.py" ]
[]
true
yt-dlp/yt-dlp
16,930
issue_to_patch
[utils] Fix `HTTPHeaderDict.__ior__`
<!-- **IMPORTANT**: PRs without the template will be CLOSED Due to the high volume of pull requests, it may be a while before your PR is reviewed. Please try to keep your pull request focused on a single bugfix or new feature. Pull requests with a vast scope and/or very large diff will take mu...
e47691215f75fe7e9684080d17fadf340c9a8450
519ccdf6a558cf8caf981ce1df1747a2fcccb09c
diff --git a/yt_dlp/utils/networking.py b/yt_dlp/utils/networking.py index 32c7acdb1483..33cca412dc38 100644 --- a/yt_dlp/utils/networking.py +++ b/yt_dlp/utils/networking.py @@ -64,7 +64,7 @@ def __ior__(self, other, /): other = other.sensitive() if isinstance(other, dict): self.upda...
[ "test/test_utils.py", "yt_dlp/utils/networking.py" ]
[]
diff --git a/test/test_utils.py b/test/test_utils.py index cd0fb0f2e970..8f86d151b28c 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -2172,6 +2172,10 @@ def test_http_header_dict(self): headers6 = HTTPHeaderDict(a=1, b=2) self.assertEqual(pickle.loads(pickle.dumps(headers6)), headers6) ...
true
yt-dlp/yt-dlp
16,839
issue_to_patch
[reddit] Download requires new javascript challenge or resulting cookie (Error: "Account authentication is required", or, failed to parse JSON) ### Checklist - [x] I'm reporting that yt-dlp is broken on a **supported** site - [x] I've verified that I have **updated yt-dlp to nightly or master** ([update instructions]...
[ie/reddit] Work around anonymous JSON API depreciation
Closes #16877 <!-- **IMPORTANT**: PRs without the template will be CLOSED Due to the high volume of pull requests, it may be a while before your PR is reviewed. Please try to keep your pull request focused on a single bugfix or new feature. Pull requests with a vast scope and/or very large ...
59bba1be7bb476d4445dc4eae94f602300cb865a
9ecf0c388e8c982a93a5f1e010a4dfdb81234d10
diff --git a/yt_dlp/extractor/reddit.py b/yt_dlp/extractor/reddit.py index be4c32e1350e..2684e3607c2e 100644 --- a/yt_dlp/extractor/reddit.py +++ b/yt_dlp/extractor/reddit.py @@ -265,7 +265,14 @@ class RedditIE(InfoExtractor): 'only_matching': True, }] + @property + def _is_logged_in(self): + ...
[ "yt_dlp/extractor/reddit.py" ]
[ { "comment": "this is unnecessary; the cookie is set for `.reddit.com` and kept in the cookiejar\r\n```suggestion\r\n```", "path": "yt_dlp/extractor/reddit.py", "hunk": "@@ -285,6 +285,10 @@ def _perform_login(self, username, password):\n raise ExtractorError('Unable to login, no cookie was ...
true
yt-dlp/yt-dlp
16,814
issue_to_patch
[ie/twitter] add `view_count` from GraphQL api
<!-- **IMPORTANT**: PRs without the template will be CLOSED Due to the high volume of pull requests, it may be a while before your PR is reviewed. Please try to keep your pull request focused on a single bugfix or new feature. Pull requests with a vast scope and/or very large diff will take mu...
37a8c6f42b1e0866bbeec47ca57a68a6ae63784e
562dbdc346025124c1cc39e0e97c235bd1056c16
diff --git a/yt_dlp/extractor/twitter.py b/yt_dlp/extractor/twitter.py index c75c5f1012c6..1b85f36faf18 100644 --- a/yt_dlp/extractor/twitter.py +++ b/yt_dlp/extractor/twitter.py @@ -977,6 +977,7 @@ class TwitterIE(TwitterBaseIE): 'repost_count': int, 'like_count': int, 'comment_c...
[ "yt_dlp/extractor/twitter.py" ]
[ { "comment": "I'm curious why `str_to_int`? Can you give examples of `.views.count` values returned by the API?", "path": "yt_dlp/extractor/twitter.py", "hunk": "@@ -1111,6 +1112,10 @@ def _graphql_to_legacy(self, data, twid):\n if binding_values:\n status['card']['binding_values'] =...
true
yt-dlp/yt-dlp
16,814
comment_to_fix
[ie/twitter] add `view_count` from GraphQL api
I'm curious why `str_to_int`? Can you give examples of `.views.count` values returned by the API?
37a8c6f42b1e0866bbeec47ca57a68a6ae63784e
562dbdc346025124c1cc39e0e97c235bd1056c16
diff --git a/yt_dlp/extractor/twitter.py b/yt_dlp/extractor/twitter.py index c75c5f1012c6..1b85f36faf18 100644 --- a/yt_dlp/extractor/twitter.py +++ b/yt_dlp/extractor/twitter.py @@ -977,6 +977,7 @@ class TwitterIE(TwitterBaseIE): 'repost_count': int, 'like_count': int, 'comment_c...
[ "yt_dlp/extractor/twitter.py" ]
[ { "comment": "I'm curious why `str_to_int`? Can you give examples of `.views.count` values returned by the API?", "path": "yt_dlp/extractor/twitter.py", "hunk": "@@ -1111,6 +1112,10 @@ def _graphql_to_legacy(self, data, twid):\n if binding_values:\n status['card']['binding_values'] =...
true
yt-dlp/yt-dlp
16,794
issue_to_patch
[PornHub] Unable to download webpage: HTTP Error 410: Gone ### Checklist - [x] I'm reporting that yt-dlp is broken on a **supported** site - [x] I've verified that I have **updated yt-dlp to nightly or master** ([update instructions](https://github.com/yt-dlp/yt-dlp#update-channels)) - [x] I've checked that all provi...
[ie/pornhub] Fix extractor
<!-- **IMPORTANT**: PRs without the template will be CLOSED Due to the high volume of pull requests, it may be a while before your PR is reviewed. Please try to keep your pull request focused on a single bugfix or new feature. Pull requests with a vast scope and/or very large diff will take mu...
618b5e446c4379c9d95fe7b30fd6a0fc6af19a70
04debe34fdddb13fc6740af8deeeaea566c7aeda
diff --git a/yt_dlp/extractor/pornhub.py b/yt_dlp/extractor/pornhub.py index 3fc802e15d2b..889eb8d259ba 100644 --- a/yt_dlp/extractor/pornhub.py +++ b/yt_dlp/extractor/pornhub.py @@ -17,6 +17,7 @@ int_or_none, merge_dicts, orderedSet, + parse_qs, remove_quotes, remove_start, str_to_int,...
[ "yt_dlp/extractor/pornhub.py" ]
[ { "comment": "Maybe something like this:\r\n```suggestion\r\n raise ExtractorError('Redirected to homepage; the video may be deleted or require logging in.', expected=True)\r\n```", "path": "yt_dlp/extractor/pornhub.py", "hunk": "@@ -300,6 +303,9 @@ def dl_webpage(platform):\n ...
true
yt-dlp/yt-dlp
16,794
comment_to_fix
[ie/pornhub] Fix extractor
Maybe something like this: ```suggestion raise ExtractorError('Redirected to homepage; the video may be deleted or require logging in.', expected=True) ```
618b5e446c4379c9d95fe7b30fd6a0fc6af19a70
04debe34fdddb13fc6740af8deeeaea566c7aeda
diff --git a/yt_dlp/extractor/pornhub.py b/yt_dlp/extractor/pornhub.py index 3fc802e15d2b..889eb8d259ba 100644 --- a/yt_dlp/extractor/pornhub.py +++ b/yt_dlp/extractor/pornhub.py @@ -17,6 +17,7 @@ int_or_none, merge_dicts, orderedSet, + parse_qs, remove_quotes, remove_start, str_to_int,...
[ "yt_dlp/extractor/pornhub.py" ]
[ { "comment": "Maybe something like this:\r\n```suggestion\r\n raise ExtractorError('Redirected to homepage; the video may be deleted or require logging in.', expected=True)\r\n```", "path": "yt_dlp/extractor/pornhub.py", "hunk": "@@ -300,6 +303,9 @@ def dl_webpage(platform):\n ...
true
yt-dlp/yt-dlp
16,794
comment_to_fix
[ie/pornhub] Fix extractor
This can be regular words: ```suggestion if self._search_regex(r'originPart\s*=\s*["\']([^"\']+)["\']', webpage, 'redirect to homepage', default='') == 'homepage': ```
618b5e446c4379c9d95fe7b30fd6a0fc6af19a70
04debe34fdddb13fc6740af8deeeaea566c7aeda
diff --git a/yt_dlp/extractor/pornhub.py b/yt_dlp/extractor/pornhub.py index 3fc802e15d2b..889eb8d259ba 100644 --- a/yt_dlp/extractor/pornhub.py +++ b/yt_dlp/extractor/pornhub.py @@ -17,6 +17,7 @@ int_or_none, merge_dicts, orderedSet, + parse_qs, remove_quotes, remove_start, str_to_int,...
[ "yt_dlp/extractor/pornhub.py" ]
[ { "comment": "This can be regular words:\n```suggestion\n if self._search_regex(r'originPart\\s*=\\s*[\"\\']([^\"\\']+)[\"\\']', webpage, 'redirect to homepage', default='') == 'homepage':\n```", "path": "yt_dlp/extractor/pornhub.py", "hunk": "@@ -300,6 +303,9 @@ def dl_webpage(platform):\n ...
true
yt-dlp/yt-dlp
16,794
comment_to_fix
[ie/pornhub] Fix extractor
I'd prefer not to change this until we know there's a purpose for doing so ```suggestion self._set_cookie(host, 'accessAgeDisclaimerPH', '1') # site sets '2' ```
618b5e446c4379c9d95fe7b30fd6a0fc6af19a70
04debe34fdddb13fc6740af8deeeaea566c7aeda
diff --git a/yt_dlp/extractor/pornhub.py b/yt_dlp/extractor/pornhub.py index 3fc802e15d2b..889eb8d259ba 100644 --- a/yt_dlp/extractor/pornhub.py +++ b/yt_dlp/extractor/pornhub.py @@ -17,6 +17,7 @@ int_or_none, merge_dicts, orderedSet, + parse_qs, remove_quotes, remove_start, str_to_int,...
[ "yt_dlp/extractor/pornhub.py" ]
[ { "comment": "I'd prefer not to change this until we know there's a purpose for doing so\r\n```suggestion\r\n self._set_cookie(host, 'accessAgeDisclaimerPH', '1') # site sets '2'\r\n```", "path": "yt_dlp/extractor/pornhub.py", "hunk": "@@ -61,7 +61,7 @@ def _real_initialize(self):\n \n def _...
true
yt-dlp/yt-dlp
16,794
comment_to_fix
[ie/pornhub] Fix extractor
```suggestion webpage, urlh = self._download_webpage_handle( f'https://www.{host}/view_video.php?viewkey={video_id}', ```
618b5e446c4379c9d95fe7b30fd6a0fc6af19a70
04debe34fdddb13fc6740af8deeeaea566c7aeda
diff --git a/yt_dlp/extractor/pornhub.py b/yt_dlp/extractor/pornhub.py index 3fc802e15d2b..889eb8d259ba 100644 --- a/yt_dlp/extractor/pornhub.py +++ b/yt_dlp/extractor/pornhub.py @@ -17,6 +17,7 @@ int_or_none, merge_dicts, orderedSet, + parse_qs, remove_quotes, remove_start, str_to_int,...
[ "yt_dlp/extractor/pornhub.py" ]
[ { "comment": "```suggestion\r\n webpage, urlh = self._download_webpage_handle(\r\n f'https://www.{host}/view_video.php?viewkey={video_id}',\r\n```", "path": "yt_dlp/extractor/pornhub.py", "hunk": "@@ -281,7 +281,10 @@ def dl_webpage(platform):\n self._set_cookie(hos...
true
yt-dlp/yt-dlp
16,794
comment_to_fix
[ie/pornhub] Fix extractor
Please try to keep the diff minimal (i.e. don't change formatting unnecessarily). it makes it easier for me to review I think we could detect the redirect here instead of below ```suggestion video_id, f'Downloading {platform} webpage', impersonate=True) if parse_qs(url...
618b5e446c4379c9d95fe7b30fd6a0fc6af19a70
04debe34fdddb13fc6740af8deeeaea566c7aeda
diff --git a/yt_dlp/extractor/pornhub.py b/yt_dlp/extractor/pornhub.py index 3fc802e15d2b..889eb8d259ba 100644 --- a/yt_dlp/extractor/pornhub.py +++ b/yt_dlp/extractor/pornhub.py @@ -17,6 +17,7 @@ int_or_none, merge_dicts, orderedSet, + parse_qs, remove_quotes, remove_start, str_to_int,...
[ "yt_dlp/extractor/pornhub.py" ]
[ { "comment": "Please try to keep the diff minimal (i.e. don't change formatting unnecessarily). it makes it easier for me to review\r\n\r\nI think we could detect the redirect here instead of below\r\n```suggestion\r\n video_id, f'Downloading {platform} webpage',\r\n impersonate=Tr...
true
yt-dlp/yt-dlp
16,794
comment_to_fix
[ie/pornhub] Fix extractor
see my suggestion above ```suggestion ```
618b5e446c4379c9d95fe7b30fd6a0fc6af19a70
04debe34fdddb13fc6740af8deeeaea566c7aeda
diff --git a/yt_dlp/extractor/pornhub.py b/yt_dlp/extractor/pornhub.py index 3fc802e15d2b..889eb8d259ba 100644 --- a/yt_dlp/extractor/pornhub.py +++ b/yt_dlp/extractor/pornhub.py @@ -17,6 +17,7 @@ int_or_none, merge_dicts, orderedSet, + parse_qs, remove_quotes, remove_start, str_to_int,...
[ "yt_dlp/extractor/pornhub.py" ]
[ { "comment": "see my suggestion above\r\n```suggestion\r\n```", "path": "yt_dlp/extractor/pornhub.py", "hunk": "@@ -300,6 +303,9 @@ def dl_webpage(platform):\n r'>\\s*This content is unavailable in your country')):\n self.raise_geo_restricted()\n \n+ if self._search_re...
true
yt-dlp/yt-dlp
16,794
comment_to_fix
[ie/pornhub] Fix extractor
I'd make this a class var and add a comment about why they're needed
618b5e446c4379c9d95fe7b30fd6a0fc6af19a70
04debe34fdddb13fc6740af8deeeaea566c7aeda
diff --git a/yt_dlp/extractor/pornhub.py b/yt_dlp/extractor/pornhub.py index 3fc802e15d2b..889eb8d259ba 100644 --- a/yt_dlp/extractor/pornhub.py +++ b/yt_dlp/extractor/pornhub.py @@ -17,6 +17,7 @@ int_or_none, merge_dicts, orderedSet, + parse_qs, remove_quotes, remove_start, str_to_int,...
[ "yt_dlp/extractor/pornhub.py" ]
[ { "comment": "I'd make this a class var and add a comment about why they're needed", "path": "yt_dlp/extractor/pornhub.py", "hunk": "@@ -423,15 +429,16 @@ def parse_quality_items(quality_items):\n formats = []\n \n def add_format(format_url, height=None):\n+ headers = {'origin...
true
yt-dlp/yt-dlp
16,794
comment_to_fix
[ie/pornhub] Fix extractor
```suggestion @staticmethod def _get_headers(host): return { # Origin & Referer are needed for manifest requests to avoid HTTP Errror 412 'Origin': f'https://www.{host}', 'Referer': f'https://www.{host}/', } ```
618b5e446c4379c9d95fe7b30fd6a0fc6af19a70
04debe34fdddb13fc6740af8deeeaea566c7aeda
diff --git a/yt_dlp/extractor/pornhub.py b/yt_dlp/extractor/pornhub.py index 3fc802e15d2b..889eb8d259ba 100644 --- a/yt_dlp/extractor/pornhub.py +++ b/yt_dlp/extractor/pornhub.py @@ -17,6 +17,7 @@ int_or_none, merge_dicts, orderedSet, + parse_qs, remove_quotes, remove_start, str_to_int,...
[ "yt_dlp/extractor/pornhub.py" ]
[ { "comment": "```suggestion\r\n @staticmethod\r\n def _get_headers(host):\r\n return {\r\n # Origin & Referer are needed for manifest requests to avoid HTTP Errror 412\r\n 'Origin': f'https://www.{host}',\r\n 'Referer': f'https://www.{host}/',\r\n }\r\n```", ...
true
yt-dlp/yt-dlp
16,794
comment_to_fix
[ie/pornhub] Fix extractor
```suggestion headers = self._get_headers(host) ```
618b5e446c4379c9d95fe7b30fd6a0fc6af19a70
04debe34fdddb13fc6740af8deeeaea566c7aeda
diff --git a/yt_dlp/extractor/pornhub.py b/yt_dlp/extractor/pornhub.py index 3fc802e15d2b..889eb8d259ba 100644 --- a/yt_dlp/extractor/pornhub.py +++ b/yt_dlp/extractor/pornhub.py @@ -17,6 +17,7 @@ int_or_none, merge_dicts, orderedSet, + parse_qs, remove_quotes, remove_start, str_to_int,...
[ "yt_dlp/extractor/pornhub.py" ]
[ { "comment": "```suggestion\r\n headers = self._get_headers(host)\r\n```", "path": "yt_dlp/extractor/pornhub.py", "hunk": "@@ -423,15 +437,16 @@ def parse_quality_items(quality_items):\n formats = []\n \n def add_format(format_url, height=None):\n+ headers = self._h...
true
yt-dlp/yt-dlp
16,794
comment_to_fix
[ie/pornhub] Fix extractor
```suggestion 'http_headers': self._get_headers(host), ```
618b5e446c4379c9d95fe7b30fd6a0fc6af19a70
04debe34fdddb13fc6740af8deeeaea566c7aeda
diff --git a/yt_dlp/extractor/pornhub.py b/yt_dlp/extractor/pornhub.py index 3fc802e15d2b..889eb8d259ba 100644 --- a/yt_dlp/extractor/pornhub.py +++ b/yt_dlp/extractor/pornhub.py @@ -17,6 +17,7 @@ int_or_none, merge_dicts, orderedSet, + parse_qs, remove_quotes, remove_start, str_to_int,...
[ "yt_dlp/extractor/pornhub.py" ]
[ { "comment": "```suggestion\r\n 'http_headers': self._get_headers(host),\r\n```", "path": "yt_dlp/extractor/pornhub.py", "hunk": "@@ -506,7 +521,7 @@ def extract_vote_count(kind, name):\n 'cast': ({find_elements(attr='data-label', value='pornstar')}, ..., {clean_html}),\n ...
true
yt-dlp/yt-dlp
16,920
issue_to_patch
compat-options allow-unsafe-ext errors yt-dlp ### Checklist - [x] I'm reporting a bug unrelated to a specific site - [x] I've verified that I have **updated yt-dlp to nightly or master** ([update instructions](https://github.com/yt-dlp/yt-dlp#update-channels)) - [x] I've searched [known issues](https://github.com/yt-...
Fix `allow-unsafe-ext` compat option
Fix regression introduced in e578e265f7c6ca94a74b30e0d8d6196a4d19fb6a Closes #16919 <details open><summary>Template</summary> <!-- OPEN is intentional --> ### Before submitting a *pull request* make sure you have: - [x] At least skimmed through [contributing guidelines](https://github.com/yt-dlp/yt-dlp/blob...
7f7bdc974dc61d941d1a0d51c4e21a0fdb7b2d06
d3bd1b8cc344064ceb6b69b3ee11c308c01e57ed
diff --git a/yt_dlp/__init__.py b/yt_dlp/__init__.py index 18cf4c8d2c3f..ec3d52755dc6 100644 --- a/yt_dlp/__init__.py +++ b/yt_dlp/__init__.py @@ -619,7 +619,7 @@ def report_conflict(arg1, opt1, arg2='--allow-unplayable-formats', opt2='allow_u warnings.append( 'Using allow-unsafe-ext opens you up ...
[ "test/test_utils.py", "yt_dlp/__init__.py", "yt_dlp/utils/_utils.py" ]
[]
diff --git a/test/test_utils.py b/test/test_utils.py index 180ede624077..cd0fb0f2e970 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -327,6 +327,12 @@ def test_prepend_extension(self): with self.assertRaises(_UnsafeExtensionError): prepend_extension('abc.unexpected_ext', ext, ...
true
yt-dlp/yt-dlp
16,925
issue_to_patch
[Bandcamp:weekly] Extractor error 'compiledTrack' ### Checklist - [x] I'm reporting that yt-dlp is broken on a **supported** site - [x] I've verified that I have **updated yt-dlp to nightly or master** ([update instructions](https://github.com/yt-dlp/yt-dlp#update-channels)) - [x] I've checked that all provided URLs ...
[ie/bandcamp:weekly] Fix extractor
Closes #16924 <details open><summary>Template</summary> <!-- OPEN is intentional --> ### Before submitting a *pull request* make sure you have: - [x] At least skimmed through [contributing guidelines](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#developer-instructions) including [yt-dlp codin...
7f7bdc974dc61d941d1a0d51c4e21a0fdb7b2d06
209b04bfd043e2dbf3dac718a2277f52a81a960d
diff --git a/yt_dlp/extractor/bandcamp.py b/yt_dlp/extractor/bandcamp.py index f699d2dd9ee0..e1e2a5edb02b 100644 --- a/yt_dlp/extractor/bandcamp.py +++ b/yt_dlp/extractor/bandcamp.py @@ -420,10 +420,10 @@ class BandcampWeeklyIE(BandcampIE): # XXX: Do not subclass from concrete IE 'info_dict': { '...
[ "yt_dlp/extractor/bandcamp.py" ]
[]
true
yt-dlp/yt-dlp
16,502
issue_to_patch
[AbemaTV]Add subtitle support ### Checklist - [x] I'm requesting a site-specific feature - [x] I've verified that I have **updated yt-dlp to nightly or master** ([update instructions](https://github.com/yt-dlp/yt-dlp#update-channels)) - [x] I've checked that all provided URLs are playable in a browser with the same I...
[ie/AbemaTV] Extract subtitles
<!-- **IMPORTANT**: PRs without the template will be CLOSED Due to the high volume of pull requests, it may be a while before your PR is reviewed. Please try to keep your pull request focused on a single bugfix or new feature. Pull requests with a vast scope and/or very large diff will take mu...
1a1481e89b28ff1bf3f00eda00a66071f8caba9f
08d311474fbb9856313114934e4e17d0388890b2
diff --git a/yt_dlp/extractor/abematv.py b/yt_dlp/extractor/abematv.py index 8f2fc4c80aa5..5269258319a1 100644 --- a/yt_dlp/extractor/abematv.py +++ b/yt_dlp/extractor/abematv.py @@ -407,7 +407,7 @@ def _real_extract(self, url): if is_live: self.report_warning("This is a livestream; yt-dlp doesn't...
[ "yt_dlp/extractor/abematv.py" ]
[ { "comment": "subs aren't provided for livestreams, right?", "path": "yt_dlp/extractor/abematv.py", "hunk": "@@ -407,14 +407,15 @@ def _real_extract(self, url):\n if is_live:\n self.report_warning(\"This is a livestream; yt-dlp doesn't support downloading natively, but FFmpeg cannot ...
true
yt-dlp/yt-dlp
15,413
issue_to_patch
[ie/wikimedia] Rewrite extractor
<!-- **IMPORTANT**: PRs without the template will be CLOSED Due to the high volume of pull requests, it may be a while before your PR is reviewed. Please try to keep your pull request focused on a single bugfix or new feature. Pull requests with a vast scope and/or very large diff will take mu...
aaa1c78956ed4ff63df067671396de864afdc43e
5a004ed5d5fa24753b4ef4f5a6d523efd2d1672f
diff --git a/yt_dlp/extractor/wikimedia.py b/yt_dlp/extractor/wikimedia.py index 63269306856c..8332987a0f53 100644 --- a/yt_dlp/extractor/wikimedia.py +++ b/yt_dlp/extractor/wikimedia.py @@ -1,55 +1,133 @@ import re +import urllib.parse from .common import InfoExtractor from ..utils import ( clean_html, - ...
[ "yt_dlp/extractor/wikimedia.py" ]
[]
true
yt-dlp/yt-dlp
14,893
issue_to_patch
[docs] Update badges
<!-- **IMPORTANT**: PRs without the template will be CLOSED Due to the high volume of pull requests, it may be a while before your PR is reviewed. Please try to keep your pull request focused on a single bugfix or new feature. Pull requests with a vast scope and/or very large diff will take mu...
3d1f8a4a0d4da01fac484bd1593056a1dc9f30a9
bef201c9e0bc147a08bab280bef06848d98ce545
diff --git a/README.md b/README.md index e334bec8ed41..3b4d82e4aa9d 100644 --- a/README.md +++ b/README.md @@ -3,15 +3,12 @@ [![YT-DLP](https://raw.githubusercontent.com/yt-dlp/yt-dlp/master/.github/banner.svg)](#readme) -[![Release version](https://img.shields.io/github/v/release/yt-dlp/yt-dlp?color=brightgreen&l...
[ "README.md" ]
[]
true