no-leaks

:potable_water: PHPUnit Plugin for detecting Memory Leaks in code and tests

  • 所有者: Roave/no-leaks
  • 平台:
  • 許可證: MIT License
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

roave/no-leaks

Build Status
Latest Stable Version

roave/no-leaks

This library is a PHPUnit plugin
that detects memory leaks in tested code or tests.
It utilizes memory_get_usage() to make sure the code beeing executed properly cleans up after itself.

Installation

composer require --dev roave/no-leaks

Usage

vendor/bin/roave-no-leaks

If any memory leaks are detected, you should see an output like
following:

Exception: The following test produced memory leaks:
 * My\Leaky\Test::testSomething
 * My\Leaky\Test::testSomethingElse

Configuration and Parameters

vendor/bin/roave-no-leaks supports all
configuration parameters and console parameters of PHPUnit.

Known Issues

Please be aware that this is not a full substitute for PHPUnit:

  • the output format is to be improved
  • memory leak detection for scalar types and arrays is not reliable
  • can fail depending on xdebug/phpdbg/php-sapi changes

Professional Support

If you need help with setting up this library in your project,
you can contact us at team@roave.com for consulting/support.

主要指標

概覽
名稱與所有者Roave/no-leaks
主編程語言PHP
編程語言PHP (語言數: 1)
平台
許可證MIT License
所有者活动
創建於2019-03-14 21:10:31
推送於2025-06-20 12:53:50
最后一次提交
發布數8
最新版本名稱1.5.0 (發布於 2023-08-02 18:56:15)
第一版名稱1.0.0 (發布於 2019-03-15 21:32:20)
用户参与
星數501
關注者數16
派生數19
提交數568
已啟用問題?
問題數21
打開的問題數6
拉請求數136
打開的拉請求數6
關閉的拉請求數23
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?