makinacorpus / DbToolsBundle

A PHP library to backup, restore and anonymize databases
https://dbtoolsbundle.readthedocs.io
MIT License
181 stars 15 forks source link

Better discoverability for packs #165

Closed pounard closed 5 months ago

pounard commented 5 months ago

Today, we have packs, and there is, in my opinion, and hard to maintain piece of code that looks up in the vendor directory for all packages that are packs.

I can see many problems with this:

What I propose:

Some random notes:

I'm going to open a PR for this right now.

pounard commented 5 months ago

Lots of ideas for not that much to do in the end.

Planned fixes:

It's hard to get rid of \get_declared_classes() but we can, at least, condition it to the existence of packs. It will be later very useful if we release a phar archive, the user can then simply drop its custom anonymizers in a random path and will not even need an autoloader.