Weave 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
Behat Deprecation Extension

Behat Deprecation Extension Laravel Package

caciobanu/behat-deprecation-extension

A Behat extension that captures PHP deprecation notices raised during your scenarios and surfaces them in the test output, making it easy to track down and fix deprecated code before upgrading dependencies or PHP versions. Keeps your test suite clean and your upgrades predictable.

View on GitHub
Deep Wiki
Context7

A Behat extension that displays user deprecated features, inspired by "symfony/phpunit-bridge".

Frequently asked questions about Behat Deprecation Extension
What does caciobanu/behat-deprecation-extension do in a Laravel project?
It is a Behat extension that captures PHP E_DEPRECATED and E_USER_DEPRECATED notices raised while Behat scenarios run and reports them with the scenario context. In a Laravel project it only applies if the project already uses Behat for acceptance tests, because Laravel's default PHPUnit or Pest stack does not use this extension. It is a test-time diagnostic aid, not a runtime Laravel package or service provider.
How do I install and register the extension in behat.yml?
Install it as a development dependency with Composer, then register the extension in your Behat configuration under the extensions key using its fully qualified class name. The overview does not list the exact class or all options here, so verify the extension class and configuration keys against the package source or README before rollout. Commit the behat.yml change only after a spike confirms it works with your Behat version.
Which PHP and Behat versions are supported?
The package's last release is from July 2020, so support for modern PHP 8.x and recent Behat major versions is not guaranteed. Treat the Composer constraints and runtime behavior as unproven until you test against your exact PHP and Behat versions. Build a small compatibility matrix, because Composer conflicts or Behat API changes are likely on newer stacks.
Does this package work with Laravel's default PHPUnit or Pest test suite?
No. It is a Behat extension and hooks into the Behat test run, so it does not automatically integrate with PHPUnit, Pest, Artisan test, or Laravel's default testing stack. Laravel teams that do not already use Behat should use a PHPUnit or Pest listener or another deprecation-reporting approach instead of adding Behat only for this package.
How does it capture and report PHP deprecation notices?
It is designed to surface native and userland PHP deprecations raised during Behat scenario execution and tie each notice to the scenario being run. The exact capture mechanism, such as an error handler, output buffering, or Behat hooks, is not fully described in the overview and should be confirmed in the source. Validate that suppressed deprecations and deprecations converted to exceptions are handled as you expect.
Can I ignore known or vendor deprecation notices?
Yes, the package supports ignore rules for known or vendor notices, which helps reduce noise from third-party code. Define ignore rules carefully so first-party deprecations are not hidden alongside vendor noise. Keep the ignore list reviewed and versioned so it does not become a permanent silencer.
Can it fail the build or does it only report deprecations?
The overview describes reporting deprecations in the Behat output, not a guaranteed CI failure behavior. There is no stated built-in gate that fails the build when deprecations appear, so do not assume it will block CI by itself. If you need blocking behavior, verify the extension's options or add a wrapper that parses output and fails on selected first-party deprecations.
Does it work with parallel Behat workers or large test suites?
Parallel Behat execution and large-suite behavior are not addressed in the provided overview, so treat them as unproven. Test with your worker setup to confirm that notices are not lost, duplicated, or mixed across scenarios. Measure runtime and memory overhead on a representative suite before enabling it broadly.
Is this package maintained, and what should I do if it is stale?
The last release is 2020-07-07, the repository has low community traction, and it appears effectively unmaintained. For an existing Behat suite, you can adopt it as a low-cost migration aid but should assign an internal owner and plan for fork ownership or replacement. The package is MIT licensed, so forking with updated Composer constraints and minimal patches is a viable path if compatibility blocks adoption.
What are alternatives for catching deprecations in a Laravel application?
For Laravel-first projects, prefer PHPUnit or Pest listeners, Symfony PHPUnit Bridge-style deprecation reporting where applicable, or a small internal error-handler extension in your existing test stack. If you already run Behat, this extension can be used in advisory mode alongside PHPUnit or Pest deprecation detection. Do not introduce Behat solely for this package if your application is otherwise Laravel-native.
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.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect