Download the PHP package maglnet/magl-legacy-application without Composer

On this page you can find all versions of the php package maglnet/magl-legacy-application. 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 magl-legacy-application

MaglLegacyApplication - Legacy Applications in Laminas

Latest Stable Version Scrutinizer Code Quality License Build Status Code Coverage

Run your legacy applications within Laminas.

Introduction

Since rewriting your legacy application from scratch to a Laminas application could be nearly impossible due to time, effort, and resources, I was searching for a way to migrate a legacy application to a Laminas application.

A great article by Chris Abernethy described a way on how to run your legacy application within ZF1, so I migrated this HowTo to a small Laminas module, to be able to run a legacy application within Laminas.

While running your legacy application within a Laminas application it is possible to slowly migrate an existing application to Laminas by leaving your old application (nearly - see "Adjust your legacy Application") untouched and build new modules with the power of Laminas.
By adding a simple wrapper (see "Using Laminas within your legacy application") you could also use the new modules within your legacy application.

Installation

Install through composer

Enable the module within your Laminas application.config.php

Copy the provided file data/magl-laminas-legacy-wrapper.php to your public/ folder.
Copy the provided file data/.htaccess to your publix folder.
Copy your legacy Application to your public/ folder.

Your legacy application should now run within Laminas. :)

Configuration

For any SEO optimized route within your legacy application, add a route to the zend router that routes to legacy controller and remove the mod_rewrite rules from your .htaccess

Adjust your legacy Application

There are several cases in which your legacy application won't run without additional adjustments, here are some of them:

Relative Paths

Using relative paths for require, require_once or includes will possibly fail now, since Laminas will do a chdir() to the Laminas' application root. So you will need to adjust your paths to match the new root.

Example:

should be changed to:

Using Globals / Server SCRIPT_FILENAME or SCRIPT_NAME

Because of mod_rewrite rules, SCRIPT_FILENAME and SCRIPT_NAME won't be your real script anymore. If you use these variables, you need to adjust these places within your legacy application:

Example:

should be changed to:

Using Laminas within your legacy application

Injecting responses from within your legacy application

from wherever you are within your legacy application, it is possible to bypass your legacy applications controller code and send a response to the Laminas Controller wrapper. This response will then be handled like within a normal Laminas controller.

Contributing

If you have questions or problems regarding this module just open an issue or, even better, solve it and open a pull request. :+1:


All versions of magl-legacy-application with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3 || ^8.0
laminas/laminas-eventmanager Version ^3.0
laminas/laminas-http Version ^2.0
laminas/laminas-mvc Version ^3.0
laminas/laminas-router Version ^3.0
laminas/laminas-servicemanager Version ^3.0
laminas/laminas-stdlib Version ^3.0
laminas/laminas-view Version ^2.5
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 maglnet/magl-legacy-application contains the following files

Loading the files please wait ....