Skip to content
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
1 change: 0 additions & 1 deletion .github/workflows/buid_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ jobs:
# make bin files runnable without "php"
chmod 777 ecs-prefixed-downgraded/bin/ecs
chmod 777 ecs-prefixed-downgraded/bin/ecs.php
chmod 777 ecs-prefixed-downgraded/bin/blink

# 4. lint the code for PHP 7.4 - this must happen here, as setup-php allows only one PHP version switch: https://github.com/shivammathur/setup-php/issues/434
-
Expand Down
15 changes: 6 additions & 9 deletions .github/workflows/turbo.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Turbo

# End-to-end check of --blink: ECS dumps the resolved ecs.php config to JSON and
# hands it to the ecs-go binary, which maps the rules and rewrites the code. This
# builds ecs-go from source, runs --blink --fix over a golden fixture, and asserts
# the output matches the expected result.
# hands it to the blink binary, which maps the rules and rewrites the code. This
# builds blink from the local blink/ module, runs --blink --fix over a golden
# fixture, and asserts the output matches the expected result.

on:
pull_request:
Expand Down Expand Up @@ -32,17 +32,14 @@ jobs:
go-version: "1.26.6"

-
name: "Build the ecs-go binary from source"
run: |
git clone --depth 1 https://github.com/TomasVotruba/ecs-go.git /tmp/ecs-go
cd /tmp/ecs-go/ecs-go
go build -o /tmp/ecs-go-bin .
name: "Build the blink binary from the local blink/ module"
run: go build -C blink -o /tmp/blink-bin .

-
name: "Run --blink --fix over the golden fixture"
run: |
cp -r tests/Turbo/Fixture/input /tmp/turbo-work
ECS_TURBO_BIN=/tmp/ecs-go-bin bin/ecs check /tmp/turbo-work --blink --fix \
ECS_TURBO_BIN=/tmp/blink-bin bin/ecs check /tmp/turbo-work --blink --fix \
--config=tests/Turbo/Fixture/ecs.php --no-progress-bar --ansi || true

-
Expand Down
41 changes: 0 additions & 41 deletions bin/blink

This file was deleted.

3 changes: 1 addition & 2 deletions build/target-repository/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"license": "MIT",
"keywords": ["static analysis", "code style", "automation", "fixer"],
"bin": [
"bin/ecs",
"bin/blink"
"bin/ecs"
],
"require": {
"php": ">=7.2"
Expand Down
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
"fixer"
],
"bin": [
"bin/ecs",
"bin/blink"
"bin/ecs"
],
"require": {
"php": ">=8.4",
Expand Down
7 changes: 1 addition & 6 deletions src/Turbo/EcsGoBinaryLocator.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,13 @@ public function locate(): string
return $bundledBinary;
}

$vendorBinary = getcwd() . '/vendor/bin/blink';
if (is_file($vendorBinary)) {
return $vendorBinary;
}

$pathBinary = $this->findOnPath('blink');
if ($pathBinary !== null) {
return $pathBinary;
}

throw new EcsGoBinaryNotFoundException(sprintf(
'The blink binary for --blink was not found in "%s" env, "vendor/bin/blink" or on PATH. Build it with "go build" in the blink/ directory and point "%s" to it.',
'The blink binary for --blink was not found in "%s" env or on PATH. Build it with "go build" in the blink/ directory and point "%s" to it.',
self::ENV_OVERRIDE,
self::ENV_OVERRIDE,
));
Expand Down
Loading