Download the PHP package fw/last-bundle without Composer

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

Last – static site generator for any Symfony project

Build Status Test Coverage

Last is a minimalistic static site generator for Symfony 4 applications. Once installed, Last provides a command that will simply create requests for all of your routes and dumps the result as a static file to a dist folder.

Installation

(A symfony/flex recipe will be created soon. )

composer require fw/last-bundle

Last should get registered automatically to config/bundles.php. If not, add it by hand:

...
Fw\LastBundle\FwLastBundle::class => ['all' => true],

Usage

Now you can run the dump command and your Symfony app gets exported as static html files.

# will dump to the configured dist folder, defaults to %project%/dist
bin/console last:dump 

# wil dump to the given folder
bin/console last:dump --dist=./custom_dist_folder

Is it production ready?

Soon, however the following is missing yet:

Configuration

fw_last:
    dist_folder: '%kernel.project_dir%/dist' # this is the default dist folder, if you don't set it 
    providers:
        static: true # Static provider is enabled per default, you can disable it here

Request providers

Last runs requests against your kernel. So in order to make it work, all desired requests must be defined. To make things more easy, Last comes with a request provider for all static routes (routes without mandatory placeholders). So you only need to implement a custom request provider if you want to include dynamic routes like blog/article/{id}. A simple provider could look like this:

use Fw\LastBundle\Router\RouteProvider;

class YourustomProvider implements RouteProvider
{
    /**
     * {@inheritdoc}
     */
    public function getRoutes(): array
    {
        return [
            Request::create('blog/article/1'),
            Request::create('blog/article/2'),
            Request::create('blog/article/3'),
        ];
    }
} 

And needs to be a tagged service, in order to make it visible for Last.

Your\CustomBundle\Provider\CustomProvider:
        tags: ['fw.last.route_provider']

Of course you can inject any dependencies like an entity manager to create more advanced providers.

Troubleshooting

My links start with http://localhost/ what should I do?

Use {{ path() }} instead of {{ url() }} in your templates to make your urls relative.


All versions of last-bundle with dependencies

PHP Build Version
Package Version
Requires symfony/framework-bundle Version ^4.1
symfony/yaml Version ^4.1
symfony/console Version ^4.1
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 fw/last-bundle contains the following files

Loading the files please wait ...