Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Foaas Client Laravel Package

codeat3/foaas-client

A Laravel and PHP client for FOAAS (Fuck Off As A Service), offering a clean, fluent wrapper around the API's blunt one-liners. Send customizable, profanity-laden messages to friends, coworkers, or users with simple method calls and easy Laravel integration.

View on GitHub
Deep Wiki
Context7

Getting Started

  • Install with Composer (composer require <vendor>/<package> — confirm the exact name from Packagist; the 1.0.1 notes do not include it).
  • There is no config-publish step called out in this release. The entry point is the client class — open it first. As of 1.0.1 its available methods carry typehints, so your IDE and static analyser will now show expected argument and return types.
  • If the package does not auto-register, bind the client as a singleton in a service provider so configuration and transport are shared.
  • First use case: resolve the client and call one read-only method (a get*/list* style call) to confirm credentials and configuration before building write flows.

Implementation Patterns

  • Constructor injection over facades. Now that methods are typehinted, injecting the client into services/controllers gives you autocompletion and catches signature drift at analysis time rather than runtime.
  • Bind once, reuse. Register the client in a service provider as a singleton and inject it; avoid new Client() in controllers.
  • Wrap in an application adapter. Keep a thin wrapper around package calls. If a later release tightens typehints, you change one class instead of every call site.
  • Test doubles are safer. With concrete signatures in place, mocks/fakes generated from the client reflect real types. Use Mockery or Http::fake() depending on whether the client is HTTP-backed.
  • CI parity. The 1.0.1 Travis YAML is for the package maintainers, not consumers, but it signals the package runs its suite in CI. Mirror the supported PHP/Laravel matrix from that file in your own pipeline when adopting it.
  • Static analysis. Re-run PHPStan/Psalm after upgrading — the new typehints should reduce mixed noise and may surface pre-existing mismatches in your wrapper.

Gotchas and Tips

  • Typehint additions can break subclasses. If you extend the client and override its "available methods" without matching parameter/return types, PHP will throw a fatal LSP error on upgrade. Audit overrides before bumping to 1.0.1.
  • "Available methods" may be a subset. The changelog says typehints were added "for available methods" — verify which methods and whether they cover parameters, returns, or both. Do not assume the full surface is typed.
  • Travis YAML is not shipped to consumers. vendor/ distributions typically exclude CI files; do not expect it at runtime or rely on it in your app.
  • No config publish mentioned. If the package does ship a config file, publish it explicitly and never edit vendor files.
  • Debugging TypeErrors. When a call fails with a type error, inspect the client method signature via reflection or your IDE first — the 1.0.1 hints define the contract. Log the resolved client class to rule out a stale cached container binding.
  • Extend by wrapping, not patching. The client is the natural extension seam; decorate or wrap it so future typehint changes stay contained.
  • Pin the version. With thin patch notes (1.0.0 → 1.0.1), pin ^1.0 and diff the client class before adopting minor bumps.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment