Skip to content

Commit 95aa4eb

Browse files
committed
okay ?
1 parent adb632f commit 95aa4eb

File tree

3 files changed

+19
-11
lines changed

3 files changed

+19
-11
lines changed

clients/algoliasearch-client-php/lib/Algolia.php

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@
33
namespace Algolia\AlgoliaSearch;
44

55
use Algolia\AlgoliaSearch\Cache\NullCacheDriver;
6+
use Algolia\AlgoliaSearch\Http\CurlHttpClient;
7+
use Algolia\AlgoliaSearch\Http\GuzzleHttpClient;
68
use Algolia\AlgoliaSearch\Http\HttpClientInterface;
79
use Algolia\AlgoliaSearch\Log\DebugLogger;
10+
use GuzzleHttp\Client;
11+
use GuzzleHttp\ClientInterface;
812
use Psr\Log\LoggerInterface;
913
use Psr\SimpleCache\CacheInterface;
1014

@@ -15,19 +19,19 @@ final class Algolia
1519
/**
1620
* Holds an instance of the simple cache repository (PSR-16).
1721
*
18-
* @var null|\Psr\SimpleCache\CacheInterface
22+
* @var null|CacheInterface
1923
*/
2024
private static $cache;
2125

2226
/**
2327
* Holds an instance of the logger (PSR-3).
2428
*
25-
* @var null|\Psr\Log\LoggerInterface
29+
* @var null|LoggerInterface
2630
*/
2731
private static $logger;
2832

2933
/**
30-
* @var \Algolia\AlgoliaSearch\Http\HttpClientInterface
34+
* @var HttpClientInterface
3135
*/
3236
private static $httpClient;
3337

@@ -43,7 +47,7 @@ public static function isCacheEnabled()
4347
/**
4448
* Gets the cache instance.
4549
*
46-
* @return \Psr\SimpleCache\CacheInterface
50+
* @return CacheInterface
4751
*/
4852
public static function getCache()
4953
{
@@ -65,7 +69,7 @@ public static function setCache(CacheInterface $cache)
6569
/**
6670
* Gets the logger instance.
6771
*
68-
* @return \Psr\Log\LoggerInterface
72+
* @return LoggerInterface
6973
*/
7074
public static function getLogger()
7175
{
@@ -90,23 +94,23 @@ public static function getHttpClient()
9094
if (interface_exists('\GuzzleHttp\ClientInterface')) {
9195
if (defined('\GuzzleHttp\ClientInterface::VERSION')) {
9296
$guzzleVersion = (int) mb_substr(
93-
\GuzzleHttp\Client::VERSION,
97+
Client::VERSION,
9498
0,
9599
1
96100
);
97101
} else {
98-
$guzzleVersion = \GuzzleHttp\ClientInterface::MAJOR_VERSION;
102+
$guzzleVersion = ClientInterface::MAJOR_VERSION;
99103
}
100104
}
101105

102106
if (null === self::$httpClient) {
103107
if (class_exists('\GuzzleHttp\Client') && 6 <= $guzzleVersion) {
104108
self::setHttpClient(
105-
new \Algolia\AlgoliaSearch\Http\GuzzleHttpClient()
109+
new GuzzleHttpClient()
106110
);
107111
} else {
108112
self::setHttpClient(
109-
new \Algolia\AlgoliaSearch\Http\CurlHttpClient()
113+
new CurlHttpClient()
110114
);
111115
}
112116
}

generators/src/main/java/com/algolia/codegen/utils/ModelPruner.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,12 @@ private void exploreGraph(OperationsMap operations) {
8686
}
8787
}
8888
for (CodegenParameter param : ope.allParams) {
89-
CodegenModel paramType = getModel(param.baseType != null ? param.baseType : param.getSchema().getOpenApiType());
89+
String paramName = param.baseType != null ? param.baseType : param.dataType;
90+
// php has a fully qualified name for the parameter type
91+
if (paramName.contains("\\")) {
92+
paramName = paramName.substring(paramName.lastIndexOf("\\") + 1);
93+
}
94+
CodegenModel paramType = getModel(paramName);
9095
if (paramType != null) {
9196
visitedModels.add(paramType.name);
9297
}

specs/common/schemas/IndexSettings.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1035,7 +1035,6 @@ widgets:
10351035
banners:
10361036
description: banners defined in the merchandising studio for the given search.
10371037
type: array
1038-
additionalProperties: false
10391038
items:
10401039
$ref: '#/banner'
10411040

0 commit comments

Comments
 (0)