Problem/Motivation
Splitting this off from #3303900: Remove PreApply check in PackagesInstalledWithComposerValidator
This is because the Update module will only fetch the Update XML for projects that are in the active codebase.
This problem doesn't make Automatic Updates Extensions unusable because you can still update projects as long as they don't add new dependencies that are Drupal projects. But it will be problem that Project Browser has to solve.
Proposed resolution
Move \Drupal\automatic_updates\ProjectInfo into package_manager
Then in the follow-up #3307163: Add the ability to ProjectInfo handle projects not in the active codebase, add the ability to get information about projects that are not in the active codebase.
This will probably involve making calls to via the Update module services. We should be careful that we don't accidently add these projects to the stored projects info that Update uses which could result in projects not currently installed being displayed on the Available Updates page that the Update module provides.
Remaining tasks
Issue fork automatic_updates-3303902
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
tedbowComment #3
tedbowComment #4
phenaproximaI think we might want to add, to Package Manager, the ability to scan for projects (not just extensions) in a given directory (we could do this by, for instance, instantiating new ModuleExtensionList and ThemeExtensionList objects).
Then, if my theory is correct, we can call
\Drupal\update\UpdateProcessorInterface::createFetchTask()to add them to the queue when we next callupdate_get_available(). Even if they're not installed or physically present in the code base.Thoughts?
Comment #5
dwwRe #4: Your theory sounds plausible. However, I'm not completely sure what happens when we fetch the requested projects -- would their histories and info get added to the giant Array of Everything, then start trying to appear on the available updates report, etc?
Comment #6
dwwUpon successful fetch, it's stuffed into
update_available_releasesvia theavailableReleasesTempStoreworld. However, so long as you don't mess with the\Drupal\update\UpdateManager::getProjects()logic, the available updates report shouldn't care, since it just means we'll have release history for more projects than we need for the report.Comment #8
tedbowJust starting to move the class and see what else needs to move
trying to figure out locally how to make the changes so we can get the update xml for a project that is not in the active codebase.
Comment #9
tedbowI have a working version now that gets the XML for project that is not currently installed. I think maybe we should change the scope of this issue though to just moving the class to Package Manager and then do a follow-up to make
ProjectInfowork for projects that aren't the code base too, now that we know there is way to get the info for new projects.Just moving the class and not changing the functionality would make the scope much smaller.
Comment #10
tedbowre #9
Comment #11
tedbowComment #12
tedbowComment #13
traviscarden commentedApproved. 👍
Comment #15
tedbowThanks everyone!
Comment #17
tedbow