Skip to content

Latest commit

 

History

History
44 lines (32 loc) · 1.53 KB

README.md

File metadata and controls

44 lines (32 loc) · 1.53 KB

AMP Toolbox Bundle

Travis CI - Build Status Scrutinizer - Build Status Scrutinizer - Code Quality Scrutinizer - Code Coverage

Symfony integration for AMP Toolbox for PHP.

Installation

To install the bundle with Symfony Flex, use the recipe:

$ composer require holadev/amp-toolbox-bundle

Config file is needed to run this project. Must be contains a minimal config to enable:

# app/config/amp_toolbox.yaml

amp_toolbox:
  transform_enabled: true

Alternatively, the property of activating the transformer can be defined through the class itself via autowiring. This property override config value of transform_enabled

# src/ExampleController.php

public function index(
        AmpOptimizerSubscriber $ampOptimizerSubscriber
    ): array {
        $ampOptimizerSubscriber->setEnabled(false);
    // controller code...
}

Testing

$ composer test