Download the PHP package responsive-sk/slim4-root without Composer

On this page you can find all versions of the php package responsive-sk/slim4-root. 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 slim4-root

Slim4 Root

Root path management with auto-discovery and base path detection for Slim 4 applications. Say goodbye to relative paths like __DIR__ . '/../../../config' and hello to clean, consistent path access.

Latest Version on Packagist Total Downloads

New in 1.4

Features

Requirements

Installation

Usage

Basic Usage

With Custom Paths

Path Auto-Discovery

Path Validation

Path Normalization

With DI Container

With Paths Middleware

With Base Path Detection

Integration with Twig

Integration with Monolog

Or use the MonologProvider for easier setup:

For more details, see Monolog Integration.

Testing Utilities

The package includes a Testing module that provides utilities for easier test setup and execution.

TestContainer

TestContainer is a simple static container for sharing objects between tests without using globals.

Bootstrap File

The package includes a bootstrap file that you can use in your PHPUnit configuration:

Or you can create your own bootstrap file:

Available Methods

PathsInterface

BasePathMiddleware

PathsDiscoverer

PathsValidator

PathsNormalizer

TestContainer

MonologFactory

MonologProvider

Customizing Paths

You can customize the paths by passing an array of custom paths to the constructor:

Feature Comparison

Feature v1.1 v1.2 v1.3 v1.4
Auto-discovery ❌ No ✅ Yes ✅ Yes ✅ Yes
Path validation ❌ Basic ✅ Comprehensive ✅ Comprehensive ✅ Comprehensive
Path normalization ❌ No ✅ Yes ✅ Yes ✅ Yes
Error handling ❌ Generic exceptions ✅ Dedicated exceptions ✅ Dedicated exceptions ✅ Dedicated exceptions
Relative paths ❌ Manual ../ ✅ Everything relative to root ✅ Everything relative to root ✅ Everything relative to root
Base path detection ❌ No ✅ Yes ✅ Yes ✅ Yes
Testing utilities ❌ No ❌ No ✅ Basic ✅ Enhanced
Monolog integration ❌ No ❌ No ❌ No ✅ Yes
Test coverage ✅ Good ✅ Excellent ✅ Excellent ✅ Excellent
Flexibility ✅ Good ✅ Excellent ✅ Excellent ✅ Excellent

Auto-Discovery

The Paths class can automatically discover common directory structures in your project. This is enabled by default, but you can disable it by passing false as the third parameter to the constructor.

The auto-discovery process looks for the following directories:

Path Validation

The Paths class can validate that all paths exist. This is disabled by default, but you can enable it by passing true as the fourth parameter to the constructor.

If validation is enabled and a path doesn't exist, an InvalidPathException will be thrown:

Testing

Documentation

For detailed documentation, see:

Examples

License

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

Credits

About Responsive.sk

Responsive.sk is a web development company specializing in creating modern, responsive web applications using the latest technologies and best practices.

Roadmap

We're planning to expand this package with integrations for other frameworks and libraries. Check out our TODO list for upcoming features and ways to contribute.

Community

We're looking to collaborate with Laminas and Cycle ORM communities to create integrations for these frameworks. If you're interested in contributing, please check out our TODO list and get in touch!


All versions of slim4-root with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 || ^8.0
slim/slim Version ^4.0
psr/container Version ^1.0 || ^2.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 responsive-sk/slim4-root contains the following files

Loading the files please wait ...