Plugin Directory

Changeset 2283783


Ignore:
Timestamp:
04/15/2020 04:32:19 AM (6 years ago)
Author:
tynor
Message:

3.0.2 release

Location:
lockr/trunk
Files:
5 added
12 deleted
69 edited

Legend:

Unmodified
Added
Removed
  • lockr/trunk/class-lockr-wp-secret-info.php

    r2079642 r2283783  
    3030        $keys       = array();
    3131        foreach ( $return as $key ) {
    32             $keys[ $key->key_name ] = $key->key_value;
     32            if ( json_decode( $key->key_value ) ) {
     33                $keys[ $key->key_name ] = $key->key_value;
     34            } else {
     35                $key_data = array( 'wrapping_key' => $key->key_value );
     36                $key_data = wp_json_encode( $key_data );
     37
     38                $keys[ $key->key_name ] = $key_data;
     39            }
    3340        }
    3441        $this->data = $keys;
     
    7986        }
    8087
    81         if ( ! $key_store ) {
     88        if ( false === $key_store ) {
    8289            throw new \Exception( 'Could not store the new key data in the database.' );
    8390        }
  • lockr/trunk/composer.lock

    r2079642 r2283783  
    7272        {
    7373            "name": "guzzlehttp/guzzle",
    74             "version": "6.3.3",
     74            "version": "6.4.1",
    7575            "source": {
    7676                "type": "git",
    7777                "url": "https://github.com/guzzle/guzzle.git",
    78                 "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba"
    79             },
    80             "dist": {
    81                 "type": "zip",
    82                 "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba",
    83                 "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba",
    84                 "shasum": ""
    85             },
    86             "require": {
     78                "reference": "0895c932405407fd3a7368b6910c09a24d26db11"
     79            },
     80            "dist": {
     81                "type": "zip",
     82                "url": "https://api.github.com/repos/guzzle/guzzle/zipball/0895c932405407fd3a7368b6910c09a24d26db11",
     83                "reference": "0895c932405407fd3a7368b6910c09a24d26db11",
     84                "shasum": ""
     85            },
     86            "require": {
     87                "ext-json": "*",
    8788                "guzzlehttp/promises": "^1.0",
    88                 "guzzlehttp/psr7": "^1.4",
     89                "guzzlehttp/psr7": "^1.6.1",
    8990                "php": ">=5.5"
    9091            },
     
    9293                "ext-curl": "*",
    9394                "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
    94                 "psr/log": "^1.0"
     95                "psr/log": "^1.1"
    9596            },
    9697            "suggest": {
     
    104105            },
    105106            "autoload": {
     107                "psr-4": {
     108                    "GuzzleHttp\\": "src/"
     109                },
    106110                "files": [
    107111                    "src/functions_include.php"
    108                 ],
    109                 "psr-4": {
    110                     "GuzzleHttp\\": "src/"
    111                 }
     112                ]
    112113            },
    113114            "notification-url": "https://packagist.org/downloads/",
     
    133134                "web service"
    134135            ],
    135             "time": "2018-04-22T15:46:56+00:00"
     136            "time": "2019-10-23T15:58:00+00:00"
    136137        },
    137138        {
     
    188189        {
    189190            "name": "guzzlehttp/psr7",
    190             "version": "1.5.2",
     191            "version": "1.6.1",
    191192            "source": {
    192193                "type": "git",
    193194                "url": "https://github.com/guzzle/psr7.git",
    194                 "reference": "9f83dded91781a01c63574e387eaa769be769115"
    195             },
    196             "dist": {
    197                 "type": "zip",
    198                 "url": "https://api.github.com/repos/guzzle/psr7/zipball/9f83dded91781a01c63574e387eaa769be769115",
    199                 "reference": "9f83dded91781a01c63574e387eaa769be769115",
     195                "reference": "239400de7a173fe9901b9ac7c06497751f00727a"
     196            },
     197            "dist": {
     198                "type": "zip",
     199                "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a",
     200                "reference": "239400de7a173fe9901b9ac7c06497751f00727a",
    200201                "shasum": ""
    201202            },
     
    203204                "php": ">=5.4.0",
    204205                "psr/http-message": "~1.0",
    205                 "ralouphie/getallheaders": "^2.0.5"
     206                "ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
    206207            },
    207208            "provide": {
     
    209210            },
    210211            "require-dev": {
     212                "ext-zlib": "*",
    211213                "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8"
    212214            },
    213             "type": "library",
    214             "extra": {
    215                 "branch-alias": {
    216                     "dev-master": "1.5-dev"
     215            "suggest": {
     216                "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses"
     217            },
     218            "type": "library",
     219            "extra": {
     220                "branch-alias": {
     221                    "dev-master": "1.6-dev"
    217222                }
    218223            },
     
    251256                "url"
    252257            ],
    253             "time": "2018-12-04T20:46:45+00:00"
     258            "time": "2019-07-01T23:21:34+00:00"
    254259        },
    255260        {
     
    306311        {
    307312            "name": "lockr/lockr",
    308             "version": "v1.0.5",
     313            "version": "v1.0.8",
    309314            "source": {
    310315                "type": "git",
    311316                "url": "https://github.com/lockr/lockr-php.git",
    312                 "reference": "07049cd6304c2f583f0c2d5f0f7496e7e6c16cc8"
    313             },
    314             "dist": {
    315                 "type": "zip",
    316                 "url": "https://api.github.com/repos/lockr/lockr-php/zipball/07049cd6304c2f583f0c2d5f0f7496e7e6c16cc8",
    317                 "reference": "07049cd6304c2f583f0c2d5f0f7496e7e6c16cc8",
     317                "reference": "e6fa9340188ac5ee422770da07b3614e8d224fcb"
     318            },
     319            "dist": {
     320                "type": "zip",
     321                "url": "https://api.github.com/repos/lockr/lockr-php/zipball/e6fa9340188ac5ee422770da07b3614e8d224fcb",
     322                "reference": "e6fa9340188ac5ee422770da07b3614e8d224fcb",
    318323                "shasum": ""
    319324            },
     
    348353            ],
    349354            "description": "Client for use with Lockr off-site key management service.",
    350             "time": "2019-05-02T22:17:11+00:00"
     355            "time": "2019-10-07T17:28:56+00:00"
    351356        },
    352357        {
     
    447452        {
    448453            "name": "psr/log",
    449             "version": "1.1.0",
     454            "version": "1.1.2",
    450455            "source": {
    451456                "type": "git",
    452457                "url": "https://github.com/php-fig/log.git",
    453                 "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd"
    454             },
    455             "dist": {
    456                 "type": "zip",
    457                 "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd",
    458                 "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd",
     458                "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801"
     459            },
     460            "dist": {
     461                "type": "zip",
     462                "url": "https://api.github.com/repos/php-fig/log/zipball/446d54b4cb6bf489fc9d75f55843658e6f25d801",
     463                "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801",
    459464                "shasum": ""
    460465            },
     
    465470            "extra": {
    466471                "branch-alias": {
    467                     "dev-master": "1.0.x-dev"
     472                    "dev-master": "1.1.x-dev"
    468473                }
    469474            },
     
    490495                "psr-3"
    491496            ],
    492             "time": "2018-11-20T15:27:04+00:00"
     497            "time": "2019-11-01T11:05:21+00:00"
    493498        },
    494499        {
    495500            "name": "ralouphie/getallheaders",
    496             "version": "2.0.5",
     501            "version": "3.0.3",
    497502            "source": {
    498503                "type": "git",
    499504                "url": "https://github.com/ralouphie/getallheaders.git",
    500                 "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa"
    501             },
    502             "dist": {
    503                 "type": "zip",
    504                 "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/5601c8a83fbba7ef674a7369456d12f1e0d0eafa",
    505                 "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa",
    506                 "shasum": ""
    507             },
    508             "require": {
    509                 "php": ">=5.3"
    510             },
    511             "require-dev": {
    512                 "phpunit/phpunit": "~3.7.0",
    513                 "satooshi/php-coveralls": ">=1.0"
     505                "reference": "120b605dfeb996808c31b6477290a714d356e822"
     506            },
     507            "dist": {
     508                "type": "zip",
     509                "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822",
     510                "reference": "120b605dfeb996808c31b6477290a714d356e822",
     511                "shasum": ""
     512            },
     513            "require": {
     514                "php": ">=5.6"
     515            },
     516            "require-dev": {
     517                "php-coveralls/php-coveralls": "^2.1",
     518                "phpunit/phpunit": "^5 || ^6.5"
    514519            },
    515520            "type": "library",
     
    530535            ],
    531536            "description": "A polyfill for getallheaders.",
    532             "time": "2016-02-11T07:05:27+00:00"
     537            "time": "2019-03-08T08:55:37+00:00"
    533538        },
    534539        {
    535540            "name": "symfony/polyfill-ctype",
    536             "version": "v1.11.0",
     541            "version": "v1.12.0",
    537542            "source": {
    538543                "type": "git",
    539544                "url": "https://github.com/symfony/polyfill-ctype.git",
    540                 "reference": "82ebae02209c21113908c229e9883c419720738a"
    541             },
    542             "dist": {
    543                 "type": "zip",
    544                 "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/82ebae02209c21113908c229e9883c419720738a",
    545                 "reference": "82ebae02209c21113908c229e9883c419720738a",
     545                "reference": "550ebaac289296ce228a706d0867afc34687e3f4"
     546            },
     547            "dist": {
     548                "type": "zip",
     549                "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4",
     550                "reference": "550ebaac289296ce228a706d0867afc34687e3f4",
    546551                "shasum": ""
    547552            },
     
    555560            "extra": {
    556561                "branch-alias": {
    557                     "dev-master": "1.11-dev"
     562                    "dev-master": "1.12-dev"
    558563                }
    559564            },
     
    572577            "authors": [
    573578                {
     579                    "name": "Gert de Pagter",
     580                    "email": "BackEndTea@gmail.com"
     581                },
     582                {
    574583                    "name": "Symfony Community",
    575584                    "homepage": "https://symfony.com/contributors"
    576                 },
    577                 {
    578                     "name": "Gert de Pagter",
    579                     "email": "BackEndTea@gmail.com"
    580585                }
    581586            ],
     
    588593                "portable"
    589594            ],
    590             "time": "2019-02-06T07:57:58+00:00"
     595            "time": "2019-08-06T08:03:45+00:00"
    591596        },
    592597        {
    593598            "name": "symfony/yaml",
    594             "version": "v3.4.27",
     599            "version": "v3.4.33",
    595600            "source": {
    596601                "type": "git",
    597602                "url": "https://github.com/symfony/yaml.git",
    598                 "reference": "212a27b731e5bfb735679d1ffaac82bd6a1dc996"
    599             },
    600             "dist": {
    601                 "type": "zip",
    602                 "url": "https://api.github.com/repos/symfony/yaml/zipball/212a27b731e5bfb735679d1ffaac82bd6a1dc996",
    603                 "reference": "212a27b731e5bfb735679d1ffaac82bd6a1dc996",
     603                "reference": "dab657db15207879217fc81df4f875947bf68804"
     604            },
     605            "dist": {
     606                "type": "zip",
     607                "url": "https://api.github.com/repos/symfony/yaml/zipball/dab657db15207879217fc81df4f875947bf68804",
     608                "reference": "dab657db15207879217fc81df4f875947bf68804",
    604609                "shasum": ""
    605610            },
     
    647652            "description": "Symfony Yaml Component",
    648653            "homepage": "https://symfony.com",
    649             "time": "2019-03-25T07:48:46+00:00"
     654            "time": "2019-10-24T15:33:53+00:00"
    650655        }
    651656    ],
  • lockr/trunk/lockr-admin.php

    r2079642 r2283783  
    8484    $exists          = $status['keyring_label'] ? true : false;
    8585    $deleted_default = get_option( 'lockr_default_deleted' );
    86     $auto_created    = (int) $default_key[0]->auto_created;
     86    if ( $default_key ) {
     87        $auto_created = (int) $default_key[0]->auto_created;
     88    } else {
     89        $auto_created = false;
     90    }
    8791
    8892    if ( $exists && ! $default_key && ! $deleted_default ) {
  • lockr/trunk/lockr-partners.php

    r2079642 r2283783  
    2626EOL;
    2727
     28        // Legacy path to Pantheon binding certs.
     29        $cert_path = '/srv/bindings/' . PANTHEON_BINDING . '/certs/binding.pem';
     30        if ( ! is_file( $cert_path ) ) {
     31            // Pantheon's new containers has certs directory at root..
     32            // TODO: When rollout is complete, the old path can be phased out.
     33            $cert_path = '/certs/binding.pem';
     34        }
    2835        return array(
    2936            'name'          => 'pantheon',
    3037            'title'         => 'Pantheon',
    3138            'description'   => $desc,
    32             'cert'          => '/srv/bindings/' . PANTHEON_BINDING . '/certs/binding.pem',
     39            'cert'          => $cert_path,
    3340            'force_prod'    => false,
    3441            'partner_certs' => true,
  • lockr/trunk/lockr.php

    r2079642 r2283783  
    1010Plugin URI: https://lockr.io/
    1111Description: Integrate with the Lockr hosted secrets management platform. Secure all your plugin passwords, API tokens and encryption keys according to industry best practices. With Lockr, secrets management is easy.
    12 Version: 3.0
     12Version: 3.0.2
    1313Author: Lockr
    1414Author URI: htts://lockr.io/
     
    203203function lockr_settings() {
    204204
    205     if ( get_option( 'lockr_cert', false ) ) {
     205    if ( get_option( 'lockr_partner', false ) === 'custom' && get_option( 'lockr_cert', false ) ) {
    206206        $cert_path = get_option( 'lockr_cert', null );
    207207    } else {
  • lockr/trunk/readme.txt

    r2088626 r2283783  
    33Tags: encrypt, secrets management, secrets, encryption, security, API, key, password, security, secure, locker
    44Requires at least: 2.7
    5 Tested up to: 5.2
     5Tested up to: 5.4
    66Requires PHP: 5.5
    77Stable tag: trunk
     
    7979== Changelog ==
    8080
     81= 3.0.2 =
     82**Attention Pantheon Users**
     83This is a mandatory update for all Pantheon users. There is a change in the Pantheon filesystem which effects how the plugin authenticates to the Lockr Service. This will provide support for the new filesystem and ensure no disconnections occur as it is rolled out.
     84
     85= 3.0.1 =
     86This is a minor release with a single fix to some issues reported with legacy keys created prior to our newest library release.
     87
    8188= 3.0 =
    8289**Welcome to Lockr v2!**
  • lockr/trunk/vendor/composer/autoload_files.php

    r2079642 r2283783  
    99    '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
    1010    'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
     11    'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
    1112    '320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
    12     'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
    1313    '7c9b72b4e40cc7adcca6fd17b1bf4c8d' => $vendorDir . '/indigophp/hash-compat/src/hash_equals.php',
    1414    '43d9263e52ab88b5668a28ee36bd4e65' => $vendorDir . '/indigophp/hash-compat/src/hash_pbkdf2.php',
  • lockr/trunk/vendor/composer/autoload_static.php

    r2079642 r2283783  
    1010        '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
    1111        'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
     12        'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
    1213        '320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
    13         'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
    1414        '7c9b72b4e40cc7adcca6fd17b1bf4c8d' => __DIR__ . '/..' . '/indigophp/hash-compat/src/hash_equals.php',
    1515        '43d9263e52ab88b5668a28ee36bd4e65' => __DIR__ . '/..' . '/indigophp/hash-compat/src/hash_pbkdf2.php',
  • lockr/trunk/vendor/composer/installed.json

    r2079642 r2283783  
    11[
    2     {
    3         "name": "symfony/polyfill-ctype",
    4         "version": "v1.11.0",
    5         "version_normalized": "1.11.0.0",
    6         "source": {
    7             "type": "git",
    8             "url": "https://github.com/symfony/polyfill-ctype.git",
    9             "reference": "82ebae02209c21113908c229e9883c419720738a"
    10         },
    11         "dist": {
    12             "type": "zip",
    13             "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/82ebae02209c21113908c229e9883c419720738a",
    14             "reference": "82ebae02209c21113908c229e9883c419720738a",
    15             "shasum": ""
    16         },
    17         "require": {
    18             "php": ">=5.3.3"
    19         },
    20         "suggest": {
    21             "ext-ctype": "For best performance"
    22         },
    23         "time": "2019-02-06T07:57:58+00:00",
    24         "type": "library",
    25         "extra": {
    26             "branch-alias": {
    27                 "dev-master": "1.11-dev"
    28             }
    29         },
    30         "installation-source": "dist",
    31         "autoload": {
    32             "psr-4": {
    33                 "Symfony\\Polyfill\\Ctype\\": ""
    34             },
    35             "files": [
    36                 "bootstrap.php"
    37             ]
    38         },
    39         "notification-url": "https://packagist.org/downloads/",
    40         "license": [
    41             "MIT"
    42         ],
    43         "authors": [
    44             {
    45                 "name": "Symfony Community",
    46                 "homepage": "https://symfony.com/contributors"
    47             },
    48             {
    49                 "name": "Gert de Pagter",
    50                 "email": "BackEndTea@gmail.com"
    51             }
    52         ],
    53         "description": "Symfony polyfill for ctype functions",
    54         "homepage": "https://symfony.com",
    55         "keywords": [
    56             "compatibility",
    57             "ctype",
    58             "polyfill",
    59             "portable"
    60         ]
    61     },
    62     {
    63         "name": "symfony/yaml",
    64         "version": "v3.4.27",
    65         "version_normalized": "3.4.27.0",
    66         "source": {
    67             "type": "git",
    68             "url": "https://github.com/symfony/yaml.git",
    69             "reference": "212a27b731e5bfb735679d1ffaac82bd6a1dc996"
    70         },
    71         "dist": {
    72             "type": "zip",
    73             "url": "https://api.github.com/repos/symfony/yaml/zipball/212a27b731e5bfb735679d1ffaac82bd6a1dc996",
    74             "reference": "212a27b731e5bfb735679d1ffaac82bd6a1dc996",
    75             "shasum": ""
    76         },
    77         "require": {
    78             "php": "^5.5.9|>=7.0.8",
    79             "symfony/polyfill-ctype": "~1.8"
    80         },
    81         "conflict": {
    82             "symfony/console": "<3.4"
    83         },
    84         "require-dev": {
    85             "symfony/console": "~3.4|~4.0"
    86         },
    87         "suggest": {
    88             "symfony/console": "For validating YAML files using the lint command"
    89         },
    90         "time": "2019-03-25T07:48:46+00:00",
    91         "type": "library",
    92         "extra": {
    93             "branch-alias": {
    94                 "dev-master": "3.4-dev"
    95             }
    96         },
    97         "installation-source": "dist",
    98         "autoload": {
    99             "psr-4": {
    100                 "Symfony\\Component\\Yaml\\": ""
    101             },
    102             "exclude-from-classmap": [
    103                 "/Tests/"
    104             ]
    105         },
    106         "notification-url": "https://packagist.org/downloads/",
    107         "license": [
    108             "MIT"
    109         ],
    110         "authors": [
    111             {
    112                 "name": "Fabien Potencier",
    113                 "email": "fabien@symfony.com"
    114             },
    115             {
    116                 "name": "Symfony Community",
    117                 "homepage": "https://symfony.com/contributors"
    118             }
    119         ],
    120         "description": "Symfony Yaml Component",
    121         "homepage": "https://symfony.com"
    122     },
    123     {
    124         "name": "psr/log",
    125         "version": "1.1.0",
    126         "version_normalized": "1.1.0.0",
    127         "source": {
    128             "type": "git",
    129             "url": "https://github.com/php-fig/log.git",
    130             "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd"
    131         },
    132         "dist": {
    133             "type": "zip",
    134             "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd",
    135             "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd",
    136             "shasum": ""
    137         },
    138         "require": {
    139             "php": ">=5.3.0"
    140         },
    141         "time": "2018-11-20T15:27:04+00:00",
    142         "type": "library",
    143         "extra": {
    144             "branch-alias": {
    145                 "dev-master": "1.0.x-dev"
    146             }
    147         },
    148         "installation-source": "dist",
    149         "autoload": {
    150             "psr-4": {
    151                 "Psr\\Log\\": "Psr/Log/"
    152             }
    153         },
    154         "notification-url": "https://packagist.org/downloads/",
    155         "license": [
    156             "MIT"
    157         ],
    158         "authors": [
    159             {
    160                 "name": "PHP-FIG",
    161                 "homepage": "http://www.php-fig.org/"
    162             }
    163         ],
    164         "description": "Common interface for logging libraries",
    165         "homepage": "https://github.com/php-fig/log",
    166         "keywords": [
    167             "log",
    168             "psr",
    169             "psr-3"
    170         ]
    171     },
    1722    {
    1733        "name": "psr/http-message",
     
    323153    },
    324154    {
    325         "name": "ralouphie/getallheaders",
    326         "version": "2.0.5",
    327         "version_normalized": "2.0.5.0",
    328         "source": {
    329             "type": "git",
    330             "url": "https://github.com/ralouphie/getallheaders.git",
    331             "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa"
    332         },
    333         "dist": {
    334             "type": "zip",
    335             "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/5601c8a83fbba7ef674a7369456d12f1e0d0eafa",
    336             "reference": "5601c8a83fbba7ef674a7369456d12f1e0d0eafa",
    337             "shasum": ""
    338         },
    339         "require": {
    340             "php": ">=5.3"
    341         },
    342         "require-dev": {
    343             "phpunit/phpunit": "~3.7.0",
    344             "satooshi/php-coveralls": ">=1.0"
    345         },
    346         "time": "2016-02-11T07:05:27+00:00",
    347         "type": "library",
    348         "installation-source": "dist",
    349         "autoload": {
    350             "files": [
    351                 "src/getallheaders.php"
    352             ]
    353         },
    354         "notification-url": "https://packagist.org/downloads/",
    355         "license": [
    356             "MIT"
    357         ],
    358         "authors": [
    359             {
    360                 "name": "Ralph Khattar",
    361                 "email": "ralph.khattar@gmail.com"
    362             }
    363         ],
    364         "description": "A polyfill for getallheaders."
    365     },
    366     {
    367         "name": "guzzlehttp/psr7",
    368         "version": "1.5.2",
    369         "version_normalized": "1.5.2.0",
    370         "source": {
    371             "type": "git",
    372             "url": "https://github.com/guzzle/psr7.git",
    373             "reference": "9f83dded91781a01c63574e387eaa769be769115"
    374         },
    375         "dist": {
    376             "type": "zip",
    377             "url": "https://api.github.com/repos/guzzle/psr7/zipball/9f83dded91781a01c63574e387eaa769be769115",
    378             "reference": "9f83dded91781a01c63574e387eaa769be769115",
    379             "shasum": ""
    380         },
    381         "require": {
    382             "php": ">=5.4.0",
    383             "psr/http-message": "~1.0",
    384             "ralouphie/getallheaders": "^2.0.5"
    385         },
    386         "provide": {
    387             "psr/http-message-implementation": "1.0"
    388         },
    389         "require-dev": {
    390             "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8"
    391         },
    392         "time": "2018-12-04T20:46:45+00:00",
    393         "type": "library",
    394         "extra": {
    395             "branch-alias": {
    396                 "dev-master": "1.5-dev"
    397             }
    398         },
    399         "installation-source": "dist",
    400         "autoload": {
    401             "psr-4": {
    402                 "GuzzleHttp\\Psr7\\": "src/"
     155        "name": "guzzlehttp/promises",
     156        "version": "v1.3.1",
     157        "version_normalized": "1.3.1.0",
     158        "source": {
     159            "type": "git",
     160            "url": "https://github.com/guzzle/promises.git",
     161            "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646"
     162        },
     163        "dist": {
     164            "type": "zip",
     165            "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646",
     166            "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646",
     167            "shasum": ""
     168        },
     169        "require": {
     170            "php": ">=5.5.0"
     171        },
     172        "require-dev": {
     173            "phpunit/phpunit": "^4.0"
     174        },
     175        "time": "2016-12-20T10:07:11+00:00",
     176        "type": "library",
     177        "extra": {
     178            "branch-alias": {
     179                "dev-master": "1.4-dev"
     180            }
     181        },
     182        "installation-source": "dist",
     183        "autoload": {
     184            "psr-4": {
     185                "GuzzleHttp\\Promise\\": "src/"
    403186            },
    404187            "files": [
     
    415198                "email": "mtdowling@gmail.com",
    416199                "homepage": "https://github.com/mtdowling"
    417             },
    418             {
    419                 "name": "Tobias Schultze",
    420                 "homepage": "https://github.com/Tobion"
    421             }
    422         ],
    423         "description": "PSR-7 message implementation that also provides common utility methods",
    424         "keywords": [
    425             "http",
    426             "message",
    427             "psr-7",
    428             "request",
    429             "response",
    430             "stream",
    431             "uri",
    432             "url"
    433         ]
    434     },
    435     {
    436         "name": "guzzlehttp/promises",
    437         "version": "v1.3.1",
    438         "version_normalized": "1.3.1.0",
    439         "source": {
    440             "type": "git",
    441             "url": "https://github.com/guzzle/promises.git",
    442             "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646"
    443         },
    444         "dist": {
    445             "type": "zip",
    446             "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646",
    447             "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646",
    448             "shasum": ""
    449         },
    450         "require": {
    451             "php": ">=5.5.0"
    452         },
    453         "require-dev": {
    454             "phpunit/phpunit": "^4.0"
    455         },
    456         "time": "2016-12-20T10:07:11+00:00",
    457         "type": "library",
    458         "extra": {
    459             "branch-alias": {
    460                 "dev-master": "1.4-dev"
    461             }
    462         },
    463         "installation-source": "dist",
    464         "autoload": {
    465             "psr-4": {
    466                 "GuzzleHttp\\Promise\\": "src/"
    467             },
    468             "files": [
    469                 "src/functions_include.php"
    470             ]
    471         },
    472         "notification-url": "https://packagist.org/downloads/",
    473         "license": [
    474             "MIT"
    475         ],
    476         "authors": [
    477             {
    478                 "name": "Michael Dowling",
    479                 "email": "mtdowling@gmail.com",
    480                 "homepage": "https://github.com/mtdowling"
    481200            }
    482201        ],
     
    485204            "promise"
    486205        ]
    487     },
    488     {
    489         "name": "guzzlehttp/guzzle",
    490         "version": "6.3.3",
    491         "version_normalized": "6.3.3.0",
    492         "source": {
    493             "type": "git",
    494             "url": "https://github.com/guzzle/guzzle.git",
    495             "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba"
    496         },
    497         "dist": {
    498             "type": "zip",
    499             "url": "https://api.github.com/repos/guzzle/guzzle/zipball/407b0cb880ace85c9b63c5f9551db498cb2d50ba",
    500             "reference": "407b0cb880ace85c9b63c5f9551db498cb2d50ba",
    501             "shasum": ""
    502         },
    503         "require": {
    504             "guzzlehttp/promises": "^1.0",
    505             "guzzlehttp/psr7": "^1.4",
    506             "php": ">=5.5"
    507         },
    508         "require-dev": {
    509             "ext-curl": "*",
    510             "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
    511             "psr/log": "^1.0"
    512         },
    513         "suggest": {
    514             "psr/log": "Required for using the Log middleware"
    515         },
    516         "time": "2018-04-22T15:46:56+00:00",
    517         "type": "library",
    518         "extra": {
    519             "branch-alias": {
    520                 "dev-master": "6.3-dev"
    521             }
    522         },
    523         "installation-source": "dist",
    524         "autoload": {
    525             "files": [
    526                 "src/functions_include.php"
    527             ],
    528             "psr-4": {
    529                 "GuzzleHttp\\": "src/"
    530             }
    531         },
    532         "notification-url": "https://packagist.org/downloads/",
    533         "license": [
    534             "MIT"
    535         ],
    536         "authors": [
    537             {
    538                 "name": "Michael Dowling",
    539                 "email": "mtdowling@gmail.com",
    540                 "homepage": "https://github.com/mtdowling"
    541             }
    542         ],
    543         "description": "Guzzle is a PHP HTTP client library",
    544         "homepage": "http://guzzlephp.org/",
    545         "keywords": [
    546             "client",
    547             "curl",
    548             "framework",
    549             "http",
    550             "http client",
    551             "rest",
    552             "web service"
    553         ]
    554     },
    555     {
    556         "name": "lockr/lockr",
    557         "version": "v1.0.5",
    558         "version_normalized": "1.0.5.0",
    559         "source": {
    560             "type": "git",
    561             "url": "https://github.com/lockr/lockr-php.git",
    562             "reference": "07049cd6304c2f583f0c2d5f0f7496e7e6c16cc8"
    563         },
    564         "dist": {
    565             "type": "zip",
    566             "url": "https://api.github.com/repos/lockr/lockr-php/zipball/07049cd6304c2f583f0c2d5f0f7496e7e6c16cc8",
    567             "reference": "07049cd6304c2f583f0c2d5f0f7496e7e6c16cc8",
    568             "shasum": ""
    569         },
    570         "require": {
    571             "guzzlehttp/guzzle": "^6.3.0",
    572             "guzzlehttp/psr7": "^1.4.2",
    573             "indigophp/hash-compat": "^1.1.0",
    574             "paragonie/random_compat": ">=2",
    575             "psr/http-message": "^1.0.1",
    576             "psr/log": "^1.0.2",
    577             "symfony/yaml": "~3.4.5"
    578         },
    579         "require-dev": {
    580             "phpunit/phpunit": "^7.3.5",
    581             "squizlabs/php_codesniffer": "^3.3.1"
    582         },
    583         "time": "2019-05-02T22:17:11+00:00",
    584         "type": "library",
    585         "installation-source": "dist",
    586         "autoload": {
    587             "psr-4": {
    588                 "Lockr\\": "src/"
    589             }
    590         },
    591         "notification-url": "https://packagist.org/downloads/",
    592         "license": [
    593             "MIT"
    594         ],
    595         "authors": [
    596             {
    597                 "name": "Tynor Fujimoto",
    598                 "email": "tynor@lockr.io"
    599             }
    600         ],
    601         "description": "Client for use with Lockr off-site key management service."
    602206    },
    603207    {
     
    665269            "symmetric key cryptography"
    666270        ]
     271    },
     272    {
     273        "name": "symfony/polyfill-ctype",
     274        "version": "v1.12.0",
     275        "version_normalized": "1.12.0.0",
     276        "source": {
     277            "type": "git",
     278            "url": "https://github.com/symfony/polyfill-ctype.git",
     279            "reference": "550ebaac289296ce228a706d0867afc34687e3f4"
     280        },
     281        "dist": {
     282            "type": "zip",
     283            "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4",
     284            "reference": "550ebaac289296ce228a706d0867afc34687e3f4",
     285            "shasum": ""
     286        },
     287        "require": {
     288            "php": ">=5.3.3"
     289        },
     290        "suggest": {
     291            "ext-ctype": "For best performance"
     292        },
     293        "time": "2019-08-06T08:03:45+00:00",
     294        "type": "library",
     295        "extra": {
     296            "branch-alias": {
     297                "dev-master": "1.12-dev"
     298            }
     299        },
     300        "installation-source": "dist",
     301        "autoload": {
     302            "psr-4": {
     303                "Symfony\\Polyfill\\Ctype\\": ""
     304            },
     305            "files": [
     306                "bootstrap.php"
     307            ]
     308        },
     309        "notification-url": "https://packagist.org/downloads/",
     310        "license": [
     311            "MIT"
     312        ],
     313        "authors": [
     314            {
     315                "name": "Gert de Pagter",
     316                "email": "BackEndTea@gmail.com"
     317            },
     318            {
     319                "name": "Symfony Community",
     320                "homepage": "https://symfony.com/contributors"
     321            }
     322        ],
     323        "description": "Symfony polyfill for ctype functions",
     324        "homepage": "https://symfony.com",
     325        "keywords": [
     326            "compatibility",
     327            "ctype",
     328            "polyfill",
     329            "portable"
     330        ]
     331    },
     332    {
     333        "name": "symfony/yaml",
     334        "version": "v3.4.33",
     335        "version_normalized": "3.4.33.0",
     336        "source": {
     337            "type": "git",
     338            "url": "https://github.com/symfony/yaml.git",
     339            "reference": "dab657db15207879217fc81df4f875947bf68804"
     340        },
     341        "dist": {
     342            "type": "zip",
     343            "url": "https://api.github.com/repos/symfony/yaml/zipball/dab657db15207879217fc81df4f875947bf68804",
     344            "reference": "dab657db15207879217fc81df4f875947bf68804",
     345            "shasum": ""
     346        },
     347        "require": {
     348            "php": "^5.5.9|>=7.0.8",
     349            "symfony/polyfill-ctype": "~1.8"
     350        },
     351        "conflict": {
     352            "symfony/console": "<3.4"
     353        },
     354        "require-dev": {
     355            "symfony/console": "~3.4|~4.0"
     356        },
     357        "suggest": {
     358            "symfony/console": "For validating YAML files using the lint command"
     359        },
     360        "time": "2019-10-24T15:33:53+00:00",
     361        "type": "library",
     362        "extra": {
     363            "branch-alias": {
     364                "dev-master": "3.4-dev"
     365            }
     366        },
     367        "installation-source": "dist",
     368        "autoload": {
     369            "psr-4": {
     370                "Symfony\\Component\\Yaml\\": ""
     371            },
     372            "exclude-from-classmap": [
     373                "/Tests/"
     374            ]
     375        },
     376        "notification-url": "https://packagist.org/downloads/",
     377        "license": [
     378            "MIT"
     379        ],
     380        "authors": [
     381            {
     382                "name": "Fabien Potencier",
     383                "email": "fabien@symfony.com"
     384            },
     385            {
     386                "name": "Symfony Community",
     387                "homepage": "https://symfony.com/contributors"
     388            }
     389        ],
     390        "description": "Symfony Yaml Component",
     391        "homepage": "https://symfony.com"
     392    },
     393    {
     394        "name": "psr/log",
     395        "version": "1.1.2",
     396        "version_normalized": "1.1.2.0",
     397        "source": {
     398            "type": "git",
     399            "url": "https://github.com/php-fig/log.git",
     400            "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801"
     401        },
     402        "dist": {
     403            "type": "zip",
     404            "url": "https://api.github.com/repos/php-fig/log/zipball/446d54b4cb6bf489fc9d75f55843658e6f25d801",
     405            "reference": "446d54b4cb6bf489fc9d75f55843658e6f25d801",
     406            "shasum": ""
     407        },
     408        "require": {
     409            "php": ">=5.3.0"
     410        },
     411        "time": "2019-11-01T11:05:21+00:00",
     412        "type": "library",
     413        "extra": {
     414            "branch-alias": {
     415                "dev-master": "1.1.x-dev"
     416            }
     417        },
     418        "installation-source": "dist",
     419        "autoload": {
     420            "psr-4": {
     421                "Psr\\Log\\": "Psr/Log/"
     422            }
     423        },
     424        "notification-url": "https://packagist.org/downloads/",
     425        "license": [
     426            "MIT"
     427        ],
     428        "authors": [
     429            {
     430                "name": "PHP-FIG",
     431                "homepage": "http://www.php-fig.org/"
     432            }
     433        ],
     434        "description": "Common interface for logging libraries",
     435        "homepage": "https://github.com/php-fig/log",
     436        "keywords": [
     437            "log",
     438            "psr",
     439            "psr-3"
     440        ]
     441    },
     442    {
     443        "name": "ralouphie/getallheaders",
     444        "version": "3.0.3",
     445        "version_normalized": "3.0.3.0",
     446        "source": {
     447            "type": "git",
     448            "url": "https://github.com/ralouphie/getallheaders.git",
     449            "reference": "120b605dfeb996808c31b6477290a714d356e822"
     450        },
     451        "dist": {
     452            "type": "zip",
     453            "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822",
     454            "reference": "120b605dfeb996808c31b6477290a714d356e822",
     455            "shasum": ""
     456        },
     457        "require": {
     458            "php": ">=5.6"
     459        },
     460        "require-dev": {
     461            "php-coveralls/php-coveralls": "^2.1",
     462            "phpunit/phpunit": "^5 || ^6.5"
     463        },
     464        "time": "2019-03-08T08:55:37+00:00",
     465        "type": "library",
     466        "installation-source": "dist",
     467        "autoload": {
     468            "files": [
     469                "src/getallheaders.php"
     470            ]
     471        },
     472        "notification-url": "https://packagist.org/downloads/",
     473        "license": [
     474            "MIT"
     475        ],
     476        "authors": [
     477            {
     478                "name": "Ralph Khattar",
     479                "email": "ralph.khattar@gmail.com"
     480            }
     481        ],
     482        "description": "A polyfill for getallheaders."
     483    },
     484    {
     485        "name": "guzzlehttp/psr7",
     486        "version": "1.6.1",
     487        "version_normalized": "1.6.1.0",
     488        "source": {
     489            "type": "git",
     490            "url": "https://github.com/guzzle/psr7.git",
     491            "reference": "239400de7a173fe9901b9ac7c06497751f00727a"
     492        },
     493        "dist": {
     494            "type": "zip",
     495            "url": "https://api.github.com/repos/guzzle/psr7/zipball/239400de7a173fe9901b9ac7c06497751f00727a",
     496            "reference": "239400de7a173fe9901b9ac7c06497751f00727a",
     497            "shasum": ""
     498        },
     499        "require": {
     500            "php": ">=5.4.0",
     501            "psr/http-message": "~1.0",
     502            "ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
     503        },
     504        "provide": {
     505            "psr/http-message-implementation": "1.0"
     506        },
     507        "require-dev": {
     508            "ext-zlib": "*",
     509            "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8"
     510        },
     511        "suggest": {
     512            "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses"
     513        },
     514        "time": "2019-07-01T23:21:34+00:00",
     515        "type": "library",
     516        "extra": {
     517            "branch-alias": {
     518                "dev-master": "1.6-dev"
     519            }
     520        },
     521        "installation-source": "dist",
     522        "autoload": {
     523            "psr-4": {
     524                "GuzzleHttp\\Psr7\\": "src/"
     525            },
     526            "files": [
     527                "src/functions_include.php"
     528            ]
     529        },
     530        "notification-url": "https://packagist.org/downloads/",
     531        "license": [
     532            "MIT"
     533        ],
     534        "authors": [
     535            {
     536                "name": "Michael Dowling",
     537                "email": "mtdowling@gmail.com",
     538                "homepage": "https://github.com/mtdowling"
     539            },
     540            {
     541                "name": "Tobias Schultze",
     542                "homepage": "https://github.com/Tobion"
     543            }
     544        ],
     545        "description": "PSR-7 message implementation that also provides common utility methods",
     546        "keywords": [
     547            "http",
     548            "message",
     549            "psr-7",
     550            "request",
     551            "response",
     552            "stream",
     553            "uri",
     554            "url"
     555        ]
     556    },
     557    {
     558        "name": "guzzlehttp/guzzle",
     559        "version": "6.4.1",
     560        "version_normalized": "6.4.1.0",
     561        "source": {
     562            "type": "git",
     563            "url": "https://github.com/guzzle/guzzle.git",
     564            "reference": "0895c932405407fd3a7368b6910c09a24d26db11"
     565        },
     566        "dist": {
     567            "type": "zip",
     568            "url": "https://api.github.com/repos/guzzle/guzzle/zipball/0895c932405407fd3a7368b6910c09a24d26db11",
     569            "reference": "0895c932405407fd3a7368b6910c09a24d26db11",
     570            "shasum": ""
     571        },
     572        "require": {
     573            "ext-json": "*",
     574            "guzzlehttp/promises": "^1.0",
     575            "guzzlehttp/psr7": "^1.6.1",
     576            "php": ">=5.5"
     577        },
     578        "require-dev": {
     579            "ext-curl": "*",
     580            "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
     581            "psr/log": "^1.1"
     582        },
     583        "suggest": {
     584            "psr/log": "Required for using the Log middleware"
     585        },
     586        "time": "2019-10-23T15:58:00+00:00",
     587        "type": "library",
     588        "extra": {
     589            "branch-alias": {
     590                "dev-master": "6.3-dev"
     591            }
     592        },
     593        "installation-source": "dist",
     594        "autoload": {
     595            "psr-4": {
     596                "GuzzleHttp\\": "src/"
     597            },
     598            "files": [
     599                "src/functions_include.php"
     600            ]
     601        },
     602        "notification-url": "https://packagist.org/downloads/",
     603        "license": [
     604            "MIT"
     605        ],
     606        "authors": [
     607            {
     608                "name": "Michael Dowling",
     609                "email": "mtdowling@gmail.com",
     610                "homepage": "https://github.com/mtdowling"
     611            }
     612        ],
     613        "description": "Guzzle is a PHP HTTP client library",
     614        "homepage": "http://guzzlephp.org/",
     615        "keywords": [
     616            "client",
     617            "curl",
     618            "framework",
     619            "http",
     620            "http client",
     621            "rest",
     622            "web service"
     623        ]
     624    },
     625    {
     626        "name": "lockr/lockr",
     627        "version": "v1.0.8",
     628        "version_normalized": "1.0.8.0",
     629        "source": {
     630            "type": "git",
     631            "url": "https://github.com/lockr/lockr-php.git",
     632            "reference": "e6fa9340188ac5ee422770da07b3614e8d224fcb"
     633        },
     634        "dist": {
     635            "type": "zip",
     636            "url": "https://api.github.com/repos/lockr/lockr-php/zipball/e6fa9340188ac5ee422770da07b3614e8d224fcb",
     637            "reference": "e6fa9340188ac5ee422770da07b3614e8d224fcb",
     638            "shasum": ""
     639        },
     640        "require": {
     641            "guzzlehttp/guzzle": "^6.3.0",
     642            "guzzlehttp/psr7": "^1.4.2",
     643            "indigophp/hash-compat": "^1.1.0",
     644            "paragonie/random_compat": ">=2",
     645            "psr/http-message": "^1.0.1",
     646            "psr/log": "^1.0.2",
     647            "symfony/yaml": "~3.4.5"
     648        },
     649        "require-dev": {
     650            "phpunit/phpunit": "^7.3.5",
     651            "squizlabs/php_codesniffer": "^3.3.1"
     652        },
     653        "time": "2019-10-07T17:28:56+00:00",
     654        "type": "library",
     655        "installation-source": "dist",
     656        "autoload": {
     657            "psr-4": {
     658                "Lockr\\": "src/"
     659            }
     660        },
     661        "notification-url": "https://packagist.org/downloads/",
     662        "license": [
     663            "MIT"
     664        ],
     665        "authors": [
     666            {
     667                "name": "Tynor Fujimoto",
     668                "email": "tynor@lockr.io"
     669            }
     670        ],
     671        "description": "Client for use with Lockr off-site key management service."
    667672    }
    668673]
  • lockr/trunk/vendor/guzzlehttp/guzzle/CHANGELOG.md

    r2079642 r2283783  
    11# Change Log
     2
     3## 6.4.1 - 2019-10-23
     4
     5* No `guzzle.phar` was created in 6.4.0 due expired API token. This release will fix that
     6* Added `parent::__construct()` to `FileCookieJar` and `SessionCookieJar`
     7
     8## 6.4.0 - 2019-10-23
     9
     10* Improvement: Improved error messages when using curl < 7.21.2 [#2108](https://github.com/guzzle/guzzle/pull/2108)
     11* Fix: Test if response is readable before returning a summary in `RequestException::getResponseBodySummary()` [#2081](https://github.com/guzzle/guzzle/pull/2081)
     12* Fix: Add support for GUZZLE_CURL_SELECT_TIMEOUT environment variable [#2161](https://github.com/guzzle/guzzle/pull/2161)
     13* Improvement: Added `GuzzleHttp\Exception\InvalidArgumentException` [#2163](https://github.com/guzzle/guzzle/pull/2163)
     14* Improvement: Added `GuzzleHttp\_current_time()` to use `hrtime()` if that function exists. [#2242](https://github.com/guzzle/guzzle/pull/2242)
     15* Improvement: Added curl's `appconnect_time` in `TransferStats` [#2284](https://github.com/guzzle/guzzle/pull/2284)
     16* Improvement: Make GuzzleException extend Throwable wherever it's available [#2273](https://github.com/guzzle/guzzle/pull/2273)
     17* Fix: Prevent concurrent writes to file when saving `CookieJar` [#2335](https://github.com/guzzle/guzzle/pull/2335)
     18* Improvement: Update `MockHandler` so we can test transfer time [#2362](https://github.com/guzzle/guzzle/pull/2362)
    219
    320## 6.3.3 - 2018-04-22
  • lockr/trunk/vendor/guzzlehttp/guzzle/README.md

    r2079642 r2283783  
    2222```php
    2323$client = new \GuzzleHttp\Client();
    24 $res = $client->request('GET', 'https://api.github.com/repos/guzzle/guzzle');
    25 echo $res->getStatusCode();
    26 // 200
    27 echo $res->getHeaderLine('content-type');
    28 // 'application/json; charset=utf8'
    29 echo $res->getBody();
    30 // '{"id": 1420053, "name": "guzzle", ...}'
     24$response = $client->request('GET', 'https://api.github.com/repos/guzzle/guzzle');
    3125
    32 // Send an asynchronous request.
     26echo $response->getStatusCode(); # 200
     27echo $response->getHeaderLine('content-type'); # 'application/json; charset=utf8'
     28echo $response->getBody(); # '{"id": 1420053, "name": "guzzle", ...}'
     29
     30# Send an asynchronous request.
    3331$request = new \GuzzleHttp\Psr7\Request('GET', 'http://httpbin.org');
    3432$promise = $client->sendAsync($request)->then(function ($response) {
    3533    echo 'I completed! ' . $response->getBody();
    3634});
     35
    3736$promise->wait();
    3837```
     
    5857
    5958```bash
    60 php composer.phar require guzzlehttp/guzzle
     59composer require guzzlehttp/guzzle
    6160```
    6261
     
    7069
    7170 ```bash
    72 composer.phar update
     71composer update
    7372 ```
    7473
     
    8786[guzzle-5-repo]: https://github.com/guzzle/guzzle/tree/5.3
    8887[guzzle-6-repo]: https://github.com/guzzle/guzzle
    89 [guzzle-3-docs]: http://guzzle3.readthedocs.org/en/latest/
     88[guzzle-3-docs]: http://guzzle3.readthedocs.org
    9089[guzzle-5-docs]: http://guzzle.readthedocs.org/en/5.3/
    9190[guzzle-6-docs]: http://guzzle.readthedocs.org/en/latest/
  • lockr/trunk/vendor/guzzlehttp/guzzle/composer.json

    r2079642 r2283783  
    33    "type": "library",
    44    "description": "Guzzle is a PHP HTTP client library",
    5     "keywords": ["framework", "http", "rest", "web service", "curl", "client", "HTTP client"],
     5    "keywords": [
     6        "framework",
     7        "http",
     8        "rest",
     9        "web service",
     10        "curl",
     11        "client",
     12        "HTTP client"
     13    ],
    614    "homepage": "http://guzzlephp.org/",
    715    "license": "MIT",
     
    1523    "require": {
    1624        "php": ">=5.5",
    17         "guzzlehttp/psr7": "^1.4",
    18         "guzzlehttp/promises": "^1.0"
     25        "ext-json": "*",
     26        "guzzlehttp/promises": "^1.0",
     27        "guzzlehttp/psr7": "^1.6.1"
    1928    },
    2029    "require-dev": {
    2130        "ext-curl": "*",
    2231        "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0",
    23         "psr/log": "^1.0"
     32        "psr/log": "^1.1"
     33    },
     34    "suggest": {
     35        "psr/log": "Required for using the Log middleware"
     36    },
     37    "config": {
     38        "sort-packages": true
     39    },
     40    "extra": {
     41        "branch-alias": {
     42            "dev-master": "6.3-dev"
     43        }
    2444    },
    2545    "autoload": {
    26         "files": ["src/functions_include.php"],
    2746        "psr-4": {
    2847            "GuzzleHttp\\": "src/"
    29         }
     48        },
     49        "files": [
     50            "src/functions_include.php"
     51        ]
    3052    },
    3153    "autoload-dev": {
     
    3355            "GuzzleHttp\\Tests\\": "tests/"
    3456        }
    35     },
    36     "suggest": {
    37         "psr/log": "Required for using the Log middleware"
    38     },
    39     "extra": {
    40         "branch-alias": {
    41             "dev-master": "6.3-dev"
    42         }
    4357    }
    4458}
  • lockr/trunk/vendor/guzzlehttp/guzzle/src/Client.php

    r2079642 r2283783  
    211211     * @return array
    212212     */
    213     private function prepareDefaults($options)
     213    private function prepareDefaults(array $options)
    214214    {
    215215        $defaults = $this->config;
  • lockr/trunk/vendor/guzzlehttp/guzzle/src/ClientInterface.php

    r2079642 r2283783  
    1313interface ClientInterface
    1414{
    15     const VERSION = '6.3.3';
     15    const VERSION = '6.4.1';
    1616
    1717    /**
  • lockr/trunk/vendor/guzzlehttp/guzzle/src/Cookie/CookieJar.php

    r2079642 r2283783  
    121121            $this->cookies = array_filter(
    122122                $this->cookies,
    123                 function (SetCookie $cookie) use ($path, $domain) {
     123                function (SetCookie $cookie) use ($domain) {
    124124                    return !$cookie->matchesDomain($domain);
    125125                }
  • lockr/trunk/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php

    r2079642 r2283783  
    2424    public function __construct($cookieFile, $storeSessionCookies = false)
    2525    {
     26        parent::__construct();
    2627        $this->filename = $cookieFile;
    2728        $this->storeSessionCookies = $storeSessionCookies;
     
    5758
    5859        $jsonStr = \GuzzleHttp\json_encode($json);
    59         if (false === file_put_contents($filename, $jsonStr)) {
     60        if (false === file_put_contents($filename, $jsonStr, LOCK_EX)) {
    6061            throw new \RuntimeException("Unable to save file {$filename}");
    6162        }
  • lockr/trunk/vendor/guzzlehttp/guzzle/src/Cookie/SessionCookieJar.php

    r2079642 r2283783  
    2323    public function __construct($sessionKey, $storeSessionCookies = false)
    2424    {
     25        parent::__construct();
    2526        $this->sessionKey = $sessionKey;
    2627        $this->storeSessionCookies = $storeSessionCookies;
  • lockr/trunk/vendor/guzzlehttp/guzzle/src/Cookie/SetCookie.php

    r2079642 r2283783  
    228228     * Get whether or not this is a secure cookie
    229229     *
    230      * @return null|bool
     230     * @return bool|null
    231231     */
    232232    public function getSecure()
     
    248248     * Get whether or not this is a session cookie
    249249     *
    250      * @return null|bool
     250     * @return bool|null
    251251     */
    252252    public function getDiscard()
  • lockr/trunk/vendor/guzzlehttp/guzzle/src/Exception/ClientException.php

    r2079642 r2283783  
    55 * Exception when a client error is encountered (4xx codes)
    66 */
    7 class ClientException extends BadResponseException {}
     7class ClientException extends BadResponseException
     8{
     9}
  • lockr/trunk/vendor/guzzlehttp/guzzle/src/Exception/GuzzleException.php

    r2079642 r2283783  
    22namespace GuzzleHttp\Exception;
    33
    4 /**
    5  * @method string getMessage()
    6  * @method \Throwable|null getPrevious()
    7  * @method mixed getCode()
    8  * @method string getFile()
    9  * @method int getLine()
    10  * @method array getTrace()
    11  * @method string getTraceAsString()
    12  */
    13 interface GuzzleException {}
     4use Throwable;
     5
     6if (interface_exists(Throwable::class)) {
     7    interface GuzzleException extends Throwable
     8    {
     9    }
     10} else {
     11    /**
     12     * @method string getMessage()
     13     * @method \Throwable|null getPrevious()
     14     * @method mixed getCode()
     15     * @method string getFile()
     16     * @method int getLine()
     17     * @method array getTrace()
     18     * @method string getTraceAsString()
     19     */
     20    interface GuzzleException
     21    {
     22    }
     23}
  • lockr/trunk/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php

    r2079642 r2283783  
    127127        $body = $response->getBody();
    128128
    129         if (!$body->isSeekable()) {
     129        if (!$body->isSeekable() || !$body->isReadable()) {
    130130            return null;
    131131        }
  • lockr/trunk/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php

    r2079642 r2283783  
    55 * Exception when a server error is encountered (5xx codes)
    66 */
    7 class ServerException extends BadResponseException {}
     7class ServerException extends BadResponseException
     8{
     9}
  • lockr/trunk/vendor/guzzlehttp/guzzle/src/Exception/TooManyRedirectsException.php

    r2079642 r2283783  
    22namespace GuzzleHttp\Exception;
    33
    4 class TooManyRedirectsException extends RequestException {}
     4class TooManyRedirectsException extends RequestException
     5{
     6}
  • lockr/trunk/vendor/guzzlehttp/guzzle/src/Exception/TransferException.php

    r2079642 r2283783  
    22namespace GuzzleHttp\Exception;
    33
    4 class TransferException extends \RuntimeException implements GuzzleException {}
     4class TransferException extends \RuntimeException implements GuzzleException
     5{
     6}
  • lockr/trunk/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php

    r2079642 r2283783  
    1515class CurlFactory implements CurlFactoryInterface
    1616{
     17    const CURL_VERSION_STR = 'curl_version';
     18    const LOW_CURL_VERSION_NUMBER = '7.21.2';
     19
    1720    /** @var array */
    1821    private $handles = [];
     
    118121    {
    119122        $curlStats = curl_getinfo($easy->handle);
     123        $curlStats['appconnect_time'] = curl_getinfo($easy->handle, CURLINFO_APPCONNECT_TIME);
    120124        $stats = new TransferStats(
    121125            $easy->request,
     
    137141            'errno' => $easy->errno,
    138142            'error' => curl_error($easy->handle),
     143            'appconnect_time' => curl_getinfo($easy->handle, CURLINFO_APPCONNECT_TIME),
    139144        ] + curl_getinfo($easy->handle);
     145        $ctx[self::CURL_VERSION_STR] = curl_version()['version'];
    140146        $factory->release($easy);
    141147
     
    173179            );
    174180        }
    175 
    176         $message = sprintf(
    177             'cURL error %s: %s (%s)',
    178             $ctx['errno'],
    179             $ctx['error'],
    180             'see http://curl.haxx.se/libcurl/c/libcurl-errors.html'
    181         );
     181        if (version_compare($ctx[self::CURL_VERSION_STR], self::LOW_CURL_VERSION_NUMBER)) {
     182            $message = sprintf(
     183                'cURL error %s: %s (%s)',
     184                $ctx['errno'],
     185                $ctx['error'],
     186                'see https://curl.haxx.se/libcurl/c/libcurl-errors.html'
     187            );
     188        } else {
     189            $message = sprintf(
     190                'cURL error %s: %s (%s) for %s',
     191                $ctx['errno'],
     192                $ctx['error'],
     193                'see https://curl.haxx.se/libcurl/c/libcurl-errors.html',
     194                $easy->request->getUri()
     195            );
     196        }
    182197
    183198        // Create a connection exception if it was a specific error code.
  • lockr/trunk/vendor/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php

    r2079642 r2283783  
    3838        $this->factory = isset($options['handle_factory'])
    3939            ? $options['handle_factory'] : new CurlFactory(50);
    40         $this->selectTimeout = isset($options['select_timeout'])
    41             ? $options['select_timeout'] : 1;
     40
     41        if (isset($options['select_timeout'])) {
     42            $this->selectTimeout = $options['select_timeout'];
     43        } elseif ($selectTimeout = getenv('GUZZLE_CURL_SELECT_TIMEOUT')) {
     44            $this->selectTimeout = $selectTimeout;
     45        } else {
     46            $this->selectTimeout = 1;
     47        }
    4248    }
    4349
     
    8389        // Add any delayed handles if needed.
    8490        if ($this->delays) {
    85             $currentTime = microtime(true);
     91            $currentTime = \GuzzleHttp\_current_time();
    8692            foreach ($this->delays as $id => $delay) {
    8793                if ($currentTime >= $delay) {
     
    135141            curl_multi_add_handle($this->_mh, $easy->handle);
    136142        } else {
    137             $this->delays[$id] = microtime(true) + ($easy->options['delay'] / 1000);
     143            $this->delays[$id] = \GuzzleHttp\_current_time() + ($easy->options['delay'] / 1000);
    138144        }
    139145    }
     
    187193    private function timeToNext()
    188194    {
    189         $currentTime = microtime(true);
     195        $currentTime = \GuzzleHttp\_current_time();
    190196        $nextTime = PHP_INT_MAX;
    191197        foreach ($this->delays as $time) {
  • lockr/trunk/vendor/guzzlehttp/guzzle/src/Handler/MockHandler.php

    r2079642 r2283783  
    183183    ) {
    184184        if (isset($options['on_stats'])) {
    185             $stats = new TransferStats($request, $response, 0, $reason);
     185            $transferTime = isset($options['transfer_time']) ? $options['transfer_time'] : 0;
     186            $stats = new TransferStats($request, $response, $transferTime, $reason);
    186187            call_user_func($options['on_stats'], $stats);
    187188        }
  • lockr/trunk/vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php

    r2079642 r2283783  
    3434        }
    3535
    36         $startTime = isset($options['on_stats']) ? microtime(true) : null;
     36        $startTime = isset($options['on_stats']) ? \GuzzleHttp\_current_time() : null;
    3737
    3838        try {
     
    4343            // cURL's behavior.
    4444            if (0 === $request->getBody()->getSize()) {
    45                 $request = $request->withHeader('Content-Length', 0);
     45                $request = $request->withHeader('Content-Length', '0');
    4646            }
    4747
     
    8383                $request,
    8484                $response,
    85                 microtime(true) - $startTime,
     85                \GuzzleHttp\_current_time() - $startTime,
    8686                $error,
    8787                []
     
    344344                $records = dns_get_record($uri->getHost(), DNS_A);
    345345                if (!isset($records[0]['ip'])) {
    346                     throw new ConnectException(sprintf("Could not resolve IPv4 address for host '%s'", $uri->getHost()), $request);
     346                    throw new ConnectException(
     347                        sprintf(
     348                            "Could not resolve IPv4 address for host '%s'",
     349                            $uri->getHost()
     350                        ),
     351                        $request
     352                    );
    347353                }
    348354                $uri = $uri->withHost($records[0]['ip']);
     
    350356                $records = dns_get_record($uri->getHost(), DNS_AAAA);
    351357                if (!isset($records[0]['ipv6'])) {
    352                     throw new ConnectException(sprintf("Could not resolve IPv6 address for host '%s'", $uri->getHost()), $request);
     358                    throw new ConnectException(
     359                        sprintf(
     360                            "Could not resolve IPv6 address for host '%s'",
     361                            $uri->getHost()
     362                        ),
     363                        $request
     364                    );
    353365                }
    354366                $uri = $uri->withHost('[' . $records[0]['ipv6'] . ']');
  • lockr/trunk/vendor/guzzlehttp/guzzle/src/HandlerStack.php

    r2079642 r2283783  
    207207
    208208    /**
    209      * @param $name
     209     * @param string $name
    210210     * @return int
    211211     */
     
    224224     * Splices a function into the middleware list at a specific position.
    225225     *
    226      * @param          $findName
    227      * @param          $withName
     226     * @param string   $findName
     227     * @param string   $withName
    228228     * @param callable $middleware
    229      * @param          $before
     229     * @param bool     $before
    230230     */
    231231    private function splice($findName, $withName, callable $middleware, $before)
  • lockr/trunk/vendor/guzzlehttp/guzzle/src/Middleware.php

    r2079642 r2283783  
    88use Psr\Http\Message\ResponseInterface;
    99use Psr\Log\LoggerInterface;
    10 use Psr\Log\LogLevel;
    1110
    1211/**
     
    4039                            return $response;
    4140                        }
    42                 );
     41                    );
    4342            };
    4443        };
     
    5958                }
    6059                return $handler($request, $options)->then(
    61                     function (ResponseInterface $response) use ($request, $handler) {
     60                    function (ResponseInterface $response) use ($request) {
    6261                        $code = $response->getStatusCode();
    6362                        if ($code < 400) {
     
    184183     * @return callable Returns a function that accepts the next handler.
    185184     */
    186     public static function log(LoggerInterface $logger, MessageFormatter $formatter, $logLevel = LogLevel::INFO)
     185    public static function log(LoggerInterface $logger, MessageFormatter $formatter, $logLevel = 'info' /* \Psr\Log\LogLevel::INFO */)
    187186    {
    188187        return function (callable $handler) use ($logger, $formatter, $logLevel) {
  • lockr/trunk/vendor/guzzlehttp/guzzle/src/Pool.php

    r2079642 r2283783  
    77
    88/**
    9  * Sends and iterator of requests concurrently using a capped pool size.
     9 * Sends an iterator of requests concurrently using a capped pool size.
    1010 *
    1111 * The pool will read from an iterator until it is cancelled or until the
  • lockr/trunk/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php

    r2079642 r2283783  
    187187            && $modify['uri']->getScheme() === $request->getUri()->getScheme()
    188188        ) {
    189             $uri = $request->getUri()->withUserInfo('', '');
     189            $uri = $request->getUri()->withUserInfo('');
    190190            $modify['set_headers']['Referer'] = (string) $uri;
    191191        } else {
  • lockr/trunk/vendor/guzzlehttp/guzzle/src/RequestOptions.php

    r2079642 r2283783  
    2323     *   meaning redirect POST requests with POST requests vs. doing what most
    2424     *   browsers do which is redirect POST requests with GET requests
    25      * - referer: (bool, default=true) Set to false to disable the Referer
     25     * - referer: (bool, default=false) Set to true to enable the Referer
    2626     *   header.
    2727     * - protocols: (array, default=['http', 'https']) Allowed redirect
  • lockr/trunk/vendor/guzzlehttp/guzzle/src/RetryMiddleware.php

    r2079642 r2283783  
    1919    /** @var callable */
    2020    private $decider;
     21
     22    /** @var callable */
     23    private $delay;
    2124
    2225    /**
     
    4346     * Default exponential backoff delay function.
    4447     *
    45      * @param $retries
     48     * @param int $retries
    4649     *
    4750     * @return int
  • lockr/trunk/vendor/guzzlehttp/guzzle/src/TransferStats.php

    r2079642 r2283783  
    2121     * @param RequestInterface  $request          Request that was sent.
    2222     * @param ResponseInterface $response         Response received (if any)
    23      * @param null              $transferTime     Total handler transfer time.
     23     * @param float|null        $transferTime     Total handler transfer time.
    2424     * @param mixed             $handlerErrorData Handler error data.
    2525     * @param array             $handlerStats     Handler specific stats.
  • lockr/trunk/vendor/guzzlehttp/guzzle/src/functions.php

    r2079642 r2283783  
    197197    }
    198198
    199     throw new \RuntimeException(<<< EOT
     199    throw new \RuntimeException(
     200        <<< EOT
    200201No system CA bundle could be found in any of the the common system locations.
    201202PHP versions earlier than 5.6 are not properly configured to use the system's
     
    295296 *
    296297 * @return mixed
    297  * @throws \InvalidArgumentException if the JSON cannot be decoded.
     298 * @throws Exception\InvalidArgumentException if the JSON cannot be decoded.
    298299 * @link http://www.php.net/manual/en/function.json-decode.php
    299300 */
     
    302303    $data = \json_decode($json, $assoc, $depth, $options);
    303304    if (JSON_ERROR_NONE !== json_last_error()) {
    304         throw new \InvalidArgumentException(
     305        throw new Exception\InvalidArgumentException(
    305306            'json_decode error: ' . json_last_error_msg()
    306307        );
     
    318319 *
    319320 * @return string
    320  * @throws \InvalidArgumentException if the JSON cannot be encoded.
     321 * @throws Exception\InvalidArgumentException if the JSON cannot be encoded.
    321322 * @link http://www.php.net/manual/en/function.json-encode.php
    322323 */
     
    325326    $json = \json_encode($value, $options, $depth);
    326327    if (JSON_ERROR_NONE !== json_last_error()) {
    327         throw new \InvalidArgumentException(
     328        throw new Exception\InvalidArgumentException(
    328329            'json_encode error: ' . json_last_error_msg()
    329330        );
     
    332333    return $json;
    333334}
     335
     336/**
     337 * Wrapper for the hrtime() or microtime() functions
     338 * (depending on the PHP version, one of the two is used)
     339 *
     340 * @return float|mixed UNIX timestamp
     341 * @internal
     342 */
     343function _current_time()
     344{
     345    return function_exists('hrtime') ? hrtime(true) / 1e9 : microtime(true);
     346}
  • lockr/trunk/vendor/guzzlehttp/psr7/CHANGELOG.md

    r2079642 r2283783  
    99
    1010## [Unreleased]
     11
     12
     13## [1.6.0]
     14
     15### Added
     16
     17- Allowed version `^3.0` of `ralouphie/getallheaders` dependency (#244)
     18- Added MIME type for WEBP image format (#246)
     19- Added more validation of values according to PSR-7 and RFC standards, e.g. status code range (#250, #272)
     20
     21### Changed
     22
     23- Tests don't pass with HHVM 4.0, so HHVM support got dropped. Other libraries like composer have done the same. (#262)
     24- Accept port number 0 to be valid (#270)
     25
     26### Fixed
     27
     28- Fixed subsequent reads from `php://input` in ServerRequest (#247)
     29- Fixed readable/writable detection for certain stream modes (#248)
     30- Fixed encoding of special characters in the `userInfo` component of an URI (#253)
    1131
    1232
     
    210230
    211231
    212 [Unreleased]: https://github.com/guzzle/psr7/compare/1.5.2...HEAD
     232[Unreleased]: https://github.com/guzzle/psr7/compare/1.6.0...HEAD
     233[1.6.0]: https://github.com/guzzle/psr7/compare/1.5.2...1.6.0
    213234[1.5.2]: https://github.com/guzzle/psr7/compare/1.5.1...1.5.2
    214235[1.5.1]: https://github.com/guzzle/psr7/compare/1.5.0...1.5.1
  • lockr/trunk/vendor/guzzlehttp/psr7/composer.json

    r2079642 r2283783  
    1919        "php": ">=5.4.0",
    2020        "psr/http-message": "~1.0",
    21         "ralouphie/getallheaders": "^2.0.5"
     21        "ralouphie/getallheaders": "^2.0.5 || ^3.0.0"
    2222    },
    2323    "require-dev": {
    24         "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8"
     24        "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8",
     25        "ext-zlib": "*"
    2526    },
    2627    "provide": {
    2728        "psr/http-message-implementation": "1.0"
     29    },
     30    "suggest": {
     31        "zendframework/zend-httphandlerrunner": "Emit PSR-7 responses"
    2832    },
    2933    "autoload": {
     
    4044    "extra": {
    4145        "branch-alias": {
    42             "dev-master": "1.5-dev"
     46            "dev-master": "1.6-dev"
    4347        }
    4448    }
  • lockr/trunk/vendor/guzzlehttp/psr7/src/LimitStream.php

    r2079642 r2283783  
    7373        if ($whence !== SEEK_SET || $offset < 0) {
    7474            throw new \RuntimeException(sprintf(
    75                 'Cannot seek to offset % with whence %s',
     75                'Cannot seek to offset %s with whence %s',
    7676                $offset,
    7777                $whence
  • lockr/trunk/vendor/guzzlehttp/psr7/src/MessageTrait.php

    r2079642 r2283783  
    6767    public function withHeader($header, $value)
    6868    {
    69         if (!is_array($value)) {
    70             $value = [$value];
    71         }
    72 
    73         $value = $this->trimHeaderValues($value);
     69        $this->assertHeader($header);
     70        $value = $this->normalizeHeaderValue($value);
    7471        $normalized = strtolower($header);
    7572
     
    8683    public function withAddedHeader($header, $value)
    8784    {
    88         if (!is_array($value)) {
    89             $value = [$value];
    90         }
    91 
    92         $value = $this->trimHeaderValues($value);
     85        $this->assertHeader($header);
     86        $value = $this->normalizeHeaderValue($value);
    9387        $normalized = strtolower($header);
    9488
     
    145139        $this->headerNames = $this->headers = [];
    146140        foreach ($headers as $header => $value) {
    147             if (!is_array($value)) {
    148                 $value = [$value];
     141            if (is_int($header)) {
     142                // Numeric array keys are converted to int by PHP but having a header name '123' is not forbidden by the spec
     143                // and also allowed in withHeader(). So we need to cast it to string again for the following assertion to pass.
     144                $header = (string) $header;
    149145            }
    150 
    151             $value = $this->trimHeaderValues($value);
     146            $this->assertHeader($header);
     147            $value = $this->normalizeHeaderValue($value);
    152148            $normalized = strtolower($header);
    153149            if (isset($this->headerNames[$normalized])) {
     
    161157    }
    162158
     159    private function normalizeHeaderValue($value)
     160    {
     161        if (!is_array($value)) {
     162            return $this->trimHeaderValues([$value]);
     163        }
     164
     165        if (count($value) === 0) {
     166            throw new \InvalidArgumentException('Header value can not be an empty array.');
     167        }
     168
     169        return $this->trimHeaderValues($value);
     170    }
     171
    163172    /**
    164173     * Trims whitespace from the header values.
     
    178187    {
    179188        return array_map(function ($value) {
    180             return trim($value, " \t");
     189            if (!is_scalar($value) && null !== $value) {
     190                throw new \InvalidArgumentException(sprintf(
     191                    'Header value must be scalar or null but %s provided.',
     192                    is_object($value) ? get_class($value) : gettype($value)
     193                ));
     194            }
     195
     196            return trim((string) $value, " \t");
    181197        }, $values);
    182198    }
     199
     200    private function assertHeader($header)
     201    {
     202        if (!is_string($header)) {
     203            throw new \InvalidArgumentException(sprintf(
     204                'Header name must be a string but %s provided.',
     205                is_object($header) ? get_class($header) : gettype($header)
     206            ));
     207        }
     208
     209        if ($header === '') {
     210            throw new \InvalidArgumentException('Header name can not be empty.');
     211        }
     212    }
    183213}
  • lockr/trunk/vendor/guzzlehttp/psr7/src/Request.php

    r2079642 r2283783  
    3737        $version = '1.1'
    3838    ) {
     39        $this->assertMethod($method);
    3940        if (!($uri instanceof UriInterface)) {
    4041            $uri = new Uri($uri);
     
    9293    public function withMethod($method)
    9394    {
     95        $this->assertMethod($method);
    9496        $new = clone $this;
    9597        $new->method = strtoupper($method);
     
    140142        $this->headers = [$header => [$host]] + $this->headers;
    141143    }
     144
     145    private function assertMethod($method)
     146    {
     147        if (!is_string($method) || $method === '') {
     148            throw new \InvalidArgumentException('Method must be a non-empty string.');
     149        }
     150    }
    142151}
  • lockr/trunk/vendor/guzzlehttp/psr7/src/Response.php

    r2079642 r2283783  
    9494        $reason = null
    9595    ) {
    96         if (filter_var($status, FILTER_VALIDATE_INT) === false) {
    97             throw new \InvalidArgumentException('Status code must be an integer value.');
    98         }
     96        $this->assertStatusCodeIsInteger($status);
     97        $status = (int) $status;
     98        $this->assertStatusCodeRange($status);
    9999
    100         $this->statusCode = (int) $status;
     100        $this->statusCode = $status;
    101101
    102102        if ($body !== '' && $body !== null) {
     
    126126    public function withStatus($code, $reasonPhrase = '')
    127127    {
     128        $this->assertStatusCodeIsInteger($code);
     129        $code = (int) $code;
     130        $this->assertStatusCodeRange($code);
     131
    128132        $new = clone $this;
    129         $new->statusCode = (int) $code;
     133        $new->statusCode = $code;
    130134        if ($reasonPhrase == '' && isset(self::$phrases[$new->statusCode])) {
    131135            $reasonPhrase = self::$phrases[$new->statusCode];
     
    134138        return $new;
    135139    }
     140
     141    private function assertStatusCodeIsInteger($statusCode)
     142    {
     143        if (filter_var($statusCode, FILTER_VALIDATE_INT) === false) {
     144            throw new \InvalidArgumentException('Status code must be an integer value.');
     145        }
     146    }
     147
     148    private function assertStatusCodeRange($statusCode)
     149    {
     150        if ($statusCode < 100 || $statusCode >= 600) {
     151            throw new \InvalidArgumentException('Status code must be an integer value between 1xx and 5xx.');
     152        }
     153    }
    136154}
  • lockr/trunk/vendor/guzzlehttp/psr7/src/ServerRequest.php

    r2079642 r2283783  
    169169        $headers = getallheaders();
    170170        $uri = self::getUriFromGlobals();
    171         $body = new LazyOpenStream('php://input', 'r+');
     171        $body = new CachingStream(new LazyOpenStream('php://input', 'r+'));
    172172        $protocol = isset($_SERVER['SERVER_PROTOCOL']) ? str_replace('HTTP/', '', $_SERVER['SERVER_PROTOCOL']) : '1.1';
    173173
  • lockr/trunk/vendor/guzzlehttp/psr7/src/Stream.php

    r2079642 r2283783  
    1111class Stream implements StreamInterface
    1212{
     13    /**
     14     * Resource modes.
     15     *
     16     * @var string
     17     *
     18     * @see http://php.net/manual/function.fopen.php
     19     * @see http://php.net/manual/en/function.gzopen.php
     20     */
     21    const READABLE_MODES = '/r|a\+|ab\+|w\+|wb\+|x\+|xb\+|c\+|cb\+/';
     22    const WRITABLE_MODES = '/a|w|r\+|rb\+|rw|x|c/';
     23
    1324    private $stream;
    1425    private $size;
     
    1930    private $customMetadata;
    2031
    21     /** @var array Hash of readable and writable stream types */
    22     private static $readWriteHash = [
    23         'read' => [
    24             'r' => true, 'w+' => true, 'r+' => true, 'x+' => true, 'c+' => true,
    25             'rb' => true, 'w+b' => true, 'r+b' => true, 'x+b' => true,
    26             'c+b' => true, 'rt' => true, 'w+t' => true, 'r+t' => true,
    27             'x+t' => true, 'c+t' => true, 'a+' => true, 'rb+' => true,
    28         ],
    29         'write' => [
    30             'w' => true, 'w+' => true, 'rw' => true, 'r+' => true, 'x+' => true,
    31             'c+' => true, 'wb' => true, 'w+b' => true, 'r+b' => true, 'rb+' => true,
    32             'x+b' => true, 'c+b' => true, 'w+t' => true, 'r+t' => true,
    33             'x+t' => true, 'c+t' => true, 'a' => true, 'a+' => true
    34         ]
    35     ];
    36 
    3732    /**
    3833     * This constructor accepts an associative array of options.
     
    6661        $meta = stream_get_meta_data($this->stream);
    6762        $this->seekable = $meta['seekable'];
    68         $this->readable = isset(self::$readWriteHash['read'][$meta['mode']]);
    69         $this->writable = isset(self::$readWriteHash['write'][$meta['mode']]);
     63        $this->readable = (bool)preg_match(self::READABLE_MODES, $meta['mode']);
     64        $this->writable = (bool)preg_match(self::WRITABLE_MODES, $meta['mode']);
    7065        $this->uri = $this->getMetadata('uri');
    7166    }
     
    198193    public function seek($offset, $whence = SEEK_SET)
    199194    {
     195        $whence = (int) $whence;
     196       
    200197        if (!isset($this->stream)) {
    201198            throw new \RuntimeException('Stream is detached');
  • lockr/trunk/vendor/guzzlehttp/psr7/src/Uri.php

    r2079642 r2283783  
    438438    public function withUserInfo($user, $password = null)
    439439    {
    440         $info = $user;
    441         if ($password != '') {
    442             $info .= ':' . $password;
     440        $info = $this->filterUserInfoComponent($user);
     441        if ($password !== null) {
     442            $info .= ':' . $this->filterUserInfoComponent($password);
    443443        }
    444444
     
    538538            ? $this->filterScheme($parts['scheme'])
    539539            : '';
    540         $this->userInfo = isset($parts['user']) ? $parts['user'] : '';
     540        $this->userInfo = isset($parts['user'])
     541            ? $this->filterUserInfoComponent($parts['user'])
     542            : '';
    541543        $this->host = isset($parts['host'])
    542544            ? $this->filterHost($parts['host'])
     
    555557            : '';
    556558        if (isset($parts['pass'])) {
    557             $this->userInfo .= ':' . $parts['pass'];
     559            $this->userInfo .= ':' . $this->filterUserInfoComponent($parts['pass']);
    558560        }
    559561
     
    578580
    579581    /**
     582     * @param string $component
     583     *
     584     * @return string
     585     *
     586     * @throws \InvalidArgumentException If the user info is invalid.
     587     */
     588    private function filterUserInfoComponent($component)
     589    {
     590        if (!is_string($component)) {
     591            throw new \InvalidArgumentException('User info must be a string');
     592        }
     593
     594        return preg_replace_callback(
     595            '/(?:[^%' . self::$charUnreserved . self::$charSubDelims . ']+|%(?![A-Fa-f0-9]{2}))/',
     596            [$this, 'rawurlencodeMatchZero'],
     597            $component
     598        );
     599    }
     600
     601    /**
    580602     * @param string $host
    581603     *
     
    607629
    608630        $port = (int) $port;
    609         if (1 > $port || 0xffff < $port) {
     631        if (0 > $port || 0xffff < $port) {
    610632            throw new \InvalidArgumentException(
    611                 sprintf('Invalid port: %d. Must be between 1 and 65535', $port)
     633                sprintf('Invalid port: %d. Must be between 0 and 65535', $port)
    612634            );
    613635        }
  • lockr/trunk/vendor/guzzlehttp/psr7/src/functions.php

    r2079642 r2283783  
    725725        'wav' => 'audio/x-wav',
    726726        'webm' => 'video/webm',
     727        'webp' => 'image/webp',
    727728        'wma' => 'audio/x-ms-wma',
    728729        'wmv' => 'video/x-ms-wmv',
  • lockr/trunk/vendor/lockr/lockr/src/KeyWrapper/LockrAes256CbcSha256KeyWrapper.php

    r2079642 r2283783  
    88    const KEY_LEN = 32;
    99    const IV_LEN = 16;
    10     const HMAC_KEY_LEN = 32;
     10    const HMAC_LEN = 32;
    1111
    1212    /**
     
    4444     * {@inheritdoc}
    4545     */
    46     public static function decrypt($ciphertext, $wrapping_key)
     46    public static function decrypt($encoded_cipherdata, $wrapping_key)
    4747    {
    48         $wrapping_key = substr($wrapping_key, strlen(self::PREFIX));
    49         $wrapping_key = base64_decode($wrapping_key);
    50         $key_data = hash('sha512', $wrapping_key, true);
     48        $raw_wrapping_key = substr($wrapping_key, strlen(self::PREFIX));
     49        $raw_wrapping_key = base64_decode($raw_wrapping_key);
     50        $key_data = hash('sha512', $raw_wrapping_key, true);
    5151        $enc_key = substr($key_data, 0, self::KEY_LEN);
    5252        $hmac_key = substr($key_data, self::KEY_LEN);
    5353
    54         $iv = substr($ciphertext, 0, self::IV_LEN);
    55         $hmac0 = substr($ciphertext, -self::HMAC_KEY_LEN);
    56         $ciphertext = substr($ciphertext, self::IV_LEN, -self::HMAC_KEY_LEN);
     54        $cipherdata = base64_decode($encoded_cipherdata);
     55        $iv = substr($cipherdata, 0, self::IV_LEN);
     56        $hmac0 = substr($cipherdata, -self::HMAC_LEN);
     57        $ciphertext = substr($cipherdata, self::IV_LEN, -self::HMAC_LEN);
    5758
    5859        $hmac1 = self::hmac($iv, $ciphertext, $hmac_key);
    5960        if (!hash_equals($hmac0, $hmac1)) {
    60             return false;
     61            return LockrAes256CbcSha256RawKeyWrapper::decrypt($encoded_cipherdata, $wrapping_key);
    6162        }
    6263
     
    6869            $iv
    6970        );
    70         if ($plaintext === false) {
    71             return false;
    72         }
    7371        return $plaintext;
    7472    }
     
    8886        $hmac = self::hmac($iv, $ciphertext, $hmac_key);
    8987        return [
    90             'ciphertext' => $iv . $ciphertext . $hmac,
     88            'ciphertext' => base64_encode($iv . $ciphertext . $hmac),
    9189            'encoded' => self::PREFIX . base64_encode($key),
    9290        ];
  • lockr/trunk/vendor/lockr/lockr/src/KeyWrapper/MultiKeyWrapper.php

    r2079642 r2283783  
    55{
    66    private static $wrappers = [
     7        LockrAes256CbcSha256RawKeyWrapper::PREFIX => LockrAes256CbcSha256RawKeyWrapper::class,
    78        LockrAes256CbcSha256KeyWrapper::PREFIX => LockrAes256CbcSha256KeyWrapper::class,
    89        LockrAes128CtrSha256KeyWrapper::PREFIX => LockrAes128CtrSha256KeyWrapper::class,
     
    4243    {
    4344        foreach (self::$wrappers as $prefix => $wrapper) {
    44             if (strpos($wrapping_key, $prefix) === 0) {
     45            if (!$prefix || strpos($wrapping_key, $prefix) === 0) {
    4546                return $wrapper::reencrypt($plaintext, $wrapping_key);
    4647            }
     
    5556    {
    5657        foreach (self::$wrappers as $prefix => $wrapper) {
    57             if (strpos($wrapping_key, $prefix) === 0) {
     58            if (!$prefix || strpos($wrapping_key, $prefix) === 0) {
    5859                return $wrapper::decrypt($ciphertext, $wrapping_key);
    5960            }
  • lockr/trunk/vendor/lockr/lockr/src/LockrClient.php

    r2079642 r2283783  
    99class LockrClient
    1010{
    11     const VERSION = '1.0.4';
     11    const VERSION = '1.0.8';
    1212
    1313    /** @var GuzzleHttp\ClientInterface $httpClient */
  • lockr/trunk/vendor/lockr/lockr/tests/KeyWrapper/LockrAes256CbcSha256KeyWrapperTest.php

    r2079642 r2283783  
    55
    66use Lockr\KeyWrapper\LockrAes256CbcSha256KeyWrapper as KeyWrapper;
     7use Lockr\KeyWrapper\LockrAes256CbcSha256RawKeyWrapper as RawKeyWrapper;
    78
    89class LockrAes256CbcSha256KeyWrapperTest extends TestCase
     
    2526        $this->assertSame($text, $plaintext);
    2627    }
     28
     29    public function testUpgradedData()
     30    {
     31        $text = 'abcd';
     32        $data = RawKeyWrapper::encrypt($text);
     33        $plaintext = KeyWrapper::decrypt($data['ciphertext'], $data['encoded']);
     34        $this->assertSame($text, $plaintext);
     35    }
    2736}
    2837
  • lockr/trunk/vendor/psr/log/Psr/Log/LoggerInterface.php

    r2079642 r2283783  
    119119     *
    120120     * @return void
     121     *
     122     * @throws \Psr\Log\InvalidArgumentException
    121123     */
    122124    public function log($level, $message, array $context = array());
  • lockr/trunk/vendor/psr/log/Psr/Log/LoggerTrait.php

    r2079642 r2283783  
    136136     *
    137137     * @return void
     138     *
     139     * @throws \Psr\Log\InvalidArgumentException
    138140     */
    139141    abstract public function log($level, $message, array $context = array());
  • lockr/trunk/vendor/psr/log/Psr/Log/NullLogger.php

    r2079642 r2283783  
    2121     *
    2222     * @return void
     23     *
     24     * @throws \Psr\Log\InvalidArgumentException
    2325     */
    2426    public function log($level, $message, array $context = array())
  • lockr/trunk/vendor/psr/log/Psr/Log/Test/LoggerInterfaceTest.php

    r2079642 r2283783  
    55use Psr\Log\LoggerInterface;
    66use Psr\Log\LogLevel;
     7use PHPUnit\Framework\TestCase;
    78
    89/**
     
    1213 * as part of their test suite.
    1314 */
    14 abstract class LoggerInterfaceTest extends \PHPUnit_Framework_TestCase
     15abstract class LoggerInterfaceTest extends TestCase
    1516{
    1617    /**
     
    141142    public function __toString()
    142143    {
     144        return 'DummyTest';
    143145    }
    144146}
  • lockr/trunk/vendor/psr/log/Psr/Log/Test/TestLogger.php

    r2079642 r2283783  
    143143    {
    144144        $this->records = [];
     145        $this->recordsByLevel = [];
    145146    }
    146147}
  • lockr/trunk/vendor/psr/log/README.md

    r2079642 r2283783  
    3939            $this->logger->info('Doing work');
    4040        }
     41           
     42        try {
     43            $this->doSomethingElse();
     44        } catch (Exception $exception) {
     45            $this->logger->error('Oh no!', array('exception' => $exception));
     46        }
    4147
    4248        // do something useful
  • lockr/trunk/vendor/psr/log/composer.json

    r2079642 r2283783  
    2121    "extra": {
    2222        "branch-alias": {
    23             "dev-master": "1.0.x-dev"
     23            "dev-master": "1.1.x-dev"
    2424        }
    2525    }
  • lockr/trunk/vendor/ralouphie/getallheaders/README.md

    r2079642 r2283783  
    1515## Install
    1616
     17For PHP version **`>= 5.6`**:
     18
    1719```
    1820composer require ralouphie/getallheaders
    1921```
     22
     23For PHP version **`< 5.6`**:
     24
     25```
     26composer require ralouphie/getallheaders "^2"
     27```
  • lockr/trunk/vendor/ralouphie/getallheaders/composer.json

    r2079642 r2283783  
    1010    ],
    1111    "require": {
    12         "php": ">=5.3"
     12        "php": ">=5.6"
    1313    },
    1414    "require-dev": {
    15         "phpunit/phpunit": "~3.7.0",
    16         "satooshi/php-coveralls": ">=1.0"
     15        "phpunit/phpunit": "^5 || ^6.5",
     16        "php-coveralls/php-coveralls": "^2.1"
    1717    },
    1818    "autoload": {
    1919        "files": ["src/getallheaders.php"]
     20    },
     21    "autoload-dev": {
     22        "psr-4": {
     23            "getallheaders\\Tests\\": "tests/"
     24        }
    2025    }
    2126}
  • lockr/trunk/vendor/symfony/polyfill-ctype/composer.json

    r2079642 r2283783  
    2929    "extra": {
    3030        "branch-alias": {
    31             "dev-master": "1.11-dev"
     31            "dev-master": "1.12-dev"
    3232        }
    3333    }
  • lockr/trunk/vendor/symfony/yaml/Command/LintCommand.php

    r2079642 r2283783  
    197197    }
    198198
     199    /**
     200     * @return string|null
     201     */
    199202    private function getStdin()
    200203    {
    201204        if (0 !== ftell(STDIN)) {
    202             return;
     205            return null;
    203206        }
    204207
  • lockr/trunk/vendor/symfony/yaml/Dumper.php

    r2079642 r2283783  
    1111
    1212namespace Symfony\Component\Yaml;
     13
     14use Symfony\Component\Yaml\Tag\TaggedValue;
    1315
    1416/**
     
    9294        }
    9395
    94         if ($inline <= 0 || (!\is_array($input) && $dumpObjectAsInlineMap) || empty($input)) {
     96        if ($inline <= 0 || (!\is_array($input) && !$input instanceof TaggedValue && $dumpObjectAsInlineMap) || empty($input)) {
    9597            $output .= $prefix.Inline::dump($input, $flags);
    9698        } else {
     
    106108                    foreach (preg_split('/\n|\r\n/', $value) as $row) {
    107109                        $output .= sprintf("%s%s%s\n", $prefix, str_repeat(' ', $this->indentation), $row);
     110                    }
     111
     112                    continue;
     113                }
     114
     115                if ($value instanceof TaggedValue) {
     116                    $output .= sprintf('%s%s !%s', $prefix, $dumpAsMap ? Inline::dump($key, $flags).':' : '-', $value->getTag());
     117
     118                    if ($inline - 1 <= 0 || null === $value->getValue() || is_scalar($value->getValue())) {
     119                        $output .= ' '.$this->dump($value->getValue(), $inline - 1, 0, $flags)."\n";
     120                    } else {
     121                        $output .= "\n";
     122                        $output .= $this->dump($value->getValue(), $inline - 1, $dumpAsMap ? $indent + $this->indentation : $indent + 2, $flags);
    108123                    }
    109124
  • lockr/trunk/vendor/symfony/yaml/Inline.php

    r2079642 r2283783  
    127127            }
    128128
    129             if (null !== $tag) {
    130                 return new TaggedValue($tag, $result);
    131             }
    132 
    133129            // some comments are allowed at the end
    134130            if (preg_replace('/\s+#.*$/A', '', substr($value, $i))) {
    135131                throw new ParseException(sprintf('Unexpected characters near "%s".', substr($value, $i)), self::$parsedLineNumber + 1, $value, self::$parsedFilename);
     132            }
     133
     134            if (null !== $tag) {
     135                return new TaggedValue($tag, $result);
    136136            }
    137137
     
    645645            case '' === $scalar:
    646646            case '~' === $scalar:
    647                 return;
     647                return null;
    648648            case 'true' === $scalarLower:
    649649                return true;
     
    673673                        }
    674674
    675                         return;
     675                        return null;
    676676                    case 0 === strpos($scalar, '!!php/object:'):
    677677                        if (self::$objectSupport) {
     
    685685                        }
    686686
    687                         return;
     687                        return null;
    688688                    case 0 === strpos($scalar, '!php/object'):
    689689                        if (self::$objectSupport) {
     
    695695                        }
    696696
    697                         return;
     697                        return null;
    698698                    case 0 === strpos($scalar, '!php/const:'):
    699699                        if (self::$constantSupport) {
     
    710710                        }
    711711
    712                         return;
     712                        return null;
    713713                    case 0 === strpos($scalar, '!php/const'):
    714714                        if (self::$constantSupport) {
     
    724724                        }
    725725
    726                         return;
     726                        return null;
    727727                    case 0 === strpos($scalar, '!!float '):
    728728                        return (float) substr($scalar, 8);
     
    796796    {
    797797        if ('!' !== $value[$i]) {
    798             return;
     798            return null;
    799799        }
    800800
     
    808808        if ((!isset($value[$nextOffset]) || !\in_array($value[$nextOffset], ['[', '{'], true)) && 'tagged' !== $tag) {
    809809            // Manage non-whitelisted scalars in {@link self::evaluateScalar()}
    810             return;
     810            return null;
    811811        }
    812812
  • lockr/trunk/vendor/symfony/yaml/Parser.php

    r2079642 r2283783  
    437437
    438438                    foreach ($this->lines as $line) {
     439                        if ('' !== ltrim($line) && '#' === ltrim($line)[0]) {
     440                            continue;
     441                        }
    439442                        // If the indentation is not consistent at offset 0, it is to be considered as a ParseError
    440443                        if (0 === $this->offset && !$deprecatedUsage && isset($line[0]) && ' ' === $line[0]) {
     
    562565
    563566        if (!$this->moveToNextLine()) {
    564             return;
     567            return '';
    565568        }
    566569
     
    605608            $this->moveToPreviousLine();
    606609
    607             return;
     610            return '';
    608611        }
    609612
     
    613616            $this->moveToPreviousLine();
    614617
    615             return;
     618            return '';
    616619        }
    617620
     
    713716            $modifiers = isset($matches['modifiers']) ? $matches['modifiers'] : '';
    714717
    715             $data = $this->parseBlockScalar($matches['separator'], preg_replace('#\d+#', '', $modifiers), (int) abs($modifiers));
     718            $data = $this->parseBlockScalar($matches['separator'], preg_replace('#\d+#', '', $modifiers), (int) abs((int) $modifiers));
    716719
    717720            if ('' !== $matches['tag']) {
     
    11001103    }
    11011104
     1105    /**
     1106     * @return string|null
     1107     */
    11021108    private function getLineTag($value, $flags, $nextLineCheck = true)
    11031109    {
    11041110        if ('' === $value || '!' !== $value[0] || 1 !== self::preg_match('/^'.self::TAG_PATTERN.' *( +#.*)?$/', $value, $matches)) {
    1105             return;
     1111            return null;
    11061112        }
    11071113
    11081114        if ($nextLineCheck && !$this->isNextLineIndented()) {
    1109             return;
     1115            return null;
    11101116        }
    11111117
  • lockr/trunk/vendor/symfony/yaml/Tests/Command/LintCommandTest.php

    r2079642 r2283783  
    4949
    5050        $this->assertEquals(1, $ret, 'Returns 1 in case of error');
    51         $this->assertContains('Unable to parse at line 3 (near "bar").', trim($tester->getDisplay()));
     51        $this->assertStringContainsString('Unable to parse at line 3 (near "bar").', trim($tester->getDisplay()));
    5252    }
    5353
     
    7979    }
    8080
    81     /**
    82      * @expectedException \RuntimeException
    83      */
    8481    public function testLintFileNotReadable()
    8582    {
     83        $this->expectException('RuntimeException');
    8684        $tester = $this->createCommandTester();
    8785        $filename = $this->createFile('');
    8886        unlink($filename);
    8987
    90         $ret = $tester->execute(['filename' => $filename], ['decorated' => false]);
     88        $tester->execute(['filename' => $filename], ['decorated' => false]);
    9189    }
    9290
  • lockr/trunk/vendor/symfony/yaml/Tests/DumperTest.php

    r2079642 r2283783  
    1515use Symfony\Component\Yaml\Dumper;
    1616use Symfony\Component\Yaml\Parser;
     17use Symfony\Component\Yaml\Tag\TaggedValue;
    1718use Symfony\Component\Yaml\Yaml;
    1819
     
    231232    }
    232233
    233     /**
    234      * @expectedException \Symfony\Component\Yaml\Exception\DumpException
    235      */
    236234    public function testObjectSupportDisabledWithExceptions()
    237235    {
     236        $this->expectException('Symfony\Component\Yaml\Exception\DumpException');
    238237        $this->dumper->dump(['foo' => new A(), 'bar' => 1], 0, 0, Yaml::DUMP_EXCEPTION_ON_INVALID_TYPE);
    239238    }
     
    241240    /**
    242241     * @group legacy
    243      * @expectedException \Symfony\Component\Yaml\Exception\DumpException
    244242     */
    245243    public function testObjectSupportDisabledWithExceptionsPassingTrue()
    246244    {
     245        $this->expectException('Symfony\Component\Yaml\Exception\DumpException');
    247246        $this->dumper->dump(['foo' => new A(), 'bar' => 1], 0, 0, true);
    248247    }
     
    439438    }
    440439
     440    public function testDumpingTaggedValueSequenceRespectsInlineLevel()
     441    {
     442        $data = [
     443            new TaggedValue('user', [
     444                'username' => 'jane',
     445            ]),
     446            new TaggedValue('user', [
     447                'username' => 'john',
     448            ]),
     449        ];
     450
     451        $yaml = $this->dumper->dump($data, 2);
     452
     453        $expected = <<<YAML
     454- !user
     455  username: jane
     456- !user
     457  username: john
     458
     459YAML;
     460        $this->assertSame($expected, $yaml);
     461    }
     462
     463    public function testDumpingTaggedValueSequenceWithInlinedTagValues()
     464    {
     465        $data = [
     466            new TaggedValue('user', [
     467                'username' => 'jane',
     468            ]),
     469            new TaggedValue('user', [
     470                'username' => 'john',
     471            ]),
     472        ];
     473
     474        $yaml = $this->dumper->dump($data, 1);
     475
     476        $expected = <<<YAML
     477- !user { username: jane }
     478- !user { username: john }
     479
     480YAML;
     481        $this->assertSame($expected, $yaml);
     482    }
     483
     484    public function testDumpingTaggedValueMapRespectsInlineLevel()
     485    {
     486        $data = [
     487            'user1' => new TaggedValue('user', [
     488                'username' => 'jane',
     489            ]),
     490            'user2' => new TaggedValue('user', [
     491                'username' => 'john',
     492            ]),
     493        ];
     494
     495        $yaml = $this->dumper->dump($data, 2);
     496
     497        $expected = <<<YAML
     498user1: !user
     499    username: jane
     500user2: !user
     501    username: john
     502
     503YAML;
     504        $this->assertSame($expected, $yaml);
     505    }
     506
     507    public function testDumpingTaggedValueMapWithInlinedTagValues()
     508    {
     509        $data = [
     510            'user1' => new TaggedValue('user', [
     511                'username' => 'jane',
     512            ]),
     513            'user2' => new TaggedValue('user', [
     514                'username' => 'john',
     515            ]),
     516        ];
     517
     518        $yaml = $this->dumper->dump($data, 1);
     519
     520        $expected = <<<YAML
     521user1: !user { username: jane }
     522user2: !user { username: john }
     523
     524YAML;
     525        $this->assertSame($expected, $yaml);
     526    }
     527
     528    public function testDumpingNotInlinedScalarTaggedValue()
     529    {
     530        $data = [
     531            'user1' => new TaggedValue('user', 'jane'),
     532            'user2' => new TaggedValue('user', 'john'),
     533        ];
     534        $expected = <<<YAML
     535user1: !user jane
     536user2: !user john
     537
     538YAML;
     539
     540        $this->assertSame($expected, $this->dumper->dump($data, 2));
     541    }
     542
     543    public function testDumpingNotInlinedNullTaggedValue()
     544    {
     545        $data = [
     546            'foo' => new TaggedValue('bar', null),
     547        ];
     548        $expected = <<<YAML
     549foo: !bar null
     550
     551YAML;
     552
     553        $this->assertSame($expected, $this->dumper->dump($data, 2));
     554    }
     555
    441556    public function testDumpMultiLineStringAsScalarBlock()
    442557    {
     
    471586    }
    472587
    473     /**
    474      * @expectedException \InvalidArgumentException
    475      * @expectedExceptionMessage The indentation must be greater than zero
    476      */
    477588    public function testZeroIndentationThrowsException()
    478589    {
     590        $this->expectException('InvalidArgumentException');
     591        $this->expectExceptionMessage('The indentation must be greater than zero');
    479592        new Dumper(0);
    480593    }
    481594
    482     /**
    483      * @expectedException \InvalidArgumentException
    484      * @expectedExceptionMessage The indentation must be greater than zero
    485      */
    486595    public function testNegativeIndentationThrowsException()
    487596    {
     597        $this->expectException('InvalidArgumentException');
     598        $this->expectExceptionMessage('The indentation must be greater than zero');
    488599        new Dumper(-4);
    489600    }
  • lockr/trunk/vendor/symfony/yaml/Tests/InlineTest.php

    r2079642 r2283783  
    6363    }
    6464
    65     /**
    66      * @expectedException \Symfony\Component\Yaml\Exception\ParseException
    67      * @expectedExceptionMessage The constant "WRONG_CONSTANT" is not defined
    68      */
    6965    public function testParsePhpConstantThrowsExceptionWhenUndefined()
    7066    {
     67        $this->expectException('Symfony\Component\Yaml\Exception\ParseException');
     68        $this->expectExceptionMessage('The constant "WRONG_CONSTANT" is not defined');
    7169        Inline::parse('!php/const WRONG_CONSTANT', Yaml::PARSE_CONSTANT);
    7270    }
    7371
    74     /**
    75      * @expectedException \Symfony\Component\Yaml\Exception\ParseException
    76      * @expectedExceptionMessageRegExp #The string "!php/const PHP_INT_MAX" could not be parsed as a constant.*#
    77      */
    7872    public function testParsePhpConstantThrowsExceptionOnInvalidType()
    7973    {
     74        $this->expectException('Symfony\Component\Yaml\Exception\ParseException');
     75        $this->expectExceptionMessageRegExp('#The string "!php/const PHP_INT_MAX" could not be parsed as a constant.*#');
    8076        Inline::parse('!php/const PHP_INT_MAX', Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE);
    8177    }
     
    137133
    138134            $this->assertEquals('1.2', Inline::dump(1.2));
    139             $this->assertContains('fr', strtolower(setlocale(LC_NUMERIC, 0)));
     135            $this->assertStringContainsStringIgnoringCase('fr', setlocale(LC_NUMERIC, 0));
    140136        } finally {
    141137            setlocale(LC_NUMERIC, $locale);
     
    150146    }
    151147
    152     /**
    153      * @expectedException        \Symfony\Component\Yaml\Exception\ParseException
    154      * @expectedExceptionMessage Found unknown escape character "\V".
    155      */
    156148    public function testParseScalarWithNonEscapedBlackslashShouldThrowException()
    157149    {
     150        $this->expectException('Symfony\Component\Yaml\Exception\ParseException');
     151        $this->expectExceptionMessage('Found unknown escape character "\V".');
    158152        Inline::parse('"Foo\Var"');
    159153    }
    160154
    161     /**
    162      * @expectedException \Symfony\Component\Yaml\Exception\ParseException
    163      */
    164155    public function testParseScalarWithNonEscapedBlackslashAtTheEndShouldThrowException()
    165156    {
     157        $this->expectException('Symfony\Component\Yaml\Exception\ParseException');
    166158        Inline::parse('"Foo\\"');
    167159    }
    168160
    169     /**
    170      * @expectedException \Symfony\Component\Yaml\Exception\ParseException
    171      */
    172161    public function testParseScalarWithIncorrectlyQuotedStringShouldThrowException()
    173162    {
     163        $this->expectException('Symfony\Component\Yaml\Exception\ParseException');
    174164        $value = "'don't do somthin' like that'";
    175165        Inline::parse($value);
    176166    }
    177167
    178     /**
    179      * @expectedException \Symfony\Component\Yaml\Exception\ParseException
    180      */
    181168    public function testParseScalarWithIncorrectlyDoubleQuotedStringShouldThrowException()
    182169    {
     170        $this->expectException('Symfony\Component\Yaml\Exception\ParseException');
    183171        $value = '"don"t do somthin" like that"';
    184172        Inline::parse($value);
    185173    }
    186174
    187     /**
    188      * @expectedException \Symfony\Component\Yaml\Exception\ParseException
    189      */
    190175    public function testParseInvalidMappingKeyShouldThrowException()
    191176    {
     177        $this->expectException('Symfony\Component\Yaml\Exception\ParseException');
    192178        $value = '{ "foo " bar": "bar" }';
    193179        Inline::parse($value);
     
    204190    }
    205191
    206     /**
    207      * @expectedException \Symfony\Component\Yaml\Exception\ParseException
    208      */
    209192    public function testParseInvalidMappingShouldThrowException()
    210193    {
     194        $this->expectException('Symfony\Component\Yaml\Exception\ParseException');
    211195        Inline::parse('[foo] bar');
    212196    }
    213197
    214     /**
    215      * @expectedException \Symfony\Component\Yaml\Exception\ParseException
    216      */
    217198    public function testParseInvalidSequenceShouldThrowException()
    218199    {
     200        $this->expectException('Symfony\Component\Yaml\Exception\ParseException');
    219201        Inline::parse('{ foo: bar } bar');
     202    }
     203
     204    public function testParseInvalidTaggedSequenceShouldThrowException()
     205    {
     206        $this->expectException('Symfony\Component\Yaml\Exception\ParseException');
     207        Inline::parse('!foo { bar: baz } qux', Yaml::PARSE_CUSTOM_TAGS);
    220208    }
    221209
     
    282270    }
    283271
    284     /**
    285      * @expectedException \Symfony\Component\Yaml\Exception\ParseException
    286      * @expectedExceptionMessage A reference must contain at least one character at line 1.
    287      */
    288272    public function testParseUnquotedAsterisk()
    289273    {
     274        $this->expectException('Symfony\Component\Yaml\Exception\ParseException');
     275        $this->expectExceptionMessage('A reference must contain at least one character at line 1.');
    290276        Inline::parse('{ foo: * }');
    291277    }
    292278
    293     /**
    294      * @expectedException \Symfony\Component\Yaml\Exception\ParseException
    295      * @expectedExceptionMessage A reference must contain at least one character at line 1.
    296      */
    297279    public function testParseUnquotedAsteriskFollowedByAComment()
    298280    {
     281        $this->expectException('Symfony\Component\Yaml\Exception\ParseException');
     282        $this->expectExceptionMessage('A reference must contain at least one character at line 1.');
    299283        Inline::parse('{ foo: * #foo }');
    300284    }
     
    305289    public function testParseUnquotedScalarStartingWithReservedIndicator($indicator)
    306290    {
    307         if (method_exists($this, 'expectExceptionMessage')) {
    308             $this->expectException(ParseException::class);
    309             $this->expectExceptionMessage(sprintf('cannot start a plain scalar; you need to quote the scalar at line 1 (near "%sfoo ").', $indicator));
    310         } else {
    311             $this->setExpectedException(ParseException::class, sprintf('cannot start a plain scalar; you need to quote the scalar at line 1 (near "%sfoo ").', $indicator));
    312         }
     291        $this->expectException(ParseException::class);
     292        $this->expectExceptionMessage(sprintf('cannot start a plain scalar; you need to quote the scalar at line 1 (near "%sfoo ").', $indicator));
    313293
    314294        Inline::parse(sprintf('{ foo: %sfoo }', $indicator));
     
    325305    public function testParseUnquotedScalarStartingWithScalarIndicator($indicator)
    326306    {
    327         if (method_exists($this, 'expectExceptionMessage')) {
    328             $this->expectException(ParseException::class);
    329             $this->expectExceptionMessage(sprintf('cannot start a plain scalar; you need to quote the scalar at line 1 (near "%sfoo ").', $indicator));
    330         } else {
    331             $this->setExpectedException(ParseException::class, sprintf('cannot start a plain scalar; you need to quote the scalar at line 1 (near "%sfoo ").', $indicator));
    332         }
     307        $this->expectException(ParseException::class);
     308        $this->expectExceptionMessage(sprintf('cannot start a plain scalar; you need to quote the scalar at line 1 (near "%sfoo ").', $indicator));
    333309
    334310        Inline::parse(sprintf('{ foo: %sfoo }', $indicator));
     
    694670    /**
    695671     * @dataProvider getInvalidBinaryData
    696      * @expectedException \Symfony\Component\Yaml\Exception\ParseException
    697672     */
    698673    public function testParseInvalidBinaryData($data, $expectedMessage)
    699674    {
    700         if (method_exists($this, 'expectException')) {
    701             $this->expectExceptionMessageRegExp($expectedMessage);
    702         } else {
    703             $this->setExpectedExceptionRegExp(ParseException::class, $expectedMessage);
    704         }
     675        $this->expectException('Symfony\Component\Yaml\Exception\ParseException');
     676        $this->expectExceptionMessageRegExp($expectedMessage);
    705677
    706678        Inline::parse($data);
     
    717689    }
    718690
    719     /**
    720      * @expectedException \Symfony\Component\Yaml\Exception\ParseException
    721      * @expectedExceptionMessage Malformed inline YAML string: {this, is not, supported} at line 1.
    722      */
    723691    public function testNotSupportedMissingValue()
    724692    {
     693        $this->expectException('Symfony\Component\Yaml\Exception\ParseException');
     694        $this->expectExceptionMessage('Malformed inline YAML string: {this, is not, supported} at line 1.');
    725695        Inline::parse('{this, is not, supported}');
    726696    }
     
    806776    }
    807777
    808     /**
    809      * @expectedException \Symfony\Component\Yaml\Exception\ParseException
    810      * @expectedExceptionMessage Unexpected end of line, expected one of ",}" at line 1 (near "{abc: 'def'").
    811      */
    812778    public function testUnfinishedInlineMap()
    813779    {
     780        $this->expectException('Symfony\Component\Yaml\Exception\ParseException');
     781        $this->expectExceptionMessage('Unexpected end of line, expected one of ",}" at line 1 (near "{abc: \'def\'").');
    814782        Inline::parse("{abc: 'def'");
    815783    }
  • lockr/trunk/vendor/symfony/yaml/Tests/ParserTest.php

    r2079642 r2283783  
    1313
    1414use PHPUnit\Framework\TestCase;
    15 use Symfony\Component\Yaml\Exception\ParseException;
    1615use Symfony\Component\Yaml\Parser;
    1716use Symfony\Component\Yaml\Tag\TaggedValue;
     
    4746                    restore_error_handler();
    4847
    49                     if (class_exists('PHPUnit_Util_ErrorHandler')) {
    50                         return \call_user_func_array('PHPUnit_Util_ErrorHandler::handleError', \func_get_args());
    51                     }
    52 
    5348                    return \call_user_func_array('PHPUnit\Util\ErrorHandler::handleError', \func_get_args());
    5449                }
    5550
    5651                $deprecations[] = $msg;
     52
     53                return null;
    5754            });
    5855        }
     
    6461
    6562            $this->assertCount(1, $deprecations);
    66             $this->assertContains(true !== $deprecated ? $deprecated : 'Using the comma as a group separator for floats is deprecated since Symfony 3.2 and will be removed in 4.0 on line 1.', $deprecations[0]);
     63            $this->assertStringContainsString(true !== $deprecated ? $deprecated : 'Using the comma as a group separator for floats is deprecated since Symfony 3.2 and will be removed in 4.0 on line 1.', $deprecations[0]);
    6764        }
    6865    }
     
    114111        foreach ($yamls as $yaml) {
    115112            try {
    116                 $content = $this->parser->parse($yaml);
     113                $this->parser->parse($yaml);
    117114
    118115                $this->fail('YAML files must not contain tabs');
     
    611608    /**
    612609     * @dataProvider invalidDumpedObjectProvider
    613      * @expectedException \Symfony\Component\Yaml\Exception\ParseException
    614610     */
    615611    public function testObjectsSupportDisabledWithExceptions($yaml)
    616612    {
     613        $this->expectException('Symfony\Component\Yaml\Exception\ParseException');
    617614        $this->parser->parse($yaml, Yaml::PARSE_EXCEPTION_ON_INVALID_TYPE);
    618615    }
     
    632629     * @group legacy
    633630     * @dataProvider invalidDumpedObjectProvider
    634      * @expectedException \Symfony\Component\Yaml\Exception\ParseException
    635631     */
    636632    public function testObjectsSupportDisabledWithExceptionsUsingBooleanToggles($yaml)
    637633    {
     634        $this->expectException('Symfony\Component\Yaml\Exception\ParseException');
    638635        $this->parser->parse($yaml, true);
    639636    }
     
    678675    }
    679676
    680     /**
    681      * @expectedException \Symfony\Component\Yaml\Exception\ParseException
    682      */
    683677    public function testUnindentedCollectionException()
    684678    {
     679        $this->expectException('Symfony\Component\Yaml\Exception\ParseException');
    685680        $yaml = <<<'EOF'
    686681
     
    695690    }
    696691
    697     /**
    698      * @expectedException \Symfony\Component\Yaml\Exception\ParseException
    699      */
    700692    public function testShortcutKeyUnindentedCollectionException()
    701693    {
     694        $this->expectException('Symfony\Component\Yaml\Exception\ParseException');
    702695        $yaml = <<<'EOF'
    703696
     
    711704    }
    712705
    713     /**
    714      * @expectedException \Symfony\Component\Yaml\Exception\ParseException
    715      * @expectedExceptionMessageRegExp /^Multiple documents are not supported.+/
    716      */
    717706    public function testMultipleDocumentsNotSupportedException()
    718707    {
     708        $this->expectException('Symfony\Component\Yaml\Exception\ParseException');
     709        $this->expectExceptionMessageRegExp('/^Multiple documents are not supported.+/');
    719710        Yaml::parse(<<<'EOL'
    720711# Ranking of 1998 home runs
     
    732723    }
    733724
    734     /**
    735      * @expectedException \Symfony\Component\Yaml\Exception\ParseException
    736      */
    737725    public function testSequenceInAMapping()
    738726    {
     727        $this->expectException('Symfony\Component\Yaml\Exception\ParseException');
    739728        Yaml::parse(<<<'EOF'
    740729yaml:
     
    841830    /**
    842831     * @dataProvider getParseExceptionNotAffectedMultiLineStringLastResortParsing
    843      * @expectedException \Symfony\Component\Yaml\Exception\ParseException
    844832     */
    845833    public function testParseExceptionNotAffectedByMultiLineStringLastResortParsing($yaml)
    846834    {
     835        $this->expectException('Symfony\Component\Yaml\Exception\ParseException');
    847836        $this->parser->parse($yaml);
    848837    }
     
    874863    }
    875864
    876     /**
    877      * @expectedException \Symfony\Component\Yaml\Exception\ParseException
    878      */
    879865    public function testMappingInASequence()
    880866    {
     867        $this->expectException('Symfony\Component\Yaml\Exception\ParseException');
    881868        Yaml::parse(<<<'EOF'
    882869yaml:
     
    887874    }
    888875
    889     /**
    890      * @expectedException \Symfony\Component\Yaml\Exception\ParseException
    891      * @expectedExceptionMessage missing colon
    892      */
    893876    public function testScalarInSequence()
    894877    {
     878        $this->expectException('Symfony\Component\Yaml\Exception\ParseException');
     879        $this->expectExceptionMessage('missing colon');
    895880        Yaml::parse(<<<'EOF'
    896881foo:
     
    12431228    }
    12441229
    1245     /**
    1246      * @expectedException \Symfony\Component\Yaml\Exception\ParseException
    1247      * @expectedExceptionMessage A colon cannot be used in an unquoted mapping value
    1248      */
    12491230    public function testColonInMappingValueException()
    12501231    {
     1232        $this->expectException('Symfony\Component\Yaml\Exception\ParseException');
     1233        $this->expectExceptionMessage('A colon cannot be used in an unquoted mapping value');
    12511234        $yaml = <<<'EOF'
    12521235foo: bar: baz
     
    14821465    /**
    14831466     * @dataProvider getInvalidBinaryData
    1484      * @expectedException \Symfony\Component\Yaml\Exception\ParseException
    14851467     */
    14861468    public function testParseInvalidBinaryData($data, $expectedMessage)
    14871469    {
    1488         if (method_exists($this, 'expectException')) {
    1489             $this->expectExceptionMessageRegExp($expectedMessage);
    1490         } else {
    1491             $this->setExpectedExceptionRegExp(ParseException::class, $expectedMessage);
    1492         }
     1470        $this->expectException('Symfony\Component\Yaml\Exception\ParseException');
     1471        $this->expectExceptionMessageRegExp($expectedMessage);
    14931472
    14941473        $this->parser->parse($data);
     
    15571536    public function testParserThrowsExceptionWithCorrectLineNumber($lineNumber, $yaml)
    15581537    {
    1559         if (method_exists($this, 'expectException')) {
    1560             $this->expectException('\Symfony\Component\Yaml\Exception\ParseException');
    1561             $this->expectExceptionMessage(sprintf('Unexpected characters near "," at line %d (near "bar: "123",").', $lineNumber));
    1562         } else {
    1563             $this->setExpectedException('\Symfony\Component\Yaml\Exception\ParseException', sprintf('Unexpected characters near "," at line %d (near "bar: "123",").', $lineNumber));
    1564         }
     1538        $this->expectException('\Symfony\Component\Yaml\Exception\ParseException');
     1539        $this->expectExceptionMessage(sprintf('Unexpected characters near "," at line %d (near "bar: "123",").', $lineNumber));
    15651540
    15661541        $this->parser->parse($yaml);
     
    18041779    }
    18051780
    1806     /**
    1807      * @expectedException \Symfony\Component\Yaml\Exception\ParseException
    1808      * @expectedExceptionMessage Tags support is not enabled. Enable the `Yaml::PARSE_CUSTOM_TAGS` flag to use "!iterator" at line 1 (near "!iterator [foo]").
    1809      */
    18101781    public function testCustomTagsDisabled()
    18111782    {
     1783        $this->expectException('Symfony\Component\Yaml\Exception\ParseException');
     1784        $this->expectExceptionMessage('Tags support is not enabled. Enable the `Yaml::PARSE_CUSTOM_TAGS` flag to use "!iterator" at line 1 (near "!iterator [foo]").');
    18121785        $this->parser->parse('!iterator [foo]');
    18131786    }
     
    18221795    }
    18231796
    1824     /**
    1825      * @expectedException \Symfony\Component\Yaml\Exception\ParseException
    1826      * @expectedExceptionMessage The built-in tag "!!foo" is not implemented at line 1 (near "!!foo").
    1827      */
    18281797    public function testExceptionWhenUsingUnsuportedBuiltInTags()
    18291798    {
     1799        $this->expectException('Symfony\Component\Yaml\Exception\ParseException');
     1800        $this->expectExceptionMessage('The built-in tag "!!foo" is not implemented at line 1 (near "!!foo").');
    18301801        $this->parser->parse('!!foo');
    18311802    }
     
    18771848    }
    18781849
    1879     /**
    1880      * @expectedException        \Symfony\Component\Yaml\Exception\ParseException
    1881      * @expectedExceptionMessage Unable to parse at line 1 (near "[parameters]").
    1882      */
    18831850    public function testParsingIniThrowsException()
    18841851    {
     1852        $this->expectException('Symfony\Component\Yaml\Exception\ParseException');
     1853        $this->expectExceptionMessage('Unable to parse at line 1 (near "[parameters]").');
    18851854        $ini = <<<INI
    18861855[parameters]
     
    19321901    }
    19331902
    1934     /**
    1935      * @expectedException \Symfony\Component\Yaml\Exception\ParseException
    1936      * @expectedExceptionMessage Reference "foo" does not exist at line 2
    1937      */
    19381903    public function testParserCleansUpReferencesBetweenRuns()
    19391904    {
     1905        $this->expectException('Symfony\Component\Yaml\Exception\ParseException');
     1906        $this->expectExceptionMessage('Reference "foo" does not exist at line 2');
    19401907        $yaml = <<<YAML
    19411908foo: &foo
     
    20782045    public function testParseFile()
    20792046    {
    2080         $this->assertInternalType('array', $this->parser->parseFile(__DIR__.'/Fixtures/index.yml'));
    2081     }
    2082 
    2083     /**
    2084      * @expectedException \Symfony\Component\Yaml\Exception\ParseException
    2085      * @expectedExceptionMessageRegExp #^File ".+/Fixtures/nonexistent.yml" does not exist\.$#
    2086      */
     2047        $this->assertIsArray($this->parser->parseFile(__DIR__.'/Fixtures/index.yml'));
     2048    }
     2049
    20872050    public function testParsingNonExistentFilesThrowsException()
    20882051    {
     2052        $this->expectException('Symfony\Component\Yaml\Exception\ParseException');
     2053        $this->expectExceptionMessageRegExp('#^File ".+/Fixtures/nonexistent.yml" does not exist\.$#');
    20892054        $this->parser->parseFile(__DIR__.'/Fixtures/nonexistent.yml');
    20902055    }
    20912056
    2092     /**
    2093      * @expectedException \Symfony\Component\Yaml\Exception\ParseException
    2094      * @expectedExceptionMessageRegExp #^File ".+/Fixtures/not_readable.yml" cannot be read\.$#
    2095      */
    20962057    public function testParsingNotReadableFilesThrowsException()
    20972058    {
     2059        $this->expectException('Symfony\Component\Yaml\Exception\ParseException');
     2060        $this->expectExceptionMessageRegExp('#^File ".+/Fixtures/not_readable.yml" cannot be read\.$#');
    20982061        if ('\\' === \DIRECTORY_SEPARATOR) {
    20992062            $this->markTestSkipped('chmod is not supported on Windows');
     
    21662129    }
    21672130
    2168     /**
    2169      * @expectedException \Symfony\Component\Yaml\Exception\ParseException
    2170      * @expectedExceptionMessage Reference "foo" does not exist
    2171      */
    21722131    public function testEvalRefException()
    21732132    {
     2133        $this->expectException('Symfony\Component\Yaml\Exception\ParseException');
     2134        $this->expectExceptionMessage('Reference "foo" does not exist');
    21742135        $yaml = <<<EOE
    21752136foo: { &foo { a: Steve, <<: *foo} }
     
    21802141    /**
    21812142     * @dataProvider circularReferenceProvider
    2182      * @expectedException \Symfony\Component\Yaml\Exception\ParseException
    2183      * @expectedExceptionMessage Circular reference [foo, bar, foo] detected
    21842143     */
    21852144    public function testDetectCircularReferences($yaml)
    21862145    {
     2146        $this->expectException('Symfony\Component\Yaml\Exception\ParseException');
     2147        $this->expectExceptionMessage('Circular reference [foo, bar, foo] detected');
    21872148        $this->parser->parse($yaml, Yaml::PARSE_CUSTOM_TAGS);
    21882149    }
     
    22932254        return $tests;
    22942255    }
     2256
     2257    public function testMultiLineComment()
     2258    {
     2259        $yaml = <<<YAML
     2260parameters:
     2261    abc
     2262
     2263# Comment
     2264YAML;
     2265
     2266        $this->assertSame(['parameters' => 'abc'], $this->parser->parse($yaml));
     2267    }
     2268
     2269    public function testParseValueWithModifiers()
     2270    {
     2271        $yaml = <<<YAML
     2272parameters:
     2273    abc: |+5 # plus five spaces indent
     2274         one
     2275         two
     2276         three
     2277         four
     2278         five
     2279YAML;
     2280        $this->assertSame(
     2281            [
     2282                'parameters' => [
     2283                    'abc' => implode("\n", ['one', 'two', 'three', 'four', 'five']),
     2284                ],
     2285            ],
     2286            $this->parser->parse($yaml)
     2287        );
     2288    }
     2289
     2290    public function testParseValueWithNegativeModifiers()
     2291    {
     2292        $yaml = <<<YAML
     2293parameters:
     2294    abc: |-3 # minus
     2295       one
     2296       two
     2297       three
     2298       four
     2299       five
     2300YAML;
     2301        $this->assertSame(
     2302            [
     2303                'parameters' => [
     2304                    'abc' => implode("\n", ['one', 'two', 'three', 'four', 'five']),
     2305                ],
     2306            ],
     2307            $this->parser->parse($yaml)
     2308        );
     2309    }
    22952310}
    22962311
  • lockr/trunk/vendor/symfony/yaml/Tests/YamlTest.php

    r2079642 r2283783  
    2525    }
    2626
    27     /**
    28      * @expectedException \InvalidArgumentException
    29      * @expectedExceptionMessage The indentation must be greater than zero
    30      */
    3127    public function testZeroIndentationThrowsException()
    3228    {
     29        $this->expectException('InvalidArgumentException');
     30        $this->expectExceptionMessage('The indentation must be greater than zero');
    3331        Yaml::dump(['lorem' => 'ipsum', 'dolor' => 'sit'], 2, 0);
    3432    }
    3533
    36     /**
    37      * @expectedException \InvalidArgumentException
    38      * @expectedExceptionMessage The indentation must be greater than zero
    39      */
    4034    public function testNegativeIndentationThrowsException()
    4135    {
     36        $this->expectException('InvalidArgumentException');
     37        $this->expectExceptionMessage('The indentation must be greater than zero');
    4238        Yaml::dump(['lorem' => 'ipsum', 'dolor' => 'sit'], 2, -4);
    4339    }
Note: See TracChangeset for help on using the changeset viewer.