FILE: C:\xampp\htdocs\contribution\web\modules\contrib\bookable_calendar\src\Controller\BookableCalendarApiController.php
-------------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 7 WARNINGS AFFECTING 7 LINES
-------------------------------------------------------------------------------------------------------------------------
23 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
104 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
115 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
128 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
129 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
199 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
200 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
-------------------------------------------------------------------------------------------------------------------------
FILE: C:\xampp\htdocs\contribution\web\modules\contrib\bookable_calendar\src\Controller\BookableCalendarController.php
----------------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------------------------------------------------------
20 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
----------------------------------------------------------------------------------------------------------------------
FILE: C:\xampp\htdocs\contribution\web\modules\contrib\bookable_calendar\src\Form\BookingContactCreateForm.php
--------------------------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
--------------------------------------------------------------------------------------------------------------
24 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
--------------------------------------------------------------------------------------------------------------
FILE: C:\xampp\htdocs\contribution\web\modules\contrib\bookable_calendar\src\Notification.php
----------------------------------------------------------------------------------------------
FOUND 0 ERRORS AND 4 WARNINGS AFFECTING 4 LINES
----------------------------------------------------------------------------------------------
70 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
71 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
77 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
156 | WARNING | \Drupal calls should be avoided in classes, use dependency injection instead
----------------------------------------------------------------------------------------------
Time: 616ms; Memory: 8MB
| Comment | File | Size | Author |
|---|---|---|---|
| #29 | interdiff_27-29.txt | 594 bytes | elber |
| #29 | 3291677-29.patch | 46.84 KB | elber |
| #27 | 3291677-27.patch | 46.32 KB | lucienchalom |
| #23 | 3291677-23.patch | 30.67 KB | mpaulo |
| #18 | 3291677#18.patch | 111.13 KB | jsricardo |
Issue fork bookable_calendar-3291677
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
rakhi soni commentedI have created a patch to fix the issue of '\Drupal calls should be avoided in classes, use dependency injection instead',, please review.
Comment #3
jayesh.d commentedHi Rakhi,
I will be reviewing your patch.
Thanks!!
Comment #4
jayesh.d commentedHi Rakhi,
I have reviewed your patch. It applied cleanly.
Your patch has successfully removed the ?Drupal class should be avoided in class issue. But there are lot of coding standard isses which need to be addressed.
Moving status needs to work.
Comment #5
jayesh.d commentedHi,
I have removed all the coding issues,Except three.
Please review the patch. I haven't solved the three warnings intentionally because it can alter the maintainers code and will lead to unwanted functionality.
Thanks!!!
Comment #6
akshaydalvi212 commentedHello @jayesh.d,
Thanks for the patch, i will review it.
Comment #7
akshaydalvi212 commentedHello @jayesh.d,
while applying the patch, getting some whitespace errors in the patch as follows:
I will upload the updated patch, which will be applicable without these whitespace errors.
hence switching the status of the issue to Needs work.
Thanks and regards.
Comment #8
akshaydalvi212 commentedHello,
Providing a new patch, which eliminates all the coding standard errors and warnings as mentioned above except this warning:
FILE: ...p/web/modules/contrib/bookable_calendar/bookable_calendar.module
----------------------------------------------------------------------
FOUND 0 ERRORS AND 1 WARNING AFFECTING 1 LINE
----------------------------------------------------------------------
270 | WARNING | Only string literals should be passed to t() where
| | possible
----------------------------------------------------------------------
Time: 810ms; Memory: 16MB
This warning can be solved by the module maintainers.
if we make changes that can affect the functionality of the module.
Kindly review the patch.
Thanks & regards.
Comment #9
jayesh.d commentedHello,
@akshaydalvi212 I explicitly mentioned in my #5 I am not removing those warnings. You might have removed the parent:saveForm() line . Which should not be removed.. These methods were wrtitten intentionally by the maintainer to autoload the form.
Comment #10
jayesh.d commentedHi,
Akshay please provide me interdiff file.. with #5 and #8 patch.
I will review it
Comment #11
akshaydalvi212 commentedHello @jayesh.d,
Sorry for the inconvenience, providing the interdiff file for #5 and #8 patch.
kindly review it.
Comment #12
jayesh.d commentedHi Akshay,
Thanks for providing me interdiff file . I checked everything is fine. But when I tried testing your patch #8. It unexpectedly failed.
Please look into this. Thanks!!
Comment #13
akshaydalvi212 commentedHello @jayesh.d,
Thanks for confirming everything is fine from the review of interdiff file.

at my end the patch get applied perfectly and it is only showing some warnings as follows.
I guess we need more review from other contributors so as to confirm the problem.
Thanks and regards.
Comment #14
jayesh.d commentedYeah, fine we can wait for it.
Comment #15
omkar-pd commentedPatch applied cleanly for me and solved all the coding standard issues except the 3 mentioned in #5. Can be moved to RTBC.
Comment #16
josh.fabeanWorking on getting these merged in as I have time, in the past two weeks I've added more code, so the patches don't apply totally clean.
Comment #17
jsricardo commentedComment #18
jsricardo commentedFix dependence injections
Comment #19
alexanderj commentedi will review it.
Comment #20
alexanderj commented@jsricardo I couldn't apply your patch, because apparently it has some lines different from the current version (I believe it can be turned and another version of the project).
When I checked the patch #8, I saw that it applies correctly and follows the way expected, I believe the correct thing would be to remove your patch file and proceed with patch #8 and then change the status to RTBC.
Comment #21
jsricardo commented@alexanderj Sorry, there was an error on my part as I worked on an older version for this issue.
Disregard comment #18
Comment #22
mpaulo#20 states there is still some work left to do.
I'll try working on or reviewing the last patches.
Comment #23
mpauloNo \Drupal calls violations appear on 2.1.4. Most of them are "XXX tags need to be fully namespaced", and fixable by PHPCBF.
Because of that, rerolling a previous commit seemed counterproductive.
I think the issue should be closed, or its description updated to address general CS errors
Either way, I'm providing a patch to fix the current CS violations.
The classes which extended Symfony\Component\Validator\Constraint were missing a PHPDoc comment of their properties, so I added the comment 'The message that will be shown when the constraint is violated.' on all of them.
Comment #24
mpauloComment #25
alexanderj commentedI will review it.
Comment #26
alexanderj commented@mpaulo I can't apply your patch, the error below is showing up for me when I try to apply the patch.
Comment #27
lucienchalom commentedI could apply and reroll patch #23, but there were a lot of new CS to clean.
attaching a new patch.
Could not create a interdiff because of the reroll on #23.
Also worked on version 2.2x-dev, as the most recent branch.
I only left one "Only string literals should be passed to t() where possible" on bookable_calendar.module I was not able to fix.
I hope the maintainers can look into it.
Comment #28
elberI will do a review
Comment #29
elberHi I rewiewed patch #27 for me it's good module keeps working as expected just one thing I added a possible suggestion for the error
Only string literals should be passed to t() where possibleplease revise.Comment #30
lucienchalom commentedYour addiction was great! thank you
I Reviewed again and the module works.
all the coding standards are fixed.
Thank you everyone!
RTBC +
Comment #31
josh.fabeanFixed in Bookable Calendar 3.0.0-rc1. Module classes now receive their runtime
dependencies through constructor or entity-handler injection. The 3.0 CI
configuration runs both Drupal and DrupalPractice PHPCS rules and currently
passes without `DrupalPractice.Objects.GlobalDrupal` warnings in classes.
AI-Generated: Yes (OpenAI Codex helped draft this project-maintenance update, which was verified against the Bookable Calendar 3.0 branch.)