I'm a little unexperienced with composer and I'm starting to use Github more and more. I'm a php developer and I an application to serve as a CMS/Backoffice of the websites I develop to my clients.
I'm using and HMVC framework and I wanted to know if its possible o deploy a module (a repository) in a specific folder with composer, and again with composer change some lines of code.
For example, I have this structure:
- app
-- modules
--- users
--- auth
-- index.php
-- configs.php
- public
-- assets
In this example, users and auth are booth a module. Imagine that I have this repository in rafaelmsantos/posts and want to deploy it on the modules folder. That part I guess is simple, or its difficult?
The second part is the following: imagine that in posts repository I have a class file like this:
<?php
// $this->route('posts', 'postsController->action');
class PostsController extends appController{
function action(){
somestuff();
}
}
And when I deploy the module, I want the composer to read this file and detect that comment above class declaration and insert it into config.php that is in same level that modules folder.
Is this possible too?
Let me know some good tutorials for composer or something. Thanks, in advance.