Best Way to migrate to V5

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.

This isn’t broken, all versions of the mobile app require a trusted cert. We suggest using Let’s Encrypt.

@hillel i am using a trusted cert but not public trusted cert, the CA signed the cert is trusted by my phone, i believe you mentioned to me in another conversation that the mobile app is using it is own store for trusted cert and doesn’t leverage the phone.

When i access the browser using https it doesn’t complain about it because it is being trusted by my computer.

Also i remember you advised me to test v5. The problem i am using the application with a local domain name that i cannot generate a letsencrypt cert for it.

I am referring to this topic:

Right, I remember now.

@david what do you think, should there be an option in the mobile app to allow an untrusted cert?

@gerootech to make this work, you may need to add the root CA that you used to create the self signed certificate to your phones SSL store. The trust issue occurs well outside the bounds of the application so there isn’t anything for us to fix.

@david It is already added to the root cert of my phone but still getting the error invalid handshake. I have other applications (bitwarden) using the same CA with no issues.

When i try the new invoice ninja v5 on my android phone i get the following error:

HandshakeException: Handshake error in client (OS Error:
CERTIFICATE_VERIFY_FAILED: unable to get local issuer certificate(

@gerootech right, so the app isn’t prompting to trust the cert.

@hillel to make this work, we’d need to ask the app to dive in and prompt to trust the cert, unsure how difficult this would be cross platform in flutter.