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-05-29 23:20:22
最后一次提交
发布数8
最新版本名称1.5.0 (发布于 2023-08-02 18:56:15)
第一版名称1.0.0 (发布于 2019-03-15 21:32:20)
用户参与
星数501
关注者数16
派生数20
提交数568
已启用问题?
问题数21
打开的问题数6
拉请求数136
打开的拉请求数6
关闭的拉请求数23
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?