PHP OOP interface for writing Slack Block Kit messages and modals

Overview

Slack Block Kit for PHP

👉 For formatting messages and modals for Slack using their Block Kit syntax via an OOP interface 👈

By Jeremy Lindblom (@jeremeamia)

Slack logo placed on top of blocks

Coded in PHP 7 Packagist Version Build Status


Introduction

From Slack's Block Kit documentation:

Block Kit is a UI framework for Slack apps that offers a balance of control and flexibility when building experiences in messages and other surfaces.

Customize the order and appearance of information and guide users through your app's capabilities by composing, updating, sequencing, and stacking blocks — reusable components that work almost everywhere in Slack.

This library provides an OOP interface in PHP for composing messages/modals using Slack Block Kit. It also does the reverse, meaning you can "hydrate" message/modal JSON into an object hierarchy.

Block Kit Concepts

This library helps you build Slack messages programmatically and dynamically in your code, but you need to know how they work generally first. The library does try to prevent you from doing things you are not permitted to do in Block Kit, but it does not validate or guard against every single rule.

You may want to review the following concepts in the Slack documentation:

In general, we refer to all of the different things in Block Kit collectively as "elements".

Installation

Install easily via Composer:

composer require slack-php/slack-block-kit

Then include the Composer-generated autoloader in your project's initialization code.

Note: This library is built for PHP 7.3+.

Basic Usage

This library supports an intuitive and fluid syntax for composing Slack surfaces (e.g., messages, modals). The Kit class acts as a façade to the library, and let's you start new messages/modals.

<?php

use SlackPhp\BlockKit\Kit;
use SlackPhp\BlockKit\Surfaces\Message;

// ...

// You can start a message from the `Kit` class.
$msg = Kit::newMessage();
// OR via the surface class's "new" method.
$msg = Message::new();

// Then you can add blocks using the surface's available methods.
$msg->text('Don\'t you just love XKCD?');
$msg->divider();
$msg->newImage()
    ->title('Team Chat')
    ->url('https://imgs.xkcd.com/comics/team_chat.png')
    ->altText('Comic about the stubbornness of some people switching chat clients');

// To convert to JSON (to send to Slack API, webhook, or response_url), use PHP's `json_encode` function.
echo json_encode($msg);
// OR you can use the surfaces's `toJson` method, which also includes a convenience parameter for pretty printing.
echo $msg->toJson(true);

Fluent Interface

When using the fluent interface, every method that sets a property or adds a sub-element returns the original element's object, so you can chain additional method calls.

$msg = Message::new()
    ->text('Don\'t you just love XKCD?');
    ->divider();

Methods with a new prefix will return the new element's object, so be careful with how you are using the fluent interface in those cases.

// Correctly renders the whole message.
$msg = Message::new()
    ->text('Don\'t you just love XKCD?')
    ->divider();
$msg->newImage()
    ->title('Team Chat')
    ->url('https://imgs.xkcd.com/comics/team_chat.png')
    ->altText('Comic about the stubbornness of some people switching chat clients');
echo json_encode($msg);
// YAY!

// INCORRECT: Renders just the image, because only that element gets stored in the variable.
$msg = Message::new()
    ->text('Don\'t you just love XKCD?')
    ->divider()
    ->newImage()
        ->title('Team Chat')
        ->url('https://imgs.xkcd.com/comics/team_chat.png')
        ->altText('Comic about the stubbornness of some people switching chat clients');
echo json_encode($msg);
// WHOOPS!

Tapping

Tapping is a way to keep the fluent interface going, but makes sure the whole message is preserved.

// Correctly renders the whole message, by using tap()
$msg = Message::new()
    ->text('Don\'t you just love XKCD?')
    ->divider()
    ->tap(function (Message $msg) {
        $msg->newImage()
            ->title('Team Chat')
            ->url('https://imgs.xkcd.com/comics/team_chat.png')
            ->altText('Comic about the stubbornness of some people switching chat clients');
    });
echo json_encode($msg);
// YAY!

Preview in Block Kit Builder

Slack provides an interactive Block Kit Builder for composing/testing messages and other surfaces. This is a great way to play around with and learn the Block Kit format.

The Kit::preview method allows you to render your message/surface as a Block Kit Builder URL, so you can link to a preview or your message/surface in the browser via their interactive tool. This will help you see how it would be rendered in a Slack client.

$msg = Kit::newMessage()
    ->text('Don\'t you just love XKCD?')
    ->divider()
    ->tap(function (Message $msg) {
        $msg->newImage()
            ->title('Team Chat')
            ->url('https://imgs.xkcd.com/comics/team_chat.png')
            ->altText('Comic about the stubbornness of some people switching chat clients');
    });

echo Kit::preview($msg);

Output

https://app.slack.com/block-kit-builder#%7B"blocks":%5B%7B"type":"section"%2C"text":%7B"type":"mrkdwn"%2C"text":"Don%27t%20you%20just%20love%20XKCD%3F"%7D%7D%2C%7B"type":"divider"%7D%2C%7B"type":"image"%2C"title":%7B"type":"plain_text"%2C"text":"Team%20Chat"%7D%2C"image_url":"https:%5C%2F%5C%2Fimgs.xkcd.com%5C%2Fcomics%5C%2Fteam_chat.png"%2C"alt_text":"Comic%20about%20the%20stubbornness%20of%20some%20people%20switching%20chat%20clients"%7D%5D%7D

And here's the actual Block Kit Builder link.

It will show up in the Block Kit Builder looking something like this:

Screenshot of rendered message in Block Kit Builder

Surface Hydration

Some Slack application integrations (such as with Modals) require receiving the JSON of an existing surface and then modifying or replacing that surface with another. You can "hydrate" the JSON of a surface (or element) into its object representation using its fromArray method (or fromJson).

$messageJson = <<<JSON
{
    "blocks": [
        {
            "type": "section",
            "block_id": "block1",
            "text": {
                "type": "mrkdwn",
                "text": "*foo bar*"
            }
        }
    }
}
JSON;

// Use fromArray to hydrate the message from parsed JSON data.
$decodedMessageJson = json_decode($messageJson, true);
$message = Message::fromArray($decodedMessageJson);

// OR... use fromJson to hydrate from a JSON string.
$message = Message::fromJson($messageJson);

Message Formatting

The Formatter class exists to provide helpers for formatting "mrkdwn" text. These helpers can be used so that you don't have to have the Slack mrkdwn syntax memorized. Also, these functions will properly escape <, >, and & characters automatically, if it's needed.

Example:

// Note: $event is meant to represent some kind of DTO from your own application.
$fmt = Kit::formatter();
$msg = Kit::newMessage()->text($fmt->sub(
    'Hello, {audience}! On {date}, {host} will be hosting an AMA in the {channel} channel at {time}.',
    [
        'audience' => $fmt->atHere(),
        'date'     => $fmt->date($event->timestamp),
        'host'     => $fmt->user($event->hostId),
        'channel'  => $fmt->channel($event->channelId),
        'time'     => $fmt->time($event->timestamp),
    ]
));

Example Result:

{
  "blocks": [
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": "Hello, <!here>! On <!date^1608322949^{date}|2020-12-18T20:22:29+00:00>, <@U12345678> will be hosting an AMA in the <#C12345678> channel at <!date^1608322949^{time}|2020-12-18T20:22:29+00:00>."
      }
    }
  ]
}

Virtual Elements

In addition to the standard Block Kit elements, the following are virtual/custom elements composed of one or more blocks:

  • TwoColumnTable - Uses Sections with Fields to create a two-column table with an optional header.

Class Structure

The Kit façade provides ways to create surfaces. Surfaces contain one or more blocks. Blocks are the primary element of the Block Kit. Blocks contain other elements, including other blocks, inputs (interactive elements), and partials (element parts that are not uniquely identifiable).

UML diagram for slack-block-kit

See the YUML
[Kit]-creates>[Surface]
[Surface]^[Message]
[Surface]^[Modal]
[Surface]^[AppHome]
[Surface]^[Attachment]
[Element]^[Surface]
[Element]^[Block]
[Element]^[Input]
[Element]^[Partial]
[Surface]<>->[Block]
[Message]<>->[Attachment]
[Block]<>->[Input]
[Block]<>->[Partial]
[Input]-[note:Examples: Button
DatePicker {bg:cornsilk}]
[Partial]-[note: Examples: Text
Fields {bg:cornsilk}]
[Block]-[note: Examples: Section
Actions {bg:cornsilk}]

Contributions

Contributions welcome to support new elements, add tests, improve, etc.

When implementing elements, to fit within the existing DSL, consider these points:

  • To set instantiated sub-element objects, provide a set-prefixed setter (e.g., setText(Text $text): self).
    • Should return self to support chaining.
    • Should set the parent (e.g., setParent()) of the sub-element to $this.
  • To set simple sub-element objects, provide a simple setter method (e.g., title(string $title): self).
    • Should be in addition to the set-prefixed setter.
    • Should be named after the property being set.
    • Should return self to support chaining.
    • Should have a maximum of 2 parameters.
    • Should call the regular setter (e.g., return $this->setText(new PlainText($title));).
  • To set other non-element properties, provide a simple setter method (e.g., url(string $url): self).
    • Should be named after the property being set.
    • Should return self to support chaining.
  • To create new sub-elements attached to the current one, provide a new-prefixed factory method (e.g., newImage(): Image).
    • Should return an instance of the sub-element.
    • Should set the parent (e.g., setParent()) of the sub-element to $this before returning.
    • Should support a $blockId parameter if it's a Block or an $actionId parameter if it's an Input element.
  • All element types should be defined in the Type class and registered in relevant constant lists to be appropriately validated.
  • If you implement a custom constructor for an element, make sure all the parameters are optional.
Comments
  • Bump friendsofphp/php-cs-fixer from 3.5.0 to 3.6.0

    Bump friendsofphp/php-cs-fixer from 3.5.0 to 3.6.0

    Bumps friendsofphp/php-cs-fixer from 3.5.0 to 3.6.0.

    Release notes

    Sourced from friendsofphp/php-cs-fixer's releases.

    v3.6.0 Roe Deer

    • bug #6063 PhpdocTypesOrderFixer - Improve nested types support (ruudk, julienfalque)
    • bug #6197 FullyQualifiedStrictTypesFixer - fix same classname is imported from … (SpacePossum)
    • bug #6241 NoSuperfluousPhpdocTagsFixer - fix for reference and splat operator (kubawerlos)
    • bug #6243 PhpdocTypesOrderFixer - fix for intersection types (kubawerlos)
    • bug #6254 PhpUnitDedicateAssertFixer - remove is_resource. (drupol)
    • bug #6264 TokensAnalyzer - fix isConstantInvocation detection for mulitple exce… (SpacePossum)
    • bug #6265 NullableTypeDeclarationForDefaultNullValueFixer - handle "readonly" a… (SpacePossum)
    • bug #6266 SimplifiedIfReturnFixer - handle statement in loop without braces (SpacePossum)
    • feature #6262 ClassReferenceNameCasingFixer - introduction (SpacePossum)
    • feature #6267 NoUnneededImportAliasFixer - Introduction (SpacePossum)
    • minor #6199 HeaderCommentFixer - support monolithic files with shebang (kubawerlos, keradus)
    • minor #6231 Fix priority descriptions and tests. (SpacePossum)
    • minor #6237 DX: Application - better display version when displaying gitSha (keradus)
    • minor #6242 Annotation - improve on recognising types with reference and splat operator (kubawerlos)
    • minor #6250 Tokens - optimize cache clear (SpacePossum)
    • minor #6269 Docs: redo warnings in RST docs to fix issue on website docs (keradus)
    • minor #6270 ClassReferenceNameCasingFixer - Add missing test cases for catch (SpacePossum)
    • minor #6273 Add priority test (SpacePossum)
    Changelog

    Sourced from friendsofphp/php-cs-fixer's changelog.

    Changelog for v3.6.0

    • bug #6063 PhpdocTypesOrderFixer - Improve nested types support (ruudk, julienfalque)
    • bug #6197 FullyQualifiedStrictTypesFixer - fix same classname is imported from … (SpacePossum)
    • bug #6241 NoSuperfluousPhpdocTagsFixer - fix for reference and splat operator (kubawerlos)
    • bug #6243 PhpdocTypesOrderFixer - fix for intersection types (kubawerlos)
    • bug #6254 PhpUnitDedicateAssertFixer - remove is_resource. (drupol)
    • bug #6264 TokensAnalyzer - fix isConstantInvocation detection for mulitple exce… (SpacePossum)
    • bug #6265 NullableTypeDeclarationForDefaultNullValueFixer - handle "readonly" a… (SpacePossum)
    • bug #6266 SimplifiedIfReturnFixer - handle statement in loop without braces (SpacePossum)
    • feature #6262 ClassReferenceNameCasingFixer - introduction (SpacePossum)
    • feature #6267 NoUnneededImportAliasFixer - Introduction (SpacePossum)
    • minor #6199 HeaderCommentFixer - support monolithic files with shebang (kubawerlos, keradus)
    • minor #6231 Fix priority descriptions and tests. (SpacePossum)
    • minor #6237 DX: Application - better display version when displaying gitSha (keradus)
    • minor #6242 Annotation - improve on recognising types with reference and splat operator (kubawerlos)
    • minor #6250 Tokens - optimize cache clear (SpacePossum)
    • minor #6269 Docs: redo warnings in RST docs to fix issue on website docs (keradus)
    • minor #6270 ClassReferenceNameCasingFixer - Add missing test cases for catch (SpacePossum)
    • minor #6273 Add priority test (SpacePossum)
    Commits
    • 1975e44 prepared the 3.6.0 release
    • db4b997 minor #6273 Add priority test (SpacePossum)
    • 7bdb9a2 Add priority test
    • a6fa961 minor #6270 ClassReferenceNameCasingFixer - Add missing test cases for catch ...
    • 9e31f1f ClassReferenceNameCasingFixer - Add missing test cases for catch
    • 42a449a minor #6269 Docs: redo warnings in RST docs to fix issue on website docs (ker...
    • f1a0942 Docs: redo warnings in RST docs to fix issue on website docs
    • 86d0a4c feature #6262 ClassReferenceNameCasingFixer - introduction (SpacePossum)
    • 776850a ClassReferenceNameCasingFixer - introduction
    • 248a56b feature #6267 NoUnneededImportAliasFixer - Introduction (SpacePossum)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies php 
    opened by dependabot[bot] 3
  • Bump phpstan/phpstan from 1.4.4 to 1.4.6

    Bump phpstan/phpstan from 1.4.4 to 1.4.6

    ⚠️ Dependabot is rebasing this PR ⚠️

    Rebasing might not happen immediately, so don't worry if this takes some time.

    Note: if you make any changes to this PR yourself, they will take precedence over the rebase.


    Bumps phpstan/phpstan from 1.4.4 to 1.4.6.

    Release notes

    Sourced from phpstan/phpstan's releases.

    1.4.6

    Improvements 🔧

    • Implemented constant type inference for implode() function (#991), thanks @​staabm!

    Bugfixes 🐛

    Function signature fixes 🤖

    1.4.5

    Improvements 🔧

    Bugfixes 🐛

    Function signature fixes 🤖

    ... (truncated)

    Commits
    • 8a7761f PHPStan 1.4.6
    • 3273c8e Updated PHPStan to commit 3e014c27fa6041a1187a326d028eb07d58792ddc
    • ba8d439 Updated PHPStan to commit 5162bcfea5456eb827035cd249c5ace55057237b
    • fcd06a1 Updated PHPStan to commit 5087733fc667b1f84fe6a482194073467847cb88
    • bc824b0 Updated PHPStan to commit 5348490153abba4ed09b39a4872f4d8b1c6c037c
    • 55f6cc1 Updated PHPStan to commit 2d7f374888f6d032c329140572d69de09fa77238
    • 00babe5 Updated PHPStan to commit c0fe972234f9b05e41e194dbc85d2cfbfe406ece
    • 7a030f0 🤏 Little typo fix
    • 8859e9c Updated PHPStan to commit 30798b52ba7024640b0baa866a00a20d5477d85e
    • d744a01 Updated PHPStan to commit 0d288353ca782ef79e362657c2581abf4246a2f8
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies php 
    opened by dependabot[bot] 2
  • Added duplicate validation for block_id and action_id

    Added duplicate validation for block_id and action_id

    TL;DR

    Added duplicate validation for block_id and action_id at Surface::class and Actions::class .

    Details

    • In the Block Kit, the action id and block id must be unique
    • php-slack-block-kit does not have a mechanism to verify if the action id or block id is unique
    • I thought that this validation should be done not only on the Slack API side, but also on the library side that generates the json that defines the block
    opened by lunain84 2
  • Bump phpstan/phpstan from 1.4.6 to 1.9.2

    Bump phpstan/phpstan from 1.4.6 to 1.9.2

    Bumps phpstan/phpstan from 1.4.6 to 1.9.2.

    Release notes

    Sourced from phpstan/phpstan's releases.

    1.9.2

    Bugfixes 🐛

    Function signature fixes 🤖

    • Update DateTimeZone::listAbbreviations signature (#1962), thanks @​franmomu!
    • Making json_encode() always produce a non-empty-string, when successful (#1980), thanks @​Slamdunk!
    • sodium_crypto_generichash* always produce a non-empty-string (#1981), thanks @​Slamdunk!
    • sodium_crypto_sign* always produce non-empty-string (#1985), thanks @​Slamdunk!

    Internals 🔍

    1.9.1

    Improvements 🔧

    Bugfixes 🐛

    1.9.0

    Check out the article about this release!

    ... (truncated)

    Commits
    • d6fdf01 PHPStan 1.9.2
    • ac5ea90 Fix Larastan
    • 953a97b Updated PHPStan to commit 582a9cb8b9b4fce2bd069bac26bf1d31dd52e7e2
    • f878d19 Updated PHPStan to commit b4ac8a1e09d46fe6180962d5d681ffec1fac2d84
    • 7db7d40 Updated PHPStan to commit f8f09cdb60a0a6214199f5a765a7782cb110e52e
    • 4218398 Bye bye old issue bot!
    • 172a390 Updated PHPStan to commit 8faf0fbde83ef3b681b570c1f714f7c938cb3a9f
    • 80714c3 Updated PHPStan to commit b8accb117f03741ac95f0a0c9de4a7e4edffab05
    • a56ae2c Fix retrieveSample
    • ed192b9 Playground API - retrieveSample
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies php 
    opened by dependabot[bot] 1
  • Bump phpstan/phpstan from 1.4.6 to 1.8.11

    Bump phpstan/phpstan from 1.4.6 to 1.8.11

    Bumps phpstan/phpstan from 1.4.6 to 1.8.11.

    Release notes

    Sourced from phpstan/phpstan's releases.

    1.8.11

    Improvements 🔧

    Bugfixes 🐛

    1.8.10

    Improvements 🔧

    • RuleTestCase: enable gathering analyser errors without causing test failures (#1728), thanks @​schlndh!

    Bugfixes 🐛

    Function signature fixes 🤖

    1.8.9

    Improvements 🔧

    ... (truncated)

    Commits
    • 46e223d PHPStan 1.8.11
    • 1dafc66 Updated PHPStan to commit 9e4e93b48cc32298c0a1661f14891307a22def7b
    • 7cacdc7 Updated PHPStan to commit dcd8bac24fdbe0723b9307f3f3b2e8e38cc7eae1
    • c4a9041 Updated PHPStan to commit 08703d1dacf47cc26a33542d0589bf7912c2aeb4
    • 857335f Updated PHPStan to commit 6a4eb02a146d1a1a9de0024c88fb2bd3a300ee93
    • fc0c01c Updated PHPStan to commit 83691977757661e4160c89a533cdaf589434d782
    • e5f4fb0 Updated PHPStan to commit 407cb5a367b002623abb45a4a1b27c0ca28f53e9
    • 4492c38 Updated PHPStan to commit e215a81e752007630421bb96b0d167da76ec2c6b
    • 10f11d2 Updated PHPStan to commit 4cdb8060b73fc09e25cf230041532f068974234d
    • 4047131 Updated PHPStan to commit ec5b6331e910e18bec1abfa4a1db8961509c7591
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies php 
    opened by dependabot[bot] 1
  • Bump phpunit/phpunit from 9.5.13 to 9.5.26

    Bump phpunit/phpunit from 9.5.13 to 9.5.26

    Bumps phpunit/phpunit from 9.5.13 to 9.5.26.

    Changelog

    Sourced from phpunit/phpunit's changelog.

    [9.5.26] - 2022-10-28

    Fixed

    • #5076: Test Runner does not warn about conflicting options

    [9.5.25] - 2022-09-25

    Added

    • #5042: Support Disjunctive Normal Form types

    Fixed

    • #4966: TestCase::assertSame() (and related exact comparisons) must compare float exactly

    [9.5.24] - 2022-08-30

    Added

    • #4931: Support null and false as stand-alone types
    • #4955: Support true as stand-alone type

    Fixed

    • #4913: Failed assert() should show a backtrace
    • #5012: Memory leak in ExceptionWrapper

    [9.5.23] - 2022-08-22

    Changed

    • #5033: Do not depend on phpspec/prophecy

    [9.5.22] - 2022-08-20

    Fixed

    • #5015: Ukraine banner unreadable on black background
    • #5020: PHPUnit 9 breaks loading of PSR-0/PEAR style classes
    • #5022: ExcludeList::addDirectory() does not work correctly

    [9.5.21] - 2022-06-19

    Fixed

    • #4950: False error on atMost() invocation rule without call
    • #4962: Ukraine banner unreadable on white background

    [9.5.20] - 2022-04-01

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies php 
    opened by dependabot[bot] 1
  • Bump friendsofphp/php-cs-fixer from 3.6.0 to 3.13.0

    Bump friendsofphp/php-cs-fixer from 3.6.0 to 3.13.0

    Bumps friendsofphp/php-cs-fixer from 3.6.0 to 3.13.0.

    Release notes

    Sourced from friendsofphp/php-cs-fixer's releases.

    v3.13.0 Oliva

    • bug: BracesFixer - Fix unexpected extra blank line (#6667)
    • bug: fix CI on master branch (#6663)
    • bug: IsNullFixer - handle casting (#6661)
    • docs: feature or bug (#6652)
    • docs: Use case insensitive sorting for options (#6666)
    • docs: [DateTimeCreateFromFormatCallFixer] Fix typos in the code sample (#6671)
    • DX: update cli-executor (#6664)
    • DX: update dev-tools (#6665)
    • feature: Add global_namespace_import to @​Symfony ruleset (#6662)
    • feature: Add separate option for closure_fn_spacing (#6658)
    • feature: general_phpdoc_annotation_remove - allow add case_sensitive option (#6660)
    • minor: AllowedValueSubset - possible values are sorted (#6651)
    • minor: Use md5 for file hashing to reduce possible collisions (#6597)

    v3.12.0 Oliva

    • bug: SingleLineThrowFixer - Handle throw expression inside block (#6653)
    • DX: create TODO to change default ruleset for v4 (#6601)
    • DX: Fix SCA findings (#6626)
    • DX: HelpCommand - fix docblock (#6584)
    • DX: Narrow some docblock types (#6581)
    • DX: Remove redundant check for PHP <5.2.7 (#6620)
    • DX: Restore PHPDoc to type rules workflow step (#6615)
    • DX: SCA - scope down types (#6630)
    • DX: Specify value type in iterables in tests (#6594)
    • DX: Test on PHP 8.2 (#6558)
    • DX: Update GitHub Actions (#6606)
    • DX: Update PHPStan (#6616)
    • feature: Add @PHP82Migration ruleset (#6621)
    • feature: ArrayPushFixer now fix short arrays (#6639)
    • feature: NoSuperfluousPhpdocTagsFixer - support untyped and empty annotations in phpdoc (#5792)
    • feature: NoUselessConcatOperatorFixer - Introduction (#6447)
    • feature: Support for constants in traits (#6607)
    • feature: [PHP8.2] Support for new standalone types (null, true, false) (#6623)
    • minor: GitHub Workflows security hardening (#6644)
    • minor: prevent BC break in ErrorOutput (#6633)
    • minor: prevent BC break in Runner (#6634)
    • minor: Revert "minor: prevent BC break in Runner" (#6637)
    • minor: Update dev tools (#6554)

    v3.11.0 Oliva

    • bug: DateTimeCreateFromFormatCallFixer - Mark as risky (#6575)
    • bug: Do not treat implements list comma as array comma (#6595)
    • bug: Fix MethodChainingIndentationFixer with arrow functions and class instantiation (#5587)
    • bug: MethodChainingIndentationFixer - Fix bug with attribute access (#6573)
    • bug: NoMultilineWhitespaceAroundDoubleArrowFixer - fix for single line comment (#6589)
    • bug: TypeAlternationTransformer - TypeIntersectionTransforme - Bug: handle attributes (#6579)
    • bug: [BinaryOperatorFixer] Fix more issues with scoped operators (#6559)
    • docs: Remove $ from console command snippets (#6600)
    • docs: Remove $ from console command snippets in documentation (#6599)

    ... (truncated)

    Changelog

    Sourced from friendsofphp/php-cs-fixer's changelog.

    Changelog for v3.13.0

    • bug: BracesFixer - Fix unexpected extra blank line (#6667)
    • bug: fix CI on master branch (#6663)
    • bug: IsNullFixer - handle casting (#6661)
    • docs: feature or bug (#6652)
    • docs: Use case insensitive sorting for options (#6666)
    • docs: [DateTimeCreateFromFormatCallFixer] Fix typos in the code sample (#6671)
    • DX: update cli-executor (#6664)
    • DX: update dev-tools (#6665)
    • feature: Add global_namespace_import to @​Symfony ruleset (#6662)
    • feature: Add separate option for closure_fn_spacing (#6658)
    • feature: general_phpdoc_annotation_remove - allow add case_sensitive option (#6660)
    • minor: AllowedValueSubset - possible values are sorted (#6651)
    • minor: Use md5 for file hashing to reduce possible collisions (#6597)

    Changelog for v3.12.0

    • bug: SingleLineThrowFixer - Handle throw expression inside block (#6653)
    • DX: create TODO to change default ruleset for v4 (#6601)
    • DX: Fix SCA findings (#6626)
    • DX: HelpCommand - fix docblock (#6584)
    • DX: Narrow some docblock types (#6581)
    • DX: Remove redundant check for PHP <5.2.7 (#6620)
    • DX: Restore PHPDoc to type rules workflow step (#6615)
    • DX: SCA - scope down types (#6630)
    • DX: Specify value type in iterables in tests (#6594)
    • DX: Test on PHP 8.2 (#6558)
    • DX: Update GitHub Actions (#6606)
    • DX: Update PHPStan (#6616)
    • feature: Add @PHP82Migration ruleset (#6621)
    • feature: ArrayPushFixer now fix short arrays (#6639)
    • feature: NoSuperfluousPhpdocTagsFixer - support untyped and empty annotations in phpdoc (#5792)
    • feature: NoUselessConcatOperatorFixer - Introduction (#6447)
    • feature: Support for constants in traits (#6607)
    • feature: [PHP8.2] Support for new standalone types (null, true, false) (#6623)
    • minor: GitHub Workflows security hardening (#6644)
    • minor: prevent BC break in ErrorOutput (#6633)
    • minor: prevent BC break in Runner (#6634)
    • minor: Revert "minor: prevent BC break in Runner" (#6637)
    • minor: Update dev tools (#6554)

    Changelog for v3.11.0

    • bug: DateTimeCreateFromFormatCallFixer - Mark as risky (#6575)
    • bug: Do not treat implements list comma as array comma (#6595)
    • bug: Fix MethodChainingIndentationFixer with arrow functions and class instantiation (#5587)

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies php 
    opened by dependabot[bot] 1
  • Bump phpstan/phpstan from 1.4.6 to 1.8.6

    Bump phpstan/phpstan from 1.4.6 to 1.8.6

    Bumps phpstan/phpstan from 1.4.6 to 1.8.6.

    Release notes

    Sourced from phpstan/phpstan's releases.

    1.8.6

    Improvements 🔧

    Bleeding edge 🔪

    • Change curl_setopt function signature based on 2nd arg (#1719), thanks @​staabm!

    If you want to see the shape of things to come and adopt bleeding edge features early, you can include this config file in your project's phpstan.neon:

    includes:
    	- vendor/phpstan/phpstan/conf/bleedingEdge.neon
    

    Of course, there are no backwards compatibility guarantees when you include this file. The behaviour and reported errors can change in minor versions with this file included. Learn more

    Bugfixes 🐛

    Function signature fixes 🤖

    ... (truncated)

    Commits
    • c386ab2 PHPStan 1.8.6
    • cbf2ce1 Update ignoring-errors.md
    • 0688dec ignoreErrors: multiple messages in and explicit reportUnmatched
    • ede35bb Updated PHPStan to commit 8bd73706ed4cf064484d08803dd7e5b8c4f34993
    • 2c7c2cd Updated PHPStan to commit 2531ca32902479ceeaa9e0034aeacefb7335d2bf
    • 1da7f85 Reproduce Phalcon 5 problem
    • 60d2e24 Updated PHPStan to commit b0babd082514303ec62deb5f16cf330f845c1821
    • a98d279 Add integration test for autoload-psr (C-based autoloader)
    • a6a7bc2 Updated PHPStan to commit a628fb34293c84c807a1a561883811067e49ebcb
    • 65b94f8 Fix
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies php 
    opened by dependabot[bot] 1
  • Bump phpunit/phpunit from 9.5.13 to 9.5.25

    Bump phpunit/phpunit from 9.5.13 to 9.5.25

    Bumps phpunit/phpunit from 9.5.13 to 9.5.25.

    Changelog

    Sourced from phpunit/phpunit's changelog.

    [9.5.25] - 2022-09-25

    Added

    • #5042: Support Disjunctive Normal Form types

    Fixed

    • #4966: TestCase::assertSame() (and related exact comparisons) must compare float exactly

    [9.5.24] - 2022-08-30

    Added

    • #4931: Support null and false as stand-alone types
    • #4955: Support true as stand-alone type

    Fixed

    • #4913: Failed assert() should show a backtrace
    • #5012: Memory leak in ExceptionWrapper

    [9.5.23] - 2022-08-22

    Changed

    • #5033: Do not depend on phpspec/prophecy

    [9.5.22] - 2022-08-20

    Fixed

    • #5015: Ukraine banner unreadable on black background
    • #5020: PHPUnit 9 breaks loading of PSR-0/PEAR style classes
    • #5022: ExcludeList::addDirectory() does not work correctly

    [9.5.21] - 2022-06-19

    Fixed

    • #4950: False error on atMost() invocation rule without call
    • #4962: Ukraine banner unreadable on white background

    [9.5.20] - 2022-04-01

    Fixed

    • #4938: Test Double code generator does not handle void return type declaration on __clone() methods
    • #4947: Test annotated with @coversNothing may lead to files missing from code coverage report

    ... (truncated)

    Commits
    • 3e6f90c Prepare release
    • e4a88c5 Merge branch '8.5' into 9.5
    • 4fd448d Prepare release
    • 94fbab8 Merge branch '8.5' into 9.5
    • 0869792 Fix: Run 'tools/php-cs-fixer fix'
    • 2b5cb60 Enhancement: Enable and configure native_function_invocation fixer
    • 630725f Merge branch '8.5' into 9.5
    • 63bd717 Enhancement: Enable no_unneeded_import_alias fixer
    • 186775f Merge branch '8.5' into 9.5
    • fe26cfb Enhancement: Use no_trailing_comma_in_singleline instead of deprecated fixers
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies php 
    opened by dependabot[bot] 1
  • Bump phpstan/phpstan from 1.4.6 to 1.8.3

    Bump phpstan/phpstan from 1.4.6 to 1.8.3

    Bumps phpstan/phpstan from 1.4.6 to 1.8.3.

    Release notes

    Sourced from phpstan/phpstan's releases.

    1.8.3

    This release fixes 76 issues! :tada:

    Improvements 🔧

    Bugfixes 🐛

    ... (truncated)

    Commits
    • 5583623 PHPStan 1.8.3
    • 63dd1eb Updated PHPStan to commit c057aa9d1feff5ce61f96f397ef92e7389a17477
    • 0cec633 Update Prestashop baseline
    • 5d6a147 Updated PHPStan to commit 024738fcc7fe98eec72a274ee742a51442a681a3
    • c1878ca Updated PHPStan to commit 4291a2494a3295274a1d37002b29908b8fe79f49
    • 6383edb Updated PHPStan to commit ca616c3340923b58c972aedec8732d34cc1dbb96
    • 5d994a3 Updated PHPStan to commit 5e54dbd526a8cef50593fe9e5241c071d800a738
    • 7f87750 Updated PHPStan to commit fc69708ceca99cfeb52a553533bec9b369d4dd61
    • d2cd5e2 Updated PHPStan to commit 169af1dcf09cdbf90471155f370c93cf37e36693
    • 3b9884e Updated PHPStan to commit 2a03c92512f990779d504b37a9a62d7fe49b84a3
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies php 
    opened by dependabot[bot] 1
  • Bump phpunit/phpunit from 9.5.13 to 9.5.24

    Bump phpunit/phpunit from 9.5.13 to 9.5.24

    Bumps phpunit/phpunit from 9.5.13 to 9.5.24.

    Changelog

    Sourced from phpunit/phpunit's changelog.

    [9.5.24] - 2022-08-30

    Added

    • #4931: Support null and false as stand-alone types
    • #4955: Support true as stand-alone type

    Fixed

    • #4913: Failed assert() should show a backtrace
    • #5012: Memory leak in ExceptionWrapper

    [9.5.23] - 2022-08-22

    Changed

    • #5033: Do not depend on phpspec/prophecy

    [9.5.22] - 2022-08-20

    Fixed

    • #5015: Ukraine banner unreadable on black background
    • #5020: PHPUnit 9 breaks loading of PSR-0/PEAR style classes
    • #5022: ExcludeList::addDirectory() does not work correctly

    [9.5.21] - 2022-06-19

    Fixed

    • #4950: False error on atMost() invocation rule without call
    • #4962: Ukraine banner unreadable on white background

    [9.5.20] - 2022-04-01

    Fixed

    • #4938: Test Double code generator does not handle void return type declaration on __clone() methods
    • #4947: Test annotated with @coversNothing may lead to files missing from code coverage report

    [9.5.19] - 2022-03-15

    Fixed

    • #4929: Test Double code generator does not handle new expressions inside parameter default values
    • #4932: Backport support for intersection types from PHPUnit 10 to PHPUnit 9.5
    • #4933: Backport support for never type from PHPUnit 10 to PHPUnit 9.5

    [9.5.18] - 2022-03-08

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies php 
    opened by dependabot[bot] 1
  • Bump phpstan/phpstan from 1.4.6 to 1.9.4

    Bump phpstan/phpstan from 1.4.6 to 1.9.4

    Bumps phpstan/phpstan from 1.4.6 to 1.9.4.

    Release notes

    Sourced from phpstan/phpstan's releases.

    1.9.4

    Improvements 🔧

    Bugfixes 🐛

    Internals 🔍

    • Implement getConstantStrings() on Type (#1979), thanks @​staabm!
    • Fix node PHPDoc type hints (#2053), thanks @​herndlm!
    • Refactor FilterVarDynamicReturnTypeExtension to pass around Types instead of Args and the Scope (#2109), thanks @​herndlm!

    1.9.3

    Bleeding edge 🔪

    If you want to see the shape of things to come and adopt bleeding edge features early, you can include this config file in your project's phpstan.neon:

    includes:
    	- vendor/phpstan/phpstan/conf/bleedingEdge.neon
    

    Of course, there are no backwards compatibility guarantees when you include this file. The behaviour and reported errors can change in minor versions with this file included. Learn more

    Improvements 🔧

    ... (truncated)

    Commits
    • d03bcce PHPStan 1.9.4
    • b22aa05 Updated PHPStan to commit 4025209062e31619077197006ce44b5d60a9f2c1
    • 811db85 Updated PHPStan to commit a7fed03bbf1bef545c8afcbf6c906ac93b34c876
    • 274d06e Infinite recursion regression test
    • ad9d3c7 Updated PHPStan to commit a8975b1800d6c5cb88a6af02e132b4e44e093fc3
    • 7a65fac Updated PHPStan to commit 2a61ebc7d07888dbb2836147edaa21b78a983065
    • c0086d9 output-format: add info about editorUrlTitle
    • 15377d9 Updated PHPStan to commit 901d789a45f0682bf6adbdfde516ec1011d873bb
    • 9a25ace Updated PHPStan to commit bc4b2fe0d83a0e601448dbdaa8b0a288342c23f3
    • 89c729c Updated PHPStan to commit 03786827d92df439c3a31760bcd98d560035a33f
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies php 
    opened by dependabot[bot] 0
  • Bump friendsofphp/php-cs-fixer from 3.6.0 to 3.13.1

    Bump friendsofphp/php-cs-fixer from 3.6.0 to 3.13.1

    Bumps friendsofphp/php-cs-fixer from 3.6.0 to 3.13.1.

    Release notes

    Sourced from friendsofphp/php-cs-fixer's releases.

    v3.13.1 Oliva

    • bug: Align all the arrows inside the same array (#6590)
    • bug: Fix priority between modernize_types_casting and no_unneeded_control_parentheses (#6687)
    • bug: TrailingCommaInMultilineFixer - do not add trailing comma when there is no break line after last element (#6677)
    • docs: Fix docs for disabled rules in rulesets (#6679)
    • docs: fix the cookbook_fixers.rst (#6672)
    • docs: Update installation recommended commands for mkdir argument (-p insteadof --parents). (#6689)
    • Make static data providers that are not using dynamic calls (#6696)
    • minor: displaying number of checked files (#6674)

    v3.13.0 Oliva

    • bug: BracesFixer - Fix unexpected extra blank line (#6667)
    • bug: fix CI on master branch (#6663)
    • bug: IsNullFixer - handle casting (#6661)
    • docs: feature or bug (#6652)
    • docs: Use case insensitive sorting for options (#6666)
    • docs: [DateTimeCreateFromFormatCallFixer] Fix typos in the code sample (#6671)
    • DX: update cli-executor (#6664)
    • DX: update dev-tools (#6665)
    • feature: Add global_namespace_import to @​Symfony ruleset (#6662)
    • feature: Add separate option for closure_fn_spacing (#6658)
    • feature: general_phpdoc_annotation_remove - allow add case_sensitive option (#6660)
    • minor: AllowedValueSubset - possible values are sorted (#6651)
    • minor: Use md5 for file hashing to reduce possible collisions (#6597)

    v3.12.0 Oliva

    • bug: SingleLineThrowFixer - Handle throw expression inside block (#6653)
    • DX: create TODO to change default ruleset for v4 (#6601)
    • DX: Fix SCA findings (#6626)
    • DX: HelpCommand - fix docblock (#6584)
    • DX: Narrow some docblock types (#6581)
    • DX: Remove redundant check for PHP <5.2.7 (#6620)
    • DX: Restore PHPDoc to type rules workflow step (#6615)
    • DX: SCA - scope down types (#6630)
    • DX: Specify value type in iterables in tests (#6594)
    • DX: Test on PHP 8.2 (#6558)
    • DX: Update GitHub Actions (#6606)
    • DX: Update PHPStan (#6616)
    • feature: Add @PHP82Migration ruleset (#6621)
    • feature: ArrayPushFixer now fix short arrays (#6639)
    • feature: NoSuperfluousPhpdocTagsFixer - support untyped and empty annotations in phpdoc (#5792)
    • feature: NoUselessConcatOperatorFixer - Introduction (#6447)
    • feature: Support for constants in traits (#6607)
    • feature: [PHP8.2] Support for new standalone types (null, true, false) (#6623)
    • minor: GitHub Workflows security hardening (#6644)
    • minor: prevent BC break in ErrorOutput (#6633)
    • minor: prevent BC break in Runner (#6634)
    • minor: Revert "minor: prevent BC break in Runner" (#6637)
    • minor: Update dev tools (#6554)

    ... (truncated)

    Changelog

    Sourced from friendsofphp/php-cs-fixer's changelog.

    Changelog for v3.13.1

    • bug: Align all the arrows inside the same array (#6590)
    • bug: Fix priority between modernize_types_casting and no_unneeded_control_parentheses (#6687)
    • bug: TrailingCommaInMultilineFixer - do not add trailing comma when there is no break line after last element (#6677)
    • docs: Fix docs for disabled rules in rulesets (#6679)
    • docs: fix the cookbook_fixers.rst (#6672)
    • docs: Update installation recommended commands for mkdir argument (-p insteadof --parents). (#6689)
    • Make static data providers that are not using dynamic calls (#6696)
    • minor: displaying number of checked files (#6674)

    Changelog for v3.13.0

    • bug: BracesFixer - Fix unexpected extra blank line (#6667)
    • bug: fix CI on master branch (#6663)
    • bug: IsNullFixer - handle casting (#6661)
    • docs: feature or bug (#6652)
    • docs: Use case insensitive sorting for options (#6666)
    • docs: [DateTimeCreateFromFormatCallFixer] Fix typos in the code sample (#6671)
    • DX: update cli-executor (#6664)
    • DX: update dev-tools (#6665)
    • feature: Add global_namespace_import to @​Symfony ruleset (#6662)
    • feature: Add separate option for closure_fn_spacing (#6658)
    • feature: general_phpdoc_annotation_remove - allow add case_sensitive option (#6660)
    • minor: AllowedValueSubset - possible values are sorted (#6651)
    • minor: Use md5 for file hashing to reduce possible collisions (#6597)

    Changelog for v3.12.0

    • bug: SingleLineThrowFixer - Handle throw expression inside block (#6653)
    • DX: create TODO to change default ruleset for v4 (#6601)
    • DX: Fix SCA findings (#6626)
    • DX: HelpCommand - fix docblock (#6584)
    • DX: Narrow some docblock types (#6581)
    • DX: Remove redundant check for PHP <5.2.7 (#6620)
    • DX: Restore PHPDoc to type rules workflow step (#6615)
    • DX: SCA - scope down types (#6630)
    • DX: Specify value type in iterables in tests (#6594)
    • DX: Test on PHP 8.2 (#6558)
    • DX: Update GitHub Actions (#6606)
    • DX: Update PHPStan (#6616)
    • feature: Add @PHP82Migration ruleset (#6621)
    • feature: ArrayPushFixer now fix short arrays (#6639)
    • feature: NoSuperfluousPhpdocTagsFixer - support untyped and empty annotations in phpdoc (#5792)
    • feature: NoUselessConcatOperatorFixer - Introduction (#6447)
    • feature: Support for constants in traits (#6607)
    • feature: [PHP8.2] Support for new standalone types (null, true, false) (#6623)

    ... (truncated)

    Commits
    • 78d2251 prepared the 3.13.1 release
    • a2bdba3 Make static data providers that are not using dynamic calls (#6696)
    • ad0a87e bug: Align all the arrows inside the same array (#6590)
    • 663f3fc docs: Update installation recommended commands for mkdir argument (-p ins...
    • 9c7070b bug: Fix priority between modernize_types_casting and `no_unneeded_control_...
    • 046ff90 docs: Fix docs for disabled rules in rulesets (#6679)
    • b577444 minor: displaying number of checked files (#6674)
    • bb94db0 bug: TrailingCommaInMultilineFixer - do not add trailing comma when there is ...
    • 3969f39 docs: fix the cookbook_fixers.rst (#6672)
    • a1a5570 bumped version
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies php 
    opened by dependabot[bot] 0
  • Bump phpunit/phpunit from 9.5.13 to 9.5.27

    Bump phpunit/phpunit from 9.5.13 to 9.5.27

    Bumps phpunit/phpunit from 9.5.13 to 9.5.27.

    Changelog

    Sourced from phpunit/phpunit's changelog.

    [9.5.27] - 2022-12-09

    Fixed

    • #5113: PHP error instead of PHPUnit error when trying to create test double for readonly class

    [9.5.26] - 2022-10-28

    Fixed

    • #5076: Test Runner does not warn about conflicting options

    [9.5.25] - 2022-09-25

    Added

    • #5042: Support Disjunctive Normal Form types

    Fixed

    • #4966: TestCase::assertSame() (and related exact comparisons) must compare float exactly

    [9.5.24] - 2022-08-30

    Added

    • #4931: Support null and false as stand-alone types
    • #4955: Support true as stand-alone type

    Fixed

    • #4913: Failed assert() should show a backtrace
    • #5012: Memory leak in ExceptionWrapper

    [9.5.23] - 2022-08-22

    Changed

    • #5033: Do not depend on phpspec/prophecy

    [9.5.22] - 2022-08-20

    Fixed

    • #5015: Ukraine banner unreadable on black background
    • #5020: PHPUnit 9 breaks loading of PSR-0/PEAR style classes
    • #5022: ExcludeList::addDirectory() does not work correctly

    [9.5.21] - 2022-06-19

    ... (truncated)

    Commits
    • a2bc7ff Prepare release
    • 1b09a9a Exclude source file with PHP 8.2 syntax
    • ac259bc Update Psalm baseline
    • 9e0968d Update ChangeLog
    • 8635ff9 Skip test on PHP < 8.2
    • faa1515 Implement logic to blocks readonly classes to be doubled.
    • 5c6e811 Merge branch '8.5' into 9.5
    • cc19735 Update tools
    • c5d3542 Assert that we have a DOMElement here
    • a653302 Document collected/iterated type using Psalm template
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies php 
    opened by dependabot[bot] 0
  • Bump actions/checkout from 2 to 3

    Bump actions/checkout from 2 to 3

    Bumps actions/checkout from 2 to 3.

    Release notes

    Sourced from actions/checkout's releases.

    v3.0.0

    • Update default runtime to node16

    v2.4.0

    • Convert SSH URLs like org-<ORG_ID>@github.com: to https://github.com/ - pr

    v2.3.5

    Update dependencies

    v2.3.4

    v2.3.3

    v2.3.2

    Add Third Party License Information to Dist Files

    v2.3.1

    Fix default branch resolution for .wiki and when using SSH

    v2.3.0

    Fallback to the default branch

    v2.2.0

    Fetch all history for all tags and branches when fetch-depth=0

    v2.1.1

    Changes to support GHES (here and here)

    v2.1.0

    Changelog

    Sourced from actions/checkout's changelog.

    Changelog

    v2.3.1

    v2.3.0

    v2.2.0

    v2.1.1

    • Changes to support GHES (here and here)

    v2.1.0

    v2.0.0

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies github_actions 
    opened by dependabot[bot] 0
Releases(2.0.0)
  • 2.0.0(Feb 19, 2022)

    Welcome to Version 2!

    V2 is written for PHP 8.1+, and uses all the latest and greatest PHP features (enums, named parameters, attributes, etc.).

    The library itself has gone through quite a few changes:

    • Many classes/namespaces have been renamed (Elements -> Components, Inputs -> Elements, Partials -> Parts, etc.). Most of these changes are to align better with Slack documentation.
    • Named parameters have become the primary interface now, but the fluent interface is still there too (and more reliable than before, IMO).
    • Lots of fixes across the different components (found a lot of little bugs here and there), and improvements to validations.
    • Validation is no longer implicit. You have to call ->validate() explicitly now. This means you can choose to validate or not.
    • The Kit class is now a facade for all the components, not just surfaces.
    • The Formatter class is now named Md.
    • Existing component objects are easier to read/update. This makes them more useful in the context of APIs and app code where block kit JSON is received and needs to be altered (very common for modals and app homes).

    The README is updated with new examples and diagrams that will help you get a feel for everything.

    Source code(tar.gz)
    Source code(zip)
  • 2.0.0-alpha.2(Feb 8, 2022)

    • Rename ActionsCollection to ActionCollection for consistency
    • Separate unique ID validation from ValidCollection into UniqueIds validation attribute
    • Add support for new accessibility_label field on Elements\Button
    Source code(tar.gz)
    Source code(zip)
  • 2.0.0-alpha.1(Feb 7, 2022)

    Welcome to Version 2!

    V2 is written for PHP 8.1+, and uses all the latest and greatest PHP features (enums, named parameters, attributes, etc.).

    The library itself has gone through quite a few changes:

    • Many classes/namespaces have been renamed (Elements -> Components, Inputs -> Elements, Partials -> Parts, etc.). Most of these changes are to align better with Slack documentation.
    • Named parameters have become the primary interface now, but the fluent interface is still there too (and more reliable than before, IMO).
    • Lots of fixes across the different components (found a lot of little bugs here and there), and improvements to validations.
    • Validation is no longer implicit. You have to call ->validate() explicitly now. This means you can choose to validate or not.
    • The Kit class is now a facade for all the components, not just surfaces.
    • Existing component objects are easier to read/update. This makes them more useful in the context of APIs and app code where block kit JSON is received and needs to be altered (very common for modals and app homes).

    The README is updated with new examples and diagrams that will help you get a feel for everything.

    Source code(tar.gz)
    Source code(zip)
  • 1.0.0(Feb 7, 2022)

    It's about time I cut a v1 release, so here it is! It's not perfect, but it's complete.

    This release includes recent contributions for internationalization, unique ID checks, and test updates as well (Thank you!).

    Going forward, any patches for v1 should use the v1 branch.

    The main branch (formerly master) has diverged now to v2 work.

    Source code(tar.gz)
    Source code(zip)
  • 0.19.0(Jun 18, 2021)

    • Adds tapIf() to all Elements. Works the same as tap(), but allows you to specify a condition to decide if the tap is needed.
    • Adds blocks() methods to all Surfaces for adding arrays/iterables of blocks easily.
    • Adds support for callbackId, externalId, and privateMetadata to AppHome surfaces. This was previously missing.
      • This was done by creating a base View surface class that both Modal and AppHome extend.
    • Adds the encodePrivateMetadata(array $data) method to Modal and AppHome, which provides an easy way to set encoded private metadata from an array.
    • Adds support for the newInput() method to all surfaces, instead of just Modals.
    • Updates all VirtualBlocks to implement IteratorAggregate for emitting it's BlockElements.
    Source code(tar.gz)
    Source code(zip)
  • 0.18.0(Apr 30, 2021)

    • Adds support for using Blocks\Input in Surfaces\Message (new in Slack as of 4/20/2021)
    • Adds support for the new dispatch_action property in Blocks\Input
    • Adds support for the new dispatch_action_config property in Inputs\TextInput
      • Adds new Partials\DispatchActionConfig object
      • Adds setters in Inputs\TextInput: setDispatchActionConfig, triggerActionOnEnterPressed, and triggerActionOnCharacterEntered
    Source code(tar.gz)
    Source code(zip)
  • 0.17.0(Apr 15, 2021)

    • Moved repo from https://github.com/jeremeamia/slack-block-kit to https://github.com/slack-php org.
    • Updated root namespace from Jeremeamia\Slack\BlockKit to SlackPhp\BlockKit.
    • Updated composer package from jeremeamia/slack-block-kit to slack-php/slack-block-kit.
    Source code(tar.gz)
    Source code(zip)
Owner
Slack PHP Framework
PHP framework and libraries for building Slack apps
Slack PHP Framework
A simple PHP package for sending messages to Slack, with a focus on ease of use and elegant syntax.

Slack for PHP A simple PHP package for sending messages to Slack with incoming webhooks, focussed on ease-of-use and elegant syntax. Note: this packag

Regan McEntyre 1.2k Oct 29, 2022
A library for reading and writing DNA test kit files in PHP.

php-dna Requirements php-dna 1.0+ requires PHP 8.0 (or later). Installation There are two ways of installing php-dna. Composer To install php-dna in y

Family Tree 365 4 Aug 31, 2022
Demonstration of OOP concepts and usage of Abstract class & Interfaces

Learn OOP Demonstration of OOP concepts and usage of Abstract class & Interfaces Usage clone this repo run composer install run php index.php Code str

M N Islam Shihan 3 Sep 14, 2021
A PHP Package to work with OS processes in an OOP way.

OS Process This package is a wrapper around the Symfony Process component, and build up an API that is object-oriented and user-friendly. Installation

Steve McDougall 58 Jan 1, 2023
Make a Laravel app respond to a slash command from Slack

Make a Laravel app respond to a slash command from Slack This package makes it easy to make your Laravel app respond to Slack's Slash commands. Once y

Spatie 239 Nov 18, 2022
A Slack integration to post GIF replies from replygif.net

Archibald Archibald is a Slack integration written in PHP to post tag-selected GIF replies from replygif.net into your current Slack channel or Direct

Lukas Gächter 11 Nov 1, 2020
PHP implementation for reading and writing Apache Parquet files/streams

php-parquet This is the first parquet file format reader/writer implementation in PHP, based on the Thrift sources provided by the Apache Foundation.

null 17 Oct 25, 2022
A pure PHP library for reading and writing presentations documents

Branch Master : Branch Develop : PHPPresentation is a library written in pure PHP that provides a set of classes to write to different presentation fi

PHPOffice 1.2k Jan 2, 2023
Reference for writing clear PHP code

clearPHP Reference for writing clear PHP code It is difficult to know when one's code is well written. There are recommendations for writing PHP code

Seguy Damien 947 Dec 22, 2022
Result of our code-along meetup writing PHP 8.1 code

PHP 8.1 Demo Code This code demonstrates various PHP 8.0 and 8.1 features in a realistic, functional (but incomplete) codebase. The code is part of so

azPHP 2 Nov 14, 2021
Test essentials for writing testable code that interacts with Magento core modules

Essentials for testing Magento 2 modules Using mocking frameworks for testing Magento 2 modules is counterproductive as you replicate line by line you

EcomDev B.V. 9 Oct 6, 2022
Block Session Hijacking in php.

Block Session Hijacking in php. How Does it work? This is an incredibly simple example, that is meant to be worked on. Please Do NOT use this from sto

null 0 Dec 25, 2021
Make WhatsApp ChatBot and use WhatsApp API to send the WhatsApp messages in php .

Ultramsg.com WhatsApp Bot using WhatsApp API and ultramsg Demo WhatsApp API ChatBot using Ultramsg API with php. Chatbot tasks: The output of the comm

Ultramsg 33 Nov 19, 2022
Moodle plugin to limit the access to course content according to the user level in Block Game.

Moodle plugin to limit the access to course content according to the user level in Block Game.

null 4 Oct 18, 2022
A PocketMine/Altay Plugin to morph yourself into a block

BlockMorph A PocketMine/Altay Plugin to morph yourself into a block Command To morph yourself into a block use this command: /blockmorph [BlockID|Bloc

Matze 7 Mar 22, 2022
Block Hunt minigame for PocketMine-MP!

BlockHunt Block Hunt minigame for PocketMine-MP! What is this minigame? In this minigame there are two teams, Hunters and seekers. Seekers are trying

Oğuzhan 7 Dec 12, 2021
Block malicious scripts using botscout.com protection for your laravel app

Laravel BotScout Protect your website against automated scripts using the botscout.com API. Installation You can install the package via composer: com

Nicolas Beauvais 64 Jul 30, 2022
Block ads for other servers.

[] NoAdvertisings| v0.0.1 Block ads for other servers. Features Block server ads. Easy to setup. Block server address ads when chatting, using command

Nguyễn Hiếu 4 Aug 28, 2022
A collection of experimental block-based WordPress themes.

Frost An experimental block theme for designers, developers, and creators. About Frost is a Full Site Editing theme for WordPress that extends the inc

Fahim Murshed 0 Dec 25, 2021