Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why method Country->getCapital does not work with v0.3.10 ? #41

Open
sergeynilov opened this issue May 6, 2021 · 0 comments
Open

Why method Country->getCapital does not work with v0.3.10 ? #41

sergeynilov opened this issue May 6, 2021 · 0 comments

Comments

@sergeynilov
Copy link

Hello,
About a month ago I wrote that method Country->getCapital does not work.

At branch #40 I got feedback :

I took a look and it turns out this part was never finished properly :) I fixed the method in the code and added a test, but somebody has to make a pull request on geographer-data repo - edit resources/cities/*.json files adding "capital" property to the corresponding entries, eg:
"long": { "default": "Moscow" }, "capital": true,

Now I have the same problem .
I page : https://github.com/MenaraSolutions/geographer/releases/tag/v0.3.10

Fix get capital method
@dusterio dusterio released this 22 days ago

v0.3.10

In composer.json I modified version of the package and now it has content :

{
    "name": "laravel/laravel",
    "type": "project",
    "description": "The Laravel Framework.",
    "keywords": [
        "framework",
        "laravel"
    ],
    "license": "MIT",
    "require": {
        "php": "^7.3|^8.0",
        "cviebrock/eloquent-sluggable": "^8.0",
        "drewm/mailchimp-api": "^2.5",
        "fideloper/proxy": "^4.4",
        "fruitcake/laravel-cors": "^2.0",
        "guzzlehttp/guzzle": "^7.0.1",
        "jenssegers/agent": "^2.6",
        "laravel/fortify": "^1.7",
        "laravel/framework": "^8.12",
        "laravel/sanctum": "^2.8",
        "laravel/socialite": "^5.2",
        "laravel/tinker": "^2.5",
        "laravelcollective/html": "^6.2",
        "maatwebsite/excel": "^3.1",
        "mailchimp/mailchimp": "^2.0",
        "menarasolutions/geographer": "^0.3.10",
        "mews/purifier": "^3.3",
        "mobiledetect/mobiledetectlib": "^2.8",
        "monarobase/country-list": "^3.2",
        "spatie/browsershot": "^3.40",
        "spatie/emoji": "^2.2",
        "spatie/geocoder": "^3.10",
        "spatie/laravel-image-optimizer": "^1.6",
        "spatie/laravel-permission": "^4.0",
        "stidges/laravel-country-flags": "^2.0",
        "stripe/stripe-php": "^7.75",
        "toin0u/geocoder-laravel": "^4.4",
        "wboyz/laravel-enum": "^0.2.1",
        "webpatser/laravel-uuid": "^3.0"
    },
    "require-dev": {
        "facade/ignition": "^2.5",
        "fakerphp/faker": "^1.9.1",
        "laravel-frontend-presets/tailwindcss": "^4.3",
        "laravel/sail": "^1.0.1",
        "mockery/mockery": "^1.4.2",
        "nunomaduro/collision": "^5.0",
        "phpunit/phpunit": "^9.3.3"
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true
    },
    "extra": {
        "laravel": {
            "dont-discover": []
        }
    },
    "autoload": {
        "files": [
            "app/library/helper.php"
        ],
        "psr-4": {
            "App\\": "app/",
            "Database\\Factories\\": "database/factories/",
            "Database\\Seeders\\": "database/seeders/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "scripts": {
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover --ansi"
        ],
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate --ansi"
        ]
    }
}

I run commands :


php artisan config:cache
php artisan route:cache
php artisan cache:clear
php artisan view:clear
php artisan  clear-compiled

composer dump-autoload


and removed “/vendor” and “/composer.lock” and run
composer install and after that example from docs:

        $thailand = $earth->getCountries()->findOne(['code' => 'TH']);
        $capital = $thailand->getCapital(); // return NULL

I do not if pull request on geographer-data repo was done, but with
"menarasolutions/geographer": "^0.3.10"
I expected this method woul work properly.

How can I make it working?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant