Skip to content

Commit 6012a6d

Browse files
committed
Update to current box version (phar packaging)
Current version (2.x) is really old and emitting some warnings with php >= 8.1. So, just move to current 4.x version. Simply change to its new incarnation (fork of the original) and tidy up a few parameters. Note that the phar still has a good number of limitations: - Not all checks work (phpcs, behat...). - Cannot post-install moodle-local_ci (vnu.jar) - ... But all those are pre-existing and this new version does not change that. Note that box requires PHP 8.1 to build the phar, but the phar works perfectly with PHP 7.4 (our min requirement). Fixes #235
1 parent 225a511 commit 6012a6d

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
- name: Check out repository code
1616
uses: actions/checkout@v3
1717

18-
- name: Setup PHP 7.4
18+
- name: Setup PHP 8.1
1919
uses: shivammathur/setup-php@v2
2020
with:
21-
php-version: 7.4
21+
php-version: 8.1
2222
ini-values: phar.readonly = false
2323

2424
- name: Build PHAR

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ ifeq (, $(wildcard vendor))
7272
endif
7373

7474
build/box.phar:
75-
@cd build && curl -LSs https://box-project.github.io/box2/installer.php | php
75+
curl -LSs https://github.com/box-project/box/releases/download/4.3.8/box.phar -o build/box.phar
7676

7777
build/moodle-plugin-ci.phar: build/box.phar
7878
$(COMPOSER) install --no-dev --prefer-dist --classmap-authoritative --quiet
79-
php -d memory_limit=-1 -d phar.readonly=false build/box.phar build
79+
php -d memory_limit=-1 -d phar.readonly=false build/box.phar compile
8080
$(COMPOSER) install --prefer-dist --quiet
8181

8282
docs/CLI.md: $(CMDS)

box.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
"chmod": "0755",
32
"compression": "GZ",
43
"directories": [
54
"src",
@@ -39,13 +38,11 @@
3938
]
4039
}
4140
],
42-
"compactors": "Herrera\\Box\\Compactor\\Php",
41+
"compactors": "KevinGH\\Box\\Compactor\\Php",
4342
"git-version": "package_version",
4443
"replacements": {
4544
"is_boxed": "BOXED"
4645
},
4746
"intercept": true,
48-
"main": "bin/moodle-plugin-ci",
49-
"output": "build/moodle-plugin-ci.phar",
50-
"stub": true
51-
}
47+
"output": "build/moodle-plugin-ci.phar"
48+
}

docs/CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
99
The format of this change log follows the advice given at [Keep a CHANGELOG](http://keepachangelog.com).
1010

1111
## [Unreleased]
12+
### Fixed
13+
- Updated the PHAR packaging utility ([box](https://github.com/box-project/box)) to actual one, to avoid various issues happening with PHP 8.1 and up.
14+
1215
## [4.1.2] - 2023-09-02
1316
### Changed
1417
- Modified `moodle-local_ci` composer dependencies and manage them normally, removing some ancient bits that have [stopped working with Composer 2.6.0 and up](https://github.com/composer/composer/issues/11613).

0 commit comments

Comments
 (0)