PHPackages                             neunerlei/lockpick - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. neunerlei/lockpick

ActiveLibrary

neunerlei/lockpick
==================

A list of tools that helps you overcome some arbitrary restrictions while coding

0.0.10(3y ago)16231Apache-2.0PHP

Since Jan 2Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Neunerlei/lockpick)[ Packagist](https://packagist.org/packages/neunerlei/lockpick)[ RSS](/packages/neunerlei-lockpick/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (11)Used By (1)

Lock picks
==========

[](#lock-picks)

TLDR
----

[](#tldr)

This is a package that allows you to disable ALL locks that another author might have imposed on code you use in your project. It contains some tools that I use for years now and work quite well.

WARNING
-------

[](#warning)

- Expect there to be a LOT of reflection and string manipulation happening 🙈
- If you break open third-party code be sure that **YOU KNOW** what you are doing, and that the code might change and so your code needs to be flexible enough not to break.

Rambling
--------

[](#rambling)

While I understand why principles like SOLID exist, and why you can easily get in trouble if you start to modify third-party code. In a day-to-day basis, where you need to find solutions; `private` and `final` are two words that bring me to the brink of cringe every time I see them. Making something private AND final in code other developers might use is like locking someone into a room without lights, windows and a door they could use to do their job. If you as an author use `protected` and someone modifies that code, without it being clearly marked as "@api" it should be fairly clear that there might be dragons. But, please, please guys and gals all around the world, don't take away the option from others to fix a bug, or extend a feature you did.

Installation
------------

[](#installation)

Install this package using composer:

```
composer require neunerlei/lockpick

```

What's in the box
-----------------

[](#whats-in-the-box)

### Class lock-pick

[](#class-lock-pick)

The `Neunerlei\Lockpick\Util\ClassLockpick` class is minimal invasive tool to do stuff with objects that are locked for extension. For example, if there is a private property you want to get the data from, or call a private method. The usage is simple and comes with minimal overhead:

```
