2017 © Pedro Peláez
 

library typo3-repository-client

Client for interacting with the official TYPO3 Extension Repository (TER). Contains API and CLI scripts.

image

namelesscoder/typo3-repository-client

Client for interacting with the official TYPO3 Extension Repository (TER). Contains API and CLI scripts.

  • Sunday, February 12, 2017
  • by NamelessCoder
  • Repository
  • 1 Watchers
  • 6 Stars
  • 58,737 Installations
  • PHP
  • 79 Dependents
  • 0 Suggesters
  • 3 Forks
  • 4 Open issues
  • 13 Versions
  • 6 % Grown

The README.md

TYPO3 Repository Client API/CLI

OBSOLETE!

This library uses the long-deprecated and now removed SOAP API for the TYPO3 Extension Repository. It is no longer functioning!, (*1)

The library is archived and no longer receives updates. It is kept available here only for posterity.

Alternative

I recommend using the official "Tailor" library from TYPO3: https://github.com/TYPO3/tailor, (*2)

The Tailor library allows you to interact with the TYPO3 Extension Repository using the current REST API. It is possible to use it from a local machine or through CI. An example GitHub action (for example as .github/workflows/release.yml):, (*3)

on:
  push:
    tags:
      - "**"

jobs:
  release:
    runs-on: ubuntu-20.04
    steps:
      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: 8.2
          extensions: mbstring, json
          ini-values: date.timezone="Europe/Copenhagen", opcache.fast_shutdown=0
          tools: composer:v2.2
      - name: "create working directory"
        run: "mkdir tailor"
      - name: "Install Tailor"
        working-directory: tailor
        run: "composer require typo3/tailor"
      - name: "Upload to TER"
        working-directory: tailor
        run: "./vendor/bin/tailor ter:publish $TAG $EXTENSION_KEY --artefact $ARTEFECT_URL --comment \"$MESSAGE\""
        env:
          TYPO3_API_USERNAME: ${{ secrets.TER_USERNAME }}
          TYPO3_API_TOKEN: ${{ secrets.TER_TOKEN }}
          TAG: ${{ github.ref_name }}
          EXTENSION_KEY: testing
          ARTEFECT_URL: "https://github.com/${{ github.repository }}/archive/${{ github.ref }}.zip"
          MESSAGE: "Automatic release built from GitHub. See the CHANGELOG.md file that is shipped with this release for details."

(Requires two "secrets" entered in the GitHub repository; TER_TOKEN and TER_USERNAME. See Tailor's documentation for further information on how to obtain a token. Note that the token has a limited lifetime and will need to be refreshed.), (*4)

This action has the benefit that it does not operate on artefact files locally in the CI pipeline. Instead it refers TER to read the files from the artefect produced by GitHub whenever a new tag is uploaded. If you need/want to operate on files before a release is made, e.g. to remove certain files, Thomas Norre has provided a drop-in GitHub action that works in that particular way: https://github.com/tomasnorre/typo3-upload-ter, (*5)

See Tailor's documentation for alternative CI integrations and manual usage instructions., (*6)

So long, and thanks for all the fish! ;), (*7)


Build Status Coverage Status, (*8)

TYPO3 Extension Repository (TER) client library and CLI commands, (*9)

Usage

Each command which can be executed has a corresponding class, for example NamelessCoder\TYPO3RepositoryClient\Uploader and a CLI script which acts as a wrapper for said class. The parameters which should be passed to each CLI script must be the same arguments and in the same order as required by the class' method., (*10)

Uploader

As component:, (*11)

$uploader = new \NamelessCoder\TYPO3RepositoryClient\Uploader();
$uploader->upload('/path/to/extension', 'myusername', 'mypassword', 'An optional comment');

And as CLI command:, (*12)

./bin/upload /path/to/extension myusername mypassword "An optional comment"

Version Updater (local)

As component:, (*13)

$versioner = new \NamelessCoder\TYPO3RepositoryClient\Versioner();
$version = $versioner->read('/path/to/extension/');
$version[0] = '1.2.3';
$version[1] = 'beta';
$versioner->write('/path/to/extension/', '1.2.3', 'beta');

And as CLI command:, (*14)

# with all parameters
./bin/setversion 1.2.3 beta /optional/path/to/extension/
# without changing current stability:
./bin/setversion 1.2.3

Version Deleter (admins only)

As component:, (*15)

$deleter = new \NamelessCoder\TYPO3RepositoryClient\VersionDeleter();
$deleter->deleteExtensionVersion('extensionkey', '1.2.3', 'myusername', 'mypassword');

And as CLI command:, (*16)

./bin/rmversion extensionkey 1.2.3 myusername mypassword

FAQ

Excluded files and folders

  • Dotfiles (like .editorconfig or .php_cs.dist) will be ignored except for .htpasswd and .htaccess files.
  • Use a .gitignore file to exclude more files and folders from being included in the final TER release.

The Versions

12/02 2017

dev-master

9999999-dev

Client for interacting with the official TYPO3 Extension Repository (TER). Contains API and CLI scripts.

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Claus Due

12/02 2017

2.0.0

2.0.0.0

Client for interacting with the official TYPO3 Extension Repository (TER). Contains API and CLI scripts.

  Sources   Download

MIT

The Requires

  • php ^7.0

 

The Development Requires

by Claus Due

12/02 2017

1.3.1

1.3.1.0

Client for interacting with the official TYPO3 Extension Repository (TER). Contains API and CLI scripts.

  Sources   Download

MIT

The Development Requires

by Claus Due

12/02 2017

1.3.0

1.3.0.0

Client for interacting with the official TYPO3 Extension Repository (TER). Contains API and CLI scripts.

  Sources   Download

MIT

The Development Requires

by Claus Due

28/07 2016

1.2.0

1.2.0.0

Client for interacting with the official TYPO3 Extension Repository (TER). Contains API and CLI scripts.

  Sources   Download

MIT

The Development Requires

by Claus Due

08/08 2015

1.1.1

1.1.1.0

Client for interacting with the official TYPO3 Extension Repository (TER). Contains API and CLI scripts.

  Sources   Download

MIT

The Development Requires

by Claus Due

15/03 2015

1.1.0

1.1.0.0

Client for interacting with the official TYPO3 Extension Repository (TER). Contains API and CLI scripts.

  Sources   Download

MIT

The Development Requires

by Claus Due

03/03 2015

1.0.5

1.0.5.0

Client for interacting with the official TYPO3 Extension Repository (TER). Contains API and CLI scripts.

  Sources   Download

MIT

The Development Requires

by Claus Due

02/03 2015

1.0.4

1.0.4.0

Client for interacting with the official TYPO3 Extension Repository (TER). Contains API and CLI scripts.

  Sources   Download

MIT

The Development Requires

by Claus Due

28/02 2015

1.0.3

1.0.3.0

Client for interacting with the official TYPO3 Extension Repository (TER). Contains API and CLI scripts.

  Sources   Download

MIT

The Development Requires

by Claus Due

08/12 2014

1.0.2

1.0.2.0

Client for interacting with the official TYPO3 Extension Repository (TER). Contains API and CLI scripts.

  Sources   Download

MIT

The Development Requires

by Claus Due

08/12 2014

1.0.1

1.0.1.0

Client for interacting with the official TYPO3 Extension Repository (TER). Contains API and CLI scripts.

  Sources   Download

MIT

The Development Requires

by Claus Due

08/12 2014

1.0.0

1.0.0.0

Client for interacting with the official TYPO3 Extension Repository (TER). Contains API and CLI scripts.

  Sources   Download

MIT

The Development Requires

by Claus Due