Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: allow resolving from container instead of constructing directly#182

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
atymic wants to merge2 commits intogeocoder-php:master
base:master
Choose a base branch
Loading
fromatymic:fix/container-resolve
Open
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletionssrc/Contracts/ResolveFromContainer.php
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
<?php
declare(strict_types=1);

namespace Geocoder\Laravel\Contracts;

interface ResolveFromContainer
{
}
5 changes: 5 additions & 0 deletionssrc/ProviderAndDumperAggregator.php
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,6 +14,7 @@
use Geocoder\Dumper\Kml;
use Geocoder\Dumper\Wkb;
use Geocoder\Dumper\Wkt;
use Geocoder\Laravel\Contracts\ResolveFromContainer;
use Geocoder\Laravel\Exceptions\InvalidDumperException;
use Geocoder\ProviderAggregator;
use Geocoder\Query\GeocodeQuery;
Expand DownExpand Up@@ -277,6 +278,10 @@ protected function getArguments(array $arguments, string $provider) : array
protected function getProvidersFromConfiguration(Collection $providers) : array
{
$providers = $providers->map(function ($arguments, $provider) {
if (is_string($arguments) && $arguments === ResolveFromContainer::class) {
return app($provider);
}

$arguments = $this->getArguments($arguments, $provider);
$reflection = new ReflectionClass($provider);

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp