[1.x] Every8d for SMS Framework

Created on 8 November 2022, over 1 year ago
Updated 13 June 2024, 14 days ago

This module provides integration to SMS Framework for the Every8d gateway from Taiwan. It allows the users of SMS Framework module to send SMS using Every8d as a gateway.

Project link

https://www.drupal.org/project/sms_every8d →

📌 Task
Status

Needs work

Component

module

Created by

🇹🇼Taiwan gloomcheng

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇹🇼Taiwan gloomcheng

    I would like to reopen this application and kindly request advice on security measures.

  • Status changed to Needs work about 2 months ago
  • 🇯🇵Japan ptmkenny

    Some initial feedback:

    First, your module does not install on Drupal 10, the current version of Drupal:

    composer require 'drupal/sms_every8d:^1.0@alpha' --with-all-dependencies
    ./composer.json has been updated
    Running composer update drupal/sms_every8d --with-all-dependencies
    Gathering patches for root package.
    Loading composer repositories with package information
    Updating dependencies
    Your requirements could not be resolved to an installable set of packages.
    
      Problem 1
        - drupal/sms_every8d 1.0.0-alpha2 requires drupal/sms * -> satisfiable by drupal/sms[1.0.0, 1.1.0, 1.2.0, 1.3.0, 2.0.0, 2.0.1, 2.1.0].
        - drupal/sms_every8d 1.0.0-alpha1 requires drupal/core ^8.9 || ^9 -> found drupal/core[8.9.0, ..., 8.9.20, 9.0.0, ..., 9.5.11] but these were not loaded, likely because it conflicts with another require.
        - drupal/sms[2.0.0, ..., 2.0.1] require drupal/core ^8.9 || ^9 -> found drupal/core[8.9.0, ..., 8.9.20, 9.0.0, ..., 9.5.11] but these were not loaded, likely because it conflicts with another require.
        - drupal/sms[1.0.0, ..., 1.3.0] require drupal/smsframework ^1 -> found drupal/smsframework[1.0.0, ..., 1.3.0] but it conflicts with your root composer.json require (^2.2@RC).
        - drupal/sms 2.1.0 requires drupal/core ^9.2 -> found drupal/core[9.2.0, ..., 9.5.11] but these were not loaded, likely because it conflicts with another require.
        - Root composer.json requires drupal/sms_every8d ^1.0@alpha -> satisfiable by drupal/sms_every8d[1.0.0-alpha1, 1.0.0-alpha2].
    

    Second, you have some coding standards issues:

    > ./vendor/bin/phpcs -p --colors --standard=Drupal,DrupalPractice --extensions=php,module,inc,install,test,profile,theme,info,txt,md --ignore=node_modules,vendor ./web/modules/dev/sms_every8d
    WEE 3 / 3 (100%)
    
    
    
    FILE: /var/www/html/web/modules/dev/sms_every8d/README.md
    ----------------------------------------------------------------------
    FOUND 0 ERRORS AND 3 WARNINGS AFFECTING 3 LINES
    ----------------------------------------------------------------------
      6 | WARNING | Line exceeds 80 characters; contains 84 characters
     10 | WARNING | Line exceeds 80 characters; contains 135 characters
     11 | WARNING | Line exceeds 80 characters; contains 156 characters
    ----------------------------------------------------------------------
    
    
    FILE: /var/www/html/web/modules/dev/sms_every8d/sms_every8d.install
    ----------------------------------------------------------------------
    FOUND 1 ERROR AFFECTING 1 LINE
    ----------------------------------------------------------------------
     1 | ERROR | [x] Missing file doc comment
    ----------------------------------------------------------------------
    PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
    ----------------------------------------------------------------------
    
  • Status changed to Needs review about 2 months ago
  • 🇹🇼Taiwan gloomcheng

    Thanks for your → for initial feedback on the module review. I've addressed the issues you pointed out, and I'm pleased to announce the release of version 1.0.0-rc1.

    Regarding the installation issue on Drupal 10, I've updated the dependencies to resolve conflicts and ensure compatibility. Now, the module should install properly on Drupal 10. You can try installing it again using the following command:

    composer require 'drupal/sms_every8d:^1.0.0-rc1' --with-all-dependencies

    Additionally, I've resolved the coding standards issues.
    I appreciate your assistance in reviewing the code. If you have time, I'd be grateful for another review of the updated module.

  • 🇮🇳India vishal.kadam Mumbai

    @ptmkenny → : Comments in this queue are required to review the project files and report what needs to be changed. We do not debug projects.

  • Status changed to Needs work 15 days ago
  • I noticed that there is a password field.

        $form['every8d']['password'] = [
          '#type' => 'textfield',
          '#title' => $this->t('Password'),
          '#default_value' => $config['password'],
          '#required' => TRUE,
        ];
    

    The type should be password, not textfield.

    Also, it's not clear to me where the password is stored, if anywhere. It doesn't appear to save it in config. If it did, you might want to encourage users to put the password in settings.php or use the Key → module.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    Also, it's not clear to me where the password is stored

    It is stored in the plugin configuration, which is probably stored in a database table.

  • It is stored in the plugin configuration

    Are you sure? The class doesn't extend the typical configuration form base. There is no call to ->save() anywhere.

  • The module's composer.json file requires "drupal/smsframework": "^2.1",, however, that version of SMS Framework doesn't support Drupal 10. You would need to use "drupal/smsframework": "^2.2@RC",

  • An alternative to saving credentials in config is to use the Key → module, or to use settings that must be set in settings.php.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    The configuration form is returned from Every8d::buildConfigurationForm() and the form is submitted by Every8d::submitConfigurationForm(). What Every8d::submitConfigurationForm() does is exactly what that method is supposed to do; see Alignment::submitConfigurationForm() or NodeSearch::submitConfigurationForm(), for example.

Production build 0.69.0 2024