Possible to overwrite a total broken installation?

I wanted to migrate v4 to v5 and the process got struck with a couple of errors from laravel and composer. now I have a total broken frankenstein and get a 500 error when trying to access the public folder. cannot even login anymore.

composer install gives me

Carbon 1 is deprecated, see how to migrate to Carbon 2.
https://carbon.nesbot.com/docs/#api-carbon-2
You can run ‘./vendor/bin/upgrade-carbon’ to get help in updating carbon and other frameworks and libraries that dep

Illuminate\Foundation\ComposerScripts::postAutoloadDump
@php artisan package:discover

In Container.php line 752:

Class LaravelCrawlerDetect does not exist

50 packages you are using are looking for funding.
Use the composer fund command to find out more!
[codeception/c3] Copying c3.php to the root of your project…
[codeception/c3] Include c3.php into index.php in order to collect codecoverage from server scripts

rm bootstrap/cache/compiled.php || true
rm: cannot remove ‘bootstrap/cache/compiled.php’: No such file or directory
php artisan view:clear

In Container.php line 752:

Class LaravelCrawlerDetect does not exist

php artisan clear-compiled

In Container.php line 752:

Class LaravelCrawlerDetect does not exist


I even tried to install v5 clean in another dictionary on the server but funny it gives the same problems , with composer installation.

Is there is simple way to overwrite the mess ? without deleting data?

Hi,

Are you seeing errors in v4 or v5?

both installations are not working, the old
4.52 and the newer 5.2

php artisan optimize gives me this output:

[20-Jul-2021 20:19:36 Europe/Berlin] PHP Warning: require(/var/www/virtual/mphoto/invoice.martin-peterdamm.com/vendor/composer/…/symfony/var-dumper/Resources/functions/dump.php): failed to open stream: No such file or directory in /var/www/virtual/mphoto/invoice.martin-peterdamm.com/vendor/composer/autoload_real.php on line 71
[20-Jul-2021 20:19:36 Europe/Berlin] PHP Fatal error: require(): Failed opening required ‘/var/www/virtual/mphoto/invoice.martin-peterdamm.com/vendor/composer/…/symfony/var-dumper/Resources/functions/dump.php’ (include_path=’.:/opt/remi/php73/root/usr/share/pear:/opt/remi/php73/root/usr/share/php:/usr/share/pear:/usr/share/php’) in /var/www/virtual/mphoto/invoice.martin-peterdamm.com/vendor/composer/autoload_real.php on line 71

composer install --no-interaction

Gives this

v5 requires composer v2, maybe that’s the problem?

Also, if you’re running both apps on the same server you’d need to use PHP 7.3

I’m aware of PHP 7.3 and have it running.

just for my understanding, if I install v5 in a different folder on the server via git … I will not get composer 2.0 by this ?

btw. in all this I tried to update composer alone and got struck. from my understanding the whole mess has to do with composer laravee.

You can avoid using composer by using the selfhost zip, it includes all of the vendor files.

https://github.com/invoiceninja/invoiceninja/releases/download/v5.2.14/invoiceninja.zip

If your v4 install is still broken you can download the selfhost v4 zip here:

https://download.invoiceninja.com

If you are having trouble also migrating it might be easier for you, as it was for me, to export and import your data with .csv files instead. It wasn’t too difficult, I made a mistake first try but it was easy enough to delete the company and remake it and import again the right way. I got all my invoice, payment, customer, and expense records over cleanly in the end with .csv export from v4 and import in v5.

https://invoiceninja.github.io/docs/basic-settings/#import_export