Closed mjordan closed 7 years ago
Works as described. While testing this branch, I noticed that changing https://github.com/MarcusBarnes/mik/blob/master/extras/scripts/samplecontentgenerator/generate.php#L16 to
use \Commando\Commando;
resolved the PHP Warning I was getting on my system (despite the script creating proper output). @mjordan Would you check if this change has any detrimental affect on your system and if not, would you roll it into this pull-request for me to merge? Thank you in advance.
After reading this documentation http://php.net/manual/en/language.namespaces.importing.php, I believe we should be able to delete the use
lines since we are not using namespace aliases elsewhere in generate.php
. I've done a quick test on my machine and the script still produces the same output with no notices, warnings or errors. @mjordan If you're able, would you please confirm that the script still works as expected after commenting out lines 16 and 17 of generate.php? Note that you'll need to clear the contents of the output directory if you run the script multiple times using the same output directory.
Thanks for the careful review @MarcusBarnes. I will test this afternoon.
generate.php works fine wit lines 16 and 17 commented out. I'll push an update. Thanks!
Github issue: (#397)
393 is also relevant.
What does this Pull Request do?
Adds the ability to generate sample MIK configurations and input data for CSV compound, CSV books, and CVS newspaper issues.
What's new?
Just completing work started in PR #395.
How should this be tested?
This PR needs to be tested using a smoke test. There are no PHPUnit tests for this PR. To test it, for each of the content models, run
generate.php
from within the MIK directory and runtree
on the output directory:mik>php extras/scripts/samplecontentgenerator/generate.php -id single-test /tmp/single
mik>php extras/scripts/samplecontentgenerator/generate.php -m compound -id compound-test /tmp/compound
Note that /tmp/compound/compound-test.ini contains the required compound_directory_field, child_title, metadata_filename, and child_key settings.
mik>php extras/scripts/samplecontentgenerator/generate.php -m books -id book-test /tmp/books
mik>php extras/scripts/samplecontentgenerator/generate.php -m newspapers -id newspapers-test /tmp/newspapers
Interested parties
@MarcusBarnes