Skip to content

Commit

Permalink
Merge tag '9.0.0' into develop
Browse files Browse the repository at this point in the history
v9.0.0 9.0.0
  • Loading branch information
BracketSpaceWorker committed Oct 2, 2024
2 parents 34ce88f + 91e81ac commit a257f50
Show file tree
Hide file tree
Showing 34 changed files with 85 additions and 85 deletions.
4 changes: 2 additions & 2 deletions compat/src-deprecated/Abstracts/Adapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* Adapter class
*
* @mixin \BracketSpace\Notification\Core\Notification
* @deprecated [Next]
* @deprecated 9.0.0
*/
abstract class Adapter implements Interfaces\Adaptable
{
Expand All @@ -39,7 +39,7 @@ abstract class Adapter implements Interfaces\Adaptable
*/
public function __construct(Notification $notification)
{
notification_deprecated_class( __CLASS__, '[Next]' );
notification_deprecated_class( __CLASS__, '9.0.0' );

$this->notification = $notification;
}
Expand Down
2 changes: 1 addition & 1 deletion compat/src-deprecated/Adapter/JSON.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/**
* JSON Adapter class
*
* @deprecated [Next]
* @deprecated 9.0.0
*/
class JSON extends Abstracts\Adapter
{
Expand Down
2 changes: 1 addition & 1 deletion compat/src-deprecated/Adapter/WordPress.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* WordPress Adapter class
*
* @mixin \BracketSpace\Notification\Core\Notification
* @deprecated [Next]
* @deprecated 9.0.0
*/
class WordPress extends Abstracts\Adapter
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* Notification Queries class
*
* @deprecated [Next]
* @deprecated 9.0.0
*/
class NotificationQueries
{
Expand All @@ -25,7 +25,7 @@ class NotificationQueries
*/
public function __construct()
{
notification_deprecated_class( __CLASS__, '[Next]' );
notification_deprecated_class( __CLASS__, '9.0.0' );
}

/**
Expand Down
2 changes: 1 addition & 1 deletion compat/src-deprecated/Defaults/Carrier/Webhook.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/**
* Webhook Carrier
*
* @deprecated [Next]
* @deprecated 9.0.0
*/
class Webhook extends BaseCarrier
{
Expand Down
2 changes: 1 addition & 1 deletion compat/src-deprecated/Defaults/Carrier/WebhookJson.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/**
* Webhook Carrier
*
* @deprecated [Next]
* @deprecated 9.0.0
*/
class WebhookJson extends BaseCarrier
{
Expand Down
2 changes: 1 addition & 1 deletion compat/src-deprecated/Defaults/Recipient/Webhook.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* Webhook recipient
*
* @deprecated [Next]
* @deprecated 9.0.0
*/
class Webhook extends BaseRecipient
{
Expand Down
2 changes: 1 addition & 1 deletion compat/src-deprecated/Traits/Webhook.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
/**
* Webhook trait
*
* @deprecated [Next]
* @deprecated 9.0.0
*/
trait Webhook
{
Expand Down
44 changes: 22 additions & 22 deletions compat/src-deprecated/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -476,10 +476,10 @@ function notification_get_global_merge_tags() {
* @param \BracketSpace\Notification\Core\Notification $notification Notification object.
* @return \BracketSpace\Notification\Interfaces\Adaptable
* @since 6.0.0
* @deprecated [Next]
* @deprecated 9.0.0
*/
function notification_adapt($adapterName, \BracketSpace\Notification\Core\Notification $notification) {
_deprecated_function( __FUNCTION__, '[Next]', 'Notification::to()');
_deprecated_function( __FUNCTION__, '9.0.0', 'Notification::to()');

if (class_exists($adapterName)) {
$adapter = new $adapterName($notification);
Expand All @@ -504,10 +504,10 @@ function notification_adapt($adapterName, \BracketSpace\Notification\Core\Notifi
* @param mixed $data Input data needed by adapter.
* @return \BracketSpace\Notification\Interfaces\Adaptable
* @since 6.0.0
* @deprecated [Next]
* @deprecated 9.0.0
*/
function notification_adapt_from($adapterName, $data) {
_deprecated_function( __FUNCTION__, '[Next]', 'Notification::from()');
_deprecated_function( __FUNCTION__, '9.0.0', 'Notification::from()');

$adapter = notification_adapt(
$adapterName,
Expand All @@ -523,10 +523,10 @@ function notification_adapt_from($adapterName, $data) {
* @param \BracketSpace\Notification\Interfaces\Adaptable $adapter Adapter.
* @return \BracketSpace\Notification\Interfaces\Adaptable
* @since 6.0.0
* @deprecated [Next]
* @deprecated 9.0.0
*/
function notification_swap_adapter($newAdapterName, Interfaces\Adaptable $adapter) {
_deprecated_function( __FUNCTION__, '[Next]');
_deprecated_function( __FUNCTION__, '9.0.0');

return notification_adapt(
$newAdapterName,
Expand All @@ -538,14 +538,14 @@ function notification_swap_adapter($newAdapterName, Interfaces\Adaptable $adapte
* Logs the message in database
*
* @since 6.0.0
* @deprecated [Next]
* @deprecated 9.0.0
* @param string $component Component nice name, like `Core` or `Any Plugin Name`.
* @param string $type Log type, values: notification|error|warning.
* @param string $message Log formatted message.
* @return bool|\WP_Error
*/
function notification_log($component, $type, $message) {
_deprecated_function( __FUNCTION__, '[Next]', 'BracketSpace\\Notification\\Core\\Debugging::log()');
_deprecated_function( __FUNCTION__, '9.0.0', 'BracketSpace\\Notification\\Core\\Debugging::log()');

return Debugging::log($component, $type, $message);
}
Expand All @@ -554,12 +554,12 @@ function notification_log($component, $type, $message) {
* Adds Notification to Store
*
* @since 6.0.0
* @deprecated [Next]
* @deprecated 9.0.0
* @param \BracketSpace\Notification\Core\Notification $notification Notification object.
* @return void
*/
function notification_add(\BracketSpace\Notification\Core\Notification $notification) {
_deprecated_function( __FUNCTION__, '[Next]', 'BracketSpace\\Notification\\Register::notification()');
_deprecated_function( __FUNCTION__, '9.0.0', 'BracketSpace\\Notification\\Register::notification()');

Register::notification($notification);
}
Expand All @@ -573,10 +573,10 @@ function notification_add(\BracketSpace\Notification\Core\Notification $notifica
* @param array<mixed> $data Notification static data.
* @return array<mixed> Converted data.
* @since 6.0.0
* @deprecated [Next]
* @deprecated 9.0.0
*/
function notification_convert_data($data = []) {
_deprecated_function( __FUNCTION__, '[Next]', "Bracketspace\\Notification\\Core\\Notification::from('array', ...)");
_deprecated_function( __FUNCTION__, '9.0.0', "Bracketspace\\Notification\\Core\\Notification::from('array', ...)");

$notification = Notification::from('array', $data);

Expand All @@ -590,10 +590,10 @@ function notification_convert_data($data = []) {
* @param int $priority Action priority.
* @return void
* @since 5.0.0
* @deprecated [Next]
* @deprecated 9.0.0
*/
function notification_register_settings($callback, $priority = 10) {
_deprecated_function( __FUNCTION__, '[Next]', 'Use the `notification/settings/register` action directly');
_deprecated_function( __FUNCTION__, '9.0.0', 'Use the `notification/settings/register` action directly');

if (!is_callable($callback)) {
trigger_error(
Expand All @@ -614,10 +614,10 @@ function notification_register_settings($callback, $priority = 10) {
*
* @return mixed
* @since 5.0.0
* @deprecated [Next]
* @deprecated 9.0.0
*/
function notification_get_settings() {
_deprecated_function( __FUNCTION__, '[Next]', "\Notification::settings()->getSettings()");
_deprecated_function( __FUNCTION__, '9.0.0', "\Notification::settings()->getSettings()");

return \Notification::component(Settings::class)->getSettings();
}
Expand All @@ -629,24 +629,24 @@ function notification_get_settings() {
* @return mixed
* @since 5.0.0
* @since 7.0.0 The `notifications` section has been changed to `carriers`.
* @deprecated [Next]
* @deprecated 9.0.0
*/
function notification_get_setting($setting) {
_deprecated_function( __FUNCTION__, '[Next]', "\Notification::settings()->getSetting()");
_deprecated_function( __FUNCTION__, '9.0.0', "\Notification::settings()->getSetting()");

return \Notification::component(Settings::class)->getSetting($setting);
}

/**
* Updates single setting value.
*
* @deprecated [Next]
* @deprecated 9.0.0
* @param string $setting setting name in `a/b/c` format.
* @param mixed $value setting value.
* @return mixed
*/
function notification_update_setting($setting, $value) {
_deprecated_function( __FUNCTION__, '[Next]', "\Notification::settings()->updateSetting(setting, value)");
_deprecated_function( __FUNCTION__, '9.0.0', "\Notification::settings()->updateSetting(setting, value)");

return \Notification::component(Settings::class)->updateSetting($setting, $value);
}
Expand All @@ -655,13 +655,13 @@ function notification_update_setting($setting, $value) {
* Creates new Notification from array
*
* @since 6.0.0
* @deprecated [Next]
* @deprecated 9.0.0
* @param NotificationUnconvertedData $data Notification data.
* @return void
*/
function notification($data = [])
{
_deprecated_function( __FUNCTION__, '[Next]', 'BracketSpace\\Notification\\Register::notificationFromArray()');
_deprecated_function( __FUNCTION__, '9.0.0', 'BracketSpace\\Notification\\Register::notificationFromArray()');

Register::notificationFromArray($data);
}
2 changes: 1 addition & 1 deletion compat/src-deprecated/namespaces.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

spl_autoload_register(function ($class) {
$deprecations = [
'[Next]' => [
'9.0.0' => [
'BracketSpace\Notification\Defaults' => 'BracketSpace\Notification\Repository',
'BracketSpace\Notification\Abstracts\Carrier' => 'BracketSpace\Notification\Repository\Carrier\BaseCarrier',
'BracketSpace\Notification\Abstracts\Field' => 'BracketSpace\Notification\Repository\Field\BaseField',
Expand Down
2 changes: 1 addition & 1 deletion notification.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public static function settings() {
/**
* Gets plugin settings instance
*
* @since [Next]
* @since 9.0.0
* @throws \Exception When runtime wasn't invoked yet.
* @return \BracketSpace\Notification\Dependencies\Micropackage\Filesystem\Filesystem
*/
Expand Down
8 changes: 4 additions & 4 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: notification, bracketspace, Kubitomakita, tomaszadamowicz, insejn,
Tags: notification, notify, alert, email, mail, webhook, API, developer, framework
Requires at least: 4.9
Tested up to: 6.2
Stable tag: 8.0.15
Stable tag: 9.0.0
Requires PHP: 7.4
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Expand Down Expand Up @@ -302,7 +302,7 @@ Yes! We're offering a [custom plugin development](https://bracketspace.com/custo

== Changelog ==

= [Next] =
= 9.0.0 =

**Compatibility Breaking Changes**

Expand Down Expand Up @@ -393,10 +393,10 @@ Removed deprecated hooks:

== Upgrade Notice ==

= [Next] =
= 9.0.0 =
Minimum required PHP version is 7.4.
Compatibility breaking changes. Please make sure to review the changelog before upgrading and adjust your customizations.
The premium plugins won't work with Notification [Next] unless updated.
The premium plugins won't work with Notification 9.0.0 unless updated.
Webook and Webhook JSON Carriers are now deprecated and won't work unless you get an add-on.

= 8.0.0 =
Expand Down
2 changes: 1 addition & 1 deletion src/Admin/ImportExport.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public function exportRequest()
*
* @since 6.0.0
* @since 8.0.2 Accepts the items argument, instead reading it from GET.
* @since [Next] Uses NotificationDatabaseService instead of get_posts().
* @since 9.0.0 Uses NotificationDatabaseService instead of get_posts().
* @param array<int,string> $items Items to export.
* @return array<int,string>
* @throws \Exception When no items selected for export.
Expand Down
8 changes: 4 additions & 4 deletions src/Admin/PostType.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public function bypassTrash($postId)
*
* @action after_delete_post 100
*
* @since [Next]
* @since 9.0.0
* @param int $postId Post ID.
* @param \WP_Post $post WP Post object.
* @return void
Expand Down Expand Up @@ -249,7 +249,7 @@ public function deleteNotification($postId, $post)
*
* @action save_post_notification
*
* @since [Next] We're saving the Notification to custom table instead of Post Type. Post is just the shell.
* @since 9.0.0 We're saving the Notification to custom table instead of Post Type. Post is just the shell.
* @param int $postId Current post ID.
* @param \WP_Post $post WP_Post object.
* @param bool $update If existing notification is updated.
Expand Down Expand Up @@ -381,15 +381,15 @@ public function ajaxChangeNotificationStatus()
/**
* Gets all Notifications from database.
*
* @deprecated [Next] Use BracketSpace\Notification\Database\NotificationDatabaseService::getAll();
* @deprecated 9.0.0 Use BracketSpace\Notification\Database\NotificationDatabaseService::getAll();
* @since 6.0.0
* @return array<Notification>
*/
public static function getAllNotifications()
{
_deprecated_function(
__METHOD__,
'[Next]',
'9.0.0',
'BracketSpace\Notification\Database\NotificationDatabaseService::getAll'
);

Expand Down
2 changes: 1 addition & 1 deletion src/Compat/WebhookCompat.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/**
* WebhookCompat class
*
* @since [Next]
* @since 9.0.0
*/
class WebhookCompat
{
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Debugging.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function __construct()
/**
* Logs the message in database
*
* @since [Next]
* @since 9.0.0
* @param string $component Component nice name, like `Core` or `Any Plugin Name`.
* @param string $type Log type, values: notification|error|warning.
* @param string $message Log formatted message.
Expand Down
8 changes: 4 additions & 4 deletions src/Core/Notification.php
Original file line number Diff line number Diff line change
Expand Up @@ -584,13 +584,13 @@ public function setSourcePostId($postId)
* Dumps the object to array
*
* @since 6.0.0
* @deprecated [Next] Use Converter instead, via $notification->to('array') method
* @deprecated 9.0.0 Use Converter instead, via $notification->to('array') method
* @param bool $onlyEnabledCarriers If only enabled Carriers should be saved.
* @return NotificationData|null
*/
public function toArray($onlyEnabledCarriers = false)
{
_deprecated_function(__METHOD__, '[Next]', 'Notification::to');
_deprecated_function(__METHOD__, '9.0.0', 'Notification::to');

$array = $this->to('array', ['onlyEnabledCarriers' => $onlyEnabledCarriers]);

Expand All @@ -604,7 +604,7 @@ public function toArray($onlyEnabledCarriers = false)
/**
* Creates Notification from a specific representation
*
* @since [Next]
* @since 9.0.0
* @throws \Exception When no Notification object comes back from the filter
* @param string $type The type of representation, ie. array or json
* @param string|array<mixed,mixed> $data The notification representation
Expand All @@ -630,7 +630,7 @@ public static function from(string $type, $data): Notification
/**
* Converts the notification to another type of representation.
*
* @since [Next]
* @since 9.0.0
* @param string $type The type of representation, ie. array or json
* @param array<string|int,mixed> $config The additional configuration of the converter
* @return mixed
Expand Down
2 changes: 1 addition & 1 deletion src/Core/Upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ public function upgradeToV2()
* - 1. Moves the notifications to custom table.
* - 2. Clears notifications cache.
*
* @since [Next]
* @since 9.0.0
* @return void
*/
public function upgradeToV3()
Expand Down
Loading

0 comments on commit a257f50

Please sign in to comment.