Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-12685

CLI doesn't load extension commands

    Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.0-b4
    • Fix Version/s: 3.1.0-RC3
    • Component/s: CLI, Extensions
    • Labels:
      None

      Description

      Currently, phpBB Console doesn't load extension commands.

        Issue Links

          Activity

          Hide
          carlino1994 carlino1994 added a comment -

          Yes, for example phpBB Console will be a emergency tool to disable extensions that don't allow the execution of phpBB.

          Show
          carlino1994 carlino1994 added a comment - Yes, for example phpBB Console will be a emergency tool to disable extensions that don't allow the execution of phpBB.
          Hide
          carlino1994 carlino1994 added a comment -

          And if we define a new constant in the config.php file to determine whether to load extensions in the console?

          Show
          carlino1994 carlino1994 added a comment - And if we define a new constant in the config.php file to determine whether to load extensions in the console?
          Hide
          rfdy rfdy added a comment - - edited

          By default the console should load all enabled extensions, if something breaks (which is very likely to happen during development), then a "safe mode" parameter can be added to the console which will not load extensions. IMHO that would be ideal. Thanks.

          Show
          rfdy rfdy added a comment - - edited By default the console should load all enabled extensions, if something breaks (which is very likely to happen during development), then a "safe mode" parameter can be added to the console which will not load extensions. IMHO that would be ideal. Thanks.
          Hide
          carlino1994 carlino1994 added a comment -

          There is a problem with default container.

          I did a test. If we use the default container for phpBB Console commands are loaded only the first time (when the cache is generated). Once the cache was generated, are no longer loaded.

          To test this, change line 38 of bin/phpbbcli.php to:

          $phpbb_container = phpbb_create_default_container($phpbb_root_path, $phpEx);

          We can't use a "safe mode" parameter because container is created before the console application start.

          Show
          carlino1994 carlino1994 added a comment - There is a problem with default container. I did a test. If we use the default container for phpBB Console commands are loaded only the first time (when the cache is generated). Once the cache was generated, are no longer loaded. To test this, change line 38 of bin/phpbbcli.php to: $phpbb_container = phpbb_create_default_container($phpbb_root_path, $phpEx); We can't use a "safe mode" parameter because container is created before the console application start.
          Hide
          carlino1994 carlino1994 added a comment - - edited

          For resolve the problem with the default container of which I have mentioned in my previous post, we can create a new CLI container that won't be cached, as currently do the update container (but add extensions loading).

          EDIT:
          We have 2 options:

          • create a CLI container
          • force DEBUG into CLI and use default container (this will use a compiled container instead of dumped container)
          Show
          carlino1994 carlino1994 added a comment - - edited For resolve the problem with the default container of which I have mentioned in my previous post, we can create a new CLI container that won't be cached, as currently do the update container (but add extensions loading). EDIT: We have 2 options: create a CLI container force DEBUG into CLI and use default container (this will use a compiled container instead of dumped container)

            People

            • Assignee:
              nicofuma nicofuma
              Reporter:
              carlino1994 carlino1994
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development