{
  "name": "ampproject/amp-toolbox",
  "type": "library",
  "description": "A collection of AMP tools making it easier to publish and host AMP pages with PHP.",
  "license": "Apache-2.0",
  "require": {
    "php": "^7.4 || ^8.0",
    "ext-dom": "*",
    "ext-filter": "*",
    "ext-iconv": "*",
    "ext-json": "*",
    "ext-libxml": "*"
  },
  "require-dev": {
    "ext-zip": "*",
    "civicrm/composer-downloads-plugin": "^2.1 || ^3.0",
    "dealerdirect/phpcodesniffer-composer-installer": "^0.7.1 || ^1.0.0",
    "mikey179/vfsstream": "^1.6",
    "php-parallel-lint/php-parallel-lint": "^1.2",
    "phpcompatibility/php-compatibility": "^9",
    "phpunit/phpunit": "^5 || ^6 || ^7 || ^8 || ^9",
    "roave/security-advisories": "dev-master",
    "sirbrillig/phpcs-variable-analysis": "^2.11.2",
    "squizlabs/php_codesniffer": "^3",
    "wp-coding-standards/wpcs": "^2.3",
    "yoast/phpunit-polyfills": "^0.2.0 || ^1.0.0"
  },
  "suggest": {
    "ext-json": "Provides native implementation of json_encode()/json_decode().",
    "ext-mbstring": "Used by Dom\\Document to convert encoding to UTF-8 if needed.",
    "nette/php-generator": "Needed to generate the validator spec PHP classes and interfaces.",
    "mck89/peast": "Needed to minify the AMP script."
  },
  "config": {
    "sort-packages": true,
    "allow-plugins": {
      "civicrm/composer-downloads-plugin": true,
      "dealerdirect/phpcodesniffer-composer-installer": true
    }
  },
  "extra": {
    "downloads": {
      "phpstan": {
        "url": "https://github.com/phpstan/phpstan/releases/latest/download/phpstan.phar",
        "path": "vendor/bin/phpstan",
        "type": "phar"
      }
    }
  },
  "bin": [
    "bin/amp"
  ],
  "autoload": {
    "psr-4": {
      "AmpProject\\": "src/"
    },
    "files": [
      "include/compatibility-fixes.php"
    ]
  },
  "autoload-dev": {
    "psr-4": {
      "AmpProject\\Tests\\": "tests/src/",
      "AmpProject\\Tooling\\": "bin/src/"
    }
  },
  "scripts": {
    "cbf": "phpcbf",
    "compat": "if [ -z $TEST_SKIP_PHPCOMPAT ]; then phpcs --standard=PHPCompatibility -s -p src --runtime-set testVersion 5.6; fi",
    "cs": "if [ -z $TEST_SKIP_PHPCS ]; then phpcs; fi",
    "lint": "if [ -z $TEST_SKIP_LINTING ]; then parallel-lint -j 10 --colors --exclude vendor .; fi",
    "test": [
      "@lint",
      "@unit",
      "@cs",
      "@analyze",
      "@compat"
    ],
    "analyze": "if [ -z $TEST_SKIP_PHPSTAN ]; then phpstan --version; phpstan analyze --ansi; fi",
    "unit": "if [ -z $TEST_SKIP_PHPUNIT ]; then phpunit --colors=always; fi",
    "sync-fallback-files":  "bin/sync-amp-runtime-local-fallback-resources.php",
    "sync-test-specs":  "rm -rf tests/spec && bin/sync-amp-toolbox-test-suite.php",
    "sync": [
      "sync-fallback-files",
      "sync-test-specs"
    ]
  }
}
