Skip to content

Commit 40afb36

Browse files
committed
Expose Iconify::API_ENDPOINT
1 parent 9995e4d commit 40afb36

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/Icons/src/DependencyInjection/UXIconsExtension.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
use Symfony\Component\DependencyInjection\Loader\PhpFileLoader;
2020
use Symfony\Component\HttpKernel\DependencyInjection\ConfigurableExtension;
2121
use Symfony\Contracts\HttpClient\HttpClientInterface;
22+
use Symfony\UX\Icons\Iconify;
2223

2324
/**
2425
* @author Kevin Bond <[email protected]>
@@ -52,7 +53,7 @@ public function getConfigTreeBuilder(): TreeBuilder
5253
->end()
5354
->scalarNode('endpoint')
5455
->info('The endpoint for the Iconify API.')
55-
->defaultValue('https://api.iconify.design')
56+
->defaultValue(Iconify::API_ENDPOINT)
5657
->cannotBeEmpty()
5758
->end()
5859
->end()

src/Icons/src/Iconify.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,14 @@
2626
*/
2727
final class Iconify
2828
{
29-
private const API_BASE_URI = 'https://api.iconify.design';
29+
public const API_ENDPOINT = 'https://api.iconify.design';
3030

3131
private HttpClientInterface $http;
3232
private \ArrayObject $sets;
3333

3434
public function __construct(
3535
private CacheInterface $cache,
36-
string $endpoint = self::API_BASE_URI,
36+
string $endpoint = self::API_ENDPOINT,
3737
?HttpClientInterface $http = null,
3838
) {
3939
if (!class_exists(HttpClient::class)) {

0 commit comments

Comments
 (0)