Skip to main content

Composer Support for ProcessWire, Part 2

·155 words·1 min
Hari KT
Author
Hari KT
Freelancer | Founder of Tripti and Tanvish | Maintainer of Aura for PHP, created by Paul M Jones

In my earlier post I mentioned about adding a composer.json in the root of the github repo.

Sometimes you may see a non composer.json repo or some times people reject it, you still can do like the below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php
{
    "minimum-stability": "dev",
    "repositories": [
        {
            "type": "package",
            "package": {
                "name": "ryancramerdesign/process-export-profile",
                "version": "1.0.0",
                "source": {
                    "url": "https://github.com/ryancramerdesign/ProcessExportProfile",
                    "type": "git",
                    "reference": "master"
                },
                "type": "pw-module",
                "require": {
                    "hari/pw-module": "~1.0"
                }
            }
        }
    ],    
    "require": {
        "ryancramerdesign/process-export-profile": "1.0.0"
    }
}

And run

1
php composer.phar update

Don’t forget you need composer.phar. If you don’t have get from getcomposer.org

The module is downloaded to site/modules/ProcessExportProfile. The package is of type pw-module

The name process-export-profile is converted to ProcessExportProfile . So if you have caps in between name put a hyphen in the naming

Related

Composer Support for ProcessWire Modules

·272 words·2 mins
I am a huge fan of composer. PW ( ProcessWire) is missing one of the good parts of composer. So here is a new installer to install the 3rd party modules of PW via composer. If you have created a module for PW, what you need to do is add a composer.json file in your github repo and add it to packagist. An example composer.json is 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 { "name": "vendor/package-name", "type": "pw-module", "description": "Your module what it does", "keywords": [ "keywords", "comma", "seprated"], "homepage": "https://github.com/harikt/Assets", "license": "BSD-2-Clause", "authors": [ { "name": "Assets Contributors", "homepage": "https://github.com/harikt/Assets/contributors" } ], "require": { "php": ">=5.3.0", "hari/pw-module": "~1.0" } } Note the minimum requirement is PHP 5.3 for composer is 5.3 .

Assets for ProcessWire

·233 words·2 mins
Processwire is a content management framework. I was looking to change the directory structure of the Processwire. 1 2 3 4 5 |-- index.php |-- installer.php |-- README.md |-- site `-- wire I am not the first person to talk on the subject. There are other threads like Installation paths and moving folders, Common practices Anyway I thought of trying the same and for serving the js, css, images I wrote my first processwire module Assets

Aura System Released Beta 5

·99 words·1 min
Yesterday Paul M Jones tagged the beta5 for the system repo. So you can download the system from http://auraphp.com/system/downloads/ via composer # Creating aura framework based projects has been made easy with composer. You can run php composer.phar create-project -s dev aura/system your-directory What it does is almost similar to git clone and installing via git as below