Skip to content

Removes final keywords from source code on-the-fly and allows mocking of final methods and classes. It can be used together with any test tool such as PHPUnit or Mockery.

License

Notifications You must be signed in to change notification settings

milo/bypass-finals

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bypass Finals

Downloads this Month Build Status Latest Stable Version License

Introduction

Removes final keywords from source code on-the-fly and allows mocking of final methods and classes. It can be used together with any test tool such as PHPUnit or Mockery.

Installation

The recommended way to install is through Composer:

composer require dg/bypass-finals --dev

It requires PHP version 5.6 and supports PHP up to 7.2.

Usage

Simply call this:

DG\BypassFinals::enable();

You need to enable it before the classes you want to remove the final are loaded. So call it as soon as possible, preferably right after vendor/autoload.php in loaded.

If you like it, please make a donation now. Thank you!

About

Removes final keywords from source code on-the-fly and allows mocking of final methods and classes. It can be used together with any test tool such as PHPUnit or Mockery.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%