Repository navigation
README: Composer install through a vcs repository until the Packagist listing - #7
Conversation
… listing The package is not on Packagist yet, so the bare composer require in the README failed. Document the vcs repository entry with no-api set, which installs without a GitHub token, and say the listing is pending. Fixes #5
|
Review by Grok Bot (Indian Opinion QA agent) Tested at head Fixes: #5. The README's Composer install now works while the package is not on Packagist. What I checked
ReviewNothing blocking. The documented commands do what the README says. Automated checks (this head vs current main)
I'm Grok Bot, the automated QA agent for Indian Opinion. This is a comment-only review. I don't approve, request changes or merge. Local stack: PHP 8.4.28, Composer 2.11.3, MariaDB 11.8.9, Node 24.22.1, WordPress 7.1.5. |
A plain composer require left the plugin in vendor/, where WordPress never loads it, because the package does not require composer/installers. The README now allows and requires composer/installers, sets installer-paths when composer.json is not in the WordPress root, shows the resulting composer.json, and says git is needed for the no-api repository entry. CHANGELOG: the new Fixed heading had been inserted above the "Ideas under consideration" list, so the roadmap read as part of Fixed. The list is back directly under Unreleased, with Fixed after it. Refs #5
|
Follow-up review by Grok Bot (Indian Opinion QA agent) Retested at head What changed since my last review
What I reran
ReviewNothing blocking. The documented commands do what the README says. I'm Grok Bot, the automated QA agent for Indian Opinion. This is a comment-only review. I don't approve, request changes or merge. Local stack: PHP 8.4.28, Composer 2.11.3, MariaDB 11.8.9, Node 24.22.1, WordPress 7.1.5. |
Problem
The README's Composer line,
composer require indianopinion/gen-queue, fails with "Could not find a matching version of package indianopinion/gen-queue", because the package is not on Packagist. The README did not say so. Even with a repository added, a plaincomposer requireleaves the plugin invendor/indianopinion/gen-queue/, where WordPress never loads it: the package type iswordpress-plugin, but the package does not requirecomposer/installers, so "installers place it in your plugins folder" was true only for projects that already had it.Root cause
Submitting the package to Packagist is a maintainer step that has not been done yet. The README was written as if it had, and as if every project already used
composer/installers.Change
README, "With Composer", now gives four commands:
composer config repositories.gen-queue '{"type": "vcs", "url": "https://github.com/IndianOpinion/gen-queue", "no-api": true}': Composer reads the repository with git over HTTPS instead of the GitHub API, so no GitHub token is needed. The README says the machine needsgit.composer config allow-plugins.composer/installers true: Composer 2.2 and later refuse to run a plugin thatallow-pluginsdoes not list.composer require composer/installerscomposer require indianopinion/gen-queueIt also gives the
extra.installer-pathscommand for a project whosecomposer.jsonis not in the WordPress root, says it must be set before the plugin is required, notes that Bedrock-style projects need only the first and last commands, and shows the resultingcomposer.json(copied from the proof run below). The plugin has no runtime Composer dependencies (onlyphp >=8.1) and loads its own classes throughautoload.php, so no other repository entry is needed.CHANGELOG under Unreleased, Fixed, reworded to match. The first version of this PR inserted the
### Fixedheading above the "Ideas under consideration, not promises" list, so the roadmap read as part of Fixed; the list is back directly under## [Unreleased], with### Fixedafter it.The without-Composer install is unchanged.
How it was tested
Composer 2.11.2, PHP 8.3.6. The commands were extracted verbatim from the README's
shblocks and run in a new empty directory aftercomposer init --name=example/site --no-interaction, with a scratchHOMEandCOMPOSER_HOME, no GitHub token, noauth.json, git's global and system config hidden (so no credential helper), and stdin closed. Every command exited 0.composer.jsonin the WordPress root./wp-content/plugins/gen-queue/gen-queue.phpcomposer.jsonabove WordPress inweb/,installer-pathsset before the require./web/wp-content/plugins/gen-queue/gen-queue.phpBoth installed v0.1.0. In the first layout the resulting
composer.jsonmatches the one in the README apart from thenamelinecomposer initwrote.Earlier on this PR:
echo '{}' > composer.json && composer require indianopinion/gen-queuefailed with "Could not find a matching version of package indianopinion/gen-queue" (the issue, reproduced), andvendor/bin/phpunit(165 tests, 10 integration tests skipped without a database),vendor/bin/phpcsandvendor/bin/phpstanwere clean.composer validatepasses on the latest commit, which changes only Markdown.Not verified: activating the plugin in a real WordPress install from either path, and Composer versions older than 2.11.2.
Owner decision
Should the package require
composer/installersitself? Adding"composer/installers": "^2.0"to this package'srequirewould make the plugin land in the plugins folder without the reader adding it. Not done here because it changes every existing install: it adds a dependency to every project that requires the package, and Composer still refuses to run it until each project lists it inallow-plugins, so a project that has not would see its nextcomposer updatestop in CI. The README steps work either way. Recommendation: add it in its own PR together with the Packagist listing, with a CHANGELOG note under Changed, and keep theallow-pluginsline in the README.For the reviewer
The Packagist submission itself, with the GitHub webhook so tags publish, is still open for a maintainer. When it is done, the README can drop the pending sentence and the
repositoriesentry. Packages that integrate with gen-queue and list it as a Composer dependency will need the same entry in their users' rootcomposer.json, since Composer readsrepositoriesonly from the root.Fixes #5