PHPackages                             linna/auth-mapper-mysql - 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. [Database &amp; ORM](/categories/database)
4. /
5. linna/auth-mapper-mysql

ActiveLibrary[Database &amp; ORM](/categories/database)

linna/auth-mapper-mysql
=======================

Mysql mapper implementation of the authentication and authorization interfaces.

v0.2.1(3y ago)22.2k1[1 PRs](https://github.com/linna/auth-mapper-mysql/pulls)3MITPHPPHP &gt;=8.1

Since Jan 2Pushed 2y ago1 watchersCompare

[ Source](https://github.com/linna/auth-mapper-mysql)[ Packagist](https://packagist.org/packages/linna/auth-mapper-mysql)[ Docs](https://github.com/linna)[ RSS](/packages/linna-auth-mapper-mysql/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (3)Dependencies (6)Versions (7)Used By (3)

 [![Linna Logo](logo-linna-128.png)](#)

 [![Linna Auth Mapper Mysql Logo](logo-auth-mysql.png)](#)

[![Tests](https://github.com/linna/auth-mapper-mysql/actions/workflows/tests.yml/badge.svg)](https://github.com/linna/auth-mapper-mysql/actions/workflows/tests.yml)[![PDS Skeleton](https://camo.githubusercontent.com/3c7140ee36205075ed977142f25c29eb1fb7809e9b86a865461fc21776ad1665/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7064732d736b656c65746f6e2d626c75652e7376673f7374796c653d666c6174)](https://github.com/php-pds/skeleton)[![PHP 8.1](https://camo.githubusercontent.com/1c708345a94c698fd596459da39a9535062cfa1162a57a8ae4e3cdd54e00a25d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e312d3838393242462e737667)](http://php.net)

> ***NOTE:*** Code porting to PHP 8.1 ongoing.

About
=====

[](#about)

This package provide a concrete implementation for the authentication interfaces and for the authorization interfaces of the framework.

Mappers use as persistent storage mysql through php pdo.

Requirements
============

[](#requirements)

- PHP &gt;= 8.1
- PDO extension
- MySQL extension
- linna/framework v0.28.0|next

Installation
============

[](#installation)

With composer:

```
composer require linna/auth-mapper-mysql

```

Package Content
===============

[](#package-content)

### Interfaces from Framework

[](#interfaces-from-framework)

- `Linna\Authentication\EnhancedAuthenticationMapperInterface`
- `Linna\Authorization\PermissionExtendedMapperInterface`
- `Linna\Authorization\PermissionMapperInterface`
- `Linna\Authorization\RoleExtendedMapperInterface`
- `Linna\Authorization\RoleMapperInterface`
- `Linna\Authorization\UserExtendedMapperInterface`
- `Linna\Authorization\UserMapperInterface`

### Implementation

[](#implementation)

- `Linna\Authentication\EnhancedAuthenticationMapper`
    - deleteOldLoginAttempts()
    - fetchAll()
    - fetchAttemptsWithSameIp()
    - fetchAttemptsWithSameSession()
    - fetchAttemptsWithSameUser()
    - fetchById()
    - fetchLimit()
- `Linna\Authorization\PermissionExtendedMapper`
- `Linna\Authorization\PermissionMapper`
    - fetchAll()
    - fetchById()
    - fetchByName()
    - fetchByRole()
    - fetchByRoleId()
    - fetchByRoleName()
    - fetchByUser()
    - fetchByUserId()
    - fetchByUserName()
    - fetchLimit()
    - fetchUserPermissionHashTable()
    - permissionExistById()
    - permissionExistByName()
- `Linna\Authorization\RoleExtendedMapper`
    - addUser()
    - addUserById()
    - addUserByName()
    - grantPermission()
    - grantPermissionById()
    - grantPermissionByName()
    - removeUser()
    - removeUserById()
    - removeUserByName()
    - revokePermission()
    - revokePermissionById()
    - revokePermissionByName()
- `Linna\Authorization\RoleMapper`
    - fetchAll()
    - fetchById()
    - fetchByName()
    - fetchByPermission()
    - fetchByPermissionId()
    - fetchByPermissionName()
    - fetchByUser()
    - fetchByUserId()
    - fetchByUserName()
    - fetchLimit()
- `Linna\Authorization\UserExtendedMapper`
    - addRole()
    - addRoleById()
    - addRoleByName()
    - grantPermission()
    - grantPermissionById()
    - grantPermissionByName()
    - removeRole()
    - removeRoleById()
    - removeRoleByName()
    - revokePermission()
    - revokePermissionById()
    - revokePermissionByName()
- `Linna\Authorization\UserMapper`
    - fetchAll()
    - fetchById()
    - fetchByName()
    - fetchByPermission()
    - fetchByPermissionId()
    - fetchByPermissionName()
    - fetchByRole()
    - fetchByRoleId()
    - fetchByRoleName()
    - fetchLimit()

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity64

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 ~695 days

Total

3

Last Release

1297d ago

PHP version history (2 changes)v0.1.0PHP ^7.1

v0.2.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b0180939371d6dbe2ab2d18829614d90a995b833d6bb7f503a11766f8d130f0?d=identicon)[s3b4stian](/maintainers/s3b4stian)

---

Top Contributors

[![s3b4stian](https://avatars.githubusercontent.com/u/11441761?v=4)](https://github.com/s3b4stian "s3b4stian (63 commits)")

---

Tags

authenticationauthorizationmappermappersmysqlphpphpAuthenticationmysqlauthorizationmapper

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/linna-auth-mapper-mysql/health.svg)

```
[![Health](https://phpackages.com/badges/linna-auth-mapper-mysql/health.svg)](https://phpackages.com/packages/linna-auth-mapper-mysql)
```

###  Alternatives

[clouddueling/mysqldump-php

PHP version of mysqldump cli that comes with MySQL

1.3k22.9k](/packages/clouddueling-mysqldump-php)[eftec/pdoone

Minimaist procedural PDO wrapper library

1105.9k9](/packages/eftec-pdoone)[popphp/pop-db

Pop Db Component for Pop PHP Framework

1814.6k11](/packages/popphp-pop-db)

PHPackages © 2026

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