Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Amp Sql Profiler Bundle Laravel Package

async/amp-sql-profiler-bundle

View on GitHub
Deep Wiki
Context7

Amp SQL profiler bundle

If you use Amp with Symfony then you are probably based, but that means Doctrine will be useless (except perhaps its query builder), so you can't use the handy query profiler from DoctrineBundle. This is the missing SQL profiler for Amp.

Features

Profiles Amp SQL connections in Symfony applications and displays the results in the Symfony Profiler toolbar.

  • Shows query summary in toolbar view.
  • Shows full query details in profiler view.
  • Supports transactions.
  • Supports backtraces.

Limitations

Using an unsupported feature may throw NotImplementedException.

  • Does not support prepared statements.
  • Does not support transaction save points.

Installation

Add the bundle to your project with Composer.

composer require --dev async/amp-sql-profiler-bundle

If Symfony Flex is installed, it should update bundles.php automatically with a line similar to the following.

ScriptFUSION\AmpSqlProfilerBundle\AmpSqlProfilerBundle::class => ['dev' => true, 'test' => true],

We recommend removing the 'test' key and only running the bundle in dev. If Flex is not available, the line can be added manually.

To enable profiling, all instances of Amp\Sql\Pool must be replaced with ProfiledPool at dependency injection time. To do this, add the following line to services_dev.yaml.

  # Enable Amp SQL profiling.
  Amp\Sql\Pool:
    factory: '@ScriptFUSION\AmpSqlProfilerBundle\ProfiledPoolFactory'

Unfortunately, this will create a circular reference because ProfiledPoolFactory creates an instance of ProfiledPool which requires an instance of Amp\Sql\Pool. This can be resolved by specifying the specific implementation of the Pool that we want to profile. For example, the following configuration may suffice to profile Postgres.

  ScriptFUSION\AmpSqlProfilerBundle\ProfiledPool:
    arguments:
      - '@Amp\Postgres\PostgresConnectionPool'

  Amp\Postgres\PostgresConnectionPool: ~
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver