- How do I install frlnc/php-slack with Composer?
- Run composer require frlnc/php-slack and let Composer resolve its constraints against your PHP version. The package is Composer-ready with PSR-4 autoloading, so its classes are available after the autoloader is included. Because the package is old, check its composer.json and test resolution in a branch before adding it to a Laravel project.
- Does frlnc/php-slack work with Laravel?
- It is a framework-agnostic PHP client, so it can be called from Laravel controllers, jobs, or services. It does not appear to offer a Laravel service provider or facade, so you should bind it through your own adapter and configuration. Keep package classes behind an application-owned SlackClientAdapter so you can replace it later.
- How do I call a Slack API method using frlnc/php-slack?
- Use Commander::execute() with the Slack Web API method name and parameters. The client sends the request through a pluggable HTTP interactor, with cURL included, and returns a structured Response object exposing the body, headers, and status. You then inspect the response body for Slack's ok field and handle errors in your application code.
- What authentication does frlnc/php-slack require for Slack?
- You pass a Slack API token to the client, typically a bot or user token for the workspace you are calling. The package predates modern Slack app patterns such as granular OAuth scopes and token rotation, so validate that your required scopes and auth model work in a spike. Do not assume it supports multi-workspace OAuth or automatic token refresh.
- Does frlnc/php-slack handle Slack rate limits and retries?
- The package is a thin API client and does not provide a documented retry or backoff layer for Slack rate limits. You should add timeout, retry, and rate-limit handling in your adapter or HTTP interactor. Log rate-limit responses and test behavior against Slack's current limits before relying on it in production.
- Is frlnc/php-slack still maintained?
- No, the last release was in 2016 and the repository is not an actively maintained platform dependency. Slack's Web API has changed substantially since then, so treat the package as legacy glue code. Pin the version, document a replacement path, and assign an owner for API and security review.
- What PHP and dependency versions does frlnc/php-slack support?
- You need to check the package's composer.json for its PHP and HTTP client constraints, because those determine whether it resolves in your Laravel stack. Older packages may constrain Guzzle or PHP versions that conflict with current applications. Run composer require in a throwaway branch and validate the lock file before adopting it.
- Can I use frlnc/php-slack for production Slack notifications?
- It can work for low-risk, secondary notification paths where a small number of Slack calls are acceptable. It is a poor fit for high-volume messaging, multi-workspace OAuth, or anything requiring Slack's newest APIs. Wrap it behind an internal interface, add monitoring and error normalization, and pilot it outside critical workflows.
- How should I test frlnc/php-slack integrations?
- Mock the HTTP interactor or the Commander layer so tests do not call Slack, and assert on the request method, parameters, and normalized response. Add contract tests using recorded or mocked Slack responses to cover malformed bodies, error responses, and rate-limit cases. Keep these tests at your adapter boundary so replacing the package does not require rewriting domain tests.
- What are alternatives to frlnc/php-slack?
- Consider Slack's official SDK, a direct HTTP client such as Guzzle or Laravel's HTTP client, or a maintained community package that supports current Slack auth and API conventions. If you only need a few calls, a small application-owned client is often safer than adopting an unmaintained dependency. Keep the same adapter interface so you can swap implementations without changing domain code.