PHPackages                             oliver-hader/session-service - 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. oliver-hader/session-service

ActiveTypo3-cms-extension

oliver-hader/session-service
============================

TYPO3 Extbase session &amp; frontend user service

v1.1.2(6y ago)0111GPL-2.0-or-laterPHPPHP ^7.2

Since Dec 4Pushed 6y ago1 watchersCompare

[ Source](https://github.com/ohader/session-service)[ Packagist](https://packagist.org/packages/oliver-hader/session-service)[ RSS](/packages/oliver-hader-session-service/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (1)Versions (6)Used By (0)

TYPO3 Session Service Helper
============================

[](#typo3-session-service-helper)

This extension is just a helper tool and currently is **experimental**.

Domain modelling
----------------

[](#domain-modelling)

Extbase domain entities that shall be related to an existing `FrontendUser` entity require a dedicates property of type `\TYPO3\CMS\Extbase\Domain\Model\FrontendUser`(or any sub-class of this model).

In the following example `Customer` is the entity to be resolved base on a website frontend user.

```
class Customer extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
{
    /**
     * Frontend User
     *
     * @var \TYPO3\CMS\Extbase\Domain\Model\FrontendUser
     */
    protected $user;
```

Resolving entity subject
------------------------

[](#resolving-entity-subject)

In order to resolve subjects of type `Customer` based on the current logged in frontend user the session service helper provides the following API:

```
$currentCustomer = SubjectResolver::get()
    ->forClassName(Customer::class)
    ->forPropertyName('user')
    ->resolve();
```

In case no frontend user is logged in or could not be mapped to a subject an exception of type `InvalidSessionException` is thrown. In case more than one subjects would be resolved, a `SubjectException` is thrown.

Resolving frontend user entity
------------------------------

[](#resolving-frontend-user-entity)

In order to resolve the Extbase entity (or a sub-class) that is related to the currently logged in frontend user, the following API is provided:

```
$frontendUser = FrontendUserResolver::get()
    ->forClassName(\TYPO3\CMS\Extbase\Domain\Model\FrontendUser::class)
    ->resolve();
```

Using session subject collection
--------------------------------

[](#using-session-subject-collection)

`SubjectCollection` inherits from `\ArrayObject` and thus can be used like an array in PHP. In case there are items in the session for the mandatory `scope` (`project/shopping-cart` in the example below), those items are resolved from session storage automatically.

```
/** @var $entity \TYPO3\CMS\Extbase\DomainObject\AbstractEntity */
$entity = $this->entityRepository->findByIdentifier(123);
$collection = SubjectCollection::get('project/shopping-cart');
$collection[] = $entity;
$collection->persist();
```

In case no frontend user is logged in or could not be mapped to a subject an exception of type `InvalidSessionException` is thrown.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

Total

5

Last Release

2342d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/402145?v=4)[Oliver Hader](/maintainers/ohader)[@ohader](https://github.com/ohader)

---

Top Contributors

[![ohader](https://avatars.githubusercontent.com/u/402145?v=4)](https://github.com/ohader "ohader (9 commits)")

### Embed Badge

![Health badge](/badges/oliver-hader-session-service/health.svg)

```
[![Health](https://phpackages.com/badges/oliver-hader-session-service/health.svg)](https://phpackages.com/packages/oliver-hader-session-service)
```

###  Alternatives

[netresearch/rte-ckeditor-image

Image support in CKEditor for the TYPO3 ecosystem - by Netresearch

63991.3k4](/packages/netresearch-rte-ckeditor-image)[christophlehmann/imageoptimizer

Optimize uploaded/processed images with binaries of your choice

46501.8k](/packages/christophlehmann-imageoptimizer)[b13/assetcollector

Add CSS and SVG files and strings as inline style tag/inline svg to the html code.

10118.4k](/packages/b13-assetcollector)[causal/fal-protect

Protect everything within /fileadmin/ based on associated folder and file restrictions (visibility, user groups and dates of publication).

1269.5k](/packages/causal-fal-protect)

PHPackages © 2026

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