PHPackages                             yii1tech/session-dummy - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. yii1tech/session-dummy

ActiveLibrary[Testing &amp; Quality](/categories/testing)

yii1tech/session-dummy
======================

Provides support for Yii1 application runtime configuration

1.0.1(2y ago)38.5k↓26.8%1BSD-3-ClausePHPPHP &gt;=7.1

Since Jun 13Pushed 2y ago1 watchersCompare

[ Source](https://github.com/yii1tech/session-dummy)[ Packagist](https://packagist.org/packages/yii1tech/session-dummy)[ GitHub Sponsors](https://github.com/klimov-paul)[ Patreon](https://www.patreon.com/klimov_paul)[ RSS](/packages/yii1tech-session-dummy/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (3)Used By (1)

 [ ![](https://avatars.githubusercontent.com/u/134691944) ](https://github.com/yii1tech)

Dummy Session Extension for Yii 1
=================================

[](#dummy-session-extension-for-yii-1)

This extension provides a mock for the standard Yii session, which avoids direct operations over PHP standard session.

For license information check the [LICENSE](LICENSE.md)-file.

[![Latest Stable Version](https://camo.githubusercontent.com/285e70499c605f99ebd955100dc6ec82737a47c376c6916dcaa9456ee9724156/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f79696931746563682f73657373696f6e2d64756d6d792e737667)](https://packagist.org/packages/yii1tech/session-dummy)[![Total Downloads](https://camo.githubusercontent.com/243352e24446a5a43e1b8b5ea5461b5585f690bd89a098a382dc66e90d61af56/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f79696931746563682f73657373696f6e2d64756d6d792e737667)](https://packagist.org/packages/yii1tech/session-dummy)[![Build Status](https://github.com/yii1tech/session-dummy/workflows/build/badge.svg)](https://github.com/yii1tech/session-dummy/actions)

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist yii1tech/session-dummy

```

or add

```
"yii1tech/session-dummy": "*"
```

to the "require" section of your composer.json.

Usage
-----

[](#usage)

This extension provides a mock for the standard Yii session, which avoids direct operations over PHP standard session. It introduces `\yii1tech\session\dummy\DummySession` class, which does not actually store session data anywhere, except current process's memory, and avoid sending any headers to HTTP response.

This class is useful while writing unit tests, as it avoids sending headers and cookies to the StdOut.

Application configuration example:

```
