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

Woodpecker: Update PHP version #12153

Merged
merged 4 commits into from
Nov 10, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .woodpecker/.continuous-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pipeline:
branch: [ develop, '*-rc' ]
event: push
composer_install:
image: friendicaci/php7.4:php7.4.18
image: friendicaci/php7.4:php7.4.33
commands:
- export COMPOSER_HOME=.composer
- composer validate
Expand Down
2 changes: 1 addition & 1 deletion .woodpecker/.database_checks.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
matrix:
include:
- PHP_MAJOR_VERSION: 7.4
PHP_VERSION: 7.4.18
PHP_VERSION: 7.4.33

branches:
exclude: [ stable ]
Expand Down
8 changes: 5 additions & 3 deletions .woodpecker/.phpunit.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
matrix:
include:
- PHP_MAJOR_VERSION: 7.3
PHP_VERSION: 7.3.28
PHP_VERSION: 7.3.33
- PHP_MAJOR_VERSION: 7.4
PHP_VERSION: 7.4.18
PHP_VERSION: 7.4.33
- PHP_MAJOR_VERSION: 8.0
PHP_VERSION: 8.0.5
PHP_VERSION: 8.0.25
# - PHP_MAJOR_VERSION: 8.1
# PHP_VERSION: 8.1.12

pipeline:
php-lint:
Expand Down
2 changes: 1 addition & 1 deletion .woodpecker/.releaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ pipeline:
branch: stable
event: tag
composer_install:
image: friendicaci/php7.4:php7.4.18
image: friendicaci/php7.4:php7.4.33
commands:
- export COMPOSER_HOME=.composer
- composer validate
Expand Down
2 changes: 1 addition & 1 deletion src/App/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public function logRuntime(IManageConfigValues $config, string $origin = '')
* The return value will be casted to boolean if non-boolean was returned.
* @since 5.0.0
*/
public function offsetExists($offset)
public function offsetExists($offset): bool
{
return isset($this->page[$offset]);
}
Expand Down
6 changes: 3 additions & 3 deletions src/Core/L10n.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,10 @@ public static function detectLanguage(array $server, array $get, string $sysLang
{
$lang_variable = $server['HTTP_ACCEPT_LANGUAGE'] ?? null;

$acceptedLanguages = preg_split('/,\s*/', $lang_variable);

if (empty($acceptedLanguages)) {
if (empty($lang_variable)) {
$acceptedLanguages = [];
} else {
$acceptedLanguages = preg_split('/,\s*/', $lang_variable);
}

// Add get as absolute quality accepted language (except this language isn't valid)
Expand Down
8 changes: 4 additions & 4 deletions src/Util/Network.php
Original file line number Diff line number Diff line change
Expand Up @@ -485,11 +485,11 @@ public static function unparseURL(array $parsed): string
$get('host') .
($port ? ":$port" : '');

return (strlen($scheme) ? $scheme . ':' : '') .
(strlen($authority) ? '//' . $authority : '') .
return (!empty($scheme) ? $scheme . ':' : '') .
(!empty($authority) ? '//' . $authority : '') .
$get('path') .
(strlen($query) ? '?' . $query : '') .
(strlen($fragment) ? '#' . $fragment : '');
(!empty($query) ? '?' . $query : '') .
(!empty($fragment) ? '#' . $fragment : '');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Util/ReversedFileReader.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function open(string $filename): ReversedFileReader
$this->fh = fopen($filename, 'r');
if (!$this->fh) {
// this should use a custom exception.
throw \Exception("Unable to open $filename");
throw new \Exception("Unable to open $filename");
}
$this->filesize = filesize($filename);
$this->pos = -1;
Expand Down