Download the PHP package beziworld/laravel-krs without Composer

On this page you can find all versions of the php package beziworld/laravel-krs. 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 laravel-krs

Laravel KRS

tests Latest Version

Laravel client for the open API of the Polish National Court Register (Krajowy Rejestr Sądowy, KRS), published by the Ministry of Justice. Read company data straight from the register:

No API key, no registration and no contract are needed.

Polska wersja dokumentacji

Installation

Everything works without configuration. Optional .env settings:

Company data

Krs::current() searches the register of entrepreneurs first and then the register of associations, foundations and other organisations. Pass the register to make a single request: Krs::current('30897', 'S') or Krs::current('30897', Register::Associations). Krs::find() returns null instead of throwing NotFound.

Values are returned exactly as published by the register, in upper case.

Representation and procurators

The open API pseudonymises natural persons: names and PESEL numbers come with asterisks, for example J**** K*****. Legal persons (corporate board members, shareholders, trustees) are published in full with their KRS and REGON numbers.

Shareholders and partners

Shareholders of a limited liability company, the sole shareholder of a joint-stock company and the partners of a general, limited or professional partnership are all returned as Shareholder.

Status

Full extract and removed entities

For an entity removed from the register the API answers the current extract with HTTP 204, so Krs::current() throws DeletedEntity; the full extract still returns its history.

Change bulletin and watching counterparties

The watcher compares a list of numbers with the bulletin, forgets their cached extracts and dispatches Beziworld\Krs\Events\KrsEntryChanged for each changed entity. One request covers any number of watched entities.

Validation

ExistsInKrs passes when the API cannot be reached, so an outage does not block your forms; strict() fails the validation instead. For a format-only check without an HTTP call use the krs rule of laravel-polish-validation.

Artisan

Caching and limits

Extracts and bulletins of past days are cached for KRS_CACHE_TTL seconds (one day by default). The bulletin of the current day is never cached because it grows during the day, and krs:watch forgets cached extracts of changed entities, so a long TTL stays accurate when the watcher runs. Krs::forget($krs) clears one entity by hand.

The API documents no rate limit and returns no rate-limit headers; be gentle with bulk lookups and rely on the cache. Connection failures and HTTP 5xx answers are retried KRS_RETRIES times.

Errors

Situation Result
No entity with this number in the searched register(s) (HTTP 404) NotFound (krs, registers); find() returns null
Entity removed from the register (HTTP 204 for the current extract) DeletedEntity; use full()
Malformed KRS number InvalidKrsNumber, before any request
HTTP 400, 5xx after retries, invalid JSON ApiException (httpStatus, path, isServerError(), isRateLimited())
Connection failure or timeout after retries ApiException wrapping the ConnectionException
Invalid KRS_URL InvalidConfiguration
Unknown register, invalid bulletin day or hours InvalidArgumentException

All package exceptions extend Beziworld\Krs\Exceptions\KrsException.

Related packages

Development

Tests use responses captured from the live API (tests/Fixtures); no request leaves the test suite.

Author

Created and maintained by Kamil Ćwiertnia, beziworld.eu.

Need an integration with a Polish public register or business API? Get in touch through beziworld.eu.

Other packages by the author

laravel-company-data · laravel-polish-validation · laravel-uldk · laravel-nbp

License

MIT. See LICENSE.md. The data comes from the open API of the National Court Register published by the Polish Ministry of Justice (Ministerstwo Sprawiedliwości). This package is not affiliated with or endorsed by the Ministry of Justice.


All versions of laravel-krs with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
ext-json Version *
guzzlehttp/guzzle Version ^7.8
illuminate/console Version ^12.0|^13.0
illuminate/contracts Version ^12.0|^13.0
illuminate/events Version ^12.0|^13.0
illuminate/http Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.0
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 beziworld/laravel-krs contains the following files

Loading the files please wait ...