nonsapiens / realaddressfactory Goto Github PK
View Code? Open in Web Editor NEWGenerates real-world addresses for use in seeding or test. Laravel 8, and supports Faker.
Generates real-world addresses for use in seeding or test. Laravel 8, and supports Faker.
It will be good to provide information on which exactly API are you using, to issue the requests.
This way the developers that want to use it can check the rate limits & prices.
I assume it's the Geocoding API, but I'm not quite sure:
https://developers.google.com/maps/documentation/geocoding/overview
Laravel: 10.32.0; PHP: 8.2.1; DB: PostgreSQL 15.3 (Debian 15.3-1.pgdg120+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit; RealAddress Generator: 2.0.2
I found an issue and tracked it down to Laravel 10.32.0: https://github.com/laravel/framework/releases/tag/v10.32.0. They've changed something in this version that brakes realaddressfactory
. I suppose it's this PR: laravel/framework#48968
The code that generates this error is:
$lookup = app('geocoder')->geocode($query)->get()->first();
\The generated error is the following:
SQLSTATE[42P10]: Invalid column reference: 7 ERROR: there is no unique or exclusion constraint matching the ON CONFLICT specification (Connection: pgsql, SQL: insert into "cache" ("key", "value", "expiration") values (..., ...=, 1717135847) on conflict ("key") do update set "key" = "excluded"."key", "value" = "excluded"."value", "expiration" = "excluded"."expiration") {"exception":"[object] (Illuminate\\Database\\QueryException(code: 42P10): SQLSTATE[42P10]: Invalid column reference: 7 ERROR: there is no unique or exclusion constraint matching the ON CONFLICT specification (Connection: pgsql, SQL: insert into \"cache\" (\"key\", \"value\", \"expiration\") values (...0=, 1717135847) on conflict (\"key\") do update set \"key\" = \"excluded\".\"key\", \"value\" = \"excluded\".\"value\", \"expiration\" = \"excluded\".\"expiration\") at /vagrant/vendor/laravel/framework/src/Illuminate/Database/Connection.php:822)
[stacktrace]
#0 /vagrant/vendor/laravel/framework/src/Illuminate/Database/Connection.php(776): Illuminate\\Database\\Connection->runQueryCallback()
#1 /vagrant/vendor/laravel/framework/src/Illuminate/Database/Connection.php(593): Illuminate\\Database\\Connection->run()
#2 /vagrant/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3506): Illuminate\\Database\\Connection->affectingStatement()
#3 /vagrant/vendor/laravel/framework/src/Illuminate/Cache/DatabaseStore.php(139): Illuminate\\Database\\Query\\Builder->upsert()
#4 /vagrant/vendor/laravel/framework/src/Illuminate/Cache/Repository.php(217): Illuminate\\Cache\\DatabaseStore->put()
#5 /vagrant/vendor/laravel/framework/src/Illuminate/Cache/Repository.php(399): Illuminate\\Cache\\Repository->put()
#6 /vagrant/vendor/toin0u/geocoder-laravel/src/ProviderAndDumperAggregator.php(206): Illuminate\\Cache\\Repository->remember()
#7 /vagrant/vendor/toin0u/geocoder-laravel/src/ProviderAndDumperAggregator.php(101): Geocoder\\Laravel\\ProviderAndDumperAggregator->cacheRequest()
#8 /vagrant/vendor/nonsapiens/realaddressfactory/src/RealAddressFactory.php(161): Geocoder\\Laravel\\ProviderAndDumperAggregator->geocode()
#9 /vagrant/vendor/nonsapiens/realaddressfactory/src/RealAddressFactory.php(113): Nonsapiens\\RealAddressFactory\\RealAddressFactory->make()
#10 /vagrant/app/Console/Commands/T.php(59): Nonsapiens\\RealAddressFactory\\RealAddressFactory->makeGermany()
#11 /vagrant/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\\Console\\Commands\\T->handle()
#12 /vagrant/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#13 /vagrant/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure()
#14 /vagrant/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod()
#15 /vagrant/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\\Container\\BoundMethod::call()
#16 /vagrant/vendor/laravel/framework/src/Illuminate/Console/Command.php(211): Illuminate\\Container\\Container->call()
#17 /vagrant/vendor/symfony/console/Command/Command.php(326): Illuminate\\Console\\Command->execute()
#18 /vagrant/vendor/laravel/framework/src/Illuminate/Console/Command.php(180): Symfony\\Component\\Console\\Command\\Command->run()
#19 /vagrant/vendor/symfony/console/Application.php(1096): Illuminate\\Console\\Command->run()
#20 /vagrant/vendor/symfony/console/Application.php(324): Symfony\\Component\\Console\\Application->doRunCommand()
#21 /vagrant/vendor/symfony/console/Application.php(175): Symfony\\Component\\Console\\Application->doRun()
#22 /vagrant/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(201): Symfony\\Component\\Console\\Application->run()
#23 /vagrant/artisan(35): Illuminate\\Foundation\\Console\\Kernel->handle()
#24 {main}
[previous exception] [object] (PDOException(code: 42P10): SQLSTATE[42P10]: Invalid column reference: 7 ERROR: there is no unique or exclusion constraint matching the ON CONFLICT specification at /vagrant/vendor/laravel/framework/src/Illuminate/Database/Connection.php:605)
[stacktrace]
#0 /vagrant/vendor/laravel/framework/src/Illuminate/Database/Connection.php(605): PDOStatement->execute()
#1 /vagrant/vendor/laravel/framework/src/Illuminate/Database/Connection.php(809): Illuminate\\Database\\Connection->Illuminate\\Database\\{closure}()
#2 /vagrant/vendor/laravel/framework/src/Illuminate/Database/Connection.php(776): Illuminate\\Database\\Connection->runQueryCallback()
#3 /vagrant/vendor/laravel/framework/src/Illuminate/Database/Connection.php(593): Illuminate\\Database\\Connection->run()
#4 /vagrant/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3506): Illuminate\\Database\\Connection->affectingStatement()
#5 /vagrant/vendor/laravel/framework/src/Illuminate/Cache/DatabaseStore.php(139): Illuminate\\Database\\Query\\Builder->upsert()
#6 /vagrant/vendor/laravel/framework/src/Illuminate/Cache/Repository.php(217): Illuminate\\Cache\\DatabaseStore->put()
#7 /vagrant/vendor/laravel/framework/src/Illuminate/Cache/Repository.php(399): Illuminate\\Cache\\Repository->put()
#8 /vagrant/vendor/toin0u/geocoder-laravel/src/ProviderAndDumperAggregator.php(206): Illuminate\\Cache\\Repository->remember()
#9 /vagrant/vendor/toin0u/geocoder-laravel/src/ProviderAndDumperAggregator.php(101): Geocoder\\Laravel\\ProviderAndDumperAggregator->cacheRequest()
#10 /vagrant/vendor/nonsapiens/realaddressfactory/src/RealAddressFactory.php(161): Geocoder\\Laravel\\ProviderAndDumperAggregator->geocode()
#11 /vagrant/vendor/nonsapiens/realaddressfactory/src/RealAddressFactory.php(113): Nonsapiens\\RealAddressFactory\\RealAddressFactory->make()
#12 /vagrant/app/Console/Commands/T.php(59): Nonsapiens\\RealAddressFactory\\RealAddressFactory->makeGermany()
#13 /vagrant/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\\Console\\Commands\\T->handle()
#14 /vagrant/vendor/laravel/framework/src/Illuminate/Container/Util.php(41): Illuminate\\Container\\BoundMethod::Illuminate\\Container\\{closure}()
#15 /vagrant/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(93): Illuminate\\Container\\Util::unwrapIfClosure()
#16 /vagrant/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\\Container\\BoundMethod::callBoundMethod()
#17 /vagrant/vendor/laravel/framework/src/Illuminate/Container/Container.php(662): Illuminate\\Container\\BoundMethod::call()
#18 /vagrant/vendor/laravel/framework/src/Illuminate/Console/Command.php(211): Illuminate\\Container\\Container->call()
#19 /vagrant/vendor/symfony/console/Command/Command.php(326): Illuminate\\Console\\Command->execute()
#20 /vagrant/vendor/laravel/framework/src/Illuminate/Console/Command.php(180): Symfony\\Component\\Console\\Command\\Command->run()
#21 /vagrant/vendor/symfony/console/Application.php(1096): Illuminate\\Console\\Command->run()
#22 /vagrant/vendor/symfony/console/Application.php(324): Symfony\\Component\\Console\\Application->doRunCommand()
#23 /vagrant/vendor/symfony/console/Application.php(175): Symfony\\Component\\Console\\Application->doRun()
#24 /vagrant/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(201): Symfony\\Component\\Console\\Application->run()
#25 /vagrant/artisan(35): Illuminate\\Foundation\\Console\\Kernel->handle()
#26 {main}
"}
Illuminate\Database\QueryException
SQLSTATE[42P10]: Invalid column reference: 7 ERROR: there is no unique or exclusion constraint matching the ON CONFLICT specification (Connection: pgsql, SQL: insert into "cache" ("key", "value", "expiration") values (..., ...=, 1717135847) on conflict ("key") do update set "key" = "excluded"."key", "value" = "excluded"."value", "expiration" = "excluded"."expiration")
at vendor/laravel/framework/src/Illuminate/Database/Connection.php:822
818▕ $this->getName(), $query, $this->prepareBindings($bindings), $e
819▕ );
820▕ }
821▕
➜ 822▕ throw new QueryException(
823▕ $this->getName(), $query, $this->prepareBindings($bindings), $e
824▕ );
825▕ }
826▕ }
Hello, are you willing to update the repository to most current laravel?
If you are unwilling to update it, will you allow me to assume the repository to maintain it going forward?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.