Download the PHP package jeytekdev/explain-lint-codeception without Composer

On this page you can find all versions of the php package jeytekdev/explain-lint-codeception. 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 explain-lint-codeception

jeytekdev/explain-lint-codeception

Codeception bridge for jeytekdev/explain-lint — re-runs EXPLAIN against every query your test suite executes, and fails the build on full table scans, lost indexes, filesort and temporary tables.

This package only triggers analysis/reporting — it does not capture queries by itself. Without one of the capture adapters below installed and configured, every run reports "0 issues", indistinguishable from a clean pass.

Why this package exists

packages/core's reporting/analysis pipeline is a PHPUnit extension, registered via <extensions> in phpunit.xml and driven by PHPUnit's native Runner\Extension/Event system.

Codeception 5 never reads phpunit.xml and never bootstraps that mechanism. Codeception\Suite::initPHPUnitConfiguration() builds an in-memory DefaultConfiguration purely so PHPUnit\Framework\TestCase has something to consult, and every test runs through Codeception\Suite::run() / Codeception's own Symfony EventDispatcher — never through PHPUnit\TextUI\Application, the only thing that parses <extensions> and calls Extension::bootstrap(). Concretely: Codeception\Test\TestCaseWrapper::test() calls the wrapped TestCase::runBare() directly, bypassing the PHPUnit\Framework\TestRunner\TestRunner class that emits the Finished event the core PHPUnit extension listens for.

So if your project runs tests via vendor/bin/codecept run (the default for the Yii2 basic/advanced templates, and common with Laravel/Symfony too) — as opposed to vendor/bin/phpunit directly — installing jeytekdev/explain-lint's PHPUnit extension alone does nothing: query capture (via the Laravel/Doctrine/Yii2 bridge) still works, but no EXPLAIN ever runs and no report is ever produced, silently.

This package re-implements the same subscriber wiring as a Codeception\Extension, registered in codeception.yml instead of phpunit.xml, using Codeception's own event dispatcher. It reuses Jeytekdev\ExplainLint\PHPUnit\TestAnalysisRunner and Jeytekdev\ExplainLint\Report\* from core unchanged — only the event source differs.

Install (2 minutes)

You still need a capture adapter for your stack — this package only handles analysis/reporting:

Register the extension in codeception.yml (or a per-suite <suite>.suite.yml if you only want it on one suite):

config is optional and defaults to explain-lint.php in the working directory codecept run is invoked from — same config file format as core, see the core README.

Create explain-lint.php with:

--config-only skips the phpunit.xml registration step from the plain explain-lint:install — running that step for a Codeception project would edit a file Codeception never reads (see above), so don't run it without the flag here.

Then run your suite as usual:

Known limitation: no setUp()/tearDown() split

The PHPUnit extension only analyzes queries executed inside the test method body itself — setUp()/migrations/fixture loading are excluded, via a PreparationStarted → Prepared phase transition PHPUnit dispatches around setUp().

Codeception has no equivalent signal: TestCaseWrapper::test() calls runBare() directly, which runs setUp(), the test body, and tearDown() as one opaque unit Codeception never sees the inside of. This extension therefore analyzes everything captured between test.before and test.end — including setUp()/fixture queries. In practice this mostly matters if your fixtures themselves contain a query bad enough to trip a rule; allowlist it by table/fingerprint the same way you would any other finding (see the allowlist/allowlist_fingerprints keys in the core README).

License

MIT


All versions of explain-lint-codeception with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
jeytekdev/explain-lint Version ^2.0
codeception/codeception Version ^5.0
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 jeytekdev/explain-lint-codeception contains the following files

Loading the files please wait ...