Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Issue #2595263: Remodel packages as objects introduced a problem on creating a Bundled feature.
Errors log:
Fatal error: Cannot use object of type Drupal\features\Package as array in features/src/FeaturesGenerator.php on line 156.
Comment | File | Size | Author |
---|---|---|---|
#6 | interdiff.txt | 1.55 KB | dawehner |
#6 | 2638148-6.patch | 2.13 KB | dawehner |
|
Comments
Comment #2
mkhamash CreditAttribution: mkhamash as a volunteer commentedInitial attempt to solve the problem.
Comment #3
dawehnerIt would be nice if we have a test for this bugfix.
Comment #4
dawehnerThank you for the fix!
Comment #5
mkhamash CreditAttribution: mkhamash as a volunteer commentedFIx error "Call to a member function appendFile" on initializing a bundle for an existing profile the first time.
We need to check if we still needs this code for add files from the 'standard' install profile (ASSIGNMENT METHOD PROFILE).
@dawehner I think certainly we need a test for it, though I am not that good with writing tests so hope someone could write more tests for features.
Comment #6
dawehnerThe second fix seems to be for me a total unrelated issues/bugfix, isn't it?
Btw, initPackage returns the new package as well so you could assign it directly.
Here is a test for the first fix :)
Comment #7
mkhamash CreditAttribution: mkhamash as a volunteer commentedYes the second one is technically not related, but initially I thought there would be a lot more problems from code introduced in issue #2595263: Remodel packages as objects, and thought to collect them in one ticket, but unexpectedly there was not that much problems.
I will open a new issue for it anyway, to keep things organized.
Comment #8
dawehnerThank you!
Committed the fix + test in the meantime. See you in the other issue
Comment #10
mkhamash CreditAttribution: mkhamash as a volunteer commented@dawehner I think you have committed the patch in #5 for both issues and without the test you wrote.
Comment #12
dawehner@mkhamash
Thank you for mentioning it. Reverted the patch in #5 and committed #6, so we still need the other issue, sorry. Tests would be always nice :)