Skip to content

A PHP Package Manager with a Phar builder (Ulole-PHP-Package-Manager)

Notifications You must be signed in to change notification settings

interaapps/uppm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Ulole-PHP-Package-Manager

# Creating an boilerplate app
$ uppm create testapp
// Using template (For example interaapps/ulole-framework)
$ uppm create testapp interaapps/ulole-framework:3.2.0
INFO: Creating in test123
$ cd testapp

# Start your app
$ uppm run start
Hello World!

# Installing modules
$ uppm install uloleorm
# Or from github
$ uppm install interaapps/ulole-orm+master@github
# Or from composer
$ uppm install interaapps/uloleorm@composer
# Or more...

# Building your app (Useful for CLI-Apps or non-web-hosted stuff)
$ uppm build
INFO: Creating phar...
[...]
$ cd target
$ ./testapp-1.0.phar
Hello World

# Serve (Useful if you are developing a Web-App)
uppm serve

For a single project

wget -O uppm.phar https://raw.githubusercontent.com/interaapps/uppm/master/target/uppm.phar
php uppm.phar help

Globally

curl -o uppm https://raw.githubusercontent.com/interaapps/uppm/master/target/uppm.phar
# Installing it on linux globally
sudo mv uppm /usr/local/bin/uppm
sudo chmod +x /usr/local/bin/uppm
uppm help

Requirements

  • php8.1
  • php8.1-zip
  • php8.1-json
  • php8.1-phar (And enabled in php.ini, /etc/php/8.1/cli/php.ini, phar.readonly = Off)
# Installing dependencies
sudo apt install php8.1 php8.1-zip php8.1-json php8.1-phar

# Getting the php.ini location
php --ini

# Adding phar rule to php.ini (For building projects)
sudo echo phar.readonly = Off >> /etc/php/8.1/cli/php.ini

uppm.json

{
  "name": "uppm",
  "version": "1.0",
  "phpVersion": ">8.1",
  "repositories": [],
  "run": {
    "start": "src\/main\/bootstrap.php",
    "install": "src/scripts/install.php"
  },
  "build": {
    "type": "phar",
    "run": "start",
    "outputName": "uppm",
    "ignored": [
      "test.txt",
      ".git"
    ]
  },
  "modules": {
  },
  "namespaceBindings": {
    "de\\interaapps\\uppm": "src\/main\/de\/interaapps\/uppm"
  }
}

autoload

# adds a autoload.php file
uppm autoload
<?php
(include 'autoload.php')();

Docker

docker pull interaapps/uppm