Skip to content

Releases: movemoveapp/laravel-dadata2

v2.1.3

27 May 19:13
Compare
Choose a tag to compare

Summary:

This release addresses the issue with the missing CleanName object in the DaDataOrganization::findRussianOrganization method.

Changes:

Fix missing CleanName object:

  1. Resolved the problem where the CleanName object was not included in the response when calling DaDataOrganization::findRussianOrganization with a valid INN.
  2. Ensured that the normalized organization name (CleanName) is now correctly included in the response data.

Fixed Issues:

#22 - Missing CleanName object in DaDataOrganization::findRussianOrganization

Upgrade Instructions:

  • Pull the latest changes from the repository.
  • Run composer update to ensure all dependencies are up-to-date.
  • Clear any cached data with php artisan cache:clear if necessary.

v2.1.2

27 May 18:46
Compare
Choose a tag to compare

This release addresses a bug in the DaDataOrganization::findRussianOrganization method, improving error handling and logging for DaData API errors.

Changes

  1. Fixed issue with DaDataIntegrationException:
  • Resolved the error where calling DaDataOrganization::findRussianOrganization with INN resulted in a DaDataIntegrationException with a hidden error message.
  • Improved error logging to ensure DaData API errors are captured and logged for better debugging and troubleshooting.
  • Enhanced the error handling to provide more detailed error messages for the client when interacting with the DaData API.
  1. Bug Fix:
  • The issue was related to the lack of proper error visibility when the DaData API returned a 400 error. This fix now ensures that all errors are visible and easier to debug.

Fixed Issues:

#20 - DaDataIntegrationException with hidden error message in DaDataOrganization::findRussianOrganization

Upgrade Instructions:

  • Pull the latest changes from the repository.
  • Run composer update to ensure that all dependencies are up-to-date.
  • If applicable, clear any cached data by running php artisan cache:clear.

v2.1.1

19 May 17:19
Compare
Choose a tag to compare

Transfer project from BotGun

This version addresses a wide range of bugs and issues discovered in the first release, offering a more stable and maintainable integration with the DaData API.

Note
The original movemoveapp/laravel-dadata package is no longer maintained and should not be used in new projects.

v2.1.0

12 May 18:23
02548f6
Compare
Choose a tag to compare

Release v2.1.0 — Facade Refactoring

This release introduces a major internal refactoring of facade structure for better clarity and future extensibility:

✨ What's New

Introduced two new primary facades:

  • DaDataCleaner — handles all data cleaning (standardization) operations.
  • DaDataSuggestions — handles all suggestion (autocomplete) features.

🧹 Cleanup

All previously separated facades for name, phone, email, vehicle, etc., have been merged under DaDataCleaner and DaDataSuggestions.

📌 Kept Facades

  • DaDataAddress — retained for address-specific suggestions and functions.
  • DaDataOrganization — retained for organization-related lookup and suggestion functionality.

v2.0.9

10 May 16:09
23ff834
Compare
Choose a tag to compare

Added support for Name standardization and suggestions

This release introduces two new features for working with full names using the DaData API:

Name Standardization (Clean API)

Allows you to parse a full name string into structured components:

  • Last name
  • First name
  • Patronymic (middle name)
  • Gender detection
  • Inflection into grammatical cases

Usage:

$result = DaDataCleaner::name('Иванов Иван Иванович');

Name Suggestions (Suggest API)

Provides autocomplete suggestions while typing a name, useful in forms or UIs.

Usage:

$result = DaDataSuggestions::name(['query' => 'иван']);

Each method returns a typed response based on DaData’s API structure.

Related documentation:

v2.0.8

10 May 11:41
9170b26
Compare
Choose a tag to compare

✨ New Feature: suggestCountry Support in DaData Package

We have added support for the Suggest Country method from the DaData API (ISO 3166 country reference).

🚀 How to Use

To use the new feature, call the method via the DaDataAddress facade:

DaDataAddress::suggestCountry(['query' => 'рос']);

The method returns a Country object containing a list of suggestions:

BotGun\DaData\Objects\Country
 └── suggestions: Address\CountrySuggest[]
     └── value: "Россия"
     └── unrestricted_value: "Российская Федерация"
     └── data: Address\Country
         └── code: 643
         └── alfa2: "RU"
         └── alfa3: "RUS"
         └── name_short: "Россия"
         └── name: "Российская Федерация"

🧠 Use Cases

  1. Country autocomplete in forms
  2. ISO 3166 country validation and enrichment
  3. International shipping logic

📚 API Docs

v2.0.7

23 Apr 17:39
0ce5f89
Compare
Choose a tag to compare

Added

  1. Reverse geocoding support via DaDataAddress::geoLocate()
  2. Allows retrieving nearby addresses (buildings, streets, cities) based on geographic coordinates
  3. Uses DaData API

Example usage:

DaDataAddress::geoLocate([
    'lat' => 55.755826,
    'lon' => 37.6173,
    'count' => 5,
    'radius_meters' => 250,
    'language' => 'ru',
    'division' => 'ADMINISTRATIVE',
]);

Optional parameters:

Name Type Required Default Description
lat number Latitude in decimal degrees
lon number Longitude in decimal degrees
count number 10 Number of results (maximum: 20)
radius_meters number 100 Search radius in meters (maximum: 1000)
language string ru Response language (ru or en)
division string ADMINISTRATIVE Type of territorial division: ADMINISTRATIVE or MUNICIPAL

@note: 🔒 Available only for addresses within the Russian Federation.

v2.0.6

23 Apr 17:19
80ea930
Compare
Choose a tag to compare

Added

Support for address lookup by ID via DaDataAddress::findById(['query' => (string) $query]);

Allows retrieving addresses using:

  1. cadastral numbers (stead_cadnum, house_cadnum, flat_cadnum) — Russia only
  2. FIAS / GAR codes (fias_id) — Russia only
  3. KLADR codes (kladr_id) — Russia only
  4. OpenStreetMap IDs (fias_id) — Belarus, Kazakhstan, Uzbekistan
  5. GeoNames IDs (geoname_id) — globally

This addition enables structured address resolution using official identifiers, useful for GIS systems, government data, and property records.

Note: FIAS codes may change over time. It's recommended to store the full address string alongside the identifier for future compatibility.

v2.0.5

21 Apr 16:47
4070b77
Compare
Choose a tag to compare

Fixed

okveds field is now returned as an array of objects. Previously, the OKVEDs field was incorrectly deserialized as a single object.
Now it correctly returns an array of BotGun\DaData\Objects\Organization\Ru\Okveds instances, matching the DaData API specification.

(Bug: okveds should be an array of objects but returns a single object #6)

Example (Before → After)

Before:

"okveds" => BotGun\DaData\Objects\Organization\Ru\Okveds

After:

"okveds" => [
    BotGun\DaData\Objects\Organization\Ru\Okveds,
    BotGun\DaData\Objects\Organization\Ru\Okveds,
    ...
]

Notes:

  1. This fix ensures full compatibility with organizations that have multiple OKVED entries.
  2. The fix applies to both the main OKVED and any secondary codes returned by the API.

v2.0.4

21 Apr 13:44
0d1dd4c
Compare
Choose a tag to compare

Added

  • SDK support for the DaData API method: find-company/by-email
  • New method DaDataOrganization::findOrganizationByEmail(['query' => (string) $email]) allows you to find company information by email address
  • This method uses the official DaData findByEmail endpoint which helps identify companies by their public or domain-bound email

🎉️️️️️️ Closes #4: Implement findById for Kazakhstan & Belarus + suggest for Russia + Search by Email