PHPackages                             birkanoruc/session-helper - 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. birkanoruc/session-helper

ActiveLibrary

birkanoruc/session-helper
=========================

A PHP helper class for managing sessions with features like flash data, session destruction, and more.

v1.0.0(1y ago)15MITPHPPHP &gt;=7.4

Since Oct 10Pushed 1y ago1 watchersCompare

[ Source](https://github.com/birkanoruc/session-helper)[ Packagist](https://packagist.org/packages/birkanoruc/session-helper)[ RSS](/packages/birkanoruc-session-helper/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Session Helper
==============

[](#session-helper)

**Session Helper** is a simple PHP class that provides easy methods to manage sessions, including flash messages, session destruction, and more.

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

[](#installation)

To install via Composer, run the following command:

```
composer require birkanoruc/session-helper
```

Usage
-----

[](#usage)

### Starting a Session

[](#starting-a-session)

Make sure to start the session in your application before using the session helper:

```
Birkanoruc\SessionHelper\Session::start();
```

or

```
session_start();
```

### Check if a Session Key Exists

[](#check-if-a-session-key-exists)

```
use Birkanoruc\SessionHelper\Session;

if (Session::has('user_id')) {
    // Do something
}
```

### Store a Session Value

[](#store-a-session-value)

```
Session::put('user_id', 123);
```

### Retrieve a Session Value

[](#retrieve-a-session-value)

```
$userId = Session::get('user_id');
```

### Flash Data (temporary session data)

[](#flash-data-temporary-session-data)

```
Session::flash('message', 'User created successfully!');
```

### Clear Flash Data

[](#clear-flash-data)

```
Session::unflash();
```

### Destroy a Session

[](#destroy-a-session)

```
Session::destroy();
```

Testing
-------

[](#testing)

To run the tests for this library, you need to have PHPUnit installed. Follow these steps:

1. Make sure you have installed the required dependencies:

    ```
    composer install
    ```
2. Run the tests using PHPUnit:

    ```
    vendor/bin/phpunit tests
    ```

License
-------

[](#license)

This project is licensed under the MIT License.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 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

Unknown

Total

1

Last Release

576d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/94e74311ba8f7711c315a944e437092bbd422636396c05b056d526e776ca111f?d=identicon)[birkanoruc](/maintainers/birkanoruc)

---

Top Contributors

[![birkanoruc](https://avatars.githubusercontent.com/u/113479288?v=4)](https://github.com/birkanoruc "birkanoruc (2 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/birkanoruc-session-helper/health.svg)

```
[![Health](https://phpackages.com/badges/birkanoruc-session-helper/health.svg)](https://phpackages.com/packages/birkanoruc-session-helper)
```

PHPackages © 2026

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