Installation and Compatibility
NepalData v2 requires PHP 7.4 through 8.6 and the JSON extension. Use Composer 2. Laravel is optional, and Composer does not install Testbench or PHPUnit when you require NepalData in your own project.
Install a published release
From the root of your Composer project:
composer require "kodefarmers/nepaldata:^2.0"
In a new standalone project without a composer.json, initialize it first with composer init or let composer require create it. In Laravel, install into the application as usual. The provider is discovered automatically unless you have opted out; see Using NepalData in Laravel.
If Composer cannot find a published 2.x release, check Packagist or the release list. The v1 package has a different API.
Try a local source checkout
To use the v2 implementation before a tag is available, point a separate Composer project at a local checkout that contains the v2 code. Substitute the checkout’s actual path:
composer config repositories.nepaldata path "/path/to/nepaldata"
composer require "kodefarmers/nepaldata:@dev"
After the release is available, remove that repository override and require the stable version:
composer config --unset repositories.nepaldata
composer require "kodefarmers/nepaldata:^2.0"
Verified PHP and Laravel combinations
Each listed integration entry is Laravel / Orchestra Testbench / PHPUnit by major version. The latter two describe the package’s test environment, not additional packages for your application to install.
| PHP | Standalone PHP | Verified Laravel integrations |
|---|---|---|
| 7.4 | Yes | 8 / 6 / 9 |
| 8.0 | Yes | 8 / 6 / 9; 9 / 7 / 9 |
| 8.1 | Yes | 8 / 6 / 9; 9 / 7 / 9; 10 / 8 / 10 |
| 8.2 | Yes | 9 / 7 / 9; 10 / 8 / 10; 11 / 9 / 11; 12 / 10 / 11 |
| 8.3 | Yes | 10 / 8 / 10; 11 / 9 / 11; 12 / 10 / 12; 13 / 11 / 12 |
| 8.4 | Yes | 11 / 9 / 11; 12 / 10 / 12; 13 / 11 / 12 |
| 8.5 | Yes | 12 / 10 / 12; 13 / 11 / 12 |
| 8.6 | Yes | 13 / 11 / 12 |
These checks use installable patch releases of the listed major versions. Laravel 9 on PHP 8.0 requires PHP 8.0.2 or later. Laravel 12 on PHP 8.6 passed its assertions but emitted an upstream container deprecation and is outside the verified matrix. The other unlisted pairs are unverified.
The Laravel 8 through 11 CI jobs allow specific dependency versions that Composer would otherwise block because of security advisories. These exceptions apply only to the test jobs; consumer projects keep their own Composer security policy.