PHPackages                             alexdin/yii2-file-session - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. alexdin/yii2-file-session

ActiveLibrary[File &amp; Storage](/categories/file-storage)

alexdin/yii2-file-session
=========================

Extention Class for Yii2 File Session based on yii/web/Session

0.0.2(8y ago)28PHPPHP ^5.6 || ^7.0

Since Aug 21Pushed 8y ago1 watchersCompare

[ Source](https://github.com/alexdin/yii2-file-session)[ Packagist](https://packagist.org/packages/alexdin/yii2-file-session)[ RSS](/packages/alexdin-yii2-file-session/feed)WikiDiscussions master Synced 4w ago

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

yii2-file-session
=================

[](#yii2-file-session)

PHP Yii2. This is an expanding class of web sessions . This class supports retrieving data on session id and deleting it.

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

[](#installation)

```
php composer.phar require --prefer-dist alexdin/yii2-file-session

```

or add

```
"alexdin/yii2-file-session":"^0.0.2"
```

Configure
---------

[](#configure)

Configure file session add this string to components in config main.php file (main-local.php).

```
 'session' => [
             // this is the name of the session cookie used for login on the backend
             'class'=>'alexdin\filesession\Session',
             'name' => 'session-name',
             // dir for your path session
             // create migrate if dir is not exists or use "mkdir" function
             'savePath' => __DIR__ . '/../runtime/sessions',
         ],
```

Usage
-----

[](#usage)

```
Yii::$app->session->destroySession($id)
```

Clears and deletes the session by id

```
Yii::$app->session->readSession($id)
```

Reads the session from the file and returns the serialized data in the string

```
Yii::$app->session->getSessionData($id)
```

Returns an array of session data by id

```
Yii::$app->session->getSessionFileName($id)
```

Returns the session file name by id

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

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

Total

2

Last Release

3235d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5e181fb43f6a2a16d13911a327d8fefbc3296639025f25e613837660131f48b7?d=identicon)[alexdin](/maintainers/alexdin)

---

Top Contributors

[![alexdin](https://avatars.githubusercontent.com/u/7966910?v=4)](https://github.com/alexdin "alexdin (10 commits)")

---

Tags

sessionyii2multi sessionalexdinfile-session

### Embed Badge

![Health badge](/badges/alexdin-yii2-file-session/health.svg)

```
[![Health](https://phpackages.com/badges/alexdin-yii2-file-session/health.svg)](https://phpackages.com/packages/alexdin-yii2-file-session)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[liyunfang/yii2-upload-behavior

Upload behavior for Yii 2

161.7k](/packages/liyunfang-yii2-upload-behavior)

PHPackages © 2026

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