bypass-finals

Removes `final` and `readonly` 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. (by dg)

Bypass-finals Alternatives

Similar projects and alternatives to bypass-finals

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better bypass-finals alternative or higher similarity.

bypass-finals reviews and mentions

Posts with mentions or reviews of bypass-finals. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-07-11.
  • BillaBear - Design Decisions ‐ Not Using Final Classes
    2 projects | /r/PHP | 11 Jul 2023
    I had this issue when working with Dibi as I needed to mock final methods. You can use this https://github.com/dg/bypass-finals package and forget all the debate about finals against non-final.
  • Laravel considered harmful
    13 projects | /r/PHP | 28 Apr 2023
    It definitely is my job. If you feel you should ignore best practices and author's opinion, use something like this: https://github.com/dg/bypass-finals
  • Design Decisions: Why use final classes
    2 projects | /r/PHP | 1 Dec 2022
    Even with the keyword final it's still possible to extend by using the final disable library https://github.com/dg/bypass-finals but the fact you needed to disable it makes it very clear that it's unsupported behaviour.
  • A note from our sponsor - Cloudways
    cloudways.com | 29 Nov 2023
    Cloudways: Devs' 1st choice for managed hosting! Pick from top-tier Cloud providers like DigitalOcean, AWS, and GCE. Limited-time deal: 40% OFF for 4 Months + 40 Free Migrations. Learn more →

Stats

Basic bypass-finals repo stats
3
407
0.0
10 days ago

dg/bypass-finals is an open source project licensed under GNU General Public License v3.0 or later which is an OSI approved license.

The primary programming language of bypass-finals is PHP.

Learn any GitHub repo in 59 seconds
Onboard AI learns any GitHub repo in minutes and lets you chat with it to locate functionality, understand different parts, and generate new code. Use it for free at www.getonboard.dev.
getonboard.dev