Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
614 changes: 367 additions & 247 deletions clients/algoliasearch-client-php/composer.lock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ final class UnreachableException extends AlgoliaException
public function __construct($message = '', $code = 0, $previous = null)
{
if (!$message) {
$message =
'Impossible to connect, please check your Algolia Application Id.';
$message
= 'Impossible to connect, please check your Algolia Application Id.';
}

parent::__construct($message, $code, $previous);
Expand Down
20 changes: 10 additions & 10 deletions clients/algoliasearch-client-php/lib/Http/Psr7/Uri.php
Original file line number Diff line number Diff line change
Expand Up @@ -656,10 +656,10 @@ private function filterPath($path)
}

return preg_replace_callback(
'/(?:[^'.
self::$charUnreserved.
self::$charSubDelims.
'%:@\/]++|%(?![A-Fa-f0-9]{2}))/',
'/(?:[^'
.self::$charUnreserved
.self::$charSubDelims
.'%:@\/]++|%(?![A-Fa-f0-9]{2}))/',
[$this, 'rawurlencodeMatchZero'],
$path
);
Expand All @@ -681,10 +681,10 @@ private function filterQueryAndFragment($str)
}

return preg_replace_callback(
'/(?:[^'.
self::$charUnreserved.
self::$charSubDelims.
'%:@\/\?]++|%(?![A-Fa-f0-9]{2}))/',
'/(?:[^'
.self::$charUnreserved
.self::$charSubDelims
.'%:@\/\?]++|%(?![A-Fa-f0-9]{2}))/',
[$this, 'rawurlencodeMatchZero'],
$str
);
Expand Down Expand Up @@ -714,8 +714,8 @@ private function validateState()
}
} elseif (isset($this->path[0]) && '/' !== $this->path[0]) {
@trigger_error(
'The path of a URI with an authority must start with a slash "/" or be empty. Automagically fixing the URI '.
'by adding a leading slash to the path is deprecated since version 1.4 and will throw an exception instead.',
'The path of a URI with an authority must start with a slash "/" or be empty. Automagically fixing the URI '
.'by adding a leading slash to the path is deprecated since version 1.4 and will throw an exception instead.',
E_USER_DEPRECATED
);
$this->path = '/'.$this->path;
Expand Down
14 changes: 7 additions & 7 deletions clients/algoliasearch-client-php/lib/Http/Psr7/UriResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ public static function resolve(UriInterface $base, UriInterface $rel)
$targetAuthority = $base->getAuthority();
if ('' === $rel->getPath()) {
$targetPath = $base->getPath();
$targetQuery =
'' !== $rel->getQuery()
$targetQuery
= '' !== $rel->getQuery()
? $rel->getQuery()
: $base->getQuery();
} else {
Expand All @@ -105,8 +105,8 @@ public static function resolve(UriInterface $base, UriInterface $rel)
if (false === $lastSlashPos) {
$targetPath = $rel->getPath();
} else {
$targetPath =
mb_substr(
$targetPath
= mb_substr(
$base->getPath(),
0,
$lastSlashPos + 1
Expand Down Expand Up @@ -236,9 +236,9 @@ private static function getRelativePath(
}
}
$targetSegments[] = $targetLastSegment;
$relativePath =
str_repeat('../', count($sourceSegments)).
implode('/', $targetSegments);
$relativePath
= str_repeat('../', count($sourceSegments))
.implode('/', $targetSegments);

// A reference to am empty last segment or an empty first sub-segment must be prefixed with "./".
// This also applies to a segment with a colon character (e.g., "file:colon") that cannot be used
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ public function __construct(
$this->http = $http;
$this->clusterHosts = $clusterHosts;
$this->config = $config;
$this->requestOptionsFactory =
$RqstOptsFactory ?: new RequestOptionsFactory($config);
$this->requestOptionsFactory
= $RqstOptsFactory ?: new RequestOptionsFactory($config);
$this->logger = $logger ?: Algolia::getLogger();
if (defined('JSON_UNESCAPED_UNICODE')) {
// `JSON_UNESCAPED_UNICODE` is introduced in PHP 5.4.0
Expand Down Expand Up @@ -238,8 +238,8 @@ private function handleResponse(
null === $response->getReasonPhrase()
|| '' === $response->getReasonPhrase()
) {
$reason =
$statusCode >= 500
$reason
= $statusCode >= 500
? 'Internal Server Error'
: 'Unreachable Host';
}
Expand Down
4 changes: 2 additions & 2 deletions clients/algoliasearch-client-php/lib/Support/AlgoliaAgent.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ private static function getDefaultSegments($clientName)
if (defined('\GuzzleHttp\ClientInterface::VERSION')) {
$segments['Guzzle'] = ClientInterface::VERSION;
} else {
$segments['Guzzle'] =
ClientInterface::MAJOR_VERSION;
$segments['Guzzle']
= ClientInterface::MAJOR_VERSION;
}
}

Expand Down
2 changes: 1 addition & 1 deletion config/.php-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.3.13
8.4.12
2 changes: 1 addition & 1 deletion config/.python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.11.6
3.11.13
4 changes: 2 additions & 2 deletions scripts/docker/Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ ARG CSHARP_VERSION
FROM dart:${DART_VERSION} AS dart-builder
FROM mcr.microsoft.com/dotnet/sdk:${CSHARP_VERSION} AS csharp-builder
FROM golang:${GO_VERSION}-alpine AS go-builder
FROM python:${PYTHON_VERSION}-bullseye AS python-builder
FROM php:${PHP_VERSION}-bullseye AS builder
FROM python:${PYTHON_VERSION}-trixie AS python-builder
FROM php:${PHP_VERSION}-trixie AS builder

SHELL ["/bin/bash", "--login", "-c"]

Expand Down
2 changes: 1 addition & 1 deletion scripts/docker/Dockerfile.ruby
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG RUBY_VERSION
FROM ruby:${RUBY_VERSION}-bullseye
FROM ruby:${RUBY_VERSION}-trixie

ADD https://github.com/fables-tales/rubyfmt/releases/download/v0.10.0/rubyfmt-v0.10.0-Linux-aarch64.tar.gz rubyfmt.tar.gz
RUN tar -xzf rubyfmt.tar.gz && \
Expand Down
2 changes: 1 addition & 1 deletion templates/php/composer.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"psr/simple-cache": "^1.0 || ^2.0 || ^3.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.0 || ^3.5.0",
"friendsofphp/php-cs-fixer": "^3.80.0",
"phpunit/phpunit": "^11.0",
"vlucas/phpdotenv": "^5.4",
"phpstan/phpstan": "^1.12"
Expand Down