carloschininin/app-util
Laravel utility helpers for building apps: handy functions, common traits, and small components to speed up development and reduce boilerplate. Lightweight package you can drop into projects for everyday tasks and consistent utilities.
HttpClient, Cache, or Console). If the utilities leverage these components, they could introduce tighter coupling to Symfony’s architecture, which may or may not align with Laravel’s DI container or service layer. Assess whether the package enforces a "Laravel-first" approach or remains framework-agnostic.Command bus vs. Laravel’s Artisan), increasing cognitive load for the team.ContainerInterface alongside Laravel’s Container?symfony/http-client, symfony/cache).laravel/framework bundles Symfony components).composer why symfony to audit dependencies and check for version conflicts.Cache component).Config or DependencyInjection components, it may require custom configuration in config/services.php or config/app.php.HttpClient, ensure it doesn’t override Laravel’s existing HTTP client configuration.Cache or HttpClient without proper cleanup.0.2.0 release may include:
Symfony\Component\HttpFoundation\Response instead of Laravel’s Illuminate\Http\Response).HttpClient or Cache may introduce:
HttpClient, Cache, Console)? How do they interact with Laravel’s equivalents?SymfonyHttpClient facade), or must users work with raw Symfony classes?.env keys or config/ entries for Symfony components (e.g., SYMFONY_HTTP_CLIENT_TIMEOUT)?Container vs. Laravel’s Container (e.g., service binding conflicts)?composer why-not symfony/http-client:^8.0
laravel/framework includes Symfony 6.4+).composer why symfony to identify conflicts with other packages (e.g., spatie/laravel-activitylog).composer.json overrides or forks.Symfony\Component\Cache\CacheInterface). Add PHPDoc stubs or use phpstan/extension-installer to generate type hints.phpstan with Symfony’s level-5 rules to catch type errors in Symfony-integrated utilities.vendor/bin/phpstan analyse --level=5 --generate-report=html
pest with Symfony’s HttpClient mocks).use Symfony\Component\HttpClient\MockHttpClient;
use Symfony\Component\HttpClient\Response\MockResponse;
test('Symfony HTTP client integration', function () {
$mock = new MockHttpClient([
new MockResponse('{"status":"ok"}'),
]);
$result = AppUtil::fetchData($mock);
expect($result)->toBe('ok');
});
composer validate and composer why symfony to identify conflicts.composer.json override for the package version:
"extra": {
"laravel": {
"dont-discover": ["App\\Utilities\\Symfony*"]
}
}
HttpClient, configure it in config/services.php:
'http_client' => [
'timeout' => env('SYMFONY_HTTP_TIMEOUT', 30),
'max_retries' => env('SYMFONY_HTTP_RETRIES', 3),
],
AppServiceProvider:
// In a custom ServiceProvider
public function register()
{
$this->app->singleton(SymfonyCacheInterface::class, function () {
return new SymfonyCacheAdapter();
});
}
SymfonyHttpClient), alias them in config/app.php:
'aliases' => [
'SymfonyHttp' => Symfony\HttpClient\Facades\HttpClient::class,
],
Cache to Symfony’s CacheInterface in a single module.if (feature_enabled('symfony_cache')) {
return $symfonyCache->get($key);
}
return Cache::get($key);
Doctrine components (unlikely for a Laravel package), ensure compatibility with LaravelHow can I help you explore Laravel packages today?