pressbooks / local-dev-environment

This repository uses Lando/Docker to provision a local instance of Pressbooks for testing and development by open source contributors.
1 stars 1 forks source link

Pressbooks Network Catalog missing composer dependencies #3

Closed greatislander closed 3 months ago

greatislander commented 4 months ago

@SteelWagstaff — I saw your earlier issue comment about how composer install needs to be run for Pressbooks Network Catalog. I'm not sure why this is; it shouldn't be a requirement as all dependencies should be installed via Bedrock. I'd be interested in looking into this further if it would be helpful.

SteelWagstaff commented 4 months ago

@greatislander thanks -- I think this issue may be resolved now, but I'm not 100% certain. Devs seemed to think it had to do with the composer.lock file in pressbooks/bedrock, which I then updated. Last time I went through clean install, I didn't get the composer install warning for the Pressbooks Network Catalog, at least.

If you start with clean install and do see the notice, then yes, it would be helpful to have help figuring out how to resolve this.

SteelWagstaff commented 4 months ago

@greatislander In our sprint review today a similar thing occurred with another new plugin our dev team created (pressbooks-multi-institution: https://github.com/pressbooks/pressbooks-multi-institution/). This makes me suspect it isn't a bedrock issue but has to do with the way they're handling autoloading in the two plugins, but I'm well outside my depth. Here's the relevant block in pressbooks-network-catalog: https://github.com/pressbooks/pressbooks-network-catalog/blob/b021e14d549e105399d277f88128bc579c82506f/pressbooks-network-catalog.php#L19-L31 that's returning the composer install message.

richard015ar commented 4 months ago

@greatislander This is a new approach that we have in our newer plugins. We'd like to improve it as soon as we have time. But we'd be happy to see if you have a proposal to fix this that we could consider for all our newer plugins and new ones. Maybe we'd need to work on the scaffold one.

SteelWagstaff commented 4 months ago

@greatislander I think the devs found that the issue with the new plugin was that required namespace was only being autoloaded in the autoload-dev section of the composer.json file: https://github.com/pressbooks/pressbooks-multi-institution/pull/80/files. I don't know what the issue with pressbooks-network-catalog still persists with the public bedrock and this repo. If it does, here's the difference in the composer.lock files for the the public bedrock used by this repo (on the left) and the private bedrock we use for production networks (on the right): https://www.diffchecker.com/S4AxNmF2/ in case that's helpful for further exploration. Main difference I see is whether the repo uses packagist.com or .org as the mirror source.

cmurtagh commented 3 months ago

Closing this in favour of https://github.com/pressbooks/private/issues/1390 which is a more generic approach.