public static function fromArray(array $array, $strict = true)
    {
        $details = (object)$array;
        $packageNameDetails = self::parseVendorAndPackage(object_get($details, 'name', null));

        $description = object_get($details, 'description', null);
        $license = object_get($details, 'license', null);
        $authors = object_get($details, 'authors', null);

        // Throw exceptions if the developer wants us to be super strict.
        if ($strict) {
            self::throwInvalidArgumentException($description, 'Invalid package description.');
            self::throwInvalidArgumentException($license, 'Invalid package license.');
            self::throwInvalidArgumentException($authors, 'Invalid package authors.');
        }

        $package = new Package;
        $package->setAuthors($authors);
        $package->setDescription($description);
        $package->setLicense($license);
        $package->setVendor($packageNameDetails[0]);
        $package->setPackage($packageNameDetails[1]);

        return $package;
    }