Problem/Motivation
I see that the module follows very old PHP standard practices, for example it doesn't follow the function return type hinting, among other features that need to be added
More information about Drupal's coding standards
Steps to reproduce
Look into the module's source code, it is using outdated PHP practices.
Proposed resolution
Upgrade the module follow recent standard practices for writing more robust PHP code.
Remaining tasks
N/A
User interface changes
N/A
API changes
N/A
Data model changes
N/A
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | Screenshot from 2026-04-24 22-28-36.png | 79.01 KB | danrod |
| #13 | Screenshot from 2026-04-24 22-15-51.png | 32.18 KB | danrod |
Issue fork radiostoslider-3581162
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
danrodComment #4
yusuf_khan commentedIm working on it
Comment #6
yusuf_khan commented@danrod please review my MR and commit https://git.drupalcode.org/project/radiostoslider/-/merge_requests/16/di...
Comment #7
danrodHi @yusuf_khan PHPCS and PHPSTAN tests are not passing, could you check, please?
Comment #8
danrodComment #9
yusuf_khan commented@danrod Thank you for reviewing my MR. In my latest commit, I have fixed the PHP_CodeSniffer and PHPStan-related pipeline failures, and the pipeline is now passing successfully. Could you please review it again when you have time?
Comment #10
vinodhini.e commentedHi, Hi, I tested this module on Drupal 10.5.1 and ran code quality checks using PHPCS and PHPStan.
After applying MR !16 and re-running the reports:
PHPCS issues are fixed
PHPStan issues are still being reported
Details of PHPStan issues:
File: tests/src/Functional/RadiostosliderAdminTest.php
Line 23: Class extends unknown class Drupal\Tests\BrowserTestBase
Line 45: setUp() calls parent::setUp() but class does not extend a valid parent
Lines 48, 69, 160: Access to undefined property $rootUser
Lines 48, 69, 160: Call to undefined method drupalLogin()
Lines 56, 60, 71, 162: Call to undefined method drupalGet()
Lines 59, 61, 73, 164: Call to undefined method assertSession()
Line 152: Call to undefined method assertNotEquals()
Entity-related issues:
Line 82: Drupal\node\Entity\NodeType::create() unknown class
Line 88, 104: Drupal\field\Entity\FieldStorageConfig::create() unknown class
Line 95, 118: Drupal\field\Entity\FieldConfig::create() unknown class
Lines 126, 139: Drupal\node\Entity\Node::create() unknown class
Total: 24 PHPStan errors
The module still requires fixes to resolve PHPStan issues. Thanks.
Comment #11
yusuf_khan commented@ vinodhini.e vendor/bin/phpstan analyze web/modules/contrib/radiostoslider-3581162 --level=1 --memory-limit=1G
6/6 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%
[OK] No errors
ykhan@COMM--YKHAN-MAC my-drupal-site $
ykhan@COMM--YKHAN-MAC my-drupal-site $ ddev drush st
Drupal version : 11.3.3
Site URI : http://my-drupal-site.ddev.site
DB driver : mysql
DB hostname : db
DB port : 3306
DB username : db
DB name : db
Database : Connected
Drupal bootstrap : Successful
Default theme : olivero
Admin theme : claro
PHP binary : /usr/bin/php8.4
PHP config : /etc/php/8.4/cli/php.ini
PHP OS : Linux
PHP version : 8.4.14
Drush script : /var/www/html/vendor/bin/drush.php
Drush version : 13.7.1.0
Drush temp : /tmp
Drush configs : /var/www/html/vendor/drush/drush/drush.yml
Install profile : standard
Drupal root : /var/www/html/web
Site path : sites/default
Files, Public : sites/default/files
Files, Temp : /tmp
Drupal config : sites/default/files/sync
ykhan@COMM--YKHAN-MAC my-drupal-site $
Comment #12
yusuf_khan commentedComment #13
danrodTested this and works ok, strangely the widget does not work with the Gin Admin theme, but I'll open a different issue for this.
There's some UX issues (please see attachment) that I will address in this MR
Comment #14
danrodComment #15
danrodI think it looks better now (see screenshot).
I'll move this fixed, please let me know if you have any suggestions and I reopen this.
Comment #16
danrodComment #18
danrod