Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get rid of phive #881

Merged
merged 2 commits into from
May 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 1 addition & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,14 @@ jobs:
- name: "Checkout"
uses: actions/checkout@v2

- name: "Cache tools installed with phive"
uses: actions/cache@v2
with:
path: |
~/.phive
key: phive-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('.phive/phars.xml') }}
restore-keys: |
phive-${{ runner.os }}-${{ matrix.php-version }}-
phive-${{ runner.os }}-
phive-

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, xml, ctype, iconv
ini-values: phar.readonly=0
coverage: none
tools: phive, composer
tools: composer

- name: Get composer cache directory
id: composercache
Expand All @@ -58,9 +47,6 @@ jobs:
composer-${{ runner.os }}-
composer-

- name: "Install tools with phive"
run: make tools-install

- name: "Install dependencies with composer"
run: composer install --no-interaction --no-progress --no-suggest --optimize-autoloader

Expand Down
31 changes: 3 additions & 28 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,13 @@ jobs:
- name: "Checkout"
uses: actions/checkout@v2

- name: "Cache tools installed with phive"
uses: actions/cache@v2
with:
path: |
~/.phive
key: phive-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('.phive/phars.xml') }}
restore-keys: |
phive-${{ runner.os }}-${{ matrix.php-version }}-
phive-${{ runner.os }}-
phive-

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, xml, ctype, iconv
coverage: none
tools: phive, composer
tools: composer

- name: Get composer cache directory
id: composercache
Expand All @@ -61,9 +50,6 @@ jobs:
composer-${{ runner.os }}-
composer-

- name: "Install tools with phive"
run: make tools-install

- name: "Run tests"
run: make tests

Expand All @@ -80,24 +66,13 @@ jobs:
- name: "Checkout"
uses: actions/checkout@v2

- name: "Cache tools installed with phive"
uses: actions/cache@v2
with:
path: |
~/.phive
key: phive-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('.phive/phars.xml') }}
restore-keys: |
phive-${{ runner.os }}-${{ matrix.php-version }}-
phive-${{ runner.os }}-
phive-

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, xml, ctype, iconv
coverage: xdebug
tools: phive, composer
tools: composer

- name: Get composer cache directory
id: composercache
Expand Down Expand Up @@ -141,7 +116,7 @@ jobs:
php-version: ${{ matrix.php-version }}
extensions: mbstring, xml, ctype, iconv
coverage: none
tools: phive, composer
tools: composer

- name: Get composer cache directory
id: composercache
Expand Down
6 changes: 0 additions & 6 deletions .phive/phars.xml

This file was deleted.

18 changes: 6 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
BOX_BIN := ./tools/box
BOX_BIN := ./vendor/bin/box
COMPOSER_BIN := composer
PHP_BIN := php
PHIVE_BIN := phive
PHP_CS_FIXER_BIN := ./vendor/bin/php-cs-fixer
PHPSTAN_BIN := ./vendor/bin/phpstan
PSALM_BIN := ./vendor/bin/psalm
PHPUNIT_BIN := ./tools/phpunit
INFECTION_BIN := ./tools/infection
PHPUNIT_BIN := ./vendor/bin/phpunit
INFECTION_BIN := ./vendor/bin/infection

.PHONY: build tools-install composer-install tests tests-coverage gpg php-cs-check php-cs-fix phpstan
.PHONY: build composer-install tests tests-coverage gpg php-cs-check php-cs-fix phpstan

build: tools-install tests
build: tests
$(BOX_BIN) compile

tools-install:
gpg --keyserver hkps://keyserver.ubuntu.com --receive-keys E82B2FB314E9906E
gpg --keyserver hkps://keys.openpgp.org --receive-keys 4AA394086372C20A CF1A108D0E7AE720 C5095986493B4AA0 12CE0F1D262429A5
$(PHIVE_BIN) --no-progress install --copy --trust-gpg-keys E82B2FB314E9906E,4AA394086372C20A,CF1A108D0E7AE720,C5095986493B4AA0,12CE0F1D262429A5 --force-accept-unsigned

composer-install:
$(COMPOSER_BIN) install --optimize-autoloader

Expand All @@ -43,7 +37,7 @@ deptrac:
psalm:
$(PSALM_BIN)

infection: tools-install composer-install
infection: composer-install
$(INFECTION_BIN) --threads=$(shell nproc || sysctl -n hw.ncpu || 1) --test-framework-options='--testsuite=Tests' --only-covered --min-msi=80

gpg:
Expand Down
9 changes: 6 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"require": {
"php": "^7.4 || ^8.0",
"ext-json": "*",
"composer/xdebug-handler": "^3.0",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To make things work, I had to change some packages' versions. I have tested that they are still working as expected.

"jetbrains/phpstorm-stubs": "^2020.2",
"composer/xdebug-handler": "^2.0",
"jetbrains/phpstorm-stubs": "^2021.3",
"nikic/php-parser": "^4.3",
"phpdocumentor/graphviz": "^2.1",
"phpdocumentor/type-resolver": "^1.0",
Expand Down Expand Up @@ -57,9 +57,12 @@
}
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.8",
"friendsofphp/php-cs-fixer": "^3.4",
"humbug/box": "^3.16.0",
"infection/infection": "^0.25",
"phpstan/phpstan": "^1.5",
"phpstan/phpstan-symfony": "^1.0",
"phpunit/phpunit": "^9.5",
"vimeo/psalm": "^4.22"
}
}
Loading