Download the PHP package mistralys/application_framework without Composer

On this page you can find all versions of the php package mistralys/application_framework. 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 application_framework

Application Framework

All-in-one PHP framework and UI layer for building web and intranet applications.

Introduction

The framework is designed to be a solid foundation for custom-built web applications. The integrated functionality helps to focus on the application logic, while being able to create the necessary administration screens, APIs and more with minimal effort.

Note that it is not a CMS: it is exclusively a tool for building custom applications. Supporting features are available out of the box, like the notepad or image library, but anything your application needs to do must be implemented by you.

One of the core functionalities of the framework is to provide an extensive ecology of classes for accessing custom data stored in the database. This includes complex filtering capabilities as well as a versioning system with record state tracking (draft, published, etc.).

Features overview

Requirements

Installation

The framework can be installed as a regular Composer dependency. However, the required application skeleton of folders and files can currently only be generated dynamically using the Framework Manager, which is currently still a private project.

Documentation on how to set up an application using the framework is still in progress. In the meantime, the example application can be used as a reference (see Example application).

Example application

The framework includes a sample application which is used as a reference for available features, best practices, and testing. It can also be used as the basis for a new application.

You will find it in the tests/application folder.

Installation

The quickest way to set up the example application is with the interactive setup command:

This will prompt you for database and UI settings, create the database if it does not exist, import docs/sql/pristine.sql, and seed the test data automatically. Re-running the command is safe — existing values are shown as defaults and pressing Enter preserves them.

Manual setup (alternative) 1. Import the SQL file `docs/sql/pristine.sql` into a database. 2. Open the folder `tests/application/config`. 3. Copy `test-db-config.dist.php` to `test-db-config.php`. 4. Copy `test-ui-config.dist.php` to `test-ui-config.php`. 5. Edit the settings in both files. 6. Run `composer seed-tests` to seed the test data.

After setup, access the tests/application folder via the webserver.

Note: The generated config files (test-db-config.php, test-ui-config.php) are listed in .gitignore and must never be committed to version control — they contain local credentials and are derived from the .dist.php templates.

Composer commands

These are custom Composer commands that are available when developing locally.

Build

The build step generates module documentation artefacts from module-context.yaml files discovered throughout the codebase, updates the CTX generated-at.txt timestamp, regenerates the API method index, and rebuilds offline event listeners.

For the full development build (includes module glossary and keyword index):

Setup

Interactive one-command setup for the local development environment. Prompts for database and UI settings, generates test-db-config.php and test-ui-config.php from their .dist.php templates, creates the database if it does not exist, imports docs/sql/pristine.sql, and runs composer seed-tests automatically on completion.

Re-running the command is safe (idempotent): existing config values are read back and shown as defaults; pressing Enter without typing preserves them. If the database connection fails, the script re-prompts for credentials until a successful connection is established.

The script can also be invoked directly:

Requires an interactive terminal (TTY). Do not pipe or redirect input to this command — stty -echo (used to suppress password echo) relies on an attached TTY and will behave unexpectedly in non-interactive contexts.

Seed test database

Truncates all tables in the test database and re-populates them with the standard framework seed data (system users, locales, and countries). Run this once after importing docs/sql/pristine.sql, and again whenever the test database needs to be reset to a known state.

The command runs two process-isolated steps in sequence:

  1. php tools/seed-truncate.php — empties all base tables
  2. php tools/seed-insert.php — inserts system users, locales, and countries

The command requires the test database to be accessible and configured (see tests/application/config/test-db-config.php). It is idempotent: running it on an already-seeded database produces the same result with no errors. On failure it prints a human-readable error message and exits with code 1, making it safe to use in CI pipelines.

Clear caches

Clears all caches used by the framework, including the dynamic class cache.

Developer Tools

The tools/ directory contains local-development CLI scripts. These are version-controlled and intended for developer use only — they are not part of the framework runtime.

Getting started as a contributor

The fastest way to get your local environment up and running is the interactive developer menu. From the project root, run:

The menu will automatically run composer install if vendor/ is missing, then present a numbered list of common tasks. Choose option 1 to run the interactive local-environment setup wizard, which configures the database and generates the required config files.

Setup Script

tools/setup-local.php is the interactive local-environment setup script (see composer setup above). It can be run directly with php tools/setup-local.php or via composer setup.

Generated files and version control

The script generates tests/application/config/test-db-config.php and tests/application/config/test-ui-config.php from their .dist.php counterparts. Both generated files are listed in .gitignore and must not be committed — they contain local database credentials. The .dist.php templates (which contain no credentials) are version-controlled and serve as the canonical structure reference.

Platform and TTY notes

Scenario Behaviour
Unix / macOS (interactive TTY) Password input is hidden via stty -echo. Ctrl-C restores echo via a pcntl_signal SIGINT handler.
Windows Password input is visible in the terminalstty is not available on Windows. A warning is printed before the password prompt.
Windows (some PHP builds) pcntl_signal may not be compiled in. If you interrupt the script with Ctrl-C during a password prompt, terminal echo may remain suppressed. Run stty echo in your terminal to restore it manually.
Non-interactive / piped context The script is not designed for non-interactive use. Running it without an attached TTY (e.g. via pipe or CI) may leave echo enabled and produce garbled output.

CAS authentication mode

By default the setup script writes TESTS_SESSION_TYPE = 'NoAuth' into test-ui-config.php. This setting is not prompted interactively — it must be changed manually when CAS authentication is required.

To enable CAS mode:

  1. Open tests/application/config/test-ui-config.php and change the constant:

  2. Copy the CAS configuration template and fill in your server details:

  3. Edit test-cas-config.php and set the following constants to match your CAS / LDAP environment:

    Constant Description
    APP_CAS_HOST CAS server hostname (e.g. cas.example.com)
    APP_CAS_PORT CAS server port (default 443)
    TESTS_CAS_FIELD_EMAIL CAS response field for the user's email address
    TESTS_CAS_FIELD_FIRST_NAME CAS response field for given name
    TESTS_CAS_FIELD_LAST_NAME CAS response field for family name
    TESTS_CAS_FIELD_FOREIGN_ID CAS response field used as the external user ID
    APP_LDAP_HOST / APP_LDAP_PORT LDAP server connection details
    APP_LDAP_DN / APP_LDAP_USERNAME / APP_LDAP_PASSWORD LDAP bind credentials

test-cas-config.php is gitignored alongside the other generated config files — it must never be committed.

CLI Utility Library

tools/include/cli-utilities.php is the shared helper library included by every script in tools/. It provides four console I/O functions:

Function Signature Description
writeln writeln(string $text = '') : void Writes a line to STDOUT followed by a newline. Pass an empty string for a blank line.
color color(string $text, string $color) : string Wraps text in ANSI colour codes. Supported values: green, red, yellow, cyan, bold. Returns plain text (no ANSI codes) when the colour name is unrecognised, or when running on Windows (PHP_OS_FAMILY === 'Windows'). The Windows fallback is intentionally conservative — plain text is returned for all Windows environments to avoid a dependency on runtime terminal-capability detection. Modern terminals such as Windows Terminal and PowerShell 7+ do support ANSI, but detecting them reliably requires additional checks.
prompt prompt(string $label, string $default = '') : string Displays a labelled prompt and reads a trimmed line from STDIN. Returns $default when the user submits an empty line.
promptPassword promptPassword(string $label, string $default = '') : string Like prompt, but suppresses character echo on Unix-like systems via stty -echo. On Windows or when stty is unavailable, input is read with echo visible and a warning is shown.

All functions are guarded with function_exists() so the file can be safely included more than once.

Developer Menu

An interactive numbered menu that groups the most common developer tasks in a single entry point. Launch it from the project root with:

If the vendor/ directory is missing when the menu starts, composer install is run automatically before the menu is displayed.

Available options

# Label Command invoked
1 Setup local environment php tools/setup-local.php
2 Build composer build
3 Run tests composer test (full) or composer test-filter -- <pattern>
4 Clear caches composer clear-caches
5 Seed test database composer seed-tests
6 PHPStan analysis composer analyze
0 Exit

Option 3 (Run tests) sub-prompts for an optional filter pattern. Leaving it empty runs the full test suite; entering a pattern runs only matching tests.

The menu loops after each action completes so you can run multiple tasks in sequence without re-launching the script.

Launchers

File Platform Notes
menu.sh Unix / macOS Executable (chmod +x). Uses #!/usr/bin/env bash for portability.
menu.cmd Windows Uses cd /d "%~dp0" to handle drive-letter differences.
tools/menu.php Any Core implementation; can be invoked directly with php.

Build-Time Documentation Generators

The Application\Composer namespace provides build-time utilities that generate two Markdown documentation artefacts automatically on every composer build:

To register a module for discovery, add a module-context.yaml next to its classes:

See src/classes/Application/Composer/README.md for full API documentation and the offline-event integration guide.

CTX Integration

The project uses CTX to generate context files for AI-assisted development, and to provide an MCP server for integration with IDEs like PHPStorm to access the framework's AI tools.

Related commands

Start the MCP Server

Generate all files

Server information

This fetches a JSON-lines list of configurations and tools available in the server.

Documentation

The framework's documentation is available locally by pointing a browser to the docs folder, and online in the separate Framework Documentation package.

It is ideally viewed through the framework's documentation screen, as there are some features that are only available there (like code samples that are included dynamically).

Vendor Package

For convenience, a copy of the documentation is automatically checked out into the vendor folder during the Composer install process.

It can be found at mistralys/application-framework-docs.

History

The framework has its origins in several projects where the same development paradigms were used and refined over time. In 2013, it started to crystallize into a recognizable entity, and in 2015, it was officially split off into its own project.

It was migrated to Github in february 2021, and modernizing the code has been ongoing ever since. As a result, the current state of the code is a mix of namespaced and non-namespaced code, with the goal of eventually moving to a fully namespaced codebase.


All versions of application_framework with dependencies

PHP Build Version
Package Version
Requires psr/log Version ^1.1.4
mistralys/application-framework-docs Version >=1.0.1
mistralys/appframework-ckeditor5 Version >=1.0.0
mistralys/application-utils Version >=3.2.0
mistralys/application-utils-core Version >=2.5.0
mistralys/application-utils-collections Version >=1.2.2
mistralys/application-utils-image Version >=1.2.0
mistralys/application-localization Version >=2.1.2
mistralys/changelog-parser Version >=1.0.1
mistralys/deepl-xml-translator Version ^3.0.1
mistralys/subsetsum Version >=1.0.2
mistralys/markdown-viewer Version >=1.3.1
mistralys/html_quickform2 Version >=2.3.6
mistralys/variable-hasher Version >=1.0.0
mistralys/version-parser Version >=2.1.1
pear/http_request2 Version ^v2.5.1
phpmailer/phpmailer Version ^v6.9.1
mistralys/simple_html_dom Version ^2.0
shuchkin/simplexlsxgen Version >=1.4.14
shuchkin/simplexlsx Version >=1.1.13
ccampbell/mousetrap Version dev-master
medialize/uri.js Version ^1.19.11
ulrichsg/getopt-php Version ^4.0.2
lipis/flag-icons Version ^6.8
desandro/masonry Version v4.2.2
marcj/css-element-queries Version ^1.2.2
hybridauth/hybridauth Version ^3.8.2
league/commonmark Version ^2.6.0
zenorocha/clipboardjs Version v2.0.8
apereo/phpcas Version >=1.6.2
select2/select2 Version ^4.1.0-rc.0
symfony/yaml Version ^v8.0.0
php Version ^8.4
ext-curl Version *
ext-dom Version *
ext-json Version *
ext-ldap Version *
ext-mbstring Version *
ext-pdo Version *
ext-simplexml Version *
php-mcp/server Version >=3.3.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 mistralys/application_framework contains the following files

Loading the files please wait ...