Skip to content
Snippets Groups Projects
Verified Commit 88deb535 authored by Bartek Jaskulski's avatar Bartek Jaskulski
Browse files

Merge branch 'devel'

parents d9efdece cb0dc2a9
No related branches found
No related tags found
No related merge requests found
Pipeline #8986 failed
......@@ -107,16 +107,16 @@
},
{
"name": "phpstan/phpstan",
"version": "1.6.8",
"version": "1.7.14",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
"reference": "d76498c5531232cb8386ceb6004f7e013138d3ba"
"reference": "e6f145f196a59c7ca91ea926c87ef3d936c4305f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/d76498c5531232cb8386ceb6004f7e013138d3ba",
"reference": "d76498c5531232cb8386ceb6004f7e013138d3ba",
"url": "https://api.github.com/repos/phpstan/phpstan/zipball/e6f145f196a59c7ca91ea926c87ef3d936c4305f",
"reference": "e6f145f196a59c7ca91ea926c87ef3d936c4305f",
"shasum": ""
},
"require": {
......@@ -142,7 +142,7 @@
"description": "PHPStan - PHP Static Analysis Tool",
"support": {
"issues": "https://github.com/phpstan/phpstan/issues",
"source": "https://github.com/phpstan/phpstan/tree/1.6.8"
"source": "https://github.com/phpstan/phpstan/tree/1.7.14"
},
"funding": [
{
......@@ -162,20 +162,20 @@
"type": "tidelift"
}
],
"time": "2022-05-10T06:54:21+00:00"
"time": "2022-06-14T13:09:35+00:00"
},
{
"name": "squizlabs/php_codesniffer",
"version": "3.6.2",
"version": "3.7.0",
"source": {
"type": "git",
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
"reference": "5e4e71592f69da17871dba6e80dd51bce74a351a"
"reference": "a2cd51b45bcaef9c1f2a4bda48f2dd2fa2b95563"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/5e4e71592f69da17871dba6e80dd51bce74a351a",
"reference": "5e4e71592f69da17871dba6e80dd51bce74a351a",
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/a2cd51b45bcaef9c1f2a4bda48f2dd2fa2b95563",
"reference": "a2cd51b45bcaef9c1f2a4bda48f2dd2fa2b95563",
"shasum": ""
},
"require": {
......@@ -218,20 +218,20 @@
"source": "https://github.com/squizlabs/PHP_CodeSniffer",
"wiki": "https://github.com/squizlabs/PHP_CodeSniffer/wiki"
},
"time": "2021-12-12T21:44:58+00:00"
"time": "2022-06-13T06:31:38+00:00"
},
{
"name": "symfony/polyfill-php73",
"version": "v1.25.0",
"version": "v1.26.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-php73.git",
"reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5"
"reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/cc5db0e22b3cb4111010e48785a97f670b350ca5",
"reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5",
"url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/e440d35fa0286f77fb45b79a03fedbeda9307e85",
"reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85",
"shasum": ""
},
"require": {
......@@ -240,7 +240,7 @@
"type": "library",
"extra": {
"branch-alias": {
"dev-main": "1.23-dev"
"dev-main": "1.26-dev"
},
"thanks": {
"name": "symfony/polyfill",
......@@ -281,7 +281,7 @@
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-php73/tree/v1.25.0"
"source": "https://github.com/symfony/polyfill-php73/tree/v1.26.0"
},
"funding": [
{
......@@ -297,7 +297,7 @@
"type": "tidelift"
}
],
"time": "2021-06-05T21:20:04+00:00"
"time": "2022-05-24T11:49:31+00:00"
},
{
"name": "szepeviktor/phpstan-wordpress",
......
......@@ -88,9 +88,25 @@ class WpdbMigrator implements Migrator {
return new Version( get_option( $this->option_name, '' ) );
}
private function needs_migration(): bool {
$migrations = $this->migrations_repository->get_migrations();
$last_migration = end( $migrations );
if ( $last_migration === false ) {
return false;
}
if ( $this->comparator->compare( $last_migration->get_version(), $this->get_current_version() ) ) {
return true;
}
return false;
}
public function migrate(): void {
require_once ABSPATH . 'wp-admin/includes/upgrade.php';
if ( ! $this->needs_migration() ) {
return;
}
$this->logger->info( 'DB update start' );
$current_version = $this->get_current_version();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment