PHPackages                             tumtum/sw6-sql-logger - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. tumtum/sw6-sql-logger

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

tumtum/sw6-sql-logger
=====================

Returns SQL queries to the Browser or cli.

1.3.0(1mo ago)01.1kGPL-3.0PHP

Since Jul 31Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/TumTum/sw6-sql-logger)[ Packagist](https://packagist.org/packages/tumtum/sw6-sql-logger)[ RSS](/packages/tumtum-sw6-sql-logger/feed)WikiDiscussions main Synced today

READMEChangelog (2)Dependencies (6)Versions (5)Used By (0)

Shopware SQL Logger
-------------------

[](#shopware-sql-logger)

Returns all SQL queries into console of a Browser or cli.

Install
-------

[](#install)

`composer require --dev tumtum/sw6-sql-logger`

Usage
-----

[](#usage)

Just set the function `StartSQLLog()` somewhere and from that point on all SQLs will be logged.

```
\StartSQLLog();

$result = $this->productRepository->search(new Criteria(['product.id']), $context);

\StopSQLLog();
```

Usage with VarDumper::dump()
----------------------------

[](#usage-with-vardumperdump)

If you want to dump the SQLs into the `VarDumper::dump()` and put out the result into a HTML file, you can use the following step:

##### Configure the Shopware 6 (one time):

[](#configure-the-shopware-6-one-time)

```
# config/packages/dev/debug.yml
debug:
    dump_destination: tcp://%env(VAR_DUMPER_SERVER)%
```

##### Start the VarDumper server:

[](#start-the-vardumper-server)

```
./bin/console server:dump --format html > ./public/debug.html
```

open in Browser:

##### Start the SQL logger:

[](#start-the-sql-logger)

```
\StartSQLLog(useVarDumper: true);
```

Usage with Ray
--------------

[](#usage-with-ray)

[Ray](https://myray.app/) is a powerful debugging tool for PHP developers.

##### Call in Ray Style:

[](#call-in-ray-style)

```
ray()->showQueries()

// This query will be displayed.
$this->productRepository->search(new Criteria(['product.id']), $context);

ray()->stopShowingQueries();

// This query won't be displayed.
$this->productRepository->search(new Criteria(['product.id']), $context);
```

Alternatively, you can pass a callable to showQueries. Only the queries performed inside that callable will be displayed in Ray. If you include a return type in the callable, the return value will also be returned.

```
// This query won't be displayed.
$this->productRepository->search(new Criteria(['product.id']), $context);

ray()->showQueries(function() {
    // This query will be displayed.
    $this->productRepository->search(new Criteria(['product.id']), $context);
});

$users = ray()->showQueries(function () {
    // This query will be displayed and the collection will be returned.
    return $this->productRepository->search(new Criteria(['product.id']), $context);
});

$this->productRepository->search(new Criteria(['product.id']), $context); // this query won't be displayed.
```

##### Call Classic

[](#call-classic)

```
#Classic
\StartSQLLog(useRayDumper: true);
```

To ensure Ray works correctly, you need to install the corresponding package:

```
composer require --dev spatie/ray
```

Screenshots
-----------

[](#screenshots)

CLI:

[![Example CLI](https://raw.githubusercontent.com/TumTum/sw6-sql-logger/master/img/screenshot-cli.png)](https://raw.githubusercontent.com/TumTum/sw6-sql-logger/master/img/screenshot-cli.png)

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance91

Actively maintained with recent releases

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~341 days

Total

4

Last Release

44d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/08ef539c93c95c0ccb3c36d51c8cc86a6276e8e5a8fb3fadd983843b013dbba3?d=identicon)[TumTum](/maintainers/TumTum)

---

Top Contributors

[![TumTum](https://avatars.githubusercontent.com/u/225997?v=4)](https://github.com/TumTum "TumTum (6 commits)")

### Embed Badge

![Health badge](/badges/tumtum-sw6-sql-logger/health.svg)

```
[![Health](https://phpackages.com/badges/tumtum-sw6-sql-logger/health.svg)](https://phpackages.com/packages/tumtum-sw6-sql-logger)
```

###  Alternatives

[shopware/elasticsearch

Elasticsearch for Shopware

153.9M19](/packages/shopware-elasticsearch)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)[pimcore/pimcore

Content &amp; Product Management Framework (CMS/PIM/E-Commerce)

3.8k3.8M508](/packages/pimcore-pimcore)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[shopware/storefront

Storefront for Shopware

684.6M236](/packages/shopware-storefront)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
