Textpattern-installer - Textpattern plugin and theme installer for Composer

Overview

Textpattern Installer for Composer

Package directory | Issues

Install plugins and themes to Textpattern CMS with Composer.

$ composer require rah/rah_replace

Overview

Normally installing Textpattern plugins requires that you manually download an installation package, upload the package through your admin-panel, and then go through a multi-step installer process; rinse and repeat for every plugin, and when you need to update one.

With Composer, it's all managed through the dependency manager. Any theme or a plugin can be installed, updated or uninstalled, using a single command. And it comes with all other Composers benefits such as being able to commit your package manifesto under version control system and all of your teammates will have the same set of plugins synched without any extra fiddling.

Quick start for end-users

After installing Composer to the host system your Textpattern installation is running on:

$ cd /path/to/your/textpattern/installation/root
$ composer require textpattern/lock:4.6.2
$ composer require rah/rah_replace rah/rah_flat

As in the above, to set up:

  1. Navigate to your Textpattern installation location containing a textpattern directory and a index.php file.
  2. Lock-in your installed Textpattern version using the textpattern/lock meta-package so that Composer knows your Textpattern version.
  3. You can now install any plugins, themes and libraries like any other Composer package.

Quick start for developers

Plugins and themes are just like any other normal Composer package, but with a special type and a matching installer requirement in your composer.json. The package should be named after the plugin or the theme too. An example composer.json stub would look like the following:

{
  "name": "vendor/pfx_pluginname",
  "type": "textpattern-plugin",
  "require": {
      "textpattern/installer" : "*"
  }
}

Package types

Type Description
textpattern-plugin The package contains manifest.json formatted plugin sources. See an example plugin
textpattern-plugin-package The package contains collection of compiled plugin installer files. Any file that's name matches the format pfx_pluginname_v0.1.0.txt will be installed.
textpattern-admin-theme The package is an admin-side theme. See an example admin-theme.
textpattern-public-theme The package is a front-end theme

Internals

The installer works by scanning composer.json file's sibling and child directories for a Textpattern installation. If found, it injects the whole Textpattern application to the currently running Composer process. It then collects any plugins and themes from Composer packages and installs them, invoking plugin-lifecycle updaters and installers as needed. This process can be compatible with, and used by, any plugin or a theme.

The installer doesn't require any extra configuration from the end-user or the developer. All it needs is a functional Textpattern installation, located either in the same directory as the composer.json file or in a child directory. Just note that the system the composer command is ran at, needs to have access to the database; take this in mind if you are, for instance, running the composer command outside a virtualized container.

Requirements

Comments
  • Uses Textile in help files

    Uses Textile in help files

    Hi @gocom, I recently started to make my plugins available via Composer but I meet the same issue I get during your absence with MassPlugCompiler: help files are not textilized correctly. Id's, Classes and notextile. tags are removed, so it breaks many stuff in my styled files. I forked your MassPlugCompiler repo in the past to quickly include Textile and also add a mulptile help files support but I'm not sure what could be done with this repo to fix the issue and get a tidy plugin doc. when installed via Composer.

    Edit: This version of oui_player can be tested if you need an example; compiled files (via my MassPlugCompiler fork) work nicely but are broken when installed via Composer.

    Edit#2: Because I'm not sure why Textpattern does not correctly apply Textile by itself on plugins install, I posted a new a thread on the forum.

    opened by NicolasGraph 2
  • Admin theme path needs updating

    Admin theme path needs updating

    opened by jools-r 2
  • Uninstaller appears to be broken

    Uninstaller appears to be broken

    Investigation necessary, but it appears that the uninstaller does not run properly and dies midway, resulting in a half-removal. I believe that composer lock file is neither update, only composer.json is modified when remove is called.

    bug investigate 
    opened by gocom 1
  • Themes don't support deep directory structures

    Themes don't support deep directory structures

    Unlike plugins, themes currently do not work with deep directory structures. Installation will fail if composer.json isn't placed next to the textpattern/ directory.

    This needs to be supported since we shouldn't require that:

    • User needs to navigate away from project root when updating packages (all meta should be there).
    • Or have to set the project root as the server document root.
    bug 
    opened by gocom 0
  • Install may die on a theme init error

    Install may die on a theme init error

    If the theme errors or is removed between installs/updates, Composer will die on the following error:

    cannot_instantiate_theme: pohjola, pohjola_theme

    ...because old-school Textpattern uses explicit process termination instead of Exceptions.

    We should either:

    • Try to simulate Textpattern admin-side interface, skipping theme.
    • Default to core theme.
    opened by gocom 0
Releases(1.0.14)
Owner
Jukka Svahn
Backend developer by trade, hobbyist designer and frontend fiddler, self-proclaimed home cook and baker
Jukka Svahn
Ied plugin composer - Inspired Plugin Composer: Create, publish and edit plugins from within Textpattern CMS.

ied_plugin_composer Create, publish and edit plugins from within Textpattern CMS. Creates a new page under the Extensions tab where you can edit and e

Stef Dawson 8 Oct 3, 2020
A composer plugin, to install differenty types of composer packages in custom directories outside the default composer default installation path which is in the vendor folder.

composer-custom-directory-installer A composer plugin, to install differenty types of composer packages in custom directories outside the default comp

Mina Nabil Sami 136 Dec 30, 2022
This composer installer plugin allows for easy installation of PHP_CodeSniffer coding standards

PHP_CodeSniffer Standards Composer Installer Plugin This composer installer plugin allows for easy installation of PHP_CodeSniffer coding standards (r

PHPCSStandards 393 Feb 25, 2022
An installer package that let's you install NodeJS and NPM as a Composer dependency.

NodeJS installer for Composer This is an installer that will download NodeJS and NPM and install them in your Composer dependencies. Installation is s

TheCodingMachine 106 Sep 30, 2022
Opinionated version of Wikimedia composer-merge-plugin to work in pair with Bamarni composer-bin-plugin.

Composer Inheritance Plugin Opinionated version of Wikimedia composer-merge-plugin to work in pair with bamarni/composer-bin-plugin. Usage If you are

Théo FIDRY 25 Dec 2, 2022
Composer installer for PHP_CodeSniffer coding standards

PHP_CodeSniffer Standards Composer Installer Plugin This composer installer plugin allows for easy installation of PHP_CodeSniffer coding standards (r

Dealerdirect 462 Dec 22, 2022
Composer plugin that wraps all composer vendor packages inside your own namespace. Intended for WordPress plugins.

Imposter Plugin Composer plugin that wraps all composer vendor packages inside your own namespace. Intended for WordPress plugins. Built with ♥ by Typ

Typist Tech 127 Dec 17, 2022
Composer Registrar Composer Plugin for Magento 2

This module add a global registration.php that replace the default glob search performed for each request to discover the components not installed from composer.

OpenGento 3 Mar 22, 2022
Textpattern-for-Panic-Coda - A Textpattern CMS mode for Panic Coda

Textpattern elements for Panic Coda 2 Handy elements for use with Panic Coda 2 on a Mac when authoring files for the Textpattern CMS. This repository

Phil Wareham 8 Jun 26, 2017
Composer Repository Manager for selling Magento 2 extension and offering composer installation for ordered packages.

Magento 2 Composer Repository Credits We got inspired by https://github.com/Genmato. Composer Repository for Magento 2 This extension works as a Magen

EAdesign 18 Dec 16, 2021
Victor The Cleaner for Composer - This tool removes unnecessary files and directories from Composer vendor directory.

Victor The Cleaner for Composer This tool removes unnecessary files and directories from Composer vendor directory. The Cleaner leaves only directorie

David Grudl 133 Oct 26, 2022
Composer registry manager that help to easily switch to the composer repository you want

CRM - Composer Registry Manager Composer Registry Manager can help you easily and quickly switch between different composer repositories. 简体中文 Install

Tao 500 Dec 29, 2022
Dependency graph visualization for composer.json (PHP + Composer)

clue/graph-composer Graph visualization for your project's composer.json and its dependencies: Table of contents Usage graph-composer show graph-compo

Christian Lück 797 Jan 5, 2023
Drupal Composer Scaffold - A flexible Composer project scaffold builder

This project provides a composer plugin for placing scaffold files (like index.php, update.php, …) from the drupal/core project into their desired location inside the web root. Only individual files may be scaffolded with this plugin.

Drupal 44 Sep 22, 2022
PHP Extension installer

pickle - PHP Extension installer Pickle installs PHP extensions easily on all platforms. Installation Grab the latest phar at https://github.com/Frien

null 1.6k Dec 27, 2022
This is wegare tools but all-in-one installer only, exclude GUI

All In One Installer for Wegare Tools This is wegare tools, but this is all-in-one. Here is the source https://github.com/wegare123?tab=repositories I

Helmi Amirudin 3 Jul 29, 2022
Universal extension installer for Magento 2, see introductory blog post here

ExtDN Installer for Magento 2 modules The installation of extensions for Magento 2 has a few scenarios to cover depending on your starting position (M

ExtDN 26 Apr 1, 2022
OSX/Linux Docker containers installer for Magento 2

Magento 2 OSX/Linux Docker Requirements MacOS: Docker, docker-sync, Git Linux: Docker, Docker-compose, Git on Debian based OS (Example: Ubuntu, Linux

Osiozekhai Aliu 54 Dec 10, 2022
pine - A CLI installer for timber

pine - A CLI installer for timber A CLI tool written in PHP based on symfony console to easily create a WordPress (Timber) project. Installation compo

Azeem Hassni 29 Aug 24, 2022