To allow multiple users in the same team to work on the same project, PHPMaker supports sharing your projects on the GitHub system so that the team users can retrieve, update and synchronize the projects from GitHub after changes.
If you have not registered an account with GitHub yet, you need to register first then you can create a repository for your project. Please refer to the following links on:
To understand more on how GitHub works and the basic concepts of Git and GitHub, read:
After your have your GitHub account and repository in place, click Advanced Settings and enter the following advanced settings for your project:
When you first save the project after enabling Git repo URL, you will be prompted to enter a Team Encryption Key:
This key is only saved in Window registry, you should share this key with other users of your team so that they can decrypt and sync their local projects with the repo. DO NOT store the Team Encryption Key in the repo.
For each save of the project, a commit is created for the repository. You can view the list of commits for the project by clicking Project -> History. If you want to add more meaningful message for each save, you can enable the advanced setting Prompt for Git commit message (see above), then you will be prompted for a message on each save.
After saving the project, you need to update your changes to GitHub so that other team members can download the changes. You will also see the changes not yet synchronized at the left hand corner of the UI. The simplest option is just to sync the project to GitHub by clicking Git -> Sync.
There are also a few options you can use. Make sure that you understand the meaning of each command before using:
For more detailed description for Git commands, please refer to Git Handbook.
Handling Conflicts
To avoid conflicts between team users, it is recommended that team users work on different section of the project file so conflicts will not occur. For example,
However, it is still inevitable that different users working on the same project will make changes that are conflicting with each other, they may encounter the following error messages when performing synchronization to the GitHub repository.
In such case, write down the repository name in the message and close the project first without saving.
PHPMaker does not have built-in GUI to handle merge conflicts, you need to use a third party tool, for example, Visual Studio Code, to do it. If you have not installed Visual Studio Code yet, download and install first.
Then open Visual Studio code, click File -> Open Folder... to open the repository of the project, e.g. C:\Users\<user>\Documents\PHPMaker\Repositories\<repository_name>.
Merge conflicts are recognized by Visual Studio code. Differences are highlighted and there are inline actions to accept either one or both changes. (See Merge conflicts.) You need to determine yourself which changes should be accepted, it must be done manually because only your team know which is correct for your project.
After resolving and merging the project using Visual Studio Code, copy the project file in the repository to the project folder so that you can continue to work with the project in PHPMaker.