Skip to content

Commit

Permalink
Merge branch 'release/8.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
BracketSpaceWorker committed Nov 4, 2021
2 parents c929753 + 004ec1f commit 022f623
Show file tree
Hide file tree
Showing 154 changed files with 729 additions and 698 deletions.
2 changes: 1 addition & 1 deletion compat/register-hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
add_action( 'notification/init', [ $this->component( 'core_settings' ), 'register_settings' ], 5, 0 );
add_action( 'admin_init', [ $this->component( 'core_upgrade' ), 'check_upgrade' ], 10, 0 );
add_action( 'notification/init', [ $this->component( 'core_upgrade' ), 'upgrade_db' ], 10, 0 );
add_action( 'notification/init', [ $this->component( 'core_sync' ), 'load_local_json' ], 10, 0 );
add_action( 'notification/init', [ $this->component( 'core_sync' ), 'load_local_json' ], 100, 0 );
add_action( 'notification/data/save/after', [ $this->component( 'core_sync' ), 'save_local_json' ], 10, 1 );
add_action( 'delete_post', [ $this->component( 'core_sync' ), 'delete_local_json' ], 10, 1 );
add_action( 'notification/trigger/registered', [ $this->component( 'core_binder' ), 'bind' ], 100, 1 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ class Cache {
* @param string $key cache unique key.
*/
public function __construct( $key ) {
notification_deprecated_class( __CLASS__, '8.0.2', 'BracketSpace\\Notification\\Dependencies\\Micropackage\\Cache\\Cache' );

if ( empty( $key ) ) {
trigger_error( 'Cache key cannot be empty' );
}

$this->key = $key;

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class ObjectCache extends Cache implements Cacheable {
* @param string $group cache group, optional.
*/
public function __construct( $key, $group = '' ) {
notification_deprecated_class( __CLASS__, '8.0.2', 'BracketSpace\\Notification\\Dependencies\\Micropackage\\Cache\\Driver\\ObjectCache' );

parent::__construct( $key );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ class Transient extends Cache implements Cacheable {
* @param integer $expiration expiration in seconds.
*/
public function __construct( $key, $expiration = 0 ) {
notification_deprecated_class( __CLASS__, '8.0.2', 'BracketSpace\\Notification\\Dependencies\\Micropackage\\Cache\\Driver\\Transient' );

parent::__construct( $key );

$this->expiration = $expiration;

}

/**
Expand Down
File renamed without changes.
16 changes: 16 additions & 0 deletions compat/stub-finder.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php
/**
* Stub finder.
*
* Used to generate stubs of all the important classes and functions in the core.
*
* @package notification
*/

return \StubsGenerator\Finder::create()
->in( realpath( __DIR__ . '/..' ) )
->notPath( 'resources/' )
->notPath( 'node_modules/' )
->notPath( 'vendor/' )
->notPath( 'tests/' )
->sortByName();
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@
"license": "GPL-3.0-or-later",
"description": "Notification plugin for WordPress",
"require": {
"composer-runtime-api": "^2.0",
"php": "^7.0",
"composer-runtime-api": "^2.0",
"enshrined/svg-sanitize": "^0.14.1",
"micropackage/ajax": "^1.0",
"micropackage/cache": "^1.0",
"micropackage/dochooks": "1.0.2",
"micropackage/filesystem": "^1.1",
"micropackage/requirements": "^1.0",
Expand Down
110 changes: 101 additions & 9 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion notification.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Description: Customisable email and webhook notifications with powerful developer friendly API for custom triggers and notifications. Send alerts easily.
* Author: BracketSpace
* Author URI: https://bracketspace.com
* Version: 8.0.1
* Version: 8.0.2
* License: GPL3
* Text Domain: notification
* Domain Path: /languages
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"dependencies": {
"clipboard": "^2.0.4",
"jquery-collapse": "^1.1.2",
"selectize": "^0.12.4"
"selectize": "^0.12.4",
"vue": "2.6.11"
},
"mpScriptsConfig": {
"paths": {
Expand Down
65 changes: 25 additions & 40 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,21 @@ parameters:
count: 1
path: compat/register-hooks.php

-
message: "#^Method BracketSpace\\\\Notification\\\\Utils\\\\Interfaces\\\\Cacheable\\:\\:add\\(\\) has no return typehint specified\\.$#"
count: 1
path: compat/src-deprecated/Utils/Interfaces/Cacheable.php

-
message: "#^Method BracketSpace\\\\Notification\\\\Utils\\\\Interfaces\\\\Cacheable\\:\\:delete\\(\\) has no return typehint specified\\.$#"
count: 1
path: compat/src-deprecated/Utils/Interfaces/Cacheable.php

-
message: "#^Method BracketSpace\\\\Notification\\\\Utils\\\\Interfaces\\\\Cacheable\\:\\:set\\(\\) has no return typehint specified\\.$#"
count: 1
path: compat/src-deprecated/Utils/Interfaces/Cacheable.php

-
message: "#^Function notification_get_notification_recipients\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
Expand Down Expand Up @@ -435,6 +450,11 @@ parameters:
count: 1
path: compat/src-deprecated/functions.php

-
message: "#^Call to static method create\\(\\) on an unknown class StubsGenerator\\\\Finder\\.$#"
count: 1
path: compat/stub-finder.php

-
message: "#^Method Notification\\:\\:components\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
Expand Down Expand Up @@ -590,11 +610,6 @@ parameters:
count: 1
path: src/Admin/Extensions.php

-
message: "#^Parameter \\#2 \\$now of function strtotime expects int, int\\|string given\\.$#"
count: 1
path: src/Admin/Extensions.php

-
message: "#^Property BracketSpace\\\\Notification\\\\Admin\\\\Extensions\\:\\:\\$extensions type has no value type specified in iterable type array\\.$#"
count: 1
Expand All @@ -615,11 +630,6 @@ parameters:
count: 1
path: src/Admin/ImportExport.php

-
message: "#^Method BracketSpace\\\\Notification\\\\Admin\\\\ImportExport\\:\\:prepare_notifications_export_data\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: src/Admin/ImportExport.php

-
message: "#^Method BracketSpace\\\\Notification\\\\Admin\\\\ImportExport\\:\\:process_notifications_import_request\\(\\) has parameter \\$data with no value type specified in iterable type array\\.$#"
count: 1
Expand Down Expand Up @@ -990,11 +1000,6 @@ parameters:
count: 2
path: src/Core/Binder.php

-
message: "#^Binary operation \"\\+\" between int\\|string and 86400 results in an error\\.$#"
count: 1
path: src/Core/Cron.php

-
message: "#^Method BracketSpace\\\\Notification\\\\Core\\\\Cron\\:\\:register_intervals\\(\\) has parameter \\$intervals with no value type specified in iterable type array\\.$#"
count: 1
Expand Down Expand Up @@ -1035,6 +1040,11 @@ parameters:
count: 1
path: src/Core/Debugging.php

-
message: "#^Access to an undefined property object\\:\\:\\$license\\.$#"
count: 1
path: src/Core/License.php

-
message: "#^Access to an undefined property object\\:\\:\\$license_key\\.$#"
count: 1
Expand Down Expand Up @@ -1125,11 +1135,6 @@ parameters:
count: 1
path: src/Core/Settings.php

-
message: "#^Method BracketSpace\\\\Notification\\\\Core\\\\Sync\\:\\:get_all_json\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
path: src/Core/Sync.php

-
message: "#^Cannot access property \\$post_modified_gmt on WP_Post\\|null\\.$#"
count: 1
Expand Down Expand Up @@ -2620,21 +2625,6 @@ parameters:
count: 1
path: src/Runtime.php

-
message: "#^Method BracketSpace\\\\Notification\\\\Utils\\\\Interfaces\\\\Cacheable\\:\\:add\\(\\) has no return typehint specified\\.$#"
count: 1
path: src/Utils/Interfaces/Cacheable.php

-
message: "#^Method BracketSpace\\\\Notification\\\\Utils\\\\Interfaces\\\\Cacheable\\:\\:delete\\(\\) has no return typehint specified\\.$#"
count: 1
path: src/Utils/Interfaces/Cacheable.php

-
message: "#^Method BracketSpace\\\\Notification\\\\Utils\\\\Interfaces\\\\Cacheable\\:\\:set\\(\\) has no return typehint specified\\.$#"
count: 1
path: src/Utils/Interfaces/Cacheable.php

-
message: "#^Method BracketSpace\\\\Notification\\\\Utils\\\\Settings\\:\\:get_sections\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
Expand All @@ -2650,11 +2640,6 @@ parameters:
count: 1
path: src/Utils/Settings.php

-
message: "#^Property BracketSpace\\\\Notification\\\\Utils\\\\Settings\\:\\:\\$settings type has no value type specified in iterable type array\\.$#"
count: 1
path: src/Utils/Settings.php

-
message: "#^Parameter \\#1 \\$url of function esc_url expects string, string\\|false given\\.$#"
count: 1
Expand Down
2 changes: 0 additions & 2 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ parameters:
inferPrivatePropertyTypeFromConstructor: true
bootstrapFiles:
- tests/phpstan/bootstrap.php
stubFiles:
- tests/phpstan/stubs/Filesystem.stub
scanFiles:
- vendor/php-stubs/wp-cli-stubs/wp-cli-stubs.php
paths:
Expand Down
Loading

0 comments on commit 022f623

Please sign in to comment.