From 9693406b7db9dd4cf407ff204b7bc7bf1e734d72 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Mon, 19 Feb 2024 08:00:00 +0000 Subject: [PATCH] Add humbug/box to build a phar file --- .gitignore | 4 ++++ box.json.dist | 12 ++++++++++ composer.json | 6 ++++- composer.lock | 62 +++++++++++++++++++++++++++++++++++++++++++++++++-- flake.nix | 1 + index.php | 3 +++ justfile | 5 +++++ 7 files changed, 90 insertions(+), 3 deletions(-) create mode 100644 box.json.dist create mode 100644 index.php create mode 100644 justfile diff --git a/.gitignore b/.gitignore index a67f91e..5d85e7a 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,7 @@ /var/ /vendor/ ###< symfony/framework-bundle ### + +# Box +/dist/ +/vendor-bin/ diff --git a/box.json.dist b/box.json.dist new file mode 100644 index 0000000..458b6ea --- /dev/null +++ b/box.json.dist @@ -0,0 +1,12 @@ +{ + "output": "dist/versa", + "files": [ + "versa" + ], + "directories": [ + "vendor" + ], + "check-requirements": true, + "exclude-composer-files": false, + "compression": "GZ" +} diff --git a/composer.json b/composer.json index 1c90e88..43071c2 100644 --- a/composer.json +++ b/composer.json @@ -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" } } diff --git a/composer.lock b/composer.lock index d5d1b99..29c4f8a 100644 --- a/composer.lock +++ b/composer.lock @@ -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": [], diff --git a/flake.nix b/flake.nix index 2481116..7835238 100644 --- a/flake.nix +++ b/flake.nix @@ -15,6 +15,7 @@ perSystem = { config, self', inputs', pkgs, system, ... }: { devshells.default = { packages = with pkgs; [ + "just" "php82" "php82Packages.composer" ]; diff --git a/index.php b/index.php new file mode 100644 index 0000000..fc769af --- /dev/null +++ b/index.php @@ -0,0 +1,3 @@ +