Download the PHP package worksome/company-info without Composer

On this page you can find all versions of the php package worksome/company-info. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package company-info

Company Info

Lookup company information from public services.

Tests PHPStan

If your app needs information about a given company, then there are public service API's that can provide that information. It can be a lot of work implementing support for each different service, especially if you need it for several different countries.

The Company Info package provides a service that wraps the public services and gives you a simple way to perform the lookups.

Currently, the package supports the public service API's of the Danish VIRK and CVR API services and the GB Gazette service.

Installation

You can install the package via composer:

You can publish the config file with:

Configuration

The following environment variables are available to configure the package:

Usage

The package provides two general static methods, allowing you to perform company lookups from either name or number (in Denmark, the number is the CVR number).

The methods take a country parameter, which must be one of the supported countries, or left out or empty to use the configured default country.

The country code selects the appropriate underlying service for the lookup. Currently the package supports countries dk and no for the Danish CVR API service, dk for the Danish VIRK service and gb for the English Gazette service. If an invalid country is given, an InvalidCountryException is thrown.

Example lookups:

The lookup methods returns an array of companies matching the name or number, or null if the underlying service failed.

The array may be empty, if there are no companies matching the given name or number.

If there are matches (or just one), then each matching company can be found in the array.

Company info data structure

The company information is a simplified uniform representation of the data provided by the underlying service.

The number field is the CVR number for the dk country and company number for the gb country.

Artisan

The package adds a command for performing lookups at the commandline. This is probably most useful while configuring the services, to check if your access is working.

The company information will be displayed in table format, unless option --json is given, then it is output in formatted JSON.

Documentation for services

CVR API (DK)

There is a free Danish API service for CVR lookups, which does not require obtaining access from VIRK, but is rate-limited, so if you make a lot of requests, you might suddenly get a null result, which is due to a "QUOTA EXCEEDED" error from CVR API. You can pay to have a larger quota, or use the official VIRK service instead (see below).

VIRK (DK)

VIRK is the official Danish service for CVR lookups. See some documentation here.

To obtain access and credentials to the Danish VIRK service, contact Erhvervsstyrelsen via this page: https://datacvr.virk.dk/artikel/system-til-system-adgang-til-cvr-data.

Gazette (GB)

This package uses the company search part of the Gazette service.

To obtain access and credentials to the Gazette service, see https://developer-specs.company-information.service.gov.uk/.

Testing

To help you write tests using CompanyInfo, we provide a fake implementation via the CompanyInfo::fake() method.

The package has a suite of functional tests as well as phpstan analysis and coding style checking.

Run all the tests like this:

See composer.json for other options for tests and linting.

The test suite uses a faked http response instead of calling the actual external services. The faked response is a copy of an actual response from the service.

If you want to run tests against the actual external service, copy phpunit.xml.dist to phpunit.xml and change the COMPANY_INFO_xxx variables in it to the credentials you have obtained.

Changelog

Please see GitHub Releases for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of company-info with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/contracts Version ^10.0 || ^11.0
spatie/laravel-package-tools Version ^1.16
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package worksome/company-info contains the following files

Loading the files please wait ....