Answer the question
In order to leave comments, you need to log in
How to include files from a GitHub repository?
Good day!
I am engaged in finalizing the CRM system for various clients, and in the course of work I have designed various integrations of this CRM with other systems in the form of PHP files on GitHub. Repository - ClientbasePro/Integrations . I write a separate file for each integration. For example, a separate file for integration with Yandex.Telephony YandexTelephonyFunctions.php, a separate file for integration with the SMS service IQSMSFunctions.php, etc. All files are located in this one repository.
I connect clients like this: on hosting / VPS I create a ClientbasePro folder, I put the composer.json file in it with the following content
{
"require": {
"php":">=5.3.0",
"ClientbasePro/Integrations":"dev-master"
},
"repositories":[
{
"type":"git",
"url":"https://github.com/ClientbasePro/Integrations"
}
]
}
require 'ClientbasePro/vendor/autoload.php';
Answer the question
In order to leave comments, you need to log in
create different branches? one for you, another/other for clients? The branch name contains the meaning of the plug-in. This is the simplest option + .gitignore
More complex - using submodule
ps
you have only one master branch -> this is not good. Be sure to share. You can do this:
branch:
1) dev - development, new features, bug fixes, new version of the product
2) master or release1-> main production branch
3) IQSMS + release1/dev
4) YandexTelephony + release1/dev
I would suggest that you regulate the connection of the necessary modules with a config file for each client. The config file can be called some client-specific name, something like: client_muha.cfg.php, client_slon.cfg.php
And I would suggest doing the organization of the branch space in Git more traditionally, for example, according to the Git Workflow principle .
while setting up .gitignore, synchronization broke (
[RuntimeException]
Source directory /var/www/html/ais/include/ClientbasePro/vendor/ClientbasePro/Integrations has uncommitted changes
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question