Skip to content

getParent() not working with php-isocodes-db-i18n #82

@Ronan-Lenor

Description

@Ronan-Lenor

Because the .json files aren't filled

e.g. with GB-ABC :

$sokilTranslationDriver = new \Sokil\IsoCodes\TranslationDriver\SymfonyTranslationDriver();
$sokilTranslationDriver->setLocale('en');
$sokilIsoCodes = new \Sokil\IsoCodes\IsoCodesFactory(null, $sokilTranslationDriver);

$sokilSubdivision = $sokilIsoCodes->getSubdivisions()->getByCode('GB-ABC');

call : .\src\Database\SubdivisionsPartitioned.php > loadFromJSONFile()
then : $pathToPartitionFile = sprintf(...)
return ".\vendor\sokil\php-isocodes\src/../../php-isocodes-db-i18n/databases/iso_3166-2/GB.json"

but sokil\php-isocodes-db-i18n\databases\iso_3166-2\GB.json don't have the parent key.

while sokil\php-isocodes-db-i18n\databases\iso_3166-2.json has "parent": "GB-NIR"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions