How to pull Edge module into DEVELOPMENT environment?

doing some development work and bugfixes, and I have been following this doc: https://wiki.freepbx.org/display/FOP/Setting+up+a+Development+environment+from+the+FreePBX+Distro

however, at one point you enable Developer mode.
this disables fwconsole ma upgradeall --edge

so, how would I go about pulling the latest edge module into my Dev environment so that I can unit test it and continue developing?

Thank you in advance!

https://wiki.freepbx.org/display/FOP/Setting+up+a+Development+environment+from+the+FreePBX+Distro#SettingupaDevelopmentenvironmentfromtheFreePBXDistro-UpdatingallmodulesfromGIT

gets the latest code from whatever branch you are working on, so if you are working on branch 16.0, you would get the latest which is edge.

that appears to introduce a breaking change / Diff?

[core]# ../../devtools/phpunit.php 
PHP Parse error:  syntax error, unexpected '<<' (T_SL) in /usr/src/freepbx/core/utests/API/CoreExtensionGQLTest.php on line 818
PHP Stack trace:
PHP   1. {main}() /usr/src/devtools/binaries/phpunit-5.7.21.phar:0
PHP   2. PHPUnit_TextUI_Command::main() /usr/src/devtools/binaries/phpunit-5.7.21.phar:588
PHP   3. PHPUnit_TextUI_Command->run() phar:///usr/src/devtools/binaries/phpunit-5.7.21.phar/phpunit/TextUI/Command.php:116
PHP   4. PHPUnit_Runner_BaseTestRunner->getTest() phar:///usr/src/devtools/binaries/phpunit-5.7.21.phar/phpunit/TextUI/Command.php:139
PHP   5. PHPUnit_Framework_TestSuite->addTestFiles() phar:///usr/src/devtools/binaries/phpunit-5.7.21.phar/phpunit/Runner/BaseTestRunner.php:57
PHP   6. PHPUnit_Framework_TestSuite->addTestFile() phar:///usr/src/devtools/binaries/phpunit-5.7.21.phar/phpunit/Framework/TestSuite.php:382
PHP   7. PHPUnit_Util_Fileloader::checkAndLoad() phar:///usr/src/devtools/binaries/phpunit-5.7.21.phar/phpunit/Framework/TestSuite.php:310
PHP   8. PHPUnit_Util_Fileloader::load() phar:///usr/src/devtools/binaries/phpunit-5.7.21.phar/phpunit/Util/Fileloader.php:36

it looks like its causing issues with changed files, such as the Unit test file:

>>>>>>> Stashed changes

                $json = (string)$response->getBody();

                //validate the resoponse
                $this->assertEquals('{"data":{"fetchExtension":{"extensionId":"909000140","user":{"name":"api test","outboundCid":"12345678901","password":"","extPassword":"' . $deviceSettings['secret']['value'] . '"}}}}', $json);
<<<<<<< Updated upstream
=======

//                $this->assertEquals('{"data":{"fetchExtension":{"extensionId":"909000140","user":{"name":"api test","outboundCid":"12345678901","password":"","sipsecret":"' . $deviceSettings['secret']['value'] . '"}}}}', $json);

Well, you’re doing development. Fix it. :slight_smile:

1 Like

dont threaten me with a good time!

okay. so.
it seems the steps that work for me are NOT what is listed in that doc.


rm -rf /usr/src/freepbx
rm -rf /usr/src/devtools
echo "repo_directory=/usr/src/freepbx" >> ~/.freepbxconfig
cd /usr/src
git clone https://git.freepbx.org/scm/freepbx/devtools.git
cd /usr/src/devtools
./freepbx_git.php --setup --mode=ssh --switch=release/15.0 --keys=freepbx

@kgupta1 or @mbrooks, is there a chance one of you could consider the above and update the guide:
Sangoma Documentation ?

it seems you just get Git conflict notes if you follow the official steps.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.