yceruto/acme-bundle
Symfony bundle for ACME/Let's Encrypt certificate automation. It integrates certificate issuance and renewal into your app, with configuration and console commands to request, install, and renew SSL/TLS certificates.
src/AcmeBundle.php and the new getPath() override. This is the only runtime code shown in 4.0; the rest is a directory/symlink compatibility recipe.src/Resources/.cd src/Resources
ln -s ../../config/ config
ln -s ../../public/ public
ln -s ../../translations/ translations
ln -s ../../templates/ views
getPath() so Symfony resolves the correct bundle root:
use Symfony\Component\HttpKernel\Kernel;
public function getPath(): string
{
return Kernel::VERSION_ID >= 40400 ? \dirname(__DIR__) : __DIR__;
}
src/Resources/ layout to root-level config/, public/, translations/, and templates/ while still supporting older Symfony versions.mixed branch for a working example before applying the pattern to your own bundle.config/, public/, translations/, and templates/.src/Resources/. Avoid duplicating files; the symlink becomes the compatibility layer.Kernel::VERSION_ID >= 40400 as the switch. Symfony 4.4 introduced the root-level bundle structure, so the boundary should be tested explicitly.getPath() must return __DIR__ so @AcmeBundle/... resource references continue to resolve under src/Resources/.getPath() returns \dirname(__DIR__) so Twig, translations, config, and public assets resolve from the bundle root.loadViewsFrom(), loadTranslationsFrom(), mergeConfigFrom()) instead of duplicating resources. The 4.0 recipe itself is Symfony-specific.core.symlinks on Windows and confirm the symlinks appear as links in CI.export-ignore rules can exclude or flatten symlinked directories. Test the installed package, not just the working tree.getPath() affects all @AcmeBundle/... resource resolution. A wrong return value can break templates, translations, routing, and config loading at once.Kernel::VERSION_ID 403xx vs 40400) rather than assuming the constant behaves as expected.bin/console about, debug:container, debug:twig, and a quick dump of $bundle->getPath() if resource lookup fails.Bundle::getPath(). Avoid adding custom path-resolution logic elsewhere; centralize compatibility there.How can I help you explore Laravel packages today?