Add humbug/box to build a phar file

This commit is contained in:
Oliver Davies 2024-02-19 08:00:00 +00:00
parent 1215548b35
commit 9693406b7d
7 changed files with 90 additions and 3 deletions

4
.gitignore vendored
View file

@ -8,3 +8,7 @@
/var/
/vendor/
###< symfony/framework-bundle ###
# Box
/dist/
/vendor-bin/

12
box.json.dist Normal file
View file

@ -0,0 +1,12 @@
{
"output": "dist/versa",
"files": [
"versa"
],
"directories": [
"vendor"
],
"check-requirements": true,
"exclude-composer-files": false,
"compression": "GZ"
}

View file

@ -19,7 +19,8 @@
"allow-plugins": {
"php-http/discovery": true,
"symfony/flex": true,
"symfony/runtime": true
"symfony/runtime": true,
"bamarni/composer-bin-plugin": true
},
"sort-packages": true
},
@ -63,5 +64,8 @@
"allow-contrib": false,
"require": "7.0.*"
}
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.8"
}
}

62
composer.lock generated
View file

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "ed896bf496f3acf356d14377785d8cfa",
"content-hash": "a1f732f5ff12a45f9756cf6322b15e05",
"packages": [
{
"name": "psr/cache",
@ -2461,7 +2461,65 @@
"time": "2024-01-23T15:02:46+00:00"
}
],
"packages-dev": [],
"packages-dev": [
{
"name": "bamarni/composer-bin-plugin",
"version": "1.8.2",
"source": {
"type": "git",
"url": "https://github.com/bamarni/composer-bin-plugin.git",
"reference": "92fd7b1e6e9cdae19b0d57369d8ad31a37b6a880"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/bamarni/composer-bin-plugin/zipball/92fd7b1e6e9cdae19b0d57369d8ad31a37b6a880",
"reference": "92fd7b1e6e9cdae19b0d57369d8ad31a37b6a880",
"shasum": ""
},
"require": {
"composer-plugin-api": "^2.0",
"php": "^7.2.5 || ^8.0"
},
"require-dev": {
"composer/composer": "^2.0",
"ext-json": "*",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^1.8",
"phpstan/phpstan-phpunit": "^1.1",
"phpunit/phpunit": "^8.5 || ^9.5",
"symfony/console": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0",
"symfony/finder": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0",
"symfony/process": "^2.8.52 || ^3.4.35 || ^4.4 || ^5.0 || ^6.0"
},
"type": "composer-plugin",
"extra": {
"class": "Bamarni\\Composer\\Bin\\BamarniBinPlugin"
},
"autoload": {
"psr-4": {
"Bamarni\\Composer\\Bin\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "No conflicts for your bin dependencies",
"keywords": [
"composer",
"conflict",
"dependency",
"executable",
"isolation",
"tool"
],
"support": {
"issues": "https://github.com/bamarni/composer-bin-plugin/issues",
"source": "https://github.com/bamarni/composer-bin-plugin/tree/1.8.2"
},
"time": "2022-10-31T08:38:03+00:00"
}
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],

View file

@ -15,6 +15,7 @@
perSystem = { config, self', inputs', pkgs, system, ... }: {
devshells.default = {
packages = with pkgs; [
"just"
"php82"
"php82Packages.composer"
];

3
index.php Normal file
View file

@ -0,0 +1,3 @@
<?php
require __DIR__."/versa";

5
justfile Normal file
View file

@ -0,0 +1,5 @@
_default:
just --list
build:
./vendor/bin/box compile