YunoHost-Apps / snipeit_ynh

Snipe-IT package for YunoHost
https://snipeitapp.com/
GNU Affero General Public License v3.0
2 stars 1 forks source link

Solved: Upgrade to 6.3.0 fails: Class 'Adldap\Adldap' not found #43

Closed jakobkilian closed 3 months ago

jakobkilian commented 7 months ago

Describe the bug

Upgrading Snipe-it results in: "Class 'Adldap\Adldap' not found"

Context

Steps to reproduce

Expected behavior

successful upgrade...

What I tried

most probably relates to these:

→ but how can I run the suggested composer commands in the upgrade script?

so I removed (probably flying blind) everything related to adldap in /var/www/snipeit/

Logs

YunPaste Logs

most importantly:

2024-02-22 20:18:09,485: DEBUG - + php8.1 artisan config:clear -n
2024-02-22 20:18:09,848: DEBUG - 
2024-02-22 20:18:09,849: DEBUG -    Error
2024-02-22 20:18:09,849: DEBUG - 
2024-02-22 20:18:09,849: DEBUG -   Class "Adldap\Adldap" not found
2024-02-22 20:18:09,850: DEBUG - 
2024-02-22 20:18:09,850: DEBUG -   at app/Services/LdapAd.php:99
2024-02-22 20:18:09,853: DEBUG -      95▕             sets up an 'account_suffix' of '@'.$this->ldapSettings['ad_domain'] *IF* the user has
2024-02-22 20:18:09,854: DEBUG -      96▕             $this->ldapSettings['ad_append_domain'] enabled.
2024-02-22 20:18:09,854: DEBUG -      97▕             That code in ldapLogin gets simplified, in exchange for putting all the weirdness here only.
2024-02-22 20:18:09,854: DEBUG -      98▕             */
2024-02-22 20:18:09,854: DEBUG -   ➜  99▕             $this->ldap = new Adldap();
2024-02-22 20:18:09,855: DEBUG -     100▕             $this->ldap->addProvider($this->ldapConfig);
2024-02-22 20:18:09,855: DEBUG -     101▕             return true;
2024-02-22 20:18:09,855: DEBUG -     102▕         }
2024-02-22 20:18:09,855: DEBUG -     103▕         return false;
2024-02-22 20:18:09,857: DEBUG - 
2024-02-22 20:18:09,857: DEBUG -   1   app/Services/LdapAd.php:107
2024-02-22 20:18:09,858: DEBUG -       App\Services\LdapAd::init()
2024-02-22 20:18:09,858: DEBUG - 
2024-02-22 20:18:09,858: DEBUG -   2   [internal]:0
2024-02-22 20:18:09,858: DEBUG -       App\Services\LdapAd::__construct()
jakobkilian commented 3 months ago

Revisited this topic and found an easy workaround from here: deactivate LDAP, run the update in yunohost, reactivate