php-database-migration icon indicating copy to clipboard operation
php-database-migration copied to clipboard

database name as option, som small improvements

Open elgaard opened this issue 6 years ago • 7 comments

We need this for testing scripts that copy and create databases on the fly, so that we do not have to create environment files each time.

elgaard avatar Mar 22 '19 14:03 elgaard

Hi Elgaard, thank you for contributing.

Can you please make sure that your code follow the PSR2 standard, I have updated the master branch fo comes with some dev utilities such as docker and phpcs to help contributors, a well as a guideline for contributors.

Please merge back master to your code and make sure:

  • the code strictly follow PSR2 coding standards, you can run bin/phpcs --standard=PSR2 Migrate/ to verify.
  • any feature/option addition is covered by a unit test.

Thank you.

alwex avatar Mar 22 '19 23:03 alwex

It now follows PSR2 and have unit tests. I added a check for the sqlite driver in the test script, because i spent some time on it before I realized that phpunit failed because of a missing driver.

elgaard avatar Apr 02 '19 15:04 elgaard

Just a few formatting issues remains :)

alwex avatar Apr 03 '19 00:04 alwex

Can you give me a hint about the formatting.

elgaard avatar Apr 03 '19 12:04 elgaard

I have commented on your code, but globally, it is about adding space around operators and removing extra blank lines, eg:

$dbname=$input->getOption('driver'); should be $dbname = $input->getOption('driver'); $currentDate = date('Y-m-d H:i:s',$time0); should be $currentDate = date('Y-m-d H:i:s', $time0);

which are formatting rules not covered by PSR2: https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md#7-conclusion

alwex avatar Apr 04 '19 20:04 alwex

I tried to to fix formatting issues

elgaard avatar Apr 08 '19 12:04 elgaard

Are there still issues?

elgaard avatar Jul 05 '19 13:07 elgaard