Download the PHP package krisell/laravel-session-migrator without Composer

On this page you can find all versions of the php package krisell/laravel-session-migrator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-session-migrator

Laravel Session Migrator

Latest Version on Packagist Total Downloads GitHub Actions

Migrate Laravel session driver or serialization method in production without dropping sessions.

Installation

Features

This package allows production applications to update some of the session configuration without dropping any active sessions and signing users out. More specifically, two session configuration options can be migrated:

  1. Session serialization method (php or json), regardless of driver

    Laravel 9 introduced the option to serialize session data using json rather than php's serialize, and might be preferred both from a security perspective and performance-wise. The method is changed by specifying 'serialization' => 'json' in config/session.php, but changing that in a production app would normally cause all active sessions to be invalidated and users to be signed out. With this package, this setting can be migrated transparently to users.

  2. Session driver (from file or cookie)

    This package also allows to define a driver being migrated from, such that a new driver can be used without dropping any session data (technically, the old driver is used as a fallback read source, but all writes are performed against the new driver).

    Note that currently, only the file and cookie drivers are supported as being migrated from.

Usage

Installing the package intentionally doesn't activate any of the migration features. In order to perform a migration, update the session configuration to the new wanted settings, and then also perform one of the following:

You can of course choose to only use the serialization migration, or only the driver migration. It should be very rare that one need to migrate both these at the same time, although that is also supported.

Note specifically that migrate.driver is the driver you are migrating from, i.e. the previously used driver. The new driver or serialization method is configured just as normal, in the config file or environment variables.

You only need this package during a short transition period where your application might still have session data using the old format. The length of this depends on your session lifetime. As an example, if your session expires after 2 hours, you only need to run this package in production for those two hours, although keeping it around longer does no harm. For performance reasons, you should certainly disable and preferable remove this package eventually after the transition has been completed.

Pre-production applications

There is no reason to use this package in pre-production applications or local environments, execept of course for testing before using live. If dropping sessions doesn't matter in your use case, simply update the session configuration as normal and skip this package.

Testing

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Laravel Package Boilerplate

This package was generated using the Laravel Package Boilerplate.


All versions of laravel-session-migrator with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0.2
illuminate/support Version ^9.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package krisell/laravel-session-migrator contains the following files

Loading the files please wait ....