silverstripe / sspak

Tool for managing bundles of db/assets from Silverstripe environments
http://silverstripe.github.io/sspak/
BSD 3-Clause "New" or "Revised" License
47 stars 34 forks source link

MNT Standardise modules #89

Open emteknetnz opened 2 years ago

emteknetnz commented 2 years ago

Issue https://github.com/silverstripeltd/product-issues/issues/570

CI for this PR is run on the creative-commoners org: https://github.com/creative-commoners/sspak/actions

GuySartorelli commented 2 years ago

At least one CI job has failed (in CI org)

emteknetnz commented 2 years ago

Note - closed previous PR because this required a non-standard CI file - should probably split to own card to add CI here

emteknetnz commented 2 years ago

Module is ancient, used tabs not spaces so every line was changed by phpcbf. Also used phpunit 3. Was built for CMS 3, not idea if this still functions correctly in CMS 4, particularly DatabaseConnector.php which has use DB - I don't know if this magically auto-maps to SilverStripe\ORM\DB. There is support for upddated static function names e.g. Both older getConn and newer get_conn should both work.

There's a very non-standard thing bin/build-phar which created sspak.phar and the intention was to regularly rebuild the sspak.phar. This I don't think this actually functions as the integration in travis looks broken, even though the build there is green.

I couldn't get SmokeTest.php to work as my local php.ini wouldn't let me create a phar when trying to run bin/build-phar

I've done some work around getting the PSR4 loader working, adding phpcs, getting phpunit9 working, adding ci.yml. However it feels very messy and incomplete and I've done zero manual testing. I'm not attached to anything here so I'm happy to throw this PR out and start again and just copy some bits from this PR

We'll need to spend some working out what we want to do here