# Bundles Personalizados (Symfony) > Criação de bundles, configuração de extensões, compiler passes, bundles reutilizáveis, melhores práticas - 20 perguntas de entrevista - Senior - [Perguntas de entrevista: Symfony](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista.md) ## 1. Qual classe a classe principal de um bundle deve estender no Symfony? **Resposta** A classe principal de um bundle Symfony deve estender AbstractBundle (Symfony 6.1+) ou Bundle. AbstractBundle é recomendada porque simplifica a configuração e permite definir a configuração diretamente na classe do bundle por meio do método configure(). Bundle continua disponível para retrocompatibilidade, mas AbstractBundle oferece uma API mais moderna. ## 2. Qual é o papel da classe Extension em um bundle Symfony? **Resposta** A classe Extension (que herda de ConfigurableExtension ou Extension) é responsável por carregar a configuração do bundle e registrar os serviços no contêiner. Ela lê os arquivos de configuração do bundle, processa os parâmetros da aplicação e configura os serviços por meio do ContainerBuilder. Implementa o método load(), que é chamado durante a compilação do contêiner. ## 3. Qual é a convenção de nomenclatura para a classe principal de um bundle chamado AcmePaymentBundle? **Resposta** Por convenção do Symfony, a classe principal do bundle deve ter o mesmo nome que o bundle. Para AcmePaymentBundle, a classe principal será AcmePaymentBundle e deverá estar no namespace correspondente, geralmente Acme\PaymentBundle. Portanto, o arquivo será AcmePaymentBundle.php na pasta src/ do bundle. ## Mais 17 perguntas disponiveis - O que é um Compiler Pass no Symfony e quando deve ser usado? - Como definir uma configuração semântica para um bundle com validação de parâmetros? Cadastre-se gratis: https://sharpskill.dev/pt/login ## Outros temas de entrevista Symfony - [PHP Moderno (8.1+)](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/php-modern-features.md): 20 perguntas, Junior - [Fundamentos do Symfony](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/symfony-basics.md): 25 perguntas, Junior - [Routing & Controllers](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/routing-controllers.md): 20 perguntas, Junior - [Twig & Templates](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/twig-templates.md): 20 perguntas, Junior - [Fundamentos do Doctrine ORM](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/doctrine-orm-basics.md): 25 perguntas, Junior - [Formulários Symfony](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/forms.md): 22 perguntas, Junior - [Validação de dados](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/validation.md): 18 perguntas, Junior - [Dependency Injection & Services](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/dependency-injection.md): 24 perguntas, Mid-Level - [Security & Authentication](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/security-authentication.md): 26 perguntas, Mid-Level - [Doctrine avançado](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/doctrine-advanced.md): 24 perguntas, Mid-Level - [API Platform](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/api-platform.md): 22 perguntas, Mid-Level - [Serializer Component](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/serializer.md): 20 perguntas, Mid-Level - [Events & Event Subscribers](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/events-subscribers.md): 20 perguntas, Mid-Level - [Console & Commands](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/console-commands.md): 18 perguntas, Mid-Level - [Messenger Component](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/messenger.md): 22 perguntas, Mid-Level - [HTTP Client](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/http-client.md): 18 perguntas, Mid-Level - [Cache e Desempenho](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/cache.md): 20 perguntas, Mid-Level - [Workflow Component](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/workflow.md): 18 perguntas, Mid-Level - [Testing Symfony](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/testing.md): 22 perguntas, Mid-Level - [Mailer Component](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/mailer.md): 16 perguntas, Mid-Level - [Traduções e i18n](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/translations.md): 16 perguntas, Mid-Level - [EasyAdmin Bundle](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/easyadmin.md): 18 perguntas, Mid-Level - [Arquitetura Symfony](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/architecture-patterns.md): 24 perguntas, Senior - [Desempenho e otimização](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/performance-optimization.md): 22 perguntas, Senior - [Segurança avançada](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/security-advanced.md): 22 perguntas, Senior - [Microservices com Symfony](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/microservices.md): 22 perguntas, Senior - [Real-time & WebSockets](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/real-time.md): 18 perguntas, Senior - [Deployment & DevOps](https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/deployment-devops.md): 20 perguntas, Senior --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/pt/technologies/symfony/perguntas-entrevista/custom-bundles