Download the PHP package symlex/symlex-core without Composer

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

Minimalistic Kernel and Routers based on Symfony Components

Latest Stable Version License Test Coverage Build Status Documentation Community Chat

Note: This repository contains the kernel and routers as reusable components. For more information and a complete framework based on symlex-core please see https://github.com/symlex/symlex

As published by phpbenchmarks.com, Symlex adds significantly less overhead to REST requests than other common PHP frameworks:

Our complete framework documentation can be found on docs.symlex.org. Tuzi Liu maintains a Chinese translation for us.

Kernel

The light-weight Symlex kernel can bootstrap almost any application. It is based on our di-microkernel library. The kernel itself is just a few lines to set environment parameters, initialize the Symfony service container and then start the app by calling run().

YAML files located in config/ configure the application and all of it's dependencies as a service. The filename matches the application's environment name (e.g. config/console.yml). The configuration can additionally be modified for sub environments such as local or production by providing a matching config file like config/console.local.yml (see app.sub_environment parameter). These files are in the same well documented format you might know from Symfony:

This provides a uniform approach for bootstrapping Web applications such as Symlex\Application\Web or command-line applications like Symfony\Component\Console\Application (wrapped in Symlex\Application\Console) using the same kernel. The result is much cleaner and leaner than the usual bootstrap and configuration madness you know from many frameworks.

Disable Caching

If debug mode is turned off, the service container configuration is cached by the kernel in the directory set as cache path. You have to delete all cache files after updating the configuration. To disable caching completely, add container.cache: false to your config parameters:

Routers

There are three router classes included in this library. They configure the Symfony router component to perform the actual routing, so you can expect the same high performance. After routing a request to the appropriate controller action, the router subsequently renders the response to ease controller testing (actions never directly return JSON or HTML):

It's easy to create your own custom routing/rendering based on the existing examples.

The application's HTTP kernel class initializes the routers that were configured in the service container:

The REST and Twig routers accept optional URL (e.g. /api) and service name prefixes (e.g. controller.rest.).

Routing examples for the default HTTP kernel (Symlex\Kernel\WebApp):

The routers pass on the request instance to each matched controller action as last argument. It contains request parameters and headers: http://symfony.com/doc/current/book/http_fundamentals.html#requests-and-responses-in-symfony

Controller actions invoked by TwigRouter can either return nothing (the matching Twig template will be rendered), an array (the Twig template can access the values as variables) or a string (redirect URL).

REST controller actions (invoked by RestRouter) always return arrays, which are automatically converted to valid JSON. Delete actions can return null ("204 No Content").

Interceptors

HTTP interceptors can be used to perform HTTP authentication or other actions (e.g. blocking certain IP ranges) before routing a request:

Run multiple kernels via Symlex\Kernel\WebApps

Note: This is an experimental proof-of-concept. Feedback welcome.

As an alternative to Symfony bundles, Symlex\Kernel\WebApps is capable of running multiple apps based on Symlex\Kernel\App on the same Symlex installation:

It's bootstrapped like a regular WebApp and subsequently bootstaps other Symlex apps according to the configuration in app/config/web.guests.yml (path, debug, prefix and domain are optional; bootstrap and config are required):

Note: Assets in web/ like images, CSS or JavaScript in are not automatically shared in a way Assetic does this with Symfony bundles. If your apps not only provide Web services, you might have to create symbolic links or modify your HTML templates.

About

Symlex is maintained by Michael Mayer and aims to simplify agile Web development by providing a working system that promotes best practices by example. Michael released his first PHP framework in 2001 and has previously worked with major framework vendors. Building this would not have been possible without a lot of prior work by other developers. Thank you to those and everyone who contributed!

Feel free to send an e-mail to [email protected] if you have any questions, need commercial support or just want to say hello. Contributions are welcome, even if it's just a tiny pull-request or bug report.

Donations

Please leave a star if you like this project, it provides enough motivation to keep going. Thank you very much! <3


All versions of symlex-core with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3
symlex/di-microkernel Version ^2.0
symfony/symfony Version ^4.4
twig/twig Version ^2.5.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 symlex/symlex-core contains the following files

Loading the files please wait ....