Skip to content

"Module is not enabled" error [HELP REQUESTED] #163

@tacman

Description

@tacman

I'm not configuring something correctly, but not sure what. It fails on getModule, so I'm probably not enabling the module correctly.

// Survos\DocBundle\EventSubscriber\LoggerSubscriber.php
    private function getTwig(): Environment
    {
        /** @var Symfony $symfony */
        $symfony = $this->getModule('Symfony');
        $twig = $symfony->grabService('twig');
        return $twig;
    }
# acceptene.suite.yml
actor: AcceptanceTester
modules:
    enabled:
        - Symfony:
              part: services
              app_path: 'src'
              environment: 'dev'
# codeception.yml
namespace: App\Tests
extensions:
    enabled:
        - Codeception\Extension\RunFailed
        - Survos\DocBundle\EventSubscriber\LoggerSubscriber: # enabled extension
              max_files: 5 # logger configuration

params:
    - .env

The error log


In Extension.php line 123:
                                                  
  [Codeception\Exception\ModuleRequireException]  
  [Symfony] module requirements not met --        
                                                  
  module is not enabled                           
                                                  

Exception trace:
  at /home/tac/survos/apps/jardin/vendor/codeception/codeception/src/Codeception/Extension.php:123
 Codeception\Extension->getModule() at /home/tac/survos/bundles/doc-bundle/src/EventSubscriber/LoggerSubscriber.php:57
 Survos\DocBundle\EventSubscriber\LoggerSubscriber->getTwig() at /home/tac/survos/bundles/doc-bundle/src/EventSubscriber/LoggerSubscriber.php:150
 Survos\DocBundle\EventSubscriber\LoggerSubscriber->afterSuite() at /home/tac/survos/apps/jardin/vendor/symfony/event-dispatcher/EventDispatcher.php:230
 Symfony\Component\EventDispatcher\EventDispatcher->callListeners() at /home/tac/survos/apps/jardin/vendor/symfony/event-dispatcher/EventDispatcher.php:59

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions