Download the PHP package testo/bridge-rector without Composer

On this page you can find all versions of the php package testo/bridge-rector. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package bridge-rector

testo/bridge-rector

Rector rules to convert test suites between Pest, PHPUnit and Testo.

Directions & config sets

Each direction ships a Rector set. Reference it with the typed handle from Testo\Bridge\Rector\Set\TestoRectorSetList rather than the raw file path:

Direction Set constant Status
Testo → PHPUnit TestoRectorSetList::TESTO_TO_PHPUNIT Assert calls, Expect::exception (bare), throw SkipTest, #[Covers]→#[CoversClass], lifecycle attributes.
PHPUnit → Testo TestoRectorSetList::PHPUNIT_TO_TESTO Assert calls (arg-order restored), expectException (bare), markTestSkipped, #[CoversClass]→#[Covers], lifecycle methods → attributes.
Pest → Testo TestoRectorSetList::PEST_TO_TESTO expect()->toX() → Assert::* only. The functional→class restructuring (test()/it() → methods) is not automatable — see src/PestToTesto/TODO.md.

The set files live under config/; the constants are absolute paths to those files, so they also work with $rectorConfig->import(...).

Conversions that have no faithful counterpart in the target framework (PHPUnit mocks, constraints, memory-leak / retry / repeat, Pest higher-order & arch() tests, etc.) are not silently dropped: each is a documented stub rule plus an entry in the direction's TODO.md.

Argument order (important)

Testo's comparison assertions are (actual, expected); PHPUnit's are (expected, actual). Both AssertCall* rules swap the first two arguments accordingly — getting this wrong would silently invert every comparison, so it is covered by fixtures.

Why Testo → PHPUnit

Testo is self-hosted: the engine that discovers and runs tests is the same code Infection mutates. A mutation on the run path (e.g. Sorter, PipeOptions) can break discovery itself, producing spurious survivors/kills instead of a real mutation signal. Converting the unit-style self-tests to PHPUnit lets Infection's PHPUnit adapter run them on a runner that shares no code with the mutated engine — a mutation can then only be caught (or missed) by an assertion, never by breaking the harness.

Usage

Testing the rules — "inline tests for rules"

The rules are tested by Testo itself, with no PHPUnit dependency. A rule carries #[\Testo\Bridge\Rector\Testing\TestRectorFixtures('<dir>')] pointing at co-located *.php.inc fixtures (input + expected, separated by a ----- line; no separator = "must stay unchanged"). Each declared path is relative to the rule's own directory (or absolute) and must resolve within the working directory — an escaping path is rejected; declaring the attribute with no paths tests nothing. The reusable harness lives in src/Testing/ — attach RectorTestingPlugin to a suite whose finder scans the rule sources, and each fixture is run through a freshly-booted Rector container and reported as its own data set. Fixtures are export-ignored; the harness ships so downstream rule authors can reuse it (testo/* are require-dev + suggest).


All versions of bridge-rector with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
internal/path Version ^1.2
rector/rector Version ^2.6.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package testo/bridge-rector contains the following files

Loading the files please wait ...