Best Way to migrate to V5


I have few questions in regarding to migrating to v5. I have currently v4.5.21 installed on ubuntu 18.04 with php 7.2.

for V5 i will need php 7.3 at least and i have few questions.

Can i have both V4 and V5 installed on the same server and working on another way if i moved to php 7.3 on my current server i can have both versions working ??

If not and i have to install in a new server will the migrate work ?


Yes, you can run both app sides by side on a PHP 7,3 server

thanks for the quick reply, however what other php modules i should install along with the php 7.3 ??

(the list of php extensions needed is here)


Now i have php 7.3 installed and invoice ninja 4 working fine, however when i try to access my invoice ninja 5 setup i am getting the following error

Composer detected issues in your platform: Your Composer dependencies require a PHP version “>= 7.4.0”.

I am using the latest release v5.0.31-release

Not sure, the code specifies 7.3 or 7.4

Very weird,

this is the error message i get
“Composer detected issues in your platform: Your Composer dependencies require a PHP version “>= 7.4.0”.”

however i checked my composer.json file and it says require php >=7.3

not sure where else i should be look ? any idea ??

Note: i am using apache and my virtual host root folder /var/www/html/ninja5/public not sure if this is the correct path or not, but i copied what i had for v4. I have the extracted files inside the /var/www.html/ninja5 folder.

from my apache error logs found the following

[Mon Dec 07 10:25:18.536646 2020] [php7:error] [pid 373098] [client] PHP Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version “>= 7.4.0”. You are running in /var/www/html/ninja5/vendor/composer/platform_check.php on line 24

when i check the platform_check.php it is mentioned there that php >=7.4.0

Changing this value just change the error message. but doesn’t fix the issue

What happens when you run this command in the Invoice Ninja folder:

composer check-platform-reqs

Long output in red here you are a first part of it:

“Unknown package has no name defined ([{“name”:“asgrim/ofxparser”,“version”:“1.2.2”,“version_normalized”:“”,“source”:{“type”:“git”,“url”:“https://",“reference”:“a7cc813eed19df612fc58bbe9fc89837ed98b3bf”},“dist”:{“type”:“zip”,“url”:"
illaume Bailleul",“email”:"”,“homepage”:“”},{“name”:“James Titcumb”,“email”:“hello@jamestitc”,“homepage”:“"},{“name”:"Oliver Lowe",“email”:"”}],“description”:“Simple OFX file parser”,“keywo
rds”:[“finance”,“ofx”,“open financial exchange”,“parser”],“support”:{“issues”:“",“source”:"https://github.
tps://”,“license”:[“proprietary”],“description”:“Official PHP SDK for Authorize.Net”,“homepage”:“http://developer.authorize.n
ckets”:"*",“nette/neon”:"^2.3",“paragonie/random_compat”:">= 2",“phpunit/phpunit”:"^4.8.35|^5.4.3",“psr/cache”:"^1.0",“psr/simple-cache”:"^1.0",“sebas

Not sure what is the packages he is talking about.

Here you are a part that says requires php 7.4
},“notification-url”:“",“license”:[“MIT”],“authors”:[{“name”:"Freek Van der Herten”,“email”:“”,"homepage

When i run the command on the old v4 directory i get different response:

gwadmin@websrv:/var/www/html/ninja$ composer check-platform-reqs
ext-curl 7.3.24 success
ext-dom 20031129 success
ext-fileinfo 7.3.24 success
ext-gd n/a invoiceninja/invoiceninja requires ext-gd (*) missing
ext-gmp 7.3.24 success
ext-hash 7.3.24 success
ext-iconv 7.3.24 success
ext-json 1.7.0 success
ext-mbstring 7.3.24 success
ext-openssl 7.3.24 success
ext-pcre 7.3.24 success
ext-SimpleXML 7.3.24 success
ext-SPL 7.3.24 success
ext-tokenizer 7.3.24 success
ext-xml 7.3.24 success
ext-xmlreader 7.3.24 success
ext-xmlwriter 7.3.24 success
ext-zip 1.15.4 success
lib-libxml 2.9.10 success
php 7.3.24 success

from one of the forum i found that i didn’t run the following command:

php /usr/bin/composer install --no-dev

When i run this command i am getting the following error :slight_smile:
Problem 1
- spatie/browsershot 3.41.0 requires php ^7.4|^8.0 -> your PHP version (7.3.24) does not satisfy that requirement.
- spatie/browsershot 3.41.0 requires php ^7.4|^8.0 -> your PHP version (7.3.24) does not satisfy that requirement.
- Installation request for spatie/browsershot 3.41.0 -> satisfiable by spatie/browsershot[3.41.0].

The original guide from invoice ninja didn’t mention this step though. Not sure which guide i should follow for my installation now


@gerootech you are correct. It appears the latest version of Browsershot upgrades their requirements to 7.4

I think we can wind back to Browsershot 3.40.2 which supported 7.1 without any pain.

Tagging @hillel and @ben for reference.

@david @hillel @ben Is there a specific version that i can use that uses Browsershot 3.40.2 ?? or will you be able to provide a quick update to fix this ??

@gerootech it’ll be in the next release, if you can’t wait that long… edit the composer.json file and set the line with browsershot to


Then you’ll just need to run composer update and you will be back in action :slight_smile:

@david i update my json file and ran php /usr/bin/composer update, and it gives me killed after a while,

When i try install --no-dev it give me the same dependencies as if i didn’t change the browsershot version to 3.40.21 in the composer.json file.

Note: I have 2 composer versions in my server and i am sorry i am not a developer so i am trying to figure out things but sometimes it is hard for me to understand why the steps required or how things should work.

I have one composer located at /usr/local/bin (v 1.7.3 - This one most probably from ubuntu 1804 as i have upgraded recently to ubuntu 20.04) and the other /user/bin (v 1.10.1) - I have just renamed the older version for now to make sure i am not confused. as when i run just composer it was picking the 1.7.3 version.

@gerootech I think you will need to upgrade composer to V2

composer self-update --2

Finally i managed to get V5 working, thanks for all the help, i will test the migration and will keep you guys posted.

Is there a way to move the white label as well ??

1 Like

Awesome! If you have the license you can apply it on Settings > Account Management

@hillel Thanks, and by the way i am using local domain (cannot get a public trusted cert) and was hoping that i can switch to SSL, however the android app still complaining about the selfcert for v5.

I was hoping this would be fixed in V5 though.