Download the PHP package maeandrew/novaposhta-address-resolver without Composer

On this page you can find all versions of the php package maeandrew/novaposhta-address-resolver. 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 novaposhta-address-resolver

Nova Poshta Address Resolver

Українська

Standalone PHP tooling for turning a free-form Nova Poshta address into a validated settlement and warehouse selection.

The project is intentionally split into a framework-free resolver core and optional adapters. A user may connect a ready Nova Poshta SDK or a custom HTTP client, then add an AI provider without coupling the core to a vendor SDK.

Unofficial community project. It is not affiliated with Nova Poshta.

What it solves

Real order messages often contain variants such as:

The resolver parses and normalizes the text, queries a location provider, scores candidates, and returns a result that is safe to persist:

The resolver never writes to an order or silently chooses a branch when the evidence is insufficient.

Installation

The framework-free core is installed with Composer:

The core requires PHP 8.2 or newer and ext-mbstring. It has no Laravel, HTTP-client, Nova Poshta SDK, or AI SDK dependency.

Core usage

toArray() returns the status, normalized records, confidence, candidates, parsed fields, diagnostics, and provider name. Raw provider payloads are omitted unless toArray(includeRawPayload: true) is explicitly requested.

Provider extension

The application supplies the source of truth by implementing three small methods. A provider translates its SDK, HTTP client, or local fixture data into the core DTOs:

Provider failures should throw ProviderException or another clear exception; the resolver exposes them as provider_error instead of treating an outage as not_found. The provider must return normalized Settlement and Warehouse objects. It must not trust a reference supplied by an AI or by an unvalidated caller.

The built-in parser recognizes Ukrainian and common Russian forms such as м., відд., відділення, поштомат, пункт, №, НП, and spoken warehouse numbers such as двісті вісімдесят п’ять. Matching is configurable:

BalancedMatchingStrategy is the default. StrictMatchingStrategy uses exact references, names, types, numbers, and address fields. SuggestMatchingStrategy returns ranked candidates while keeping the result reviewable.

AI is recommended for production input

For production free-form messages, AI should be treated as the primary quality layer. It handles spelling mistakes, mixed languages, omitted labels, and unusual formats that deterministic parsing cannot cover as well. The deterministic pipeline remains a safe degraded mode for outages, privacy- restricted inputs, offline jobs, and tests, so the core package does not force an AI SDK or API key.

The core AI contracts and a fake provider are included in the core package. An AI suggestion may only rank provider candidates; it can never create or persist a settlement or warehouse reference. Configure a fallback chain when more than one provider is available.

The optional OpenAI adapter uses the Responses API and structured JSON output:

During monorepo development, install its local dependencies with ddev exec bash scripts/install-openai.sh. The adapter is kept in a separate package so the core's Composer install remains small.

It accepts PSR HTTP client and factory implementations from the host application, so the core and adapter remain independent of a particular HTTP client. The adapter is wired through StructuredAddressAiInterpreter:

The adapter is optional and its tests use a fake HTTP client; CI never calls an AI endpoint.

Optional Laravel bridge

Laravel integration is a separate package and does not add framework classes to the core:

It provides service-container bindings, configurable cache, resolution events, a queue job, and novaposhta:resolve. The host application binds its own LocationProvider and decides how resolved references are persisted. See the Laravel integration guide.

The bridge source is published in its own GitHub repository and is available on Packagist.

During monorepo development, use ddev exec bash scripts/install-laravel.sh to install the bridge against the local core package.

Security and limitations

Development

For consistent local development, this repository includes a DDEV configuration with PHP and Composer:

The quality command runs PHP CS Fixer, PHPStan, and the complete PHPUnit suite. CI runs the same checks on PHP 8.2 and 8.3.

The optional Laravel bridge has its own local dependency setup and quality suite:

Documentation

License

Use MIT unless the project owner selects another permissive license before the first public release.


All versions of novaposhta-address-resolver with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
ext-mbstring Version *
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 maeandrew/novaposhta-address-resolver contains the following files

Loading the files please wait ...