slack

A simple PHP package for sending messages to Slack, with a focus on ease of use and elegant syntax.

BSD-2-CLAUSE License

Downloads
10.7M
Stars
1.2K
Committers
17
slack - Authors and thumbnails in attachments Latest Release

Published by maknz over 9 years ago

You can now specify author_name, author_link and author_icon fields in your attachments.

Demonstration of author fields

You can also specify a thumb_url to provide a thumbnail image with the attachment.

Demonstration of thumb url

slack - Guzzle 6 support

Published by maknz over 9 years ago

Add support and prefer Guzzle 6. We still support Guzzle 5 and 4 just fine.

slack - Add support for title and title_link in attachments

Published by maknz over 9 years ago

You can now provide an optional title and title_link field in attachments. Thanks @iwiznia.

slack - Add image option to attachments

Published by maknz over 9 years ago

You can now use the image_url field to embed images in attachments. Thanks @Leenug for the contribution.

slack - Dependency injection enhancements for Laravel

Published by maknz over 9 years ago

You can now typehint for a Maknz\Slack\Client in the constructor of classes created via Laravel's IoC container, rather than being forced to use the Slack facade. Thanks @tzookb for the addition.

slack - Laravel 5 support

Published by maknz over 9 years ago

This release includes compatibility changes for Laravel 5. Laravel 4 is still fully supported also.

slack - Markdown support and updated link unfurling

Published by maknz over 9 years ago

  • Markdown support: the ability to disable Markdown parsing of messages, and the ability to specify Markdown parsing for attachment properties.
  • Slack have updated unfurling to differentiate text-based URLs and media-based URLs, which have both been added as settings on the client.

Upgrading

Laravel users may wish to re-publish their configuration with php artisan config:publish maknz/slack to get the new fields. Make sure to backup your current config file so you can port your settings across to the new file.

slack - Version 1

Published by maknz almost 10 years ago

  • Decoupled messaging from the client to prevent side effects and be a bit more usable
  • Moved from PSR-2 to PSR-4 autoloading
  • Implemented missing link_names and unfurl_links options
  • Tidied up the documentation

Upgrading from 0.x.x to 1.0.0

The API has stayed much the same, so as long as you were following examples in the README, there shouldn't be any breaks for basic usage. If you have problems or want aspects of the new layout explained, log an issue.

If you're using Laravel, you may wish to re-publish the configuration (php artisan config:publish maknz/slack) in order to get the new configuration options. Everything will work without it though.

slack - Update Guzzle

Published by maknz almost 10 years ago

We now prefer Guzzle 5, but are compatible with 4. Loosens the version constraint.

slack - Unicode support

Published by maknz almost 10 years ago

A fix which will enable Unicode characters to be sent to Slack. Thanks to @serima for the bug report.

slack - Fix problem instantiating defaults from the config

Published by maknz about 10 years ago

FIxes issue #3.

slack - New interface, attachments, icons and decoupling from Laravel

Published by maknz about 10 years ago

This release revamps the interface for using the library, and adds functionality for attachments and icons. We now cover all functionality provided by Slack's incoming webhooks.

The interface has changed from 0.1.x, where you used to type:

Slack::send('message', '#channel', 'username');

you would now use

Slack::from('username')->to('#channel')->send('message');

which is more expressive and elegant.

See the README for detailed examples of the new syntax, and also how to use the new attachment and icon functionality.

If upgrading from 0.1.x, you will need to change your code if you are customising the channel and username in the call to Slack::send() to use the syntax above, and you will need to re-publish the Laravel configuration using php artisan config:publish maknz/slack.

The package can now be used (more easily) outside of Laravel. Instructions are in the README.

slack - Laravel 4.2 support

Published by maknz over 10 years ago

A minor update to the project's dependencies to allow for usage with Laravel 4.2.

slack - Initial release

Published by maknz over 10 years ago

The first release of the package.