Plugin Directory

Changeset 3331586


Ignore:
Timestamp:
07/21/2025 03:10:29 PM (8 months ago)
Author:
badasswp
Message:

Deploy version 1.2.0 for ping-me-on-slack

Location:
ping-me-on-slack
Files:
280 added
16 edited

Legend:

Unmodified
Added
Removed
  • ping-me-on-slack/trunk/inc/Core/Client.php

    r3241787 r3331586  
    1616class Client implements Dispatcher {
    1717    /**
     18     * Slack Params.
     19     *
     20     * @var mixed[]
     21     */
     22    public array $args;
     23
     24    /**
     25     * Constructor.
     26     *
     27     * @since 1.2.0
     28     */
     29    public function __construct() {
     30        $this->args = [
     31            'channel'  => pmos_get_settings( 'channel' ),
     32            'username' => pmos_get_settings( 'username' ),
     33        ];
     34    }
     35
     36    /**
    1837     * Get Slack Client.
    1938     *
     
    2241     * @return SlackClient
    2342     */
    24     protected function get_slack_client(): SlackClient {
    25         return new SlackClient(
    26             pmos_get_settings( 'webhook' ),
    27             [
    28                 'channel'  => pmos_get_settings( 'channel' ),
    29                 'username' => pmos_get_settings( 'username' ),
    30             ]
    31         );
     43    protected function get_client(): SlackClient {
     44        return new SlackClient( pmos_get_settings( 'webhook' ), $this->args );
    3245    }
    3346
     
    4558    public function ping( $message ): void {
    4659        try {
    47             $this->get_slack_client()->send( $message );
     60            $this->get_client()->send( $message );
    4861        } catch ( \Exception $e ) {
    4962            error_log(
  • ping-me-on-slack/trunk/ping-me-on-slack.php

    r3241787 r3331586  
    44 * Plugin URI:  https://github.com/badasswp/ping-me-on-slack
    55 * Description: Get notifications on Slack when changes are made on your WP website.
    6  * Version:     1.1.5
     6 * Version:     1.2.0
    77 * Author:      badasswp
    88 * Author URI:  https://github.com/badasswp
  • ping-me-on-slack/trunk/readme.txt

    r3241787 r3331586  
    44Requires at least: 4.0
    55Tested up to: 6.7.2
    6 Stable tag: 1.1.5
     6Stable tag: 1.2.0
    77Requires PHP: 8.1.0
    88License: GPLv2 or later
     
    7070== Changelog ==
    7171
     72= 1.2.0 =
     73* Fix custom filters, ensure `args` is correctly set for Slack `client`.
     74* Feat: Add `.wp-env` config for dev env.
     75
    7276= 1.1.5 =
    7377* Use helper function `pmos_get_settings`.
  • ping-me-on-slack/trunk/vendor/autoload.php

    r3168411 r3331586  
    1515        }
    1616    }
    17     trigger_error(
    18         $err,
    19         E_USER_ERROR
    20     );
     17    throw new RuntimeException($err);
    2118}
    2219
  • ping-me-on-slack/trunk/vendor/composer/InstalledVersions.php

    r3235087 r3331586  
    2727class InstalledVersions
    2828{
     29    /**
     30     * @var string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to
     31     * @internal
     32     */
     33    private static $selfDir = null;
     34
    2935    /**
    3036     * @var mixed[]|null
     
    324330
    325331    /**
     332     * @return string
     333     */
     334    private static function getSelfDir()
     335    {
     336        if (self::$selfDir === null) {
     337            self::$selfDir = strtr(__DIR__, '\\', '/');
     338        }
     339
     340        return self::$selfDir;
     341    }
     342
     343    /**
    326344     * @return array[]
    327345     * @psalm-return list<array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}>
     
    337355
    338356        if (self::$canGetVendors) {
    339             $selfDir = strtr(__DIR__, '\\', '/');
     357            $selfDir = self::getSelfDir();
    340358            foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
    341359                $vendorDir = strtr($vendorDir, '\\', '/');
  • ping-me-on-slack/trunk/vendor/composer/installed.json

    r3214251 r3331586  
    7272        {
    7373            "name": "guzzlehttp/guzzle",
    74             "version": "7.9.2",
    75             "version_normalized": "7.9.2.0",
     74            "version": "7.9.3",
     75            "version_normalized": "7.9.3.0",
    7676            "source": {
    7777                "type": "git",
    7878                "url": "https://github.com/guzzle/guzzle.git",
    79                 "reference": "d281ed313b989f213357e3be1a179f02196ac99b"
    80             },
    81             "dist": {
    82                 "type": "zip",
    83                 "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b",
    84                 "reference": "d281ed313b989f213357e3be1a179f02196ac99b",
     79                "reference": "7b2f29fe81dc4da0ca0ea7d42107a0845946ea77"
     80            },
     81            "dist": {
     82                "type": "zip",
     83                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/7b2f29fe81dc4da0ca0ea7d42107a0845946ea77",
     84                "reference": "7b2f29fe81dc4da0ca0ea7d42107a0845946ea77",
    8585                "shasum": ""
    8686            },
     
    109109                "psr/log": "Required for using the Log middleware"
    110110            },
    111             "time": "2024-07-24T11:22:20+00:00",
     111            "time": "2025-03-27T13:37:11+00:00",
    112112            "type": "library",
    113113            "extra": {
     
    181181            "support": {
    182182                "issues": "https://github.com/guzzle/guzzle/issues",
    183                 "source": "https://github.com/guzzle/guzzle/tree/7.9.2"
     183                "source": "https://github.com/guzzle/guzzle/tree/7.9.3"
    184184            },
    185185            "funding": [
     
    201201        {
    202202            "name": "guzzlehttp/promises",
    203             "version": "2.0.4",
    204             "version_normalized": "2.0.4.0",
     203            "version": "2.2.0",
     204            "version_normalized": "2.2.0.0",
    205205            "source": {
    206206                "type": "git",
    207207                "url": "https://github.com/guzzle/promises.git",
    208                 "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455"
    209             },
    210             "dist": {
    211                 "type": "zip",
    212                 "url": "https://api.github.com/repos/guzzle/promises/zipball/f9c436286ab2892c7db7be8c8da4ef61ccf7b455",
    213                 "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455",
     208                "reference": "7c69f28996b0a6920945dd20b3857e499d9ca96c"
     209            },
     210            "dist": {
     211                "type": "zip",
     212                "url": "https://api.github.com/repos/guzzle/promises/zipball/7c69f28996b0a6920945dd20b3857e499d9ca96c",
     213                "reference": "7c69f28996b0a6920945dd20b3857e499d9ca96c",
    214214                "shasum": ""
    215215            },
     
    221221                "phpunit/phpunit": "^8.5.39 || ^9.6.20"
    222222            },
    223             "time": "2024-10-17T10:06:22+00:00",
     223            "time": "2025-03-27T13:27:01+00:00",
    224224            "type": "library",
    225225            "extra": {
     
    267267            "support": {
    268268                "issues": "https://github.com/guzzle/promises/issues",
    269                 "source": "https://github.com/guzzle/promises/tree/2.0.4"
     269                "source": "https://github.com/guzzle/promises/tree/2.2.0"
    270270            },
    271271            "funding": [
     
    287287        {
    288288            "name": "guzzlehttp/psr7",
    289             "version": "2.7.0",
    290             "version_normalized": "2.7.0.0",
     289            "version": "2.7.1",
     290            "version_normalized": "2.7.1.0",
    291291            "source": {
    292292                "type": "git",
    293293                "url": "https://github.com/guzzle/psr7.git",
    294                 "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201"
    295             },
    296             "dist": {
    297                 "type": "zip",
    298                 "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201",
    299                 "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201",
     294                "reference": "c2270caaabe631b3b44c85f99e5a04bbb8060d16"
     295            },
     296            "dist": {
     297                "type": "zip",
     298                "url": "https://api.github.com/repos/guzzle/psr7/zipball/c2270caaabe631b3b44c85f99e5a04bbb8060d16",
     299                "reference": "c2270caaabe631b3b44c85f99e5a04bbb8060d16",
    300300                "shasum": ""
    301301            },
     
    318318                "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
    319319            },
    320             "time": "2024-07-18T11:15:46+00:00",
     320            "time": "2025-03-27T12:30:47+00:00",
    321321            "type": "library",
    322322            "extra": {
     
    386386            "support": {
    387387                "issues": "https://github.com/guzzle/psr7/issues",
    388                 "source": "https://github.com/guzzle/psr7/tree/2.7.0"
     388                "source": "https://github.com/guzzle/psr7/tree/2.7.1"
    389389            },
    390390            "funding": [
     
    622622        {
    623623            "name": "symfony/deprecation-contracts",
    624             "version": "v3.5.1",
    625             "version_normalized": "3.5.1.0",
     624            "version": "v3.6.0",
     625            "version_normalized": "3.6.0.0",
    626626            "source": {
    627627                "type": "git",
    628628                "url": "https://github.com/symfony/deprecation-contracts.git",
    629                 "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6"
    630             },
    631             "dist": {
    632                 "type": "zip",
    633                 "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6",
    634                 "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6",
     629                "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62"
     630            },
     631            "dist": {
     632                "type": "zip",
     633                "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/63afe740e99a13ba87ec199bb07bbdee937a5b62",
     634                "reference": "63afe740e99a13ba87ec199bb07bbdee937a5b62",
    635635                "shasum": ""
    636636            },
     
    638638                "php": ">=8.1"
    639639            },
    640             "time": "2024-09-25T14:20:29+00:00",
     640            "time": "2024-09-25T14:21:43+00:00",
    641641            "type": "library",
    642642            "extra": {
     
    646646                },
    647647                "branch-alias": {
    648                     "dev-main": "3.5-dev"
     648                    "dev-main": "3.6-dev"
    649649                }
    650650            },
     
    672672            "homepage": "https://symfony.com",
    673673            "support": {
    674                 "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1"
     674                "source": "https://github.com/symfony/deprecation-contracts/tree/v3.6.0"
    675675            },
    676676            "funding": [
  • ping-me-on-slack/trunk/vendor/composer/installed.php

    r3241787 r3331586  
    44        'pretty_version' => 'dev-master',
    55        'version' => 'dev-master',
    6         'reference' => 'e80bc8310ea070290d53cdc07e9849334aebba7b',
     6        'reference' => 'f4b81ee633aaada40604a543e64ec2a120f56248',
    77        'type' => 'package',
    88        'install_path' => __DIR__ . '/../../',
     
    2323            'pretty_version' => 'dev-master',
    2424            'version' => 'dev-master',
    25             'reference' => 'e80bc8310ea070290d53cdc07e9849334aebba7b',
     25            'reference' => 'f4b81ee633aaada40604a543e64ec2a120f56248',
    2626            'type' => 'package',
    2727            'install_path' => __DIR__ . '/../../',
     
    3030        ),
    3131        'guzzlehttp/guzzle' => array(
    32             'pretty_version' => '7.9.2',
    33             'version' => '7.9.2.0',
    34             'reference' => 'd281ed313b989f213357e3be1a179f02196ac99b',
     32            'pretty_version' => '7.9.3',
     33            'version' => '7.9.3.0',
     34            'reference' => '7b2f29fe81dc4da0ca0ea7d42107a0845946ea77',
    3535            'type' => 'library',
    3636            'install_path' => __DIR__ . '/../guzzlehttp/guzzle',
     
    3939        ),
    4040        'guzzlehttp/promises' => array(
    41             'pretty_version' => '2.0.4',
    42             'version' => '2.0.4.0',
    43             'reference' => 'f9c436286ab2892c7db7be8c8da4ef61ccf7b455',
     41            'pretty_version' => '2.2.0',
     42            'version' => '2.2.0.0',
     43            'reference' => '7c69f28996b0a6920945dd20b3857e499d9ca96c',
    4444            'type' => 'library',
    4545            'install_path' => __DIR__ . '/../guzzlehttp/promises',
     
    4848        ),
    4949        'guzzlehttp/psr7' => array(
    50             'pretty_version' => '2.7.0',
    51             'version' => '2.7.0.0',
    52             'reference' => 'a70f5c95fb43bc83f07c9c948baa0dc1829bf201',
     50            'pretty_version' => '2.7.1',
     51            'version' => '2.7.1.0',
     52            'reference' => 'c2270caaabe631b3b44c85f99e5a04bbb8060d16',
    5353            'type' => 'library',
    5454            'install_path' => __DIR__ . '/../guzzlehttp/psr7',
     
    111111        ),
    112112        'symfony/deprecation-contracts' => array(
    113             'pretty_version' => 'v3.5.1',
    114             'version' => '3.5.1.0',
    115             'reference' => '74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6',
     113            'pretty_version' => 'v3.6.0',
     114            'version' => '3.6.0.0',
     115            'reference' => '63afe740e99a13ba87ec199bb07bbdee937a5b62',
    116116            'type' => 'library',
    117117            'install_path' => __DIR__ . '/../symfony/deprecation-contracts',
  • ping-me-on-slack/trunk/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php

    r3149633 r3331586  
    6363                                $data[$search] = (int) $value;
    6464                            }
     65                        } elseif ($search === 'Secure' || $search === 'Discard' || $search === 'HttpOnly') {
     66                            if ($value) {
     67                                $data[$search] = true;
     68                            }
    6569                        } else {
    6670                            $data[$search] = $value;
  • ping-me-on-slack/trunk/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php

    r3149633 r3331586  
    1818     * requests to another handler.
    1919     *
    20      * @param callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface $default Handler used for normal responses
    21      * @param callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface $sync    Handler used for synchronous responses.
     20     * @param callable(RequestInterface, array): PromiseInterface $default Handler used for normal responses
     21     * @param callable(RequestInterface, array): PromiseInterface $sync    Handler used for synchronous responses.
    2222     *
    23      * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the composed handler.
     23     * @return callable(RequestInterface, array): PromiseInterface Returns the composed handler.
    2424     */
    2525    public static function wrapSync(callable $default, callable $sync): callable
     
    3838     * through the StreamHandler.
    3939     *
    40      * @param callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface $default   Handler used for non-streaming responses
    41      * @param callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface $streaming Handler used for streaming responses
     40     * @param callable(RequestInterface, array): PromiseInterface $default   Handler used for non-streaming responses
     41     * @param callable(RequestInterface, array): PromiseInterface $streaming Handler used for streaming responses
    4242     *
    43      * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the composed handler.
     43     * @return callable(RequestInterface, array): PromiseInterface Returns the composed handler.
    4444     */
    4545    public static function wrapStreaming(callable $default, callable $streaming): callable
  • ping-me-on-slack/trunk/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php

    r3149633 r3331586  
    5454
    5555            // Append a content-length header if body size is zero to match
    56             // cURL's behavior.
    57             if (0 === $request->getBody()->getSize()) {
     56            // the behavior of `CurlHandler`
     57            if (
     58                (
     59                    0 === \strcasecmp('PUT', $request->getMethod())
     60                    || 0 === \strcasecmp('POST', $request->getMethod())
     61                )
     62                && 0 === $request->getBody()->getSize()
     63            ) {
    5864                $request = $request->withHeader('Content-Length', '0');
    5965            }
  • ping-me-on-slack/trunk/vendor/guzzlehttp/guzzle/src/Pool.php

    r3149633 r3331586  
    8787     * @param array|\Iterator $requests Requests to send concurrently.
    8888     * @param array           $options  Passes through the options available in
    89      *                                  {@see \GuzzleHttp\Pool::__construct}
     89     *                                  {@see Pool::__construct}
    9090     *
    9191     * @return array Returns an array containing the response or an exception
  • ping-me-on-slack/trunk/vendor/guzzlehttp/guzzle/src/Utils.php

    r3149633 r3331586  
    8080     * The returned handler is not wrapped by any default middlewares.
    8181     *
    82      * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the best handler for the given system.
     82     * @return callable(\Psr\Http\Message\RequestInterface, array): Promise\PromiseInterface Returns the best handler for the given system.
    8383     *
    8484     * @throws \RuntimeException if no viable Handler is available.
  • ping-me-on-slack/trunk/vendor/guzzlehttp/guzzle/src/functions.php

    r3149633 r3331586  
    5151 * The returned handler is not wrapped by any default middlewares.
    5252 *
    53  * @return callable(\Psr\Http\Message\RequestInterface, array): \GuzzleHttp\Promise\PromiseInterface Returns the best handler for the given system.
     53 * @return callable(\Psr\Http\Message\RequestInterface, array): Promise\PromiseInterface Returns the best handler for the given system.
    5454 *
    5555 * @throws \RuntimeException if no viable Handler is available.
  • ping-me-on-slack/trunk/vendor/guzzlehttp/psr7/src/UploadedFile.php

    r3149633 r3331586  
    1212class UploadedFile implements UploadedFileInterface
    1313{
    14     private const ERRORS = [
    15         UPLOAD_ERR_OK,
    16         UPLOAD_ERR_INI_SIZE,
    17         UPLOAD_ERR_FORM_SIZE,
    18         UPLOAD_ERR_PARTIAL,
    19         UPLOAD_ERR_NO_FILE,
    20         UPLOAD_ERR_NO_TMP_DIR,
    21         UPLOAD_ERR_CANT_WRITE,
    22         UPLOAD_ERR_EXTENSION,
     14    private const ERROR_MAP = [
     15        UPLOAD_ERR_OK => 'UPLOAD_ERR_OK',
     16        UPLOAD_ERR_INI_SIZE => 'UPLOAD_ERR_INI_SIZE',
     17        UPLOAD_ERR_FORM_SIZE => 'UPLOAD_ERR_FORM_SIZE',
     18        UPLOAD_ERR_PARTIAL => 'UPLOAD_ERR_PARTIAL',
     19        UPLOAD_ERR_NO_FILE => 'UPLOAD_ERR_NO_FILE',
     20        UPLOAD_ERR_NO_TMP_DIR => 'UPLOAD_ERR_NO_TMP_DIR',
     21        UPLOAD_ERR_CANT_WRITE => 'UPLOAD_ERR_CANT_WRITE',
     22        UPLOAD_ERR_EXTENSION => 'UPLOAD_ERR_EXTENSION',
    2323    ];
    2424
     
    105105    private function setError(int $error): void
    106106    {
    107         if (false === in_array($error, UploadedFile::ERRORS, true)) {
     107        if (!isset(UploadedFile::ERROR_MAP[$error])) {
    108108            throw new InvalidArgumentException(
    109109                'Invalid error status for UploadedFile'
     
    138138    {
    139139        if (false === $this->isOk()) {
    140             throw new RuntimeException('Cannot retrieve stream due to upload error');
     140            throw new RuntimeException(\sprintf('Cannot retrieve stream due to upload error (%s)', self::ERROR_MAP[$this->error]));
    141141        }
    142142
  • ping-me-on-slack/trunk/vendor/guzzlehttp/psr7/src/Uri.php

    r3149633 r3331586  
    108108        // If IPv6
    109109        $prefix = '';
    110         if (preg_match('%^(.*://\[[0-9:a-f]+\])(.*?)$%', $url, $matches)) {
     110        if (preg_match('%^(.*://\[[0-9:a-fA-F]+\])(.*?)$%', $url, $matches)) {
    111111            /** @var array{0:string, 1:string, 2:string} $matches */
    112112            $prefix = $matches[1];
  • ping-me-on-slack/trunk/vendor/symfony/deprecation-contracts/composer.json

    r3149633 r3331586  
    2626    "extra": {
    2727        "branch-alias": {
    28             "dev-main": "3.5-dev"
     28            "dev-main": "3.6-dev"
    2929        },
    3030        "thanks": {
Note: See TracChangeset for help on using the changeset viewer.