Comments

swatichouhan012 created an issue. See original summary.

swatichouhan012’s picture

Assigned: swatichouhan012 » Unassigned
Status: Active » Needs review
StatusFileSize
new2.66 KB

Kindly review patch.

Status: Needs review » Needs work

The last submitted patch, 2: 3118178-2.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

prabha1997’s picture

Assigned: Unassigned » prabha1997
prabha1997’s picture

StatusFileSize
new3 KB
new412 bytes

Kindly review patch

prabha1997’s picture

Assigned: prabha1997 » Unassigned
Status: Needs work » Needs review
andrey.troeglazov’s picture

StatusFileSize
new4.86 KB

EntityFormWizardBase extends FormWizardBase and renderer must be injected there too.

Status: Needs review » Needs work

The last submitted patch, 7: ctools_renderer-di-3118178-7.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

Kate.Y’s picture

Status: Needs work » Needs review
Issue tags: -VbContribution2020 +Drupal 9 compatibility, +epam-contrib
StatusFileSize
new6.36 KB

Implemented DI service'renderer', code styles checked.

Kate.Y’s picture

StatusFileSize
new6.84 KB
new8.97 KB

Implemented DI

andregp’s picture

Status: Needs review » Needs work
StatusFileSize
new36.77 KB
new115.24 KB

@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)
FormWizardInterface.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.
WizardFactory.php

andregp’s picture

Also, 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

andregp’s picture

StatusFileSize
new4.71 KB
new1.4 KB

To 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:27
CToolsWizardTest.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.

andregp’s picture

Status: Needs work » Needs review
andregp’s picture

Status: Needs review » Needs work
alanmoreira’s picture

Assigned: Unassigned » alanmoreira

I will work on this issue.

alanmoreira’s picture

Assigned: alanmoreira » Unassigned
Status: Needs work » Needs review

I fixed the failing tests problems with this new patch. I tried a different approach that was being used on the previews patches.

alanmoreira’s picture

StatusFileSize
new4.88 KB

Here is the patch file.

Status: Needs review » Needs work

The last submitted patch, 18: 3118178-18.patch, failed testing. View results

alanmoreira’s picture

  • japerry committed 78788f4 on 8.x-3.x
    Issue #3118178 by Kate.Yemelyanenka, andregp, prabha1997, alanmoreira,...
japerry’s picture

Status: Needs work » Fixed

  • japerry committed 79ae23f on 4.x
    Issue #3118178 by Kate.Yemelyanenka, andregp, prabha1997, alanmoreira,...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.