Remove PackageArchive::$package
authorTim Düsterhus <duesterhus@woltlab.com>
Fri, 18 Nov 2022 09:55:22 +0000 (10:55 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Fri, 18 Nov 2022 10:00:52 +0000 (11:00 +0100)
This property is no longer used.

wcfsetup/install/files/lib/system/package/PackageArchive.class.php
wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php

index 685a41e69ac951de22a130dbade9c5c2182f1bd0..783013fae183e5f8f3276e7766a21aa2876e368e 100644 (file)
@@ -28,12 +28,6 @@ class PackageArchive
      */
     protected $archive;
 
-    /**
-     * package object of an existing package
-     * @var Package
-     */
-    protected $package;
-
     /**
      * tar archive object
      * @var Tar
@@ -95,13 +89,11 @@ class PackageArchive
      * Creates a new PackageArchive object.
      *
      * @param string $archive
-     * @param Package $package
      */
-    public function __construct($archive, ?Package $package = null)
+    public function __construct($archive)
     {
         $this->archive = $archive;  // be careful: this is a string within this class,
         // but an object in the packageStartInstallForm.class!
-        $this->package = $package;
     }
 
     /**
index 66063b83a672b3ffd4bdf47ba544b89cc0664e08..59ca2d7935304f5dc8c11994e87598d7be1f3ab4 100644 (file)
@@ -477,7 +477,7 @@ class PackageInstallationDispatcher
                 }
             }
 
-            $this->archive = new PackageArchive($this->queue->archive, $this->getPackage());
+            $this->archive = new PackageArchive($this->queue->archive);
             if (!\str_starts_with(\realpath($this->archive->getArchive()), \TMP_DIR)) {
                 throw new \Exception('Refusing to handle an archive outside of the temporary directory.');
             }