From ea46cf36d0b92c06dc2ebb05df753ba30ef4a773 Mon Sep 17 00:00:00 2001 From: Deon George Date: Sun, 27 Apr 2025 09:21:51 +1000 Subject: [PATCH] Remove deprecteated Entry::query() override and associated noObjectAttributes() it wasnt used --- app/Http/Controllers/HomeController.php | 5 ++--- app/Ldap/Entry.php | 25 ------------------------- 2 files changed, 2 insertions(+), 28 deletions(-) diff --git a/app/Http/Controllers/HomeController.php b/app/Http/Controllers/HomeController.php index dd804bee..2b5e73aa 100644 --- a/app/Http/Controllers/HomeController.php +++ b/app/Http/Controllers/HomeController.php @@ -45,7 +45,7 @@ class HomeController extends Controller * Create a new object in the LDAP server * * @param EntryAddRequest $request - * @return View + * @return \Illuminate\View\View * @throws InvalidUsage */ public function entry_add(EntryAddRequest $request): \Illuminate\View\View @@ -189,8 +189,7 @@ class HomeController extends Controller { $dn = Crypt::decryptString($id); - $result = (new Entry) - ->query() + $result = Entry::query() ->setDn($dn) ->recursive() ->get(); diff --git a/app/Ldap/Entry.php b/app/Ldap/Entry.php index cc49603a..2dc9c91c 100644 --- a/app/Ldap/Entry.php +++ b/app/Ldap/Entry.php @@ -27,8 +27,6 @@ class Entry extends Model // Our Attribute objects private Collection $objects; - /* @deprecated */ - private bool $noObjectAttributes = FALSE; // For new entries, this is the container that this entry will be stored in private string $rdnbase; @@ -84,16 +82,6 @@ class Entry extends Model || (! $this->getObject($attribute)->isDirty()); } - public static function query(bool $noattrs=false): Builder - { - $o = new static; - - if ($noattrs) - $o->noObjectAttributes(); - - return $o->newQuery(); - } - /** * As attribute values are updated, or new ones created, we need to mirror that * into our $objects. This is called when we $o->key = $value @@ -539,19 +527,6 @@ class Entry extends Model return [$attribute,$tags]; } - /** - * Dont convert our $this->attributes to $this->objects when creating a new Entry::class - * - * @return $this - * @deprecated - */ - public function noObjectAttributes(): static - { - $this->noObjectAttributes = TRUE; - - return $this; - } - public function setRDNBase(string $bdn): void { if ($this->exists)