holadev / amp-toolbox-bundle
Symfony integration for Amp-toolbox-php
Installs: 12 849
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 6
Forks: 2
Open Issues: 0
Type:symfony-bundle
Requires
- php: ^7.2
- ampproject/amp-toolbox: ^0.11
- sunra/php-simple-html-dom-parser: ^1.5
- symfony/config: ^4.4.0 || ^5.0
- symfony/dependency-injection: ^4.4.0 || ^5.0
- symfony/event-dispatcher: ^4.4.0 || ^5.0
- symfony/http-kernel: ^4.4.0 || ^5.0
- symfony/options-resolver: ^4.4.0 || ^5.0
Requires (Dev)
- dg/bypass-finals: ^1.3
- doctrine/annotations: ^1.11
- matthiasnoback/symfony-dependency-injection-test: ^4.0
- phpspec/prophecy: ^1.12
- symfony/browser-kit: ^4.4.0 || ^5.0
- symfony/framework-bundle: ^4.4.0 || ^5.0
- symfony/phpunit-bridge: ^4.4.0 || ^5.0
README
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