From 3eaf5f378807eeab410e9cc83e8be5ef31299811 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Dorn?= Date: Thu, 14 Mar 2024 19:44:07 +0100 Subject: [PATCH] upgrade to PHP8.3 --- README.md | 2 +- composer.json | 12 ++++++------ flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 16 ++++++++++++++++ shell.nix | 18 ++++++++++++++++++ 5 files changed, 68 insertions(+), 7 deletions(-) create mode 100644 flake.lock create mode 100755 flake.nix create mode 100755 shell.nix diff --git a/README.md b/README.md index 25b42be..179ae33 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ You can install the package via composer: composer require felixdorn/tin ``` -## 🔞 Screenshots +## Screenshots ![A piece of code highlighted using tin ](art/screenshot.png) diff --git a/composer.json b/composer.json index 3acbe87..e2226d8 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "felixdorn/tin", - "description": "tin is a PHP code highlighter for the terminal.", + "description": "tin is a code highlighter for PHP.", "license": "MIT", "authors": [ { @@ -9,14 +9,14 @@ } ], "require": { - "php": "^8.1" + "php": "^8.3" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^v3.0.0", - "pestphp/pest": "^v1.22.1", - "phpstan/phpstan": "^1.8.5", + "friendsofphp/php-cs-fixer": "^v3.51", + "pestphp/pest": "^v1.23", + "phpstan/phpstan": "^1.10", "spatie/pest-plugin-snapshots": "^1.1", - "symfony/var-dumper": "^v6.0.6" + "symfony/var-dumper": "^v6.4" }, "autoload": { "psr-4": { diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..1001853 --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1710272261, + "narHash": "sha256-g0bDwXFmTE7uGDOs9HcJsfLFhH7fOsASbAuOzDC+fhQ=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "0ad13a6833440b8e238947e47bea7f11071dc2b2", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100755 index 0000000..5973d53 --- /dev/null +++ b/flake.nix @@ -0,0 +1,16 @@ +{ + inputs = + { + nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + }; + + outputs = { self, nixpkgs, ... }@inputs: + let + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; + in + { + devShells.x86_64-linux.default = (import ./shell.nix { inherit pkgs; }); + }; +} + diff --git a/shell.nix b/shell.nix new file mode 100755 index 0000000..fbfb21c --- /dev/null +++ b/shell.nix @@ -0,0 +1,18 @@ +{ pkgs ? import { } }: + +pkgs.mkShell +{ + nativeBuildInputs = with pkgs; [ + (php83.buildEnv { + extraConfig = '' + memory_limit = 6G + xdebug.mode=coverage + ''; + + extensions = ({ enabled, all }: enabled ++ (with all; [ + xdebug + ])); + }) + php83Packages.composer + ]; +}