Skip to content

Commit

Permalink
Add Symfony polyfill to the PHAR stub
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianfeldmann committed Apr 16, 2021
1 parent 888e065 commit 4316d5d
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 19 deletions.
14 changes: 4 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,21 @@ jobs:
GPG_KEYS_ENCRYPTED: "build/captainhook-signing-keys.asc.gpg"

steps:
- name: "Checkout"
- name: Checkout
uses: actions/checkout@v2.0.0
with:
ref: main
fetch-depth: 0

- name: "Install PHP with extensions"
- name: Install PHP with extensions
uses: shivammathur/setup-php@v2
with:
coverage: none
extensions: mbstring
php-version: 7.4

- name: "Install dependencies"
run: "composer install --prefer-dist --no-dev --no-interaction --no-progress"

- name: Force Symfony process version 4
run: composer require symfony/process ^4.0

- name: Force Symfony console version 4
run: composer require symfony/console ^4.0
- name: Install dependencies
run: composer install --prefer-dist --no-dev --no-interaction --no-progress

- name: "Install tooling"
run: "GITHUB_AUTH_TOKEN=${{ secrets.GITHUB_API_TOKEN }} tools/phive --no-progress --home ./.phive install --force-accept-unsigned --trust-gpg-keys 4AA394086372C20A,31C7E470E2138192,8E730BA25823D8B5,CF1A108D0E7AE720"
Expand Down
10 changes: 1 addition & 9 deletions box.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
{
"alias": "captainhook",
"banner": [
"This file is part of CaptainHook",
"",
"(c) Sebastian Feldmann <sf@sebastian-feldmann.info>",
"",
"For the full copyright and license information, please view the LICENSE",
"file that was distributed with this source code."
],
"stub": "build/stub.php",
"files":[
"LICENSE"
],
Expand Down
21 changes: 21 additions & 0 deletions build/stub.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env php
<?php

/*
* This file is part of CaptainHook
*
* (c) Sebastian Feldmann <sf@sebastian-feldmann.info>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

Phar::mapPhar('captainhook');

require 'phar://captainhook/vendor/symfony/polyfill-php80/bootstrap.php';

require 'phar://captainhook/.box/bin/check-requirements.php';

require 'phar://captainhook/bin/captainhook';

__HALT_COMPILER(); ?>

0 comments on commit 4316d5d

Please sign in to comment.