From e302d69c063d634979b4837ca7a361b8f89736a0 Mon Sep 17 00:00:00 2001 From: Ahmed Alaa <92916738+AhmedAlaa4611@users.noreply.github.com> Date: Tue, 21 Oct 2025 21:59:26 +0300 Subject: [PATCH 1/3] Update EloquentNamedScopeAttributeTest.php --- .../Database/EloquentNamedScopeAttributeTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/Integration/Database/EloquentNamedScopeAttributeTest.php b/tests/Integration/Database/EloquentNamedScopeAttributeTest.php index 5d1441a43e3a..8dfc37c6fa7e 100644 --- a/tests/Integration/Database/EloquentNamedScopeAttributeTest.php +++ b/tests/Integration/Database/EloquentNamedScopeAttributeTest.php @@ -21,7 +21,7 @@ protected function setUp(): void ); } - #[DataProvider('namedScopeDataProvider')] + #[DataProvider('scopeDataProvider')] public function test_it_can_query_named_scoped_from_the_query_builder(string $methodName) { $query = Fixtures\NamedScopeUser::query()->{$methodName}(true); @@ -29,7 +29,7 @@ public function test_it_can_query_named_scoped_from_the_query_builder(string $me $this->assertSame($this->query, $query->toRawSql()); } - #[DataProvider('namedScopeDataProvider')] + #[DataProvider('scopeDataProvider')] public function test_it_can_query_named_scoped_from_static_query(string $methodName) { $query = Fixtures\NamedScopeUser::{$methodName}(true); @@ -37,7 +37,7 @@ public function test_it_can_query_named_scoped_from_static_query(string $methodN $this->assertSame($this->query, $query->toRawSql()); } - public static function namedScopeDataProvider(): array + public static function scopeDataProvider(): array { return [ 'scope with return' => ['verified'], From ee33e1063f0eaba69133027ca0ed85577faae357 Mon Sep 17 00:00:00 2001 From: Ahmed Alaa <92916738+AhmedAlaa4611@users.noreply.github.com> Date: Tue, 21 Oct 2025 22:00:06 +0300 Subject: [PATCH 2/3] Update NamedScopeUser.php --- tests/Integration/Database/Fixtures/NamedScopeUser.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/Integration/Database/Fixtures/NamedScopeUser.php b/tests/Integration/Database/Fixtures/NamedScopeUser.php index b33b8823dc2e..d677aefab294 100644 --- a/tests/Integration/Database/Fixtures/NamedScopeUser.php +++ b/tests/Integration/Database/Fixtures/NamedScopeUser.php @@ -2,7 +2,7 @@ namespace Illuminate\Tests\Integration\Database\Fixtures; -use Illuminate\Database\Eloquent\Attributes\Scope as NamedScope; +use Illuminate\Database\Eloquent\Attributes\Scope; use Illuminate\Database\Eloquent\Builder; class NamedScopeUser extends User @@ -17,7 +17,7 @@ protected function casts(): array ]; } - #[NamedScope] + #[Scope] protected function verified(Builder $builder, bool $email = true) { return $builder->when( @@ -27,7 +27,7 @@ protected function verified(Builder $builder, bool $email = true) ); } - #[NamedScope] + #[Scope] protected function verifiedWithoutReturn(Builder $builder, bool $email = true) { $this->verified($builder, $email); From 86df66b15438de391d77d906e127160ad651bc25 Mon Sep 17 00:00:00 2001 From: Ahmed Alaa <92916738+AhmedAlaa4611@users.noreply.github.com> Date: Tue, 21 Oct 2025 22:00:37 +0300 Subject: [PATCH 3/3] Update EloquentModelScopeTest.php --- tests/Integration/Database/EloquentModelScopeTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Integration/Database/EloquentModelScopeTest.php b/tests/Integration/Database/EloquentModelScopeTest.php index 7ea822b42810..8fca382000a7 100644 --- a/tests/Integration/Database/EloquentModelScopeTest.php +++ b/tests/Integration/Database/EloquentModelScopeTest.php @@ -3,7 +3,7 @@ namespace Illuminate\Tests\Integration\Database; use Illuminate\Contracts\Database\Eloquent\Builder; -use Illuminate\Database\Eloquent\Attributes\Scope as NamedScope; +use Illuminate\Database\Eloquent\Attributes\Scope; use Illuminate\Database\Eloquent\Model; class EloquentModelScopeTest extends DatabaseTestCase @@ -37,7 +37,7 @@ public function scopeExists(Builder $builder) return $builder; } - #[NamedScope] + #[Scope] protected function existsAsWell(Builder $builder) { return $builder;