Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
salt-lick opened this issue Jan 20, 2017 · 5 comments
Open

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

salt-lick opened this issue Jan 20, 2017 · 5 comments

Comments

@salt-lick
Copy link

     $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?

@mattpugh
Copy link
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.

@jozephbrasil
Copy link

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

@mattpugh mattpugh changed the title SQL Helpers Update activate/deactivate/upgrade functions to use Capsule Jan 21, 2017
@mattpugh
Copy link
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.

@salt-lick
Copy link
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.

@WHMCSPeter
Copy link

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants