Skip to content

Update activate/deactivate/upgrade functions to use Capsule #2

Open

Description

@salt-lick
     $query = "CREATE TABLE `mod_addonexample` (`id` INT( 1 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,`demo` TEXT NOT NULL )";
    full_query($query);

SQL Helper Functions

Per the docs, WHMCS has deprecated SQL helpers. However, I keep seeing code created / updated from WHMCS that still uses them. Is there an idea on when those helper functions will be removed?

Activity

  1. mattpugh commented on Jan 20, 2017

    @mattpugh
    Member

    While they are deprecated and we do encourage using Capsule and in particular the Models (http://docs.whmcs.com/classes) wherever possible, we have no plans to remove support for them at this time. You can expect them to be around as long as it is possible to support them.

  2. jozephbrasil commented on Jan 20, 2017

    @jozephbrasil

    In this case, is suggested to change sample projects to use the new classes instead of old and deprecated examples.

  3. changed the title [-]SQL Helpers[/-] [+]Update activate/deactivate/upgrade functions to use Capsule[/+] on Jan 21, 2017
  4. mattpugh commented on Jan 21, 2017

    @mattpugh
    Member

    I have updated the title of this issue to be about updating the sample module to make use of Capsule in place of the SQL Helper functions and we'll use this to track this being completed.

  5. salt-lick commented on Jan 23, 2017

    @salt-lick
    Author

    Thanks Matt. As someone that uses / codes against WHMCS all day long and interacts with numerous externally developed plugins, I keep seeing the uses of the SQL helpers perpetuated across the WHMCS ecosystem. I was just fearing that one near release was going to have these helpers pulled.

    So, seeing sample code being disseminated from the mothership that used the SQL helpers instead of Capsule was just troubling.

    Thanks for letting us they are going to stick around for a bit longer and working on updating the sample code to use the preferred method.

  6. WHMCSPeter commented on Jan 7, 2019

    @WHMCSPeter

    This issue has been resolved in PR #11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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