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

Migration 'if' conditions only support booleans

    XMLWordPrintable

    Details

      Description

      The condition of migrations' if statements must be of boolean type. Calling another migration tool is not supported, see: https://github.com/phpbb/phpbb/blob/release-3.2.2/phpBB/phpbb/db/migrator.php#L761-L766

      This does not work as expected:

      ['if', [
          ['module.exists', ['acp', false, 'ACP_FOO']],
          ['module.remove', ['acp', false, 'ACP_FOO']],
      ]],

      The only place in phpBB core where no boolean type is provided is this: https://github.com/phpbb/phpbb/blob/release-3.2.2/phpBB/phpbb/db/migration/data/v320/add_help_phpbb.php#L36

      The effect is that module.remove is always called, which is not too serious because module.remove internally checks if the module exists before trying to delete it.

        Attachments

          Activity

            People

            • Assignee:
              nicofuma nicofuma
              Reporter:
              kasimi kasimi
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: