Closed (fixed)
Project:
Drupal core
Version:
8.9.x-dev
Component:
other
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
23 Oct 2016 at 16:37 UTC
Updated:
2 Mar 2023 at 15:48 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
lomasr commentedAdded a patch for core field type modules.Please review thanks.
Comment #3
lomasr commentedComment #4
lomasr commentedtypo error. adding the patch again.
Comment #6
Andy_D commentedWill review
Comment #7
Andy_D commentedPatch applies fine. I did a quick search of the core modules folder and found 151 matches in 142 files so there must be similar issues for other modules. Will scan the queue and raise issues as applicable. https://www.drupal.org/node/1935708 should probably be updated in line with this issue too.
Comment #8
alexpottIf we do this ewe do this all in one go. Doing this per module is against the scoping advice. See https://www.drupal.org/core/scope for guidelines and examples for Drupal core issue scope.
Comment #9
Andy_D commented@alexpott: no problem, I am happy to apply this to all core modules. Are you happy with reviewing 142 patch files?
Comment #10
alexpott@Andy_D it would be good to have some idea of what we gain. One thing I can see is a good example but when the dependency is inside the same project the project part is not required. This information is primarily for testbot to sort out dependencies.
Comment #11
Andy_D commentedRe-rolled patch to encompass all relevant modules. Note: I have ignored tests and sub-modules.
Comment #12
Andy_D commentedWell that didn't go well. SimplyTest.Me couldn't even build due to missing dependencies on profiles. Removed and re-rolled patch.
Comment #13
Andy_D commentedComment #14
Andy_D commentedComment #15
alexpottWe'd have to do all the test modules too.
Comment #17
Andy_D commentedRe-re-rolling as I have all set-up, ready to go.
Comment #18
Andy_D commentedTry this bad boy!
Comment #19
Andy_D commentedComment #20
Andy_D commentedHiding previous patches
Comment #21
sophie.skPatch applies cleanly. Tested by enabling some of the changed modules (forum, content moderation) and they both enabled and configured correctly.
Marking as RTBC again.
Comment #22
alexpott@Andy_D can you relate the coder issue to this one. We need to postpone on getting that done and agreed. So if we do this we don't introduce regressions.
Comment #23
Andy_D commented@alexpott Issue added as requested. Thanks again for your help on this.
Comment #24
alexpottSo until #2842706: Add a test for dependencies for *.info.yml files. in added to coder we can't really do this because it will be super simple to regress.
Comment #26
mtodor commentedOne consideration. *.info.yml files for profiles should be adjusted too.
When I run code sniffer provided in #2842706: Add a test for dependencies for *.info.yml files. I get following issue:
When I try (just for first module) to set prefix I get following error during installation:
I don't know is there already issue for that or it should be solved here.
Comment #27
mile23#2842706: Add a test for dependencies for *.info.yml files. is marked fixed.
Comment #28
andypostThat does not work for profiles, so filed
- #2855026-12: Installation profiles do not support project:module format for dependencies
- #2857856: Allow not namespaced dependencies in theme info YAML files
Comment #29
Lal_Rerolled and works perfectly on 8.4.x
Comment #30
Lal_Comment #31
kporras07 commentedI'm not sure how to test this. I applied the patch and reinstalled site and it works. If my testing is ok, this could be marked as RTBC.
Comment #32
andypostI prefer issues in #28 solved first
Comment #36
afi13 commentedhttps://www.drupal.org/project/drupal/issues/2855026 is commited, so we can continue.
Comment #37
anya_m commentedRerolled for 8.7.x
Comment #38
pazhyn commentedComment #39
andypostGood to go, only sniffers issue from #28 needs to be committed
Comment #40
alexpottI would still argue that we need the coding standards issues to land so we can enable the rule in core in this issue.
Comment #44
ravi.shankar commentedHere is re-roll of patch #37
Comment #45
bbombachiniThe patch applied evenly and it's working as expected. Moving to reviewed.
Comment #46
bbombachiniComment #47
mile23#2842706: Add a test for dependencies for *.info.yml files. is marked fixed and added to the 8.x-3.x branch in January of 2017, but that sniff is not present in coder 3.7, released December 2019.
So we can't add it to phpcs.xml.dist, per #40.
Is it maybe a victim of that time someone deleted the github for Coder?
Comment #48
mile23Turns out the sniff was moved in #2854781: NamespacedDependencySniff can have false positives for custom modules.
So we need to add the DrupalPractice.InfoFiles.NamespacedDependency sniff to core.phpcs.yml in order to prevent regressions, per #40.
Comment #49
tapaswini sahoo commentedComment #50
tapaswini sahoo commentedComment #51
jungleEdited: Sorry, self-referenced
Comment #52
jungleDuplicate with #3116077: All dependencies must be prefixed with the project name, which one to close?
Comment #53
jungleJust closed #3116077: All dependencies must be prefixed with the project name as this one was filed earlier. Even though both expanded the scope in the middle. Changing the title to meet the scope.
Comment #54
jungleWould be great having a new patch combining the patch from #3116077 and here for further review. For this purpose, adding a Needs reroll tag
Comment #55
leolandotan commentedI'm working on re-rolling this issue at Drupal Camp Manila 2020.
Comment #56
leolandotan commentedI could apply the latest patch cleanly against the latest 8.9.x codebase, so no reroll is needed. Removing the Needs reroll tag.
Hope everything is in order.
Thank you!
Comment #58
bbombachiniRe-rolled patch for 9.1.x
Comment #59
shaktikPatch #58 LGTM + 1 RTBC
Comment #60
jhodgdonThis patch is not correct. Something happened... The patch in #29 was correct. The "reroll" in #37, and all the patches since then, are incorrect.
The project should be "drupal" everywhere, not things like
Comment #61
jungleLet's start with a newer patch from the duplicate issue #3116077, comment #18, by @vsujeetkumar. Just renamed the patch and reuploading here.
Comment #62
jungleThe phpcs snifif existed is
DrupalPractice.InfoFiles.NamespacedDependencyprobably.Comment #63
jungleRerolled from #61 partially, -- dropped conflicts.
Comment #64
nikitagupta commentedRe-rolled patch for 9.1.x
Comment #65
nikitagupta commentedComment #66
shaktikComment #67
nikitagupta commentedComment #68
nikitagupta commentedas per as drupal naming convention https://www.drupal.org/docs/8/creating-custom-modules/let-drupal-8-know-... dependencies should be like {module}:{submodule}.in case of failed test cases "Failed asserting that exception of type "Drupal\Core\Extension\ModuleUninstallValidatorException" is thrown." array return project name and module name for the installation of the module, but test cases work only on the name.
Comment #69
nikitagupta commentedComment #70
Rkumar commentedI am not able to understand what's h going on here.
The huge differences between the sizes of the patch. As the title mentioned it should for all info.yml.
Please help me to understand the journey from #29 to #68
Comment #71
jungleRe #70 changing the title that it's enough to make sense to you, I think, and 2821499-71-test-only.patch will show you how many to fix.
I do not think an interdiff is necessary, so ignored on purpose.
Comment #76
alexpottCrediting the people who worked on #3116077: All dependencies must be prefixed with the project name
Comment #77
longwavePatch looks good, 21 issues in the test-only patch, all fixed in the green patch.
Comment #78
xjmSaving issue credit for reviewers. #37 and #44 weren't correct -- please make sure to understand the goal of the issue before submitting a patch. :) Thanks to everyone who took the time to try and understand this issue and sorry that it was confusing!
Comment #80
xjmMore credits from the other issue.
Comment #83
xjmIt looks like most of the non-test modules as well as plenty of test modules were addressed in #2798891: Define project dependencies in core module .info files, and just these few were either missed or have crept in since. It's a good thing we have the coder rule now for that reason.
Committed to 9.1.x and cherry-picked to 9.0.x. I ran
composer run phpcs -- -pagainst both branches to ensure they were passing with the new rule.The patch did not cherry-pick cleanly to 8.9.x, so needs a backport.
Comment #84
xjmComment #85
jungleOn it, thanks for the RTBC @longwave, and thanks for committing @xjm!
Comment #86
jungleA test only patch first
Comment #87
jungle22 to fix from #86
Comment #88
jungleThe sniff is available in 8.8.x, the coder version locked is 8.3.6 -- not the latest, If it's necessary to backport this to 8.8.x, I am happy to make a new patch. But I will not do it without approval.
Comment #89
jungleAnother random failure? Requeued.
Comment #91
jungleFixing the test.
Comment #92
quietone commentedSince Bugfix support for Drupal 8.9.x is restricted to selected low-disruption major and critical bug-fixes and this was comitted to Drupal 9, changing status to Fixed.
Comment #93
alexpottComment #95
jonathan1055 commentedSetting parent as this commit added a DrupalPractice sniff to phpcs.xml.dist