Download the PHP package iteearmah/amp without Composer

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

Build Status

AMP PHP Library

An open source PHP library and console utility to convert HTML to AMP HTML and report HTML compliance with the AMP HTML specification.

What is the AMP PHP Library?

The AMP PHP Library is an open source and pure PHP Library that:

Use Cases

Setup

The project uses a composer workflow. If you're not familiar with composer then please read up on it before trying to set this up.

Using this in Drupal requires some specific steps. Please refer to the Drupal AMP Module documentation.

For all other scenarios, continue reading.

Setup for command line console

git clone this repo, cd into it and type in $ composer install at the command prompt to get all the dependencies of the library. Now you'll be able to use the command line AMP html converter amp-console (or equivalently amp-console.php

Running phpunit tests

After doing a $ composer install for setting up the command line console, you can run some phpunit tests

Looking at test coverage

To see test coverage data first ensure you have the xdebug extenstion installed in your PHP installation.

Setup for your composer based PHP project

To use this in your composer based PHP project, refer to composer docs here to make changes to your composer.json

Or you can simply do $ composer require lullabot/amp:"^1.0.0" to fetch the library from here and automatically update your composer.json

Advanced

Should you wish to follow the bleeding edge you can do $ composer require lullabot/amp:"dev-main". Note that this will create a .git folder in vendor/lullabot/amp. If you want to avoid that, do $ composer require lullabot/amp:"dev-master" --prefer-dist

Using the command line amp-console

Please note that the --help command line option is your friend. Use that when confused!

A few example HTML files are available in the test-html folder for you to test drive so that you can get a flavor of the AMP PHP library.

Note that you need to provide --full-document if you're providing a full html document file for conversion.

Lets see the output of the first example command above. The first few lines is the AMPized HTML provided by our library. The rest of the headings are self explanatory.

Using the library in a composer based PHP project

First, follow the setup steps above if you're using this in a composer based project.

Sample code to get started:

Tips

Caveats and Known issues

Useful Links

Useful Links for amp-library developers

You can ignore these links if you simply plan to use this library and not develop for it

Third-party libraries

Sponsored by


All versions of amp with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
querypath/querypath Version ^3.0.4
sebastian/diff Version ^1.2 || ^2 || ^3 || ^4 || ^5
marc1706/fast-image-size Version 1.*
sabberworm/php-css-parser Version ^8.0.0
guzzlehttp/guzzle Version ~6.1 || ^7.4.5 || ^7.8
masterminds/html5 Version ^2.5
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 iteearmah/amp contains the following files

Loading the files please wait ....