1. 07 Jul, 2022 4 commits
  2. 04 Jul, 2022 1 commit
  3. 13 Apr, 2022 1 commit
  4. 18 Mar, 2022 3 commits
  5. 24 Feb, 2022 1 commit
  6. 23 Feb, 2022 1 commit
  7. 07 Feb, 2022 1 commit
  8. 30 Jan, 2022 2 commits
  9. 15 Jan, 2022 1 commit
  10. 14 Jan, 2022 5 commits
  11. 23 Dec, 2021 2 commits
  12. 21 Dec, 2021 2 commits
    • Seamus Lee's avatar
      Merge pull request #266 from totten/master-hooktest · d1189a5c
      Seamus Lee authored
      HookTest - Fix execution on PHP 8
      d1189a5c
    • totten's avatar
      HookTest - Fix execution on PHP 8 · 35b19c48
      totten authored
      Before
      ------
      
      Test fails on PHP 8
      
      ```
      CiviWP\HookTest::testFoo
      Undefined array key "hook_was_called"
      
      /home/jenkins/bknix-dfl/build/wp-265-47vsb/web/wp-content/plugins/civicrm/tests/phpunit/CiviWP/HookTest.php:22
      ```
      
      After
      -----
      
      Test passes
      
      Comments
      --------
      
      This is a superficial change - the point of the assertion is to validate the
      starting circumstance (asserting that the hook has not yet run). This is just
      a cleaner assertion that the hook has not yet run.
      35b19c48
  13. 20 Dec, 2021 2 commits
    • totten's avatar
      wp-cli/civicrm.php - Bring forward support for --site_url and --ssl · ad02b02b
      totten authored
      Inadvertently dropped when switching from civicrm/install to civirm/setup.
      Fixing within same branch/PR.
      ad02b02b
    • totten's avatar
      wp-cli/civicrm.php - Activate civicrm before running setup-logic · fb187b68
      totten authored
      The installation process involves a few distinct steps, eg *activating* the CiviCRM WP plugin
      and *running the setup logic* (eg DB/data-file init). But which one should execute first?
      
      Before
      -----
      
      The web and CLI flows differ:
      
      * Web flow: Activation then setup-logic
      * CLI flow: Activation is optional. If you skip it, it will auto-activate _after_ setup-logic.
        (Note opposite order of operations.)
      
      The CLI flow produces a large number of warnings and erroneous-behavior like
      
      ```
      Warning: file_get_contents(CIVICRM_PLUGIN_DIRcivicrm/extension-compatibility.json): failed to open stream:
        No such file or directory in /home/fixme/public_html/wp-content/plugins/civicrm/civicrm/CRM/Extension/System.php on line 301
      ```
      
      After
      -----
      
      The order is consistent - the plugin will always activate before running setup-logic.
      
      The above warning goes away. `CIVICRM_PLUGIN_DIR` is reliably available during setup-logic.
      fb187b68
  14. 18 Dec, 2021 3 commits
    • totten's avatar
      (core#1615) wp-cli - Perform CLI installations using Civi\Setup. · 9f22bc42
      totten authored
      Overview
      --------
      
      Per core#1615, change how `wp civicrm install` performs installation.
      Using the `Civi\Setup` means that:
      
      * There's more shared installation code (eg WP GUI / WP-CLI / cv CLI). Less duplicated installation code.
      * Supports more install-time options (`$setup->getModel()`) to configure extensions, components, settings, etc
      * Some options are impelmented more correctly (eg `$setup->getModel()->lang`).
      
      Before
      -------
      
      * Loads the old installer, which (eg) does not have the ability to activate extensions or apply settings.
      
      After
      -----
      
      * Loads `civicrm-setup` (aka `Civi\Setup`) which (a) has more functionality and (b) is used by the WP+Drupal GUIs and by `cv` CLI.
      
      Technical details
      -------------------
      
      To test, here was my process:
      
      * Setup an empty WordPress site and load the CiviCRM code (but don't run the installer yet).
          * Specifically, I used `wpmaster`. But I hacked `buildkit/app/wp-demo/install.sh` to skip Civi install. Then I ran `civibuild reinstall wpmaster`.
          * Alternatively, you might install a new WordPress site and download the tarball -- then apply the patches.
          * Alternatively, you might use `wpmaster` and uninstall Civi (deactivate plugin, delete `wp-content/uploads/civicrm`, drop SQL tables).
      * Make a DB snapshot with the empty Civi+WP DBs (`civibuild snapshot wpmaster`)
      * Run a series of commands like this:
          ```bash
          rm ~/bknix/build/wpmaster/web/wp-content/uploads/civicrm/ -rf
          civibuild restore wpmaster
          wp plugin activate civicrm
          wp civicrm install --dbhost=127.0.0.1:3307 --dbname=FIXME --dbuser=FIXME --dbpass=FIXME --lang=fr_FR
          ```
      
      Comments
      --------
      
      This includes tangential changes in `--lang` handling:
      
      * In `wp-cli/civicrm.php`, only require `--langtarfile` if we're missing the l10n data.
        It's OK to use pre-existing l10n data.
      * Use `Civi::setup()` for lang setup. This loads the localized data *and also* updates
        the initial `civicrm_setting`s to use the the language. (The prior routine neglected
        to set the active language.)*
      9f22bc42
    • totten's avatar
      wp-cli - Allow localized installation with existing `l10n` data dir · 87e327b0
      totten authored
      Before: Suppose you are trying to install with existing source code. If you specify `--lang`, it will complain
      that `--langtarfile=...` is required (even if the language files already exist).
      
      After: You can install a language using *either* `--langtarfile=...` *or* an existing l10n file.
      
      Comment: If you try to install with a language that you don't have, then it will still complain, ie:
      
      ```
      Error: Failed to find data for language (fr_US). Please download valid language data with --langtarfile=<path/to/tarfile>.
      ```
      87e327b0
    • totten's avatar
      (REF) wp-cli/civicrm.php - Figure out the destination a bit sooner · 0f5dd37b
      totten authored
      Some upcoming patches will want to the $crmPath. Make this available sooner.
      0f5dd37b
  15. 02 Dec, 2021 3 commits
  16. 26 Nov, 2021 1 commit
  17. 22 Nov, 2021 1 commit
  18. 28 Oct, 2021 1 commit
  19. 16 Oct, 2021 3 commits
  20. 15 Oct, 2021 1 commit
  21. 12 Oct, 2021 1 commit