Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Version 3.0.0 #3

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from
Draft

Version 3.0.0 #3

wants to merge 11 commits into from

Conversation

justinbeaty
Copy link
Contributor

@justinbeaty justinbeaty commented Dec 5, 2024

Ref: MahoCommerce/maho#63

  • Changed namespace from Maho\MahoAutoload to Maho\ComposerPlugin\AutoloadRuntime etc.

  • AutoloadRuntime::getInstalledPackages() now also includes the root package (i.e. child project). This simplifies a lot code in Maho.

  • AutoloadRuntime::globPackages() is a nice new function to find files by pattern in all maho / module packages.

  • Technically it supports installing multiple packages of type "maho-source", but I'm not really sure the use-case. Maybe a package that contained several old deprecated modules or something...

  • Builds paths during composer dump to avoid filesystem lookups in production.

  • Modman support

  • Passes PHPStan at level 10 with strict rules!

  • I put the license as BSD MIT as there was no license before. Can change to whatever, but a permissive license could offer more flexibility.

@justinbeaty justinbeaty marked this pull request as draft December 5, 2024 22:25
stubs/composer.stub Outdated Show resolved Hide resolved
LICENSE.txt Outdated Show resolved Hide resolved
LICENSE.txt Show resolved Hide resolved
@justinbeaty
Copy link
Contributor Author

I'm just tracking down a bug in Composer now. While you can have multiple PluginInterface classes defined in composer.json, there's actually a bug when the number of them decreases during a composer install or composer upgrade.

It only causes a problem when going from this v 3.0.0 back to the v 2.x.x releases, and running composer install again fixes it, but I still don't like it.

@fballiano
Copy link
Contributor

no worries, you tell me and I'll merge

@justinbeaty
Copy link
Contributor Author

no worries, you tell me and I'll merge

Let's make sure MahoCommerce/maho#63 is fully reviewed first. I pushed a couple of bug fixes there, but otherwise I've tested it pretty thoroughly and it's ready for review if you want to clone it. Just make sure to run composer install once you switch to that branch so you pull in this version of the plugin.

Also I want to see any feedback on composer/composer#12226 which fixes the issue I had. If for some reason it's a wontfix then I may make some changes here to avoid any problems in the future. Basically it boils down to you can't remove a PluginInterface once it's been defined in composer.json without causing problems on the first composer install after upgrading the plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants