PHPackages                             granam/strict-object - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. granam/strict-object

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

granam/strict-object
====================

Base object, checking access to undefined properties and methods

3.1.0(5y ago)353.3k↓11.2%20MITPHPPHP &gt;=7.3CI failing

Since Mar 29Pushed 5y ago1 watchersCompare

[ Source](https://github.com/granam/strict-object)[ Packagist](https://packagist.org/packages/granam/strict-object)[ Docs](https://github.com/jaroslavtyc/granam-strict-object)[ RSS](/packages/granam-strict-object/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (2)Versions (22)Used By (20)

[![Build Status](https://camo.githubusercontent.com/f27fee9ec303c748f999c7c78a2f087d14906b463591f162e5fb29b6e5a4ed23/68747470733a2f2f7472617669732d63692e6f72672f6a61726f736c61767479632f6772616e616d2d7374726963742d6f626a6563742e7376673f6272616e63683d7472617669732d737570706f72742d666f72636564)](https://travis-ci.org/jaroslavtyc/granam-strict-object)

**A base object, throwing an exception in case of access to undefined property or method.**

1. [***You deserve to know...***](#you-deserve-to-know)
2. [**Usage**](#usage)
3. [**Install**](#Install)

*You deserve to know...*
------------------------

[](#you-deserve-to-know)

*Be lazy. Be smart.*

*To achieve that, you need to know.*

*Know about access to an undefined property, to an undefined method.*

*It can be anything, but at first it is a problem.*

*And you should be lazy enough to want to know that happened immediately, rather than searching logs after.*

Usage
-----

[](#usage)

Just extend the object...

```
use Granam\StrictObject\StrictObject;

class Foo extends StrictObject {

    public $everythingOk = true;
    // body
}
```

...and your code then immediately stops on mistakes like

```
// test.php
$foo = new Foo();

if (!$foo->everythinkOk) {
    // Did you noticed the typo? Maybe not, but StrictObject will!
}
```

...which results into *PHP Fatal error: Uncaught exception 'ReadingAccess' on line 4 in file test.php*Think twice about catching something like that! Remember, **you need to know**...

Install
-------

[](#install)

```
composer require granam/strict-object

```

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~109 days

Recently: every ~374 days

Total

21

Last Release

1926d ago

Major Versions

1.2.4 → 2.0.02017-02-13

2.0.1 → 3.0.02017-02-18

2.0.2 → 3.0.12017-02-19

PHP version history (4 changes)1.0.0PHP &gt;=5.4

1.2.4PHP &gt;=5.6

3.0.0PHP &gt;=7.0

3.1.0PHP &gt;=7.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/7e35d11c9a75584084f0dc0ba1a3b6ff03355777809cbe8eabd20a88ac00f794?d=identicon)[jaroslavtyc](/maintainers/jaroslavtyc)

---

Top Contributors

[![jaroslavtyc](https://avatars.githubusercontent.com/u/2290225?v=4)](https://github.com/jaroslavtyc "jaroslavtyc (58 commits)")

---

Tags

phpobjectaccessreadwritepermissionsstrict

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/granam-strict-object/health.svg)

```
[![Health](https://phpackages.com/badges/granam-strict-object/health.svg)](https://phpackages.com/packages/granam-strict-object)
```

###  Alternatives

[santigarcor/laratrust

This package provides a flexible way to add Role-based Permissions to Laravel

2.3k5.8M47](/packages/santigarcor-laratrust)[shanmuga/laravel-entrust

This package provides a flexible solution to add ACL to Laravel

69337.5k2](/packages/shanmuga-laravel-entrust)[spekkionu/laravel-zend-acl

Adds ACL to Laravel via Laminas\\Permissions\\Acl component.

4183.7k](/packages/spekkionu-laravel-zend-acl)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
