Skip to content

Commit

Permalink
2.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
fisharebest committed Jul 27, 2020
1 parent e2cad64 commit 721424f
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 19 deletions.
8 changes: 6 additions & 2 deletions app/Http/Controllers/Admin/UpgradeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,11 @@ public function wizard(ServerRequestInterface $request): ResponseInterface

$title = I18N::translate('Upgrade wizard');

if ($continue === '1') {
$latest_version = $this->upgrade_service->latestVersion();

$upgrade_available = version_compare($latest_version, Webtrees::VERSION) > 0;

if ($upgrade_available && $continue === '1') {
return $this->viewResponse('admin/upgrade/steps', [
'steps' => $this->wizardSteps(),
'title' => $title,
Expand All @@ -129,7 +133,7 @@ public function wizard(ServerRequestInterface $request): ResponseInterface

return $this->viewResponse('admin/upgrade/wizard', [
'current_version' => Webtrees::VERSION,
'latest_version' => $this->upgrade_service->latestVersion(),
'latest_version' => $latest_version,
'title' => $title,
]);
}
Expand Down
6 changes: 4 additions & 2 deletions app/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
use function sha1;
use function str_contains;
use function str_ends_with;
use function str_starts_with;
use function strlen;
use function strncmp;

use const EXTR_OVERWRITE;

Expand Down Expand Up @@ -241,7 +242,8 @@ public static function registerCustomView(string $old, string $new): void
public function getFilenameForView(string $view_name): string
{
// If we request "::view", then use it explicitly. Don't allow replacements.
$explicit = str_starts_with($view_name, self::NAMESPACE_SEPARATOR);
// NOTE: cannot use str_starts_with() as it wasn't available in 2.0.6, and is called by the upgrade wizard.
$explicit = strncmp($view_name, self::NAMESPACE_SEPARATOR, strlen(self::NAMESPACE_SEPARATOR)) === 0;

if (!str_contains($view_name, self::NAMESPACE_SEPARATOR)) {
$view_name = self::NAMESPACE_SEPARATOR . $view_name;
Expand Down
10 changes: 6 additions & 4 deletions app/Webtrees.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@
use function error_reporting;
use function set_error_handler;

use const E_ALL;
use const E_DEPRECATED;
use const E_USER_DEPRECATED;

/**
Expand Down Expand Up @@ -86,19 +88,19 @@ class Webtrees
public const DEBUG = self::STABILITY !== '';

// We want to know about all PHP errors during development, and fewer in production.
public const ERROR_REPORTING = self::DEBUG ? E_ALL | E_STRICT : E_ALL & ~E_USER_DEPRECATED & ~E_USER_DEPRECATED;
public const ERROR_REPORTING = self::DEBUG ? E_ALL : E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED;

// The name of the application.
public const NAME = 'webtrees';

// Required version of database tables/columns/indexes/etc.
public const SCHEMA_VERSION = 44;

// e.g. "dev", "alpha", "beta", etc.
public const STABILITY = 'dev';
// e.g. "-dev", "-alpha", "-beta", etc.
public const STABILITY = '';

// Version number
public const VERSION = '2.0.7' . (self::STABILITY === '' ? '' : '-') . self::STABILITY;
public const VERSION = '2.0.7' . self::STABILITY;

// Project website.
public const URL = 'https://webtrees.net/';
Expand Down
17 changes: 6 additions & 11 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ parameters:
path: app/GedcomTag.php

-
message: "#^Strict comparison using \\=\\=\\= between 'dev' and '' will always evaluate to false\\.$#"
message: "#^Strict comparison using \\=\\=\\= between '\\-dev' and '' will always evaluate to false\\.$#"
count: 1
path: app/Helpers/functions.php

Expand Down Expand Up @@ -1047,27 +1047,27 @@ parameters:
-
message: "#^Parameter \\#1 \\$string of function strlen expects string, string\\|false given\\.$#"
count: 1
path: modules_v4/example-footer.disable/module.php
path: modules_v4/example-middleware.disable/module.php

-
message: "#^Parameter \\#1 \\$string of function strlen expects string, string\\|false given\\.$#"
count: 1
path: modules_v4/example-report.disable/module.php
path: modules_v4/example-theme.disable/module.php

-
message: "#^Parameter \\#1 \\$string of function strlen expects string, string\\|false given\\.$#"
count: 1
path: modules_v4/example-theme.disable/module.php
path: modules_v4/example.disable/module.php

-
message: "#^Parameter \\#1 \\$string of function strlen expects string, string\\|false given\\.$#"
count: 1
path: modules_v4/example.disable/module.php
path: modules_v4/example-report.disable/module.php

-
message: "#^Parameter \\#1 \\$string of function strlen expects string, string\\|false given\\.$#"
count: 1
path: modules_v4/example-middleware.disable/module.php
path: modules_v4/example-footer.disable/module.php

-
message: "#^Parameter \\#1 \\$string of function strlen expects string, string\\|false given\\.$#"
Expand Down Expand Up @@ -2264,11 +2264,6 @@ parameters:
count: 1
path: app/Webtrees.php

-
message: "#^Strict comparison using \\=\\=\\= between 'dev' and '' will always evaluate to false\\.$#"
count: 1
path: app/Webtrees.php

-
message: "#^Parameter \\#1 \\$middleware of class Middleland\\\\Dispatcher constructor expects array\\<Psr\\\\Http\\\\Server\\\\MiddlewareInterface\\>, array\\<string\\> given\\.$#"
count: 1
Expand Down

0 comments on commit 721424f

Please sign in to comment.