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
4 changes: 2 additions & 2 deletions .github/workflows/cs-fix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ on:
- 'bridge/**'
- 'tests/**'
- 'testo.php'
- 'tools/code-style/.php-cs-fixer.dist.php'
- 'tools/code-style/composer.json'
- 'vendor-bin/code-style/.php-cs-fixer.dist.php'
- 'vendor-bin/code-style/composer.json'
- 'composer.json'
- 'composer.lock'
- '.github/workflows/cs-fix.yml'
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/infection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ on:
- 'bridge/**'
- 'tests/**'
- 'bin/**'
- 'tools/phpunit/composer.json'
- 'vendor-bin/phpunit/composer.json'
- 'infection.json'
- 'tools/phpunit/infection.phpunit.json'
- 'tools/phpunit/phpunit.xml'
- 'vendor-bin/phpunit/infection.phpunit.json'
- 'vendor-bin/phpunit/phpunit.xml'
- 'testo.php'
- 'composer.json'
- 'composer.lock'
Expand All @@ -23,10 +23,10 @@ on:
- 'bridge/**'
- 'tests/**'
- 'bin/**'
- 'tools/phpunit/composer.json'
- 'vendor-bin/phpunit/composer.json'
- 'infection.json'
- 'tools/phpunit/infection.phpunit.json'
- 'tools/phpunit/phpunit.xml'
- 'vendor-bin/phpunit/infection.phpunit.json'
- 'vendor-bin/phpunit/phpunit.xml'
- 'testo.php'
- 'composer.json'
- 'composer.lock'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/psalm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ on:
push:
paths:
- 'core/**'
- 'tools/psalm/psalm.xml'
- 'tools/psalm/composer.json'
- 'vendor-bin/psalm/psalm.xml'
- 'vendor-bin/psalm/composer.json'
- 'composer.json'
- 'composer.lock'
- '.github/workflows/psalm.yml'
pull_request:
paths:
- 'core/**'
- 'tools/psalm/psalm.xml'
- 'tools/psalm/composer.json'
- 'vendor-bin/psalm/psalm.xml'
- 'vendor-bin/psalm/composer.json'
- 'composer.json'
- 'composer.lock'
- '.github/workflows/psalm.yml'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/rector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- 'core/**'
- 'plugin/**'
- 'bridge/**'
- 'tools/rector/rector.php'
- 'vendor-bin/rector/rector.php'
- 'composer.json'
- 'composer.lock'
- '.github/workflows/rector.yml'
Expand All @@ -15,7 +15,7 @@ on:
- 'core/**'
- 'plugin/**'
- 'bridge/**'
- 'tools/rector/rector.php'
- 'vendor-bin/rector/rector.php'
- 'composer.json'
- 'composer.lock'
- '.github/workflows/rector.yml'
Expand Down Expand Up @@ -46,7 +46,7 @@ jobs:
with:
dependency-versions: highest

# rector is isolated in tools/rector; bin-links put its binary on vendor/bin.
# rector is isolated in vendor-bin/rector; bin-links put its binary on vendor/bin.
- name: Install bin tools
run: composer bin all install --ignore-platform-req=php

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/structarmed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- 'core/**'
- 'plugin/**'
- 'bridge/**'
- 'tools/structarmed/**'
- 'vendor-bin/structarmed/**'
- 'composer.json'
- 'composer.lock'
- '.github/workflows/structarmed.yml'
Expand All @@ -15,7 +15,7 @@ on:
- 'core/**'
- 'plugin/**'
- 'bridge/**'
- 'tools/structarmed/**'
- 'vendor-bin/structarmed/**'
- 'composer.json'
- 'composer.lock'
- '.github/workflows/structarmed.yml'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
dependency-versions: ${{ matrix.dependencies }}
paths: core plugin bridge tests testo.php

# Bin tools carry deps with a higher PHP floor than the matrix (e.g. tools/double).
# Bin tools carry deps with a higher PHP floor than the matrix (e.g. vendor-bin/double).
# They install everywhere but only load where the platform allows, so ignore the check.
- name: Install bin tools
run: composer bin all install --ignore-platform-req=php
Expand Down
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
/runtime/
/vendor/
/tests/PhpUnit/
/tools/*/vendor/
/tools/*/.agents/
/tools/*/.claude/
/.env
*.log
*.exe
Expand Down
2 changes: 1 addition & 1 deletion bin/Rector/RenameFinalMethodCollisionRector.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* which TestCase/Assert declare `final`. The method (and every `$this->`/`self::`/`static::` call to
* it within the same class) is renamed by appending `_` until the name no longer collides and is
* free in the class. The final method names are injected via configuration (the rector config reads
* them by reflection from the isolated tools/phpunit install at boot — native reflection inside a
* them by reflection from the isolated vendor-bin/phpunit install at boot — native reflection inside a
* running rule is unreliable, returning an empty set).
*
* Only classes that already extend `\PHPUnit\Framework\TestCase` are touched (run after
Expand Down
4 changes: 2 additions & 2 deletions bin/phpunit-coverage.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
$covDir = $argv[1] ?? 'runtime/phpunit-cov';
$covDir = \rtrim(\str_replace('\\', '/', $covDir), '/');

$phpunit = $root . '/tools/phpunit/vendor/phpunit/phpunit/phpunit';
$phpunit = $root . '/vendor-bin/phpunit/vendor/phpunit/phpunit/phpunit';

$command = \array_map('escapeshellarg', [
\PHP_BINARY,
$phpunit,
'--configuration',
$root . '/tools/phpunit/phpunit.xml',
$root . '/vendor-bin/phpunit/phpunit.xml',
// Keep the report lean and reproducible: drop the per-file source token dump, and never let a
// stale test-result cache reorder or skip cases (matches how Infection drives PHPUnit).
'--exclude-source-from-xml-coverage',
Expand Down
4 changes: 2 additions & 2 deletions bin/rector-phpunit-build.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@

/**
* Every `final` method PHPUnit's TestCase inherits, read by reflection from the isolated
* tools/phpunit install. Done here at config-boot (plain PHP) rather than inside the rule, where
* vendor-bin/phpunit install. Done here at config-boot (plain PHP) rather than inside the rule, where
* native reflection of TestCase is unreliable.
*
* @return list<string>
*/
function finalTestCaseMethods(): array
{
require_once __DIR__ . '/../tools/phpunit/vendor/autoload.php';
require_once __DIR__ . '/../vendor-bin/phpunit/vendor/autoload.php';

$names = [];
foreach ((new \ReflectionClass(\PHPUnit\Framework\TestCase::class))->getMethods() as $method) {
Expand Down
24 changes: 12 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,14 @@
"bamarni-bin": {
"bin-links": true,
"forward-command": false,
"target-directory": "tools"
"target-directory": "vendor-bin"
}
},
"scripts": {
"cs:diff": "php-cs-fixer fix --dry-run -v --diff --config=tools/code-style/.php-cs-fixer.dist.php",
"cs:fix": "php-cs-fixer fix -v --config=tools/code-style/.php-cs-fixer.dist.php",
"rector": "rector --config=tools/rector/rector.php",
"rector:ci": "rector --config=tools/rector/rector.php --dry-run --clear-cache --no-progress-bar",
"cs:diff": "php-cs-fixer fix --dry-run -v --diff --config=vendor-bin/code-style/.php-cs-fixer.dist.php",
"cs:fix": "php-cs-fixer fix -v --config=vendor-bin/code-style/.php-cs-fixer.dist.php",
"rector": "rector --config=vendor-bin/rector/rector.php",
"rector:ci": "rector --config=vendor-bin/rector/rector.php --dry-run --clear-cache --no-progress-bar",
"infect": [
"@putenv TESTO_CI=1",
"@putenv XDEBUG_MODE=coverage",
Expand All @@ -201,21 +201,21 @@
"@composer dump-autoload --quiet",
"rector process --config=bin/rector-phpunit-build.php --no-diffs --no-progress-bar"
],
"phpunit": "phpunit --configuration tools/phpunit/phpunit.xml",
"phpunit": "phpunit --configuration vendor-bin/phpunit/phpunit.xml",
"infect:phpunit": [
"@putenv XDEBUG_MODE=coverage",
"@php bin/phpunit-coverage.php runtime/phpunit-cov",
"infection --configuration=tools/phpunit/infection.phpunit.json --coverage=../../runtime/phpunit-cov --skip-initial-tests --threads=max --min-msi=0"
"infection --configuration=vendor-bin/phpunit/infection.phpunit.json --coverage=../../runtime/phpunit-cov --skip-initial-tests --threads=max --min-msi=0"
],
"infect:phpunit:ci": [
"@putenv XDEBUG_MODE=coverage",
"@php bin/phpunit-coverage.php runtime/phpunit-cov",
"infection --ansi --configuration=tools/phpunit/infection.phpunit.json --coverage=../../runtime/phpunit-cov --skip-initial-tests --logger-github --threads=max --show-mutations=0 --min-msi=0"
"infection --ansi --configuration=vendor-bin/phpunit/infection.phpunit.json --coverage=../../runtime/phpunit-cov --skip-initial-tests --logger-github --threads=max --show-mutations=0 --min-msi=0"
],
"psalm": "psalm -c tools/psalm/psalm.xml",
"psalm:baseline": "psalm -c tools/psalm/psalm.xml --set-baseline=tools/psalm/psalm-baseline.xml",
"psalm:ci": "psalm -c tools/psalm/psalm.xml --output-format=github --shepherd --show-info=false --stats --threads=4",
"structarmed": "structarmed analyse --config=tools/structarmed/structarmed.php --clear-cache",
"psalm": "psalm -c vendor-bin/psalm/psalm.xml",
"psalm:baseline": "psalm -c vendor-bin/psalm/psalm.xml --set-baseline=vendor-bin/psalm/psalm-baseline.xml",
"psalm:ci": "psalm -c vendor-bin/psalm/psalm.xml --output-format=github --shepherd --show-info=false --stats --threads=4",
"structarmed": "structarmed analyse --config=vendor-bin/structarmed/structarmed.php --clear-cache",
"test": "testo",
"test:ci": [
"@putenv TESTO_CI=1",
Expand Down
2 changes: 1 addition & 1 deletion infection.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "tools/infection/vendor/infection/infection/resources/schema.json",
"$schema": "vendor-bin/infection/vendor/infection/infection/resources/schema.json",
"source": {
"directories": [
"core",
Expand Down
6 changes: 3 additions & 3 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@
* Shared autoload bootstrap for every runner over Testo's own suite: the Testo CLI (testo.php),
* the generated PHPUnit mirror (phpunit.xml) and mutation testing on top of either.
*
* It loads the root autoloader, then the isolated bamarni-bin vendors under tools/ that hold the
* It loads the root autoloader, then the isolated bamarni-bin vendors under vendor-bin/ that hold the
* bridge runtime deps kept out of the root install — a higher PHP floor (double) or heavy/foreign
* transitive deps (vcr, mockery, revolt, rector). The is_file() guard keeps a run working when a
* bin namespace was not installed (double on PHP 8.2, a job that skipped it); the bridge's own
* suites.php still gates itself on the platform it needs.
*
* Only bridge vendors are listed. The standalone dev tools (psalm, phpunit, infection, code-style)
* also live under tools/, but their nikic/symfony deps differ by version and would clash if loaded
* also live under vendor-bin/, but their nikic/symfony deps differ by version and would clash if loaded
* into the same process as the tests.
*/

require_once __DIR__ . '/../vendor/autoload.php';

foreach (['double', 'vcr', 'mockery', 'revolt', 'rector'] as $binNamespace) {
$autoload = __DIR__ . "/../tools/{$binNamespace}/vendor/autoload.php";
$autoload = __DIR__ . "/../vendor-bin/{$binNamespace}/vendor/autoload.php";
\is_file($autoload) and require_once $autoload;
}
8 changes: 0 additions & 8 deletions tools/psalm/composer.json

This file was deleted.

4 changes: 4 additions & 0 deletions vendor-bin/code-style/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/vendor/
/composer.lock
/.*/
/skills.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

// This config lives under tools/code-style/, next to its isolated php-cs-fixer install: the
// This config lives under vendor-bin/code-style/, next to its isolated php-cs-fixer install: the
// autoloader sits alongside it, and the __DIR__-based source paths reach the project root with ../../.
require_once __DIR__ . '/vendor/autoload.php';

Expand Down Expand Up @@ -41,6 +41,6 @@ function expandWildcardDirs(string ...$patterns): array

return $builder
// Keep the cache in the root runtime/ (git-ignored); the default is relative to this config's
// own directory, which would otherwise litter tools/code-style/ with an untracked cache file.
// own directory, which would otherwise litter vendor-bin/code-style/ with an untracked cache file.
->cache(__DIR__ . '/../../runtime/php-cs-fixer.cache')
->build();
File renamed without changes.
4 changes: 4 additions & 0 deletions vendor-bin/double/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/vendor/
/composer.lock
/.*/
/skills.json
File renamed without changes.
4 changes: 4 additions & 0 deletions vendor-bin/infection/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/vendor/
/composer.lock
/.*/
/skills.json
File renamed without changes.
4 changes: 4 additions & 0 deletions vendor-bin/mockery/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/vendor/
/composer.lock
/.*/
/skills.json
File renamed without changes.
4 changes: 4 additions & 0 deletions vendor-bin/phpunit/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/vendor/
/composer.lock
/.*/
/skills.json
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Included into Infection's own process (the `bootstrap` option of infection.phpunit.json).
*
* Infection loads every covered source class to generate its mutants. The Rector bridge rules extend
* Rector's classes, which live in the isolated tools/rector vendor rather than the root install, so
* Rector's classes, which live in the isolated vendor-bin/rector vendor rather than the root install, so
* without this the first covered rule stops the whole run. Rector ships its dependencies scoped,
* and nikic/php-parser keeps resolving from Infection's vendor. The other bridge vendors carry
* unscoped symfony/nikic deps that would clash with Infection's, so only Rector is loaded.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"../../bridge/vcr/src"
]
},
"bootstrap": "tools/phpunit/infection-bootstrap.php",
"bootstrap": "vendor-bin/phpunit/infection-bootstrap.php",
"timeout": 10,
"testFramework": "phpunit",
"phpUnit": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
bridge/rector/README.md "Why Testo -> PHPUnit"). Not the primary test runner —
`composer test` (Testo) is.

This config lives under tools/phpunit/, next to its isolated PHPUnit install; its paths are
This config lives under vendor-bin/phpunit/, next to its isolated PHPUnit install; its paths are
therefore relative to this directory. PHPUnit resolves them against the config's own location,
and Infection rewrites them against `phpUnit.configDir` from infection.phpunit.json.

Expand Down
3 changes: 3 additions & 0 deletions vendor-bin/psalm/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/vendor/
/composer.lock
/.*/
14 changes: 14 additions & 0 deletions vendor-bin/psalm/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"require": {
"llm/skills": "^1.22",
"roxblnfk/unpoly": "^1.8.2",
"vimeo/psalm": "^7"
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"allow-plugins": {
"llm/skills": true
}
}
}
File renamed without changes.
4 changes: 2 additions & 2 deletions tools/psalm/psalm.xml → vendor-bin/psalm/psalm.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<!--
Psalm config lives under tools/psalm/, next to its isolated Psalm install. resolveFromConfigFile
Psalm config lives under vendor-bin/psalm/, next to its isolated Psalm install. resolveFromConfigFile
is off so the base directory stays the project root (where `composer psalm` runs), not this
folder: projectFiles paths and the baseline's <file src> entries therefore remain root-relative
and need no rewriting. errorBaseline is given relative to that root. The XSD in schemaLocation is
Expand All @@ -19,7 +19,7 @@
findUnusedCode="false"
ensureArrayStringOffsetsExist="true"
addParamDefaultToDocblockType="true"
errorBaseline="tools/psalm/psalm-baseline.xml"
errorBaseline="vendor-bin/psalm/psalm-baseline.xml"
>
<projectFiles>
<directory name="core" />
Expand Down
11 changes: 11 additions & 0 deletions vendor-bin/psalm/skills.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://raw.githubusercontent.com/roxblnfk/skills/master/resources/skills.schema.json",
"path-from-root": "vendor-bin/psalm",
"target": ".agents/skills",
"dependencies": {
"composer": {
"trusted": ["vimeo/psalm"],
"trusted-replace": true
}
}
}
4 changes: 4 additions & 0 deletions vendor-bin/rector/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/vendor/
/composer.lock
/.*/
/skills.json
File renamed without changes.
2 changes: 1 addition & 1 deletion tools/rector/rector.php → vendor-bin/rector/rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPublicMethodParameterRector;

// This config lives under tools/rector/, next to Rector's isolated install, so its __DIR__-based
// This config lives under vendor-bin/rector/, next to Rector's isolated install, so its __DIR__-based
// paths reach back to the project root with ../../.
return RectorConfig::configure()
->withPaths([
Expand Down
4 changes: 4 additions & 0 deletions vendor-bin/revolt/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/vendor/
/composer.lock
/.*/
/skills.json
File renamed without changes.
4 changes: 4 additions & 0 deletions vendor-bin/structarmed/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/vendor/
/composer.lock
/.*/
/skills.json
Loading
Loading