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

Artful Laravel Package

yansongda/artful

Artful is a PHP API request framework with Swoole support, a flexible plugin mechanism, and a rich event system. It separates request logic from process, keeps each request and plugin in its own file, and follows PSR-2, 3, 4, 7, 11, 14, and 18 standards for easy framework integration.

View on GitHub
Deep Wiki
Context7

Api RequesT Framework U Like - 你喜欢的 API 请求框架

Frequently asked questions about Artful
How do I install Artful in a Laravel application?
Install it with Composer using the constraint documented in the README, composer require yansongda/artful:~1.1.0, and then follow the setup guide at artful.yansongda.cn. Check the repository tags first so you lock a version that matches your PHP and framework requirements. In Laravel, you can register any needed PSR-11 or PSR-14 bindings in a service provider.
Is Artful compatible with Laravel, or is it only for standalone PHP?
Artful is not Laravel-only; it is a framework-agnostic PHP package built around PSR-2, 3, 4, 7, 11, 14, and 18. That makes it usable inside Laravel through its PSR interfaces, but it does not ship native Eloquent, queue, or notification integrations. You should expect to write small bridges where you want deep Laravel ecosystem coupling.
Does Artful support Laravel Octane and Swoole?
Artful advertises Swoole support, which makes it relevant for high-concurrency Laravel Octane or Swoole deployments. The v1.2.1 release also adds boot-time framework container auto-detection, so test that path carefully in long-running workers. Confirm that per-request state and plugins behave correctly across worker reuse before production rollout.
How is Artful different from Laravel's built-in HTTP client?
Laravel's HTTP client is convenient for straightforward REST calls and is already integrated with the framework. Artful is more useful when you want each API encapsulated in its own class file with reusable plugins, events, and PSR-based abstractions. For simple calls, the native client is usually less complex; for many third-party APIs, Artful can reduce boilerplate.
How does the one file, one request approach help with multiple APIs?
Artful separates request logic from the request process so each API call lives in its own file and is managed consistently. That isolation helps when a project has several third-party APIs or complex workflows, because changes to one API or plugin do not bleed into others. It also makes auth headers, payload shaping, and response handling easier to review and reuse.
How do Artful plugins work and can they affect other API requests?
Plugins are designed as one file per plugin with no side effects, and APIs plus plugins are isolated from each other. You can use them for cross-cutting behavior such as headers, logging, or request and response transformations. Because each API keeps its own configuration, a plugin change should not silently affect unrelated API calls, but you should still test shared plugin behavior.
Can I use Artful's PSR-14 events with Laravel's event system?
Artful's event system is built on PSR-14, so you can dispatch and listen to its events using any PSR-14-compatible dispatcher. Laravel's native event dispatcher is not automatically the same thing, so use a bridge or adapter if you want Artful events to flow through Laravel listeners. This keeps logging, retries, or analytics separate from business logic.
What Laravel versions does Artful support?
The package does not publish a Laravel-specific version matrix; its compatibility story is based on PSR standards and your PHP version. In practice, use it with Laravel versions that support the PSR interfaces you need and verify the integration in your own test suite. The README's documented Composer constraint is the best starting point, then adjust after checking current tags.
Is Artful safe for production in a Laravel app?
For production, Artful's PSR compliance and per-API isolation are positives, but the project is single-maintainer and has a broad multi-framework surface. Treat v1.2.1's container auto-detection and any Swoole or Octane usage as items to test under load. Pin your Composer version and add integration tests around authentication, retries, and error handling before relying on it for critical APIs.
How actively is Artful maintained and should I consider alternatives?
Artful is alive but low-cadence, with releases focused across ThinkPHP, Hyperf, and Laravel rather than Laravel-first. If you need deep Laravel integration or a large maintainer team, Laravel's HTTP client, Guzzle, or a dedicated API-client package may be a better fit. Choose Artful when its per-API file structure, plugins, events, and Swoole support match your architecture.
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.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections