Document #[RequiredBundle], ServicesBundle and ConsoleBundle#22225
Open
lacatoire wants to merge 3 commits into
Open
Document #[RequiredBundle], ServicesBundle and ConsoleBundle#22225lacatoire wants to merge 3 commits into
lacatoire wants to merge 3 commits into
Conversation
Document the new features introduced in symfony/symfony#63880: - #[RequiredBundle] attribute: declare bundle dependencies that are automatically loaded, with examples for single/multiple dependencies and the ignoreOnInvalid option - ServicesBundle and ConsoleBundle: standalone bundles providing core DI and console services without requiring FrameworkBundle
Member
|
When using the use App\Kernel;
use Symfony\Component\Console\Application;
if (!is_dir(dirname(__DIR__).'/vendor')) {
throw new LogicException('Dependencies are missing. Try running "composer install".');
}
if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) {
throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".');
}
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
return function (array $context) {
$kernel = new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
$kernel->boot();
return new Application('Application Name', 'Version', $kernel->getContainer());
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #22223