craftcms/laravel-aliases
Laravel integration for Craft CMS aliases. Defines common path/URL aliases and resolves them through Laravel’s config/container so you can use Craft-style alias strings in your app, CLI, and packages with consistent environment-aware values.
Purpose Alignment:
SplAutoloaderRegister extensions remain preferable for most cases.Laravel Ecosystem Fit:
AppServiceProvider::register()).Core Laravel Compatibility:
Dependency Conflicts:
ramsey/composer-install v4: Minor risk of CI/CD pipeline changes (e.g., composer install behavior). Verify no impact on alias registration.yiisoft/aliases remains unchanged; no new conflicts expected.Configuration Overhead:
AppServiceProvider is still the only required step. Example:
$this->app->register(\CraftCMS\LaravelAliases\AliasesServiceProvider::class);
Unmaintained Package:
dependabot[bot] suggests low human oversight. Risk of:
yiisoft/aliases.Laravel 13-Specific Risks:
Performance:
Laravel 13 Impact:
Dependency Updates:
ramsey/composer-install bump? Are there CI/CD implications (e.g., composer install flags)?Forking Strategy:
craftcms/aliases-core)?Use Case Validation:
SplClassLoader) as a lighter alternative?Laravel Version:
bootstrap/app.php structure) could affect service provider registration. Verify:
// Laravel 13's bootstrap/app.php may require adjustments if aliases are registered early.
Composer Dependencies:
ramsey/composer-install v4 may alter composer install behavior. Test:
composer install --prefer-dist).Alternative Stacks:
Assessment Phase (Updated):
bootstrap/app.php or service provider bootstrapping.Proof of Concept (Updated):
Incremental Rollout (Unchanged):
Fallback Plan (Updated):
ClassLoader extensions or app->bind() for critical paths.Laravel 13 Features:
Edge Cases (Updated):
opcache_reset(); // Simulate cold start.
Phase 1: Setup (Updated)
bootstrap/app.php structure.composer.json with:
"require": {
"craftcms/laravel-aliases": "^2.1",
"ramsey/composer-install": "^4"
}
composer install with the new ramsey/composer-install version.Phase 2: Configuration (Unchanged)
config/app.php or a dedicated config file. Example:
'aliases' => [
'LegacyNamespace' => 'App\\Compatibility\\LegacyAdapter',
],
Phase 3: Testing (Updated)
laravel-debugbar to monitor autoloader stats.Phase 4: Deployment (Updated)
ClassNotFoundException or ReflectionException in logs.Dependency Updates:
ramsey/composer-install v4: Update CI/CD scripts to handle any changes (e.g., new flags).yiisoft/aliases to direct dependencies.Alias Management:
How can I help you explore Laravel packages today?