I'm running it locally like this....
Code: Select all
php src/EPV.php run --dir=/Applications/MAMP/htdocs/glacier/ext/glacierparkchat/glaciermenuinclude
I first thought my Packaging Structure error was due to something I configured incorrectly.. I'm hoping it still is although looking at it further, I'm not sure if I can get anything to pass.
Here's my output with some variable debugs added in to help me see what's happening... (You can ignore the warnings from the Eclipse project files for now)
Code: Select all
Test results for extension:
Warning: Can't detect the file type for .buildpath, handling it as a binary file.
Warning: Can't detect the file type for .project, handling it as a binary file.
Warning: Can't detect the file type for org.eclipse.core.resources.prefs, handling it as a binary file.
Warning: Can't detect the file type for org.eclipse.php.core.prefs, handling it as a binary file.
$this->namespace = glacierparkchat/glaciermenuinclude
$this->opendir = /Applications/MAMP/htdocs/glacier/ext/glacierparkchat/glaciermenuinclude
$dir = /Applications/MAMP/htdocs/glacier/ext/glacierparkchat/glaciermenuinclude/composer.json
$dir = /Applications/MAMP/htdocs/glacier/ext/glacierparkchat/glaciermenuinclude/composer.json
$sp = /Applications/MAMP/htdocs/glacier/ext/glacierparkchat/glaciermenuinclude/composer.json
$sp = /composer.json
$sp =
$sp =
Error: C) Packaging structure doesn't meet the extension DB policies.
Expected: glacierparkchat/glaciermenuinclude
Got:
Here's the EPV/src/Tests/Tests/epv_test_validate_directory_structure.php code with my added debugs around original lines 75-84 being the area of interest. I think line 76 in particular. The double str_replace. (It's a little messy with the added debugs)
Code: Select all
$this->output->addMessage(Output::DEBUG,sprintf("\$this->namespace = " . $this->namespace));
$this->output->addMessage(Output::DEBUG,sprintf("\$this->opendir = " . $this->opendir));
$this->output->addMessage(Output::DEBUG,sprintf("\$dir = " . $dir));
$sp = str_replace('\\', '/', $dir);
$this->output->addMessage(Output::DEBUG,sprintf("\$dir = " . $dir));
$this->output->addMessage(Output::DEBUG,sprintf("\$sp = " . $sp));
$sp = str_replace(str_replace('\\', '/', $this->opendir), '', $sp);
$this->output->addMessage(Output::DEBUG,sprintf("\$sp = " . $sp));
$sp = str_replace('/composer.json', '', $sp);
$this->output->addMessage(Output::DEBUG,sprintf("\$sp = " . $sp));
if (!empty($sp) && $sp[0] == '/')
{
$this->output->addMessage(Output::DEBUG,sprintf("\$sp !empty = " . !empty($sp)));
// for some reason, there is a extra / on at least OS X
$sp = substr($sp, 1, strlen($sp));
}
$this->output->addMessage(Output::DEBUG,sprintf("\$sp = " . $sp));
if ($this->namespace != $sp)
{
$this->output->addMessage(Output::ERROR,
sprintf("Packaging structure doesn't meet the extension DB policies.\nExpected: %s\nGot: %s",
$this->namespace, $sp));
}
It looks like its goal is to compare $sp with $this->namespace in hopes that they match, but line 76 in the original code looks like it will always make sure they don't by replacing $this->opendir with '' in the double str_replace call for $sp. It seems to make sure that $sp ends up as a blank string in the end which will never match $this->namespace, unless I'm running it incorrectly, which is quite possible.
Any chance I'm doing that wrong perhaps? I'm hoping so, as I don't think I can get anything through that check.
Thanks!
Cheers!