Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[9.x] Add missing php extensions in composer #45941

Merged
merged 51 commits into from
Feb 6, 2023
Merged
Show file tree
Hide file tree
Changes from 43 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
71150ae
Add missing php extensions
joelharkes Feb 3, 2023
d2b3ace
Update composer.json
taylorotwell Feb 3, 2023
e753f7d
adds hash-ext to Auth
timacdonald Feb 5, 2023
fd8f666
adds hash-ext to Cookie
timacdonald Feb 5, 2023
f6b6126
Removes always on json-ext from Encryption
timacdonald Feb 5, 2023
0597478
adds hash-ext to Encryption
timacdonald Feb 5, 2023
a7257ad
Adds ext-hash to Filesystem
timacdonald Feb 5, 2023
7fd365f
Adds ext-fileinfo to Filesystem
timacdonald Feb 5, 2023
0472190
Sorts Filesystem extensions
timacdonald Feb 5, 2023
b6f802c
Removes always on json-ext from Mail
timacdonald Feb 5, 2023
c8147c1
Removes always on json-ext from Pagination
timacdonald Feb 5, 2023
c829830
Adds ext-filter to Pagination
timacdonald Feb 5, 2023
03e1dbb
Removes always on json-ext from Queue
timacdonald Feb 5, 2023
8c975e6
Adds ext-PDO to Queue
timacdonald Feb 5, 2023
71a5464
Adds ext-mbstring to Queue
timacdonald Feb 5, 2023
83c238c
Adds ext-filter to Queue
timacdonald Feb 5, 2023
43c0c0b
Removes always on ext-json from Routing
timacdonald Feb 5, 2023
69aab93
Adds ext-filter to Routing
timacdonald Feb 5, 2023
6149ed5
Adds ext-hash to Routing
timacdonald Feb 5, 2023
b19f23d
Removes always on json-ext from Support
timacdonald Feb 5, 2023
74e0faa
Adds ext-ctype to Support
timacdonald Feb 5, 2023
d4d898f
Adds ext-filter to Support
timacdonald Feb 5, 2023
3fb42f4
Removes always on ext-json from Translation
timacdonald Feb 5, 2023
d108e91
Removes always on ext-json from View
timacdonald Feb 5, 2023
3a2c75e
Adds ext-tokenizer to View
timacdonald Feb 5, 2023
d11b3d4
Removes always on json-ext from Broadcasting
timacdonald Feb 5, 2023
28ca5cc
Adds ext-hash to Broadcasting
timacdonald Feb 5, 2023
df59a0f
Adds ext-filter to Cache
timacdonald Feb 5, 2023
a72fd90
Adds ext-mbstring to Console
timacdonald Feb 5, 2023
c2cd77c
Adds ext-pcntl to Console
timacdonald Feb 5, 2023
162064e
Removes always on ext-json from Database
timacdonald Feb 5, 2023
d6616ce
Adds ext-PDO to Database
timacdonald Feb 5, 2023
7a68613
Adds ext-filter to Database
timacdonald Feb 5, 2023
45d9d15
Adds ext-pcntl to Database
timacdonald Feb 5, 2023
67b5310
Remove always on ext-json from Http
timacdonald Feb 5, 2023
db76d96
Adds ext-filter to Http
timacdonald Feb 5, 2023
97f5881
Removes always on ext-json from Session
timacdonald Feb 5, 2023
a1f0183
Adds ext-ctype to Session
timacdonald Feb 5, 2023
97fcde1
Adds ext-session to Session
timacdonald Feb 5, 2023
bfa24e7
Adds ext-mbstring to Testing
timacdonald Feb 5, 2023
6da41d3
Removes always on ext-json from Validation
timacdonald Feb 5, 2023
f83c68e
Adds ext-filter to Validation
timacdonald Feb 5, 2023
e82276d
Adds ext-mbstring to Validation
timacdonald Feb 5, 2023
195e2f3
Moves ext-PDO to suggested for Queue
timacdonald Feb 6, 2023
ff0fbfe
Moves driver based extensions to suggested
timacdonald Feb 6, 2023
bab99e6
Standardise capitalisation of ext-pdo
timacdonald Feb 6, 2023
6420e23
Update ext-pcntl suggest framework description
timacdonald Feb 6, 2023
4f76021
Add additional framework required extensions
timacdonald Feb 6, 2023
e64c2cf
Remove require-dev dependency on bcmath
timacdonald Feb 6, 2023
330eb5a
Adds ext-apcu to Cache suggests
timacdonald Feb 6, 2023
1dce098
code style
timacdonald Feb 6, 2023
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
5 changes: 5 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@
"illuminate/view": "self.version"
},
"require-dev": {
"ext-gmp": "*",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we still need this in require-dev.

See this PR: #43959

Seems best to leave it as GMP objects have some quirks that this addresses and I can't replicate with standard classes.

"ext-bcmath": "*",
timacdonald marked this conversation as resolved.
Show resolved Hide resolved
"ably/ably-php": "^1.0",
"aws/aws-sdk-php": "^3.235.5",
"doctrine/dbal": "^2.13.3|^3.1.4",
Expand Down Expand Up @@ -140,10 +142,13 @@
}
},
"suggest": {
"ext-apcu": "Required to use the APC cache driver.",
"ext-fileinfo": "Required to use the Filesystem class.",
"ext-ftp": "Required to use the Flysystem FTP driver.",
"ext-gd": "Required to use Illuminate\\Http\\Testing\\FileFactory::image().",
"ext-memcached": "Required to use the memcache cache driver.",
"ext-pcntl": "Required to use all features of the queue worker.",
"ext-pdo": "Required to use all database features.",
"ext-posix": "Required to use all features of the queue worker.",
"ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0).",
"ably/ably-php": "Required to use the Ably broadcast driver (^1.0).",
Expand Down
1 change: 1 addition & 0 deletions src/Illuminate/Auth/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
],
"require": {
"php": "^8.0.2",
"ext-hash": "*",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$this->storageKey => $this->hash ? hash('sha256', $token) : $token,

return $user && $user->getRememberToken() && hash_equals($user->getRememberToken(), $token)

return $rememberToken && hash_equals($rememberToken, $token) ? $retrievedModel : null;

return hash_hmac('sha256', Str::random(40), $this->hashKey);

"illuminate/collections": "^9.0",
"illuminate/contracts": "^9.0",
"illuminate/http": "^9.0",
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Broadcasting/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"require": {
"php": "^8.0.2",
"ext-json": "*",
"ext-hash": "*",
"psr/log": "^1.0|^2.0|^3.0",
"illuminate/bus": "^9.0",
"illuminate/collections": "^9.0",
Expand Down
1 change: 1 addition & 0 deletions src/Illuminate/Cache/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
],
"require": {
"php": "^8.0.2",
"ext-filter": "*",
"illuminate/collections": "^9.0",
"illuminate/contracts": "^9.0",
"illuminate/macroable": "^9.0",
Expand Down
2 changes: 2 additions & 0 deletions src/Illuminate/Console/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
],
"require": {
"php": "^8.0.2",
"ext-mbstring": "*",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$descriptionWidth = mb_strlen(preg_replace("/\<[\w=#\/\;,:.&,%?]+\>|\\e\[\d+m/", '$1', $description) ?? '');

$runTimeWidth = mb_strlen($runTime);

$command = mb_strlen($command) > 1 ? "{$command} " : '';

$terminalWidth - mb_strlen($expression.$command.$nextDueDateLabel.$nextDueDate.$hasMutex) - 8, 0

), $this->output->isVerbose() && mb_strlen($description) > 1 ? sprintf(
' <fg=#6C7280>%s%s %s</>',
str_repeat(' ', mb_strlen($expression) + 2),

$rows = $events->map(fn ($event) => array_map('mb_strlen', preg_split("/\s+/", $event->expression)));

"ext-pcntl": "*",
"illuminate/collections": "^9.0",
"illuminate/contracts": "^9.0",
"illuminate/macroable": "^9.0",
Expand Down
1 change: 1 addition & 0 deletions src/Illuminate/Cookie/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
],
"require": {
"php": "^8.0.2",
"ext-hash": "*",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return hash_hmac('sha1', $cookieName.'v2', $key).'|';

"illuminate/collections": "^9.0",
"illuminate/contracts": "^9.0",
"illuminate/macroable": "^9.0",
Expand Down
4 changes: 3 additions & 1 deletion src/Illuminate/Database/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
],
"require": {
"php": "^8.0.2",
"ext-json": "*",
"ext-PDO": "*",
"ext-filter": "*",
"ext-pcntl": "*",
"brick/math": "^0.9.3|^0.10.2|^0.11",
"illuminate/collections": "^9.0",
"illuminate/container": "^9.0",
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Encryption/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"require": {
"php": "^8.0.2",
"ext-json": "*",
"ext-hash": "*",
Copy link
Member

@timacdonald timacdonald Feb 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

protected function validMac(array $payload)
{
return hash_equals(
$this->hash($payload['iv'], $payload['value']), $payload['mac']
);
}

protected function hash($iv, $value)
{
return hash_hmac('sha256', $iv.$value, $this->key);
}

"ext-mbstring": "*",
"ext-openssl": "*",
"illuminate/contracts": "^9.0",
Expand Down
2 changes: 2 additions & 0 deletions src/Illuminate/Filesystem/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
],
"require": {
"php": "^8.0.2",
"ext-fileinfo": "*",
"ext-hash": "*",
"illuminate/collections": "^9.0",
"illuminate/contracts": "^9.0",
"illuminate/macroable": "^9.0",
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Http/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"require": {
"php": "^8.0.2",
"ext-json": "*",
"ext-filter": "*",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

public function boolean($key = null, $default = false)
{
return filter_var($this->input($key, $default), FILTER_VALIDATE_BOOLEAN);
}

"fruitcake/php-cors": "^1.2",
"illuminate/collections": "^9.0",
"illuminate/macroable": "^9.0",
Expand Down
1 change: 0 additions & 1 deletion src/Illuminate/Mail/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
],
"require": {
"php": "^8.0.2",
"ext-json": "*",
"illuminate/collections": "^9.0",
"illuminate/container": "^9.0",
"illuminate/contracts": "^9.0",
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/Pagination/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"require": {
"php": "^8.0.2",
"ext-json": "*",
"ext-filter": "*",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

protected function isValidPageNumber($page)
{
return $page >= 1 && filter_var($page, FILTER_VALIDATE_INT) !== false;
}

Paginator::currentPageResolver(function ($pageName = 'page') use ($app) {
$page = $app['request']->input($pageName);
if (filter_var($page, FILTER_VALIDATE_INT) !== false && (int) $page >= 1) {
return (int) $page;
}
return 1;
});

"illuminate/collections": "^9.0",
"illuminate/contracts": "^9.0",
"illuminate/support": "^9.0"
Expand Down
4 changes: 3 additions & 1 deletion src/Illuminate/Queue/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
],
"require": {
"php": "^8.0.2",
"ext-json": "*",
"ext-PDO": "*",
"ext-filter": "*",
"ext-mbstring": "*",
"illuminate/collections": "^9.0",
"illuminate/console": "^9.0",
"illuminate/container": "^9.0",
Expand Down
3 changes: 2 additions & 1 deletion src/Illuminate/Routing/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
],
"require": {
"php": "^8.0.2",
"ext-json": "*",
"ext-filter": "*",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

public function isValidUrl($path)
{
if (! preg_match('~^(#|//|https?://|(mailto|tel|sms):)~', $path)) {
return filter_var($path, FILTER_VALIDATE_URL) !== false;
}
return true;
}

"ext-hash": "*",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

public function signedRoute($name, $parameters = [], $expiration = null, $absolute = true)
{
$this->ensureSignedRouteParametersAreNotReserved(
$parameters = Arr::wrap($parameters)
);
if ($expiration) {
$parameters = $parameters + ['expires' => $this->availableAt($expiration)];
}
ksort($parameters);
$key = call_user_func($this->keyResolver);
return $this->route($name, $parameters + [
'signature' => hash_hmac('sha256', $this->route($name, $parameters, $absolute), $key),
], $absolute);
}

public function hasCorrectSignature(Request $request, $absolute = true, array $ignoreQuery = [])
{
$ignoreQuery[] = 'signature';
$url = $absolute ? $request->url() : '/'.$request->path();
$queryString = collect(explode('&', (string) $request->server->get('QUERY_STRING')))
->reject(fn ($parameter) => in_array(Str::before($parameter, '='), $ignoreQuery))
->join('&');
$original = rtrim($url.'?'.$queryString, '?');
$signature = hash_hmac('sha256', $original, call_user_func($this->keyResolver));
return hash_equals($signature, (string) $request->query('signature', ''));
}

"illuminate/collections": "^9.0",
"illuminate/container": "^9.0",
"illuminate/contracts": "^9.0",
Expand Down
3 changes: 2 additions & 1 deletion src/Illuminate/Session/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
],
"require": {
"php": "^8.0.2",
"ext-json": "*",
"ext-ctype": "*",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

public function isValidId($id)
{
return is_string($id) && ctype_alnum($id) && strlen($id) === 40;
}

"ext-session": "*",
Copy link
Member

@timacdonald timacdonald Feb 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All session handlers implement \SessionHandlerInterface

"illuminate/collections": "^9.0",
"illuminate/contracts": "^9.0",
"illuminate/filesystem": "^9.0",
Expand Down
3 changes: 2 additions & 1 deletion src/Illuminate/Support/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
],
"require": {
"php": "^8.0.2",
"ext-json": "*",
"ext-ctype": "*",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

public static function snake($value, $delimiter = '_')
{
$key = $value;
if (isset(static::$snakeCache[$key][$delimiter])) {
return static::$snakeCache[$key][$delimiter];
}
if (! ctype_lower($value)) {
$value = preg_replace('/\s+/u', '', ucwords($value));
$value = static::lower(preg_replace('/(.)(?=[A-Z])/u', '$1'.$delimiter, $value));
}
return static::$snakeCache[$key][$delimiter] = $value;
}

"ext-filter": "*",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

public function toBoolean()
{
return filter_var($this->value, FILTER_VALIDATE_BOOLEAN);
}

public function split($pattern, $limit = -1, $flags = 0)
{
if (filter_var($pattern, FILTER_VALIDATE_INT) !== false) {
return collect(mb_str_split($this->value, $pattern));
}
$segments = preg_split($pattern, $this->value, $limit, $flags);
return ! empty($segments) ? collect($segments) : collect();
}

"ext-mbstring": "*",
"doctrine/inflector": "^2.0",
"illuminate/collections": "^9.0",
Expand Down
1 change: 1 addition & 0 deletions src/Illuminate/Testing/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
],
"require": {
"php": "^8.0.2",
"ext-mbstring": "*",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

public function matches($values): bool
{
$position = 0;
foreach ($values as $value) {
if (empty($value)) {
continue;
}
$valuePosition = mb_strpos($this->content, $value, $position);
if ($valuePosition === false || $valuePosition < $position) {
$this->failedValue = $value;
return false;
}
$position = $valuePosition + mb_strlen($value);
}
return true;
}

"illuminate/collections": "^9.0",
"illuminate/contracts": "^9.0",
"illuminate/macroable": "^9.0",
Expand Down
1 change: 0 additions & 1 deletion src/Illuminate/Translation/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
],
"require": {
"php": "^8.0.2",
"ext-json": "*",
"illuminate/collections": "^9.0",
"illuminate/contracts": "^9.0",
"illuminate/macroable": "^9.0",
Expand Down
3 changes: 2 additions & 1 deletion src/Illuminate/Validation/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
],
"require": {
"php": "^8.0.2",
"ext-json": "*",
"ext-filter": "*",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See usages of filter_var, FILTER_FLAG_EMAIL_UNICODE, FILTER_FLAG_IPV4, FILTER_FLAG_IPV6, FILTER_VALIDATE_EMAIL, FILTER_VALIDATE_INT, FILTER_VALIDATE_IP, and FILTER_VALIDATE_MAC.

"ext-mbstring": "*",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

protected function getSize($attribute, $value)
{
$hasNumeric = $this->hasRule($attribute, $this->numericRules);
// This method will determine if the attribute is a number, string, or file and
// return the proper size accordingly. If it is a number, then number itself
// is the size. If it is a file, we take kilobytes, and for a string the
// entire length of the string will be considered the attribute size.
if (is_numeric($value) && $hasNumeric) {
return $this->trim($value);
} elseif (is_array($value)) {
return count($value);
} elseif ($value instanceof File) {
return $value->getSize() / 1024;
}
return mb_strlen($value ?? '');
}

protected function addWhere($query, $key, $extraValue)
{
if ($extraValue === 'NULL') {
$query->whereNull($key);
} elseif ($extraValue === 'NOT_NULL') {
$query->whereNotNull($key);
} elseif (str_starts_with($extraValue, '!')) {
$query->where($key, '!=', mb_substr($extraValue, 1));
} else {
$query->where($key, $extraValue);
}
}

"brick/math": "^0.9.3|^0.10.2|^0.11",
"egulias/email-validator": "^3.2.1|^4.0",
"illuminate/collections": "^9.0",
Expand Down
2 changes: 1 addition & 1 deletion src/Illuminate/View/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
],
"require": {
"php": "^8.0.2",
"ext-json": "*",
"ext-tokenizer": "*",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See usages of token_get_all, T_CLOSE_TAG, T_INLINE_HTML, T_OPEN_TAG, and T_OPEN_TAG_WITH_ECHO.

"illuminate/collections": "^9.0",
"illuminate/container": "^9.0",
"illuminate/contracts": "^9.0",
Expand Down