diff --git a/.gitattributes b/.gitattributes index 103f6b16..4881f0e8 100644 --- a/.gitattributes +++ b/.gitattributes @@ -5,8 +5,7 @@ /.gitignore export-ignore /box.json.dist export-ignore /build-phar.sh export-ignore -/composer.lock export-ignore -/infection.json.dist +/infection.json.dist export-ignore /phpcs.xml.dist export-ignore /phpunit.xml.dist export-ignore /psalm.xml export-ignore diff --git a/.github/workflows/release-phar.yml b/.github/workflows/release-phar.yml index 9d8c46c1..9849a315 100644 --- a/.github/workflows/release-phar.yml +++ b/.github/workflows/release-phar.yml @@ -15,10 +15,6 @@ jobs: strategy: matrix: - dependencies: - - "locked" - php-version: - - "7.4" operating-system: - "ubuntu-latest" @@ -26,36 +22,11 @@ jobs: - name: "Checkout" uses: "actions/checkout@v3" - - name: "Install PHP" - uses: "shivammathur/setup-php@2.24.0" - with: - coverage: "pcov" - php-version: "${{ matrix.php-version }}" - ini-values: memory_limit=-1 + - uses: DeterminateSystems/nix-installer-action@v9 - - name: "Cache dependencies" - uses: "actions/cache@v3" - with: - path: | - ~/.composer/cache - vendor - key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}" - restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}" - - - name: "Install lowest dependencies" - if: ${{ matrix.dependencies == 'lowest' }} - run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest" - - - name: "Install highest dependencies" - if: ${{ matrix.dependencies == 'highest' }} - run: "composer update --no-interaction --no-progress --no-suggest" - - - name: "Install locked dependencies" - if: ${{ matrix.dependencies == 'locked' }} - run: "composer install --no-interaction --no-progress --no-suggest" - - - name: "build-phar.sh" - run: "build-phar.sh" + - name: "Build PHAR" + run: | + "nix run .#build-phar-script" - name: "Upload PHAR" uses: fnkr/github-action-ghr@v1.3 diff --git a/bin/roave-backward-compatibility-check.php b/bin/roave-backward-compatibility-check.php index 506682d2..ce6d1e6d 100644 --- a/bin/roave-backward-compatibility-check.php +++ b/bin/roave-backward-compatibility-check.php @@ -326,16 +326,16 @@ static function (string $installationPath) use ($composerIo): Installer { В Украине сейчас идет война. Силами РФ наносятся удары по гражданской инфраструктуре в [Харькове][1], [Киеве][2], [Чернигове][3], [Сумах][4], [Ирпене][5] и десятках других городов. Гибнут люди - и гражданское население, и военные, в том числе российские призывники, которых бросили воевать. Чтобы лишить собственный народ доступа к информации, правительство РФ запретило называть войну войной, закрыло независимые СМИ и принимает сейчас ряд диктаторских законов. Эти законы призваны заткнуть рот всем, кто против войны. За обычный призыв к миру сейчас можно получить несколько лет тюрьмы. -Не молчите! Молчание - знак вашего согласия с политикой российского правительства. +Не молчите! Молчание - знак вашего согласия с политикой российского правительства. **Вы можете сделать выбор НЕ МОЛЧАТЬ.** --- ## 🇺🇸 To people of Russia -There is a war in Ukraine right now. The forces of the Russian Federation are attacking civilian infrastructure in [Kharkiv][1], [Kyiv][2], [Chernihiv][3], [Sumy][4], [Irpin][5] and dozens of other cities. People are dying – both civilians and military servicemen, including Russian conscripts who were thrown into the fighting. In order to deprive its own people of access to information, the government of the Russian Federation has forbidden calling a war a war, shut down independent media and is passing a number of dictatorial laws. These laws are meant to silence all those who are against war. You can be jailed for multiple years for simply calling for peace. +There is a war in Ukraine right now. The forces of the Russian Federation are attacking civilian infrastructure in [Kharkiv][1], [Kyiv][2], [Chernihiv][3], [Sumy][4], [Irpin][5] and dozens of other cities. People are dying – both civilians and military, including Russian conscripts who were thrown into the fighting. In order to deprive its own people of access to information, the government of the Russian Federation has forbidden calling a war a war, shut down independent media and is passing a number of dictatorial laws. These laws are meant to silence all those who are against war. You can be jailed for multiple years for simply calling for peace. -Do not be silent! Silence is a sign that you accept the Russian government's policy. +Do not be silent! Silence is a sign that you accept the Russian government's policy. **You can choose NOT TO BE SILENT.** [1]: "Kharkiv under attack" diff --git a/box.json.dist b/box.json.dist index 987325ce..425ea7e1 100644 --- a/box.json.dist +++ b/box.json.dist @@ -1,7 +1,10 @@ { + "alias": "roave-backward-compatibility-check", + "banner": false, + "check-requirements": false, "compactors": [ - "Herrera\\Box\\Compactor\\Php", - "Herrera\\Box\\Compactor\\Json" + "KevinGH\\Box\\Compactor\\Json", + "KevinGH\\Box\\Compactor\\Php" ], "compression": "GZ", "main": "bin/roave-backward-compatibility-check.php", @@ -10,6 +13,5 @@ "LICENSE", "vendor/composer/composer/LICENSE" ], - "chmod": "0755", - "git-version": "git-version" + "timestamp": "1970-01-01" } diff --git a/build-phar.sh b/build-phar.sh deleted file mode 100755 index 6e49f1fe..00000000 --- a/build-phar.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env bash - -set -e - -BOX_DIR="/tmp/box" - -mkdir -p ${BOX_DIR} - -# Install humbug/box -composer --working-dir=${BOX_DIR} require humbug/box "^3.8" --no-interaction --no-progress --no-suggest - -# Remove dev dependencies for package distribution -composer install --no-dev - -${BOX_DIR}/vendor/bin/box compile - -composer install - -rm -rf ${BOX_DIR} diff --git a/composer.json b/composer.json index 5e135e08..c69f4d70 100644 --- a/composer.json +++ b/composer.json @@ -3,9 +3,8 @@ "description": "Tool to compare two revisions of a public API to check for BC breaks", "require": { "php": "~8.1.0 || ~8.2.0 || ~8.3.0", - "ext-json": "*", "azjezz/psl": "^2.3.1", - "composer/composer": "^2.5.1", + "composer/composer": "^2.6.4", "nikic/php-parser": "^4.15.3", "nikolaposa/version": "^4.1.0", "ocramius/package-versions": "^2.7.0", diff --git a/composer.lock b/composer.lock index ad242b48..2a829ac7 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": "32e8d817b05bb7d73cb1a086bba6c6f5", + "content-hash": "c0f1103b887578dda60b26453e07b5b8", "packages": [ { "name": "azjezz/psl", @@ -298,16 +298,16 @@ }, { "name": "composer/composer", - "version": "2.5.1", + "version": "2.6.6", "source": { "type": "git", "url": "https://github.com/composer/composer.git", - "reference": "923278ad13e1621946eb76ab2882655d2cc396a4" + "reference": "683557bd2466072777309d039534bb1332d0dda5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/923278ad13e1621946eb76ab2882655d2cc396a4", - "reference": "923278ad13e1621946eb76ab2882655d2cc396a4", + "url": "https://api.github.com/repos/composer/composer/zipball/683557bd2466072777309d039534bb1332d0dda5", + "reference": "683557bd2466072777309d039534bb1332d0dda5", "shasum": "" }, "require": { @@ -315,23 +315,23 @@ "composer/class-map-generator": "^1.0", "composer/metadata-minifier": "^1.0", "composer/pcre": "^2.1 || ^3.1", - "composer/semver": "^3.0", + "composer/semver": "^3.2.5", "composer/spdx-licenses": "^1.5.7", "composer/xdebug-handler": "^2.0.2 || ^3.0.3", "justinrainbow/json-schema": "^5.2.11", "php": "^7.2.5 || ^8.0", "psr/log": "^1.0 || ^2.0 || ^3.0", - "react/promise": "^2.8", + "react/promise": "^2.8 || ^3", "seld/jsonlint": "^1.4", "seld/phar-utils": "^1.2", "seld/signal-handler": "^2.0", "symfony/console": "^5.4.11 || ^6.0.11", - "symfony/filesystem": "^5.4 || ^6.0", - "symfony/finder": "^5.4 || ^6.0", + "symfony/filesystem": "^5.4 || ^6.0 || ^7", + "symfony/finder": "^5.4 || ^6.0 || ^7", "symfony/polyfill-php73": "^1.24", "symfony/polyfill-php80": "^1.24", "symfony/polyfill-php81": "^1.24", - "symfony/process": "^5.4 || ^6.0" + "symfony/process": "^5.4 || ^6.0 || ^7" }, "require-dev": { "phpstan/phpstan": "^1.9.3", @@ -339,7 +339,7 @@ "phpstan/phpstan-phpunit": "^1.0", "phpstan/phpstan-strict-rules": "^1", "phpstan/phpstan-symfony": "^1.2.10", - "symfony/phpunit-bridge": "^6.0" + "symfony/phpunit-bridge": "^6.0 || ^7" }, "suggest": { "ext-openssl": "Enabling the openssl extension allows you to access https URLs for repositories and packages", @@ -352,7 +352,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "2.6-dev" }, "phpstan": { "includes": [ @@ -362,7 +362,7 @@ }, "autoload": { "psr-4": { - "Composer\\": "src/Composer" + "Composer\\": "src/Composer/" } }, "notification-url": "https://packagist.org/downloads/", @@ -391,7 +391,8 @@ "support": { "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/composer/issues", - "source": "https://github.com/composer/composer/tree/2.5.1" + "security": "https://github.com/composer/composer/security/policy", + "source": "https://github.com/composer/composer/tree/2.6.6" }, "funding": [ { @@ -407,7 +408,7 @@ "type": "tidelift" } ], - "time": "2022-12-22T14:33:54+00:00" + "time": "2023-12-08T17:32:26+00:00" }, { "name": "composer/metadata-minifier", @@ -6963,12 +6964,11 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "~8.1.0 || ~8.2.0", - "ext-json": "*" + "php": "~8.1.0 || ~8.2.0 || ~8.3.0" }, "platform-dev": [], "platform-overrides": { "php": "8.1.99" }, - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/flake.lock b/flake.lock new file mode 100644 index 00000000..a8beeba5 --- /dev/null +++ b/flake.lock @@ -0,0 +1,427 @@ +{ + "nodes": { + "flake-compat": { + "locked": { + "lastModified": 1688025799, + "narHash": "sha256-ktpB4dRtnksm9F5WawoIkEneh1nrEvuxb5lJFt1iOyw=", + "owner": "nix-community", + "repo": "flake-compat", + "rev": "8bf105319d44f6b9f0d764efa4fdef9f1cc9ba1c", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_2": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1701473968, + "narHash": "sha256-YcVE5emp1qQ8ieHUnxt1wCZCC3ZfAS+SRRWZ2TMda7E=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5", + "type": "github" + }, + "original": { + "id": "flake-parts", + "type": "indirect" + } + }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_2" + }, + "locked": { + "lastModified": 1701473968, + "narHash": "sha256-YcVE5emp1qQ8ieHUnxt1wCZCC3ZfAS+SRRWZ2TMda7E=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5", + "type": "github" + }, + "original": { + "id": "flake-parts", + "type": "indirect" + } + }, + "flake-parts_3": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_3" + }, + "locked": { + "lastModified": 1701473968, + "narHash": "sha256-YcVE5emp1qQ8ieHUnxt1wCZCC3ZfAS+SRRWZ2TMda7E=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5", + "type": "github" + }, + "original": { + "id": "flake-parts", + "type": "indirect" + } + }, + "nix-phps": { + "inputs": { + "flake-compat": "flake-compat_2", + "nixpkgs": "nixpkgs", + "utils": "utils" + }, + "locked": { + "lastModified": 1702806911, + "narHash": "sha256-Tt7y60GaDg8hOizZSYnib6MIa5/fDYYdZfV8P9YQ+24=", + "owner": "fossar", + "repo": "nix-phps", + "rev": "530bfb5cca5bc28bdb0df1b68b6d68d881b0553d", + "type": "github" + }, + "original": { + "owner": "fossar", + "repo": "nix-phps", + "type": "github" + } + }, + "nix-shell": { + "inputs": { + "flake-compat": "flake-compat", + "flake-parts": "flake-parts_2", + "nix-phps": "nix-phps", + "nixpkgs": "nixpkgs_2", + "php-src-nix": "php-src-nix", + "systems": "systems_3" + }, + "locked": { + "lastModified": 1702862892, + "narHash": "sha256-YAhLi/m+Etyp8H7lZJo9n75Vyd+fobaDC3/CS8OltAE=", + "owner": "loophp", + "repo": "nix-shell", + "rev": "3d7741000b2be61b650bb573fe01ea0ae7132ea7", + "type": "github" + }, + "original": { + "owner": "loophp", + "repo": "nix-shell", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1702539185, + "narHash": "sha256-KnIRG5NMdLIpEkZTnN5zovNYc0hhXjAgv6pfd5Z4c7U=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "aa9d4729cbc99dabacb50e3994dcefb3ea0f7447", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib": { + "locked": { + "dir": "lib", + "lastModified": 1701253981, + "narHash": "sha256-ztaDIyZ7HrTAfEEUt9AtTDNoCYxUdSd6NrRHaYOIxtk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e92039b55bcd58469325ded85d4f58dd5a4eaf58", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib_2": { + "locked": { + "dir": "lib", + "lastModified": 1701253981, + "narHash": "sha256-ztaDIyZ7HrTAfEEUt9AtTDNoCYxUdSd6NrRHaYOIxtk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e92039b55bcd58469325ded85d4f58dd5a4eaf58", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib_3": { + "locked": { + "dir": "lib", + "lastModified": 1701253981, + "narHash": "sha256-ztaDIyZ7HrTAfEEUt9AtTDNoCYxUdSd6NrRHaYOIxtk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e92039b55bcd58469325ded85d4f58dd5a4eaf58", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1702539185, + "narHash": "sha256-KnIRG5NMdLIpEkZTnN5zovNYc0hhXjAgv6pfd5Z4c7U=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "aa9d4729cbc99dabacb50e3994dcefb3ea0f7447", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1702312524, + "narHash": "sha256-gkZJRDBUCpTPBvQk25G0B7vfbpEYM5s5OZqghkjZsnE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "a9bf124c46ef298113270b1f84a164865987a91c", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1702312524, + "narHash": "sha256-gkZJRDBUCpTPBvQk25G0B7vfbpEYM5s5OZqghkjZsnE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "a9bf124c46ef298113270b1f84a164865987a91c", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "php-src-81": { + "flake": false, + "locked": { + "lastModified": 1701785100, + "narHash": "sha256-EELC/rFPMfl1/6QVkf8hRJ8dpLyYXLp1N5e423LyBgo=", + "owner": "php", + "repo": "php-src", + "rev": "8f6610ce8871c1065682db84264fd3450a5db342", + "type": "github" + }, + "original": { + "owner": "php", + "ref": "PHP-8.1", + "repo": "php-src", + "type": "github" + } + }, + "php-src-82": { + "flake": false, + "locked": { + "lastModified": 1702649516, + "narHash": "sha256-U6s1i/uk4srCzgUkFHKxgLzKdvxDAoE5qb/R9fyq8D8=", + "owner": "php", + "repo": "php-src", + "rev": "40ccc8ea7e0b69d4580588a459a78a73b1209d08", + "type": "github" + }, + "original": { + "owner": "php", + "ref": "PHP-8.2", + "repo": "php-src", + "type": "github" + } + }, + "php-src-83": { + "flake": false, + "locked": { + "lastModified": 1702649621, + "narHash": "sha256-ffJw5zuFcWsyqqYjLmbYGM9QNNBTGKx9jKSGzngFiic=", + "owner": "php", + "repo": "php-src", + "rev": "1b8be9acf07e9a6d94aa72b5dce09ba8afab69a9", + "type": "github" + }, + "original": { + "owner": "php", + "ref": "PHP-8.3", + "repo": "php-src", + "type": "github" + } + }, + "php-src-master": { + "flake": false, + "locked": { + "lastModified": 1702750016, + "narHash": "sha256-aiayaTWRTZBr5VYQgQfY3I+JvktbhDxUfTof7R+An9s=", + "owner": "php", + "repo": "php-src", + "rev": "d8268f1aba7190583e9ec24361c913559a4a347a", + "type": "github" + }, + "original": { + "owner": "php", + "ref": "master", + "repo": "php-src", + "type": "github" + } + }, + "php-src-nix": { + "inputs": { + "flake-parts": "flake-parts_3", + "nixpkgs": "nixpkgs_3", + "php-src-81": "php-src-81", + "php-src-82": "php-src-82", + "php-src-83": "php-src-83", + "php-src-master": "php-src-master", + "systems": "systems_2" + }, + "locked": { + "lastModified": 1702791878, + "narHash": "sha256-2GViiwoOGILsg465wWTOa8OvYL36HFDSrzQKwBPtJrA=", + "owner": "loophp", + "repo": "php-src-nix", + "rev": "b91ed8c2088e1d74907a127d87d79d825ce290de", + "type": "github" + }, + "original": { + "owner": "loophp", + "repo": "php-src-nix", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-parts": "flake-parts", + "nix-shell": "nix-shell", + "nixpkgs": "nixpkgs_4", + "systems": "systems_4" + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_4": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1701680307, + "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 00000000..7847a71d --- /dev/null +++ b/flake.nix @@ -0,0 +1,68 @@ +{ + description = "PHP development environments"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + nix-shell.url = "github:loophp/nix-shell"; + systems.url = "github:nix-systems/default"; + }; + + outputs = inputs@{ self, flake-parts, systems, ... }: flake-parts.lib.mkFlake { inherit inputs; } { + systems = import systems; + + perSystem = { config, self', inputs', pkgs, system, lib, ... }: + let + # This function creates a PHP interpreter with the proper required + # extensions by reading the composer.json and infering the extensions to + # enable. + php = pkgs.api.buildPhpFromComposer { + src = ./.; + php = pkgs.php82; + }; + in + { + _module.args.pkgs = import self.inputs.nixpkgs { + inherit system; + overlays = [ + inputs.nix-shell.overlays.default + ]; + }; + + apps = { + build-phar = { + type = "app"; + program = lib.getExe self'.packages.build-phar-script; + }; + }; + + devShells.default = pkgs.mkShellNoCC { + name = "php-devshell"; + buildInputs = [ + php + php.packages.box + php.packages.composer + self'.packages.build-phar-script + ]; + }; + + packages = { + build-phar-script = pkgs.writeShellApplication { + name = "build-phar-script"; + + runtimeInputs = [ + php + php.packages.box + php.packages.composer + ]; + + text = '' + rm -rf vendor + composer validate --strict + composer install --no-dev + box compile --no-interaction + ''; + }; + }; + }; + }; +} diff --git a/renovate.json b/renovate.json index 7a6b1283..5eb96d17 100644 --- a/renovate.json +++ b/renovate.json @@ -2,5 +2,8 @@ "$schema": "https://docs.renovatebot.com/renovate-schema.json", "extends": [ "local>Ocramius/.github:renovate-config" - ] + ], + "nix": { + "enabled": true + } }