Download the PHP package code711/siteconfiggitsync without Composer

On this page you can find all versions of the php package code711/siteconfiggitsync. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package siteconfiggitsync

TYPO3 Site config - git synchronisation

Latest Stable Version TYPO3 13 TYPO3 14 Total Downloads Monthly Downloads PHPSTAN:Level 8 build:passing

Sometimes it is necessary for a TYPO3 project that the site-config yaml files are managed in git alongside the site-package. Those projects have the problem that site-admins can then not change settings in the site config without manually carrying those changes back over to the git repository in order for them not to be overriden with the next CI/CD run or publish.

This extension aims to alleviate this problem by pushing those changes back to your GitLab instance automatically. In doing so the extension will create a branch, check in the changes that have been made and create a merge-request which you then can manage in GitLab without manually merging the yaml files. And you will be notified about the changes because of the merge-request.

There is no git binary on the server needed, everything is done through the GitLab API. GitHub and GitLab (selfhosted or GitLab.com) are supported.

Changelog

3.0.1

3.0.0

2.1.3

Bugfix in extension configurator:

2.1.2 & 1.2.2

Changed logic when the Eventhandlers actually act:

2.1.0

2.0.0

1.1.0

1.0.3

1.0.1

Fix README.md

1.0.0

Support TYPO3 12

0.10.0

Externalised the XCLASS of the SiteConfiguration Class to EXT:siteconfigurationevents. Composer installations should pull this extension automatically as a dependency. Refactored the git related actions into event listeners.

0.9.x Initial release

Setup / Installation

GitLab token

after installing this extension with

composer req code711/siteconfiggitsync
you will need to create an API Token in your GitLab Project Page with at least 'Developer' permissions.

This is done in your GitLab in your Project under 'Settings->Access Token'. Developer Permissions are needed because only from this level on Branches can be created and Merge-requests can be issued.

GitLab Backend

In the field 'Token name' enter something meaningfull for this task, as it will be written next to commits or merge-requests. For example 'External Site change from TYPO3'.

Set the 'Expiration Date' to your liking.

In 'Select a role' choose 'Developer'

And for the scope select 'api'. The other scopes are not enough for the tasks we want to do.

after pressing the 'Create project access token' button you will be given a series of alphanumeric character. Copy this string of character. This is your token.

New Token

GitHub token

after installing this extension with

composer req code711/siteconfiggitsync
you will need to create an API Token in your GitLab Project Page with at least 'Developer' permissions.

The setup for GitHub is from TYPO3 Point of view the same as in the above GitLab setup.

The main difference is how to access your ACCESS_TOKEN.

In GitHub access tokens are always personal tied to a user. The token can be created inside an organisation or team, but it has to be created as a personal token by one of its members.

To do that access your GitHub dashboard, and click on your profile Icon. Choose the entry "Settings". In the following page choose 'Developer Settings' on the left hand side of the screen. Finally open up the Option "Personal access tokens" and choose the option "Fine-grained tokens"

You should be here then Fine-grained personal access token

If you don't see the organisation or team where your project is located you have to enrol the organisation or team once. This is done from the Organisation Overview screen by choosing "Settings" in to top menu and then "Personal access tokens" - here you will then be able to enrol your organisation. Once you've done that, return to the "Developer Settings" screen, your organisation will then be listed there.

Create a personal access token of the type "Fine-grained token" and restrict it to the repository you want to push your changes to. The following permissions are needed:

save and store the token

TYPO3 Backend config

In your TYPO3 backend navigate to Settings->Extension Configuration and open the accordion for the siteconfiggitsync extension:

Extension Config

Choose 'GitLab' or 'GitHub' in the service dropdown (v1.1)

In the field project url add the complete URL to your projects repository, without any .git. Just as it is in your browser. for example

https://GitLab.com/mycompany/customerproject 
(same is true for GitHub)

In the field API Auth Token enter the token you just generated.

Now press the "Save 'siteconfiggitsync' Configuration" button, and close the window. Re-open the window and navigate again to the siteconfiggitsync accordion and open it. The fields 'main_branch' and 'Who to assign a merge request' should be filled with respectively the available branches in that project and members who are allowed to merge merge-requests.

Choose the branch which represents the production branch, i.e. from which the branch to commit the changes should be taken.

Optionaly choose a member who gets the merge-requests assigend to. If no member is chosen the merge-requests will not be assigend to anybody, and it depends on your setup if you are notified when one is created.

Now press the "Save 'siteconfiggitsync' Configuration" button again, and you should be ready to accept merge-requests when the site-config is changed through the backend interface.

Merge request options

Notes and limitations


All versions of siteconfiggitsync with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
typo3/cms-core Version ^12.0
m4tthumphrey/php-gitlab-api Version ^11.5
code711/siteconfigurationevents Version ^1.0
knplabs/github-api Version ^3.16
php-http/guzzle7-adapter Version ^1.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package code711/siteconfiggitsync contains the following files

Loading the files please wait ...