| Comment | File | Size | Author |
|---|---|---|---|
| #18 | 3118178-18.patch | 4.88 KB | alanmoreira |
| #13 | diff_3118178_7-13.txt | 1.4 KB | andregp |
| #13 | 3118178-13.patch | 4.71 KB | andregp |
| #11 | WizardFactory.png | 115.24 KB | andregp |
| #11 | FormWizardInterface.png | 36.77 KB | andregp |
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | 3118178-18.patch | 4.88 KB | alanmoreira |
| #13 | diff_3118178_7-13.txt | 1.4 KB | andregp |
| #13 | 3118178-13.patch | 4.71 KB | andregp |
| #11 | WizardFactory.png | 115.24 KB | andregp |
| #11 | FormWizardInterface.png | 36.77 KB | andregp |
Comments
Comment #2
swatichouhan012 commentedKindly review patch.
Comment #4
prabha1997 commentedComment #5
prabha1997 commentedKindly review patch
Comment #6
prabha1997 commentedComment #7
andrey.troeglazov commentedEntityFormWizardBase extends FormWizardBase and renderer must be injected there too.
Comment #9
Kate.Y commentedImplemented DI service'renderer', code styles checked.
Comment #10
Kate.Y commentedImplemented DI
Comment #11
andregp commented@Kate.Yemelyanenka Your patch applies perfectly. But, I noticed you removed the method

getParameters()even though FormWizardBase implements FormWizardInterface which includes this method, so it should be kept or it should also be removed from the interface. (https://www.php.net/manual/en/language.oop5.interfaces.php)Apparently, removing this method completely would affect the WisardFactory class too, so, or we change the createWisard() method to work without getParameters(), or we keep and change getParameters() on FormWisardBase to work without the "\Drupal::" calls.

Comment #12
andregp commentedAlso, EntityFormWizardBase extends FormWizardBase so its constructor parameters may be affected by the changes made on the FormWizardBase's constructor parameters too.Sorry, @andrey.troeglazov already pointed that on comment #7
Comment #13
andregp commentedTo be honest, imho, patch #7 (that is based on patch #2) is the closest to the issue resolution. It is simple and focus on the issue's scope. There are just some inverted parameters (which I fixed on this patch).
The only thing I don't understand is why both #7 and #2 got almost the same errors on the tests.
Exception: TypeError: Argument 7 passed to Drupal\ctools\Wizard\FormWizardBase::__construct() must implement interface Drupal\Core\Render\RendererInterface, string given...
/var/www/html/modules/contrib/ctools/tests/src/Functional/CToolsWizardTest.php:27CToolsWizardTest.php line 27 is
$this->drupalGet('ctools/wizard');. It isn't giving any parameter so why changing the parameters on the __construct() function return these errors? If the test is dynamic shouldn't it work okay even with this change? Or are the test's parameters hard-coded?I'm new to Drupal and haven't learned about how these tests work yet, so any explanation/clarification is welcome.
Comment #14
andregp commentedComment #15
andregp commentedComment #16
alanmoreira commentedI will work on this issue.
Comment #17
alanmoreira commentedI fixed the failing tests problems with this new patch. I tried a different approach that was being used on the previews patches.
Comment #18
alanmoreira commentedHere is the patch file.
Comment #20
alanmoreira commentedThe test failures on the patch #18 can be related to this issue -> Issue #3292191 - setUp-Method in Test CToolsViewsBasicViewBlockTest fails due to new parent signature in D9.4
Comment #22
japerry