run php-cs-fixer and add TYPE constant
This commit is contained in:
parent
f884a650f4
commit
52583496ba
15 changed files with 880 additions and 39 deletions
|
|
@ -28,10 +28,17 @@ steps:
|
|||
depends_on:
|
||||
- composer
|
||||
|
||||
- name: testing
|
||||
image: d.xr.to/eater/php7.4rc6
|
||||
commands:
|
||||
- ./vendor/bin/php-cs-fixer fix --dry-run src
|
||||
depends_on:
|
||||
- composer
|
||||
|
||||
volumes:
|
||||
- name: composer
|
||||
host:
|
||||
path: /tank/var/composer-cache
|
||||
---
|
||||
kind: signature
|
||||
hmac: f37f65151151bb234e48025637865312bcf2b099c6550775fdc0a2b5fba73887
|
||||
hmac: ad2a518ae2f5db6fe8d8a45078668f02a11e54ae83bb7c5612058c2a880dc1ec
|
||||
|
|
|
|||
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -1,2 +1,3 @@
|
|||
.phpunit.result.cache
|
||||
/vendor
|
||||
/vendor
|
||||
.php_cs.cache
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@
|
|||
},
|
||||
"require-dev": {
|
||||
"phpstan/phpstan": "^0.11.19",
|
||||
"phpunit/phpunit": "^8.4"
|
||||
"phpunit/phpunit": "^8.4",
|
||||
"friendsofphp/php-cs-fixer": "^2.16"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
|
|
|
|||
824
composer.lock
generated
824
composer.lock
generated
|
|
@ -4,9 +4,71 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "0f9e383a7cab8e646258809a64fa9fbf",
|
||||
"content-hash": "c6fed759f6b232a29e98aea636df69f7",
|
||||
"packages": [],
|
||||
"packages-dev": [
|
||||
{
|
||||
"name": "composer/semver",
|
||||
"version": "1.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/composer/semver.git",
|
||||
"reference": "46d9139568ccb8d9e7cdd4539cab7347568a5e2e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/composer/semver/zipball/46d9139568ccb8d9e7cdd4539cab7347568a5e2e",
|
||||
"reference": "46d9139568ccb8d9e7cdd4539cab7347568a5e2e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.3.2 || ^7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^4.5 || ^5.0.5",
|
||||
"phpunit/phpunit-mock-objects": "2.3.0 || ^3.0"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Composer\\Semver\\": "src"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nils Adermann",
|
||||
"email": "naderman@naderman.de",
|
||||
"homepage": "http://www.naderman.de"
|
||||
},
|
||||
{
|
||||
"name": "Jordi Boggiano",
|
||||
"email": "j.boggiano@seld.be",
|
||||
"homepage": "http://seld.be"
|
||||
},
|
||||
{
|
||||
"name": "Rob Bast",
|
||||
"email": "rob.bast@gmail.com",
|
||||
"homepage": "http://robbast.nl"
|
||||
}
|
||||
],
|
||||
"description": "Semver library that offers utilities, version constraint parsing and validation.",
|
||||
"keywords": [
|
||||
"semantic",
|
||||
"semver",
|
||||
"validation",
|
||||
"versioning"
|
||||
],
|
||||
"time": "2019-03-19T17:25:45+00:00"
|
||||
},
|
||||
{
|
||||
"name": "composer/xdebug-handler",
|
||||
"version": "1.4.0",
|
||||
|
|
@ -51,6 +113,74 @@
|
|||
],
|
||||
"time": "2019-11-06T16:40:04+00:00"
|
||||
},
|
||||
{
|
||||
"name": "doctrine/annotations",
|
||||
"version": "v1.8.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/doctrine/annotations.git",
|
||||
"reference": "904dca4eb10715b92569fbcd79e201d5c349b6bc"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/doctrine/annotations/zipball/904dca4eb10715b92569fbcd79e201d5c349b6bc",
|
||||
"reference": "904dca4eb10715b92569fbcd79e201d5c349b6bc",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"doctrine/lexer": "1.*",
|
||||
"php": "^7.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/cache": "1.*",
|
||||
"phpunit/phpunit": "^7.5"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.7.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Guilherme Blanco",
|
||||
"email": "guilhermeblanco@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Roman Borschel",
|
||||
"email": "roman@code-factory.org"
|
||||
},
|
||||
{
|
||||
"name": "Benjamin Eberlei",
|
||||
"email": "kontakt@beberlei.de"
|
||||
},
|
||||
{
|
||||
"name": "Jonathan Wage",
|
||||
"email": "jonwage@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Johannes Schmitt",
|
||||
"email": "schmittjoh@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "Docblock Annotations Parser",
|
||||
"homepage": "http://www.doctrine-project.org",
|
||||
"keywords": [
|
||||
"annotations",
|
||||
"docblock",
|
||||
"parser"
|
||||
],
|
||||
"time": "2019-10-01T18:55:10+00:00"
|
||||
},
|
||||
{
|
||||
"name": "doctrine/instantiator",
|
||||
"version": "1.3.0",
|
||||
|
|
@ -107,6 +237,157 @@
|
|||
],
|
||||
"time": "2019-10-21T16:45:58+00:00"
|
||||
},
|
||||
{
|
||||
"name": "doctrine/lexer",
|
||||
"version": "1.2.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/doctrine/lexer.git",
|
||||
"reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/doctrine/lexer/zipball/5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6",
|
||||
"reference": "5242d66dbeb21a30dd8a3e66bf7a73b66e05e1f6",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/coding-standard": "^6.0",
|
||||
"phpstan/phpstan": "^0.11.8",
|
||||
"phpunit/phpunit": "^8.2"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.2.x-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer"
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Guilherme Blanco",
|
||||
"email": "guilhermeblanco@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "Roman Borschel",
|
||||
"email": "roman@code-factory.org"
|
||||
},
|
||||
{
|
||||
"name": "Johannes Schmitt",
|
||||
"email": "schmittjoh@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.",
|
||||
"homepage": "https://www.doctrine-project.org/projects/lexer.html",
|
||||
"keywords": [
|
||||
"annotations",
|
||||
"docblock",
|
||||
"lexer",
|
||||
"parser",
|
||||
"php"
|
||||
],
|
||||
"time": "2019-10-30T14:39:59+00:00"
|
||||
},
|
||||
{
|
||||
"name": "friendsofphp/php-cs-fixer",
|
||||
"version": "v2.16.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git",
|
||||
"reference": "c8afb599858876e95e8ebfcd97812d383fa23f02"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/c8afb599858876e95e8ebfcd97812d383fa23f02",
|
||||
"reference": "c8afb599858876e95e8ebfcd97812d383fa23f02",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"composer/semver": "^1.4",
|
||||
"composer/xdebug-handler": "^1.2",
|
||||
"doctrine/annotations": "^1.2",
|
||||
"ext-json": "*",
|
||||
"ext-tokenizer": "*",
|
||||
"php": "^5.6 || ^7.0",
|
||||
"php-cs-fixer/diff": "^1.3",
|
||||
"symfony/console": "^3.4.17 || ^4.1.6 || ^5.0",
|
||||
"symfony/event-dispatcher": "^3.0 || ^4.0 || ^5.0",
|
||||
"symfony/filesystem": "^3.0 || ^4.0 || ^5.0",
|
||||
"symfony/finder": "^3.0 || ^4.0 || ^5.0",
|
||||
"symfony/options-resolver": "^3.0 || ^4.0 || ^5.0",
|
||||
"symfony/polyfill-php70": "^1.0",
|
||||
"symfony/polyfill-php72": "^1.4",
|
||||
"symfony/process": "^3.0 || ^4.0 || ^5.0",
|
||||
"symfony/stopwatch": "^3.0 || ^4.0 || ^5.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"johnkary/phpunit-speedtrap": "^1.1 || ^2.0 || ^3.0",
|
||||
"justinrainbow/json-schema": "^5.0",
|
||||
"keradus/cli-executor": "^1.2",
|
||||
"mikey179/vfsstream": "^1.6",
|
||||
"php-coveralls/php-coveralls": "^2.1",
|
||||
"php-cs-fixer/accessible-object": "^1.0",
|
||||
"php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.1",
|
||||
"php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.1",
|
||||
"phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.1",
|
||||
"phpunitgoodpractices/traits": "^1.8",
|
||||
"symfony/phpunit-bridge": "^4.3 || ^5.0",
|
||||
"symfony/yaml": "^3.0 || ^4.0 || ^5.0"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-mbstring": "For handling non-UTF8 characters in cache signature.",
|
||||
"php-cs-fixer/phpunit-constraint-isidenticalstring": "For IsIdenticalString constraint.",
|
||||
"php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "For XmlMatchesXsd constraint.",
|
||||
"symfony/polyfill-mbstring": "When enabling `ext-mbstring` is not possible."
|
||||
},
|
||||
"bin": [
|
||||
"php-cs-fixer"
|
||||
],
|
||||
"type": "application",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"PhpCsFixer\\": "src/"
|
||||
},
|
||||
"classmap": [
|
||||
"tests/Test/AbstractFixerTestCase.php",
|
||||
"tests/Test/AbstractIntegrationCaseFactory.php",
|
||||
"tests/Test/AbstractIntegrationTestCase.php",
|
||||
"tests/Test/Assert/AssertTokensTrait.php",
|
||||
"tests/Test/IntegrationCase.php",
|
||||
"tests/Test/IntegrationCaseFactory.php",
|
||||
"tests/Test/IntegrationCaseFactoryInterface.php",
|
||||
"tests/Test/InternalIntegrationCaseFactory.php",
|
||||
"tests/TestCase.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "Dariusz Rumiński",
|
||||
"email": "dariusz.ruminski@gmail.com"
|
||||
}
|
||||
],
|
||||
"description": "A tool to automatically fix PHP code style",
|
||||
"time": "2019-11-25T22:10:32+00:00"
|
||||
},
|
||||
{
|
||||
"name": "jean85/pretty-package-versions",
|
||||
"version": "1.2",
|
||||
|
|
@ -836,6 +1117,51 @@
|
|||
"description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)",
|
||||
"time": "2019-07-17T15:49:50+00:00"
|
||||
},
|
||||
{
|
||||
"name": "paragonie/random_compat",
|
||||
"version": "v9.99.99",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/paragonie/random_compat.git",
|
||||
"reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95",
|
||||
"reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "4.*|5.*",
|
||||
"vimeo/psalm": "^1"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes."
|
||||
},
|
||||
"type": "library",
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Paragon Initiative Enterprises",
|
||||
"email": "security@paragonie.com",
|
||||
"homepage": "https://paragonie.com"
|
||||
}
|
||||
],
|
||||
"description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7",
|
||||
"keywords": [
|
||||
"csprng",
|
||||
"polyfill",
|
||||
"pseudorandom",
|
||||
"random"
|
||||
],
|
||||
"time": "2018-07-02T15:55:56+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phar-io/manifest",
|
||||
"version": "1.0.3",
|
||||
|
|
@ -938,6 +1264,57 @@
|
|||
"description": "Library for handling version information and constraints",
|
||||
"time": "2018-07-08T19:19:57+00:00"
|
||||
},
|
||||
{
|
||||
"name": "php-cs-fixer/diff",
|
||||
"version": "v1.3.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHP-CS-Fixer/diff.git",
|
||||
"reference": "78bb099e9c16361126c86ce82ec4405ebab8e756"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHP-CS-Fixer/diff/zipball/78bb099e9c16361126c86ce82ec4405ebab8e756",
|
||||
"reference": "78bb099e9c16361126c86ce82ec4405ebab8e756",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^5.6 || ^7.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^5.7.23 || ^6.4.3",
|
||||
"symfony/process": "^3.3"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"classmap": [
|
||||
"src/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"BSD-3-Clause"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Kore Nordmann",
|
||||
"email": "mail@kore-nordmann.de"
|
||||
},
|
||||
{
|
||||
"name": "Sebastian Bergmann",
|
||||
"email": "sebastian@phpunit.de"
|
||||
},
|
||||
{
|
||||
"name": "SpacePossum"
|
||||
}
|
||||
],
|
||||
"description": "sebastian/diff v2 backport support for PHP5.6",
|
||||
"homepage": "https://github.com/PHP-CS-Fixer",
|
||||
"keywords": [
|
||||
"diff"
|
||||
],
|
||||
"time": "2018-02-15T16:58:55+00:00"
|
||||
},
|
||||
{
|
||||
"name": "phpdocumentor/reflection-common",
|
||||
"version": "2.0.0",
|
||||
|
|
@ -2395,6 +2772,184 @@
|
|||
"homepage": "https://symfony.com",
|
||||
"time": "2019-11-13T07:39:40+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/event-dispatcher",
|
||||
"version": "v4.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/event-dispatcher.git",
|
||||
"reference": "ab1c43e17fff802bef0a898f3bc088ac33b8e0e1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/ab1c43e17fff802bef0a898f3bc088ac33b8e0e1",
|
||||
"reference": "ab1c43e17fff802bef0a898f3bc088ac33b8e0e1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1.3",
|
||||
"symfony/event-dispatcher-contracts": "^1.1"
|
||||
},
|
||||
"conflict": {
|
||||
"symfony/dependency-injection": "<3.4"
|
||||
},
|
||||
"provide": {
|
||||
"psr/event-dispatcher-implementation": "1.0",
|
||||
"symfony/event-dispatcher-implementation": "1.1"
|
||||
},
|
||||
"require-dev": {
|
||||
"psr/log": "~1.0",
|
||||
"symfony/config": "^3.4|^4.0|^5.0",
|
||||
"symfony/dependency-injection": "^3.4|^4.0|^5.0",
|
||||
"symfony/expression-language": "^3.4|^4.0|^5.0",
|
||||
"symfony/http-foundation": "^3.4|^4.0|^5.0",
|
||||
"symfony/service-contracts": "^1.1|^2",
|
||||
"symfony/stopwatch": "^3.4|^4.0|^5.0"
|
||||
},
|
||||
"suggest": {
|
||||
"symfony/dependency-injection": "",
|
||||
"symfony/http-kernel": ""
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "4.4-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\EventDispatcher\\": ""
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony EventDispatcher Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-11-08T22:40:51+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/event-dispatcher-contracts",
|
||||
"version": "v1.1.7",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/event-dispatcher-contracts.git",
|
||||
"reference": "c43ab685673fb6c8d84220c77897b1d6cdbe1d18"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/c43ab685673fb6c8d84220c77897b1d6cdbe1d18",
|
||||
"reference": "c43ab685673fb6c8d84220c77897b1d6cdbe1d18",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1.3"
|
||||
},
|
||||
"suggest": {
|
||||
"psr/event-dispatcher": "",
|
||||
"symfony/event-dispatcher-implementation": ""
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.1-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Contracts\\EventDispatcher\\": ""
|
||||
}
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicolas Grekas",
|
||||
"email": "p@tchwork.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Generic abstractions related to dispatching event",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"abstractions",
|
||||
"contracts",
|
||||
"decoupling",
|
||||
"interfaces",
|
||||
"interoperability",
|
||||
"standards"
|
||||
],
|
||||
"time": "2019-09-17T09:54:03+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/filesystem",
|
||||
"version": "v5.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/filesystem.git",
|
||||
"reference": "0bf75c37a71ff41f718b14b9f5a0a7d6a7dd9b84"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/filesystem/zipball/0bf75c37a71ff41f718b14b9f5a0a7d6a7dd9b84",
|
||||
"reference": "0bf75c37a71ff41f718b14b9f5a0a7d6a7dd9b84",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.2.5",
|
||||
"symfony/polyfill-ctype": "~1.8"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "5.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\Filesystem\\": ""
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony Filesystem Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-11-18T17:27:11+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/finder",
|
||||
"version": "v4.4.0",
|
||||
|
|
@ -2444,6 +2999,60 @@
|
|||
"homepage": "https://symfony.com",
|
||||
"time": "2019-11-17T21:56:56+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/options-resolver",
|
||||
"version": "v5.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/options-resolver.git",
|
||||
"reference": "1ad3d0ffc00cc1990e5c9c7bb6b81578ec3f5f68"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/options-resolver/zipball/1ad3d0ffc00cc1990e5c9c7bb6b81578ec3f5f68",
|
||||
"reference": "1ad3d0ffc00cc1990e5c9c7bb6b81578ec3f5f68",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.2.5"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "5.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\OptionsResolver\\": ""
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony OptionsResolver Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"config",
|
||||
"configuration",
|
||||
"options"
|
||||
],
|
||||
"time": "2019-11-18T17:27:11+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-ctype",
|
||||
"version": "v1.12.0",
|
||||
|
|
@ -2561,6 +3170,120 @@
|
|||
],
|
||||
"time": "2019-08-06T08:03:45+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php70",
|
||||
"version": "v1.12.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-php70.git",
|
||||
"reference": "54b4c428a0054e254223797d2713c31e08610831"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/54b4c428a0054e254223797d2713c31e08610831",
|
||||
"reference": "54b4c428a0054e254223797d2713c31e08610831",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"paragonie/random_compat": "~1.0|~2.0|~9.99",
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.12-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Php70\\": ""
|
||||
},
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
],
|
||||
"classmap": [
|
||||
"Resources/stubs"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicolas Grekas",
|
||||
"email": "p@tchwork.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"compatibility",
|
||||
"polyfill",
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"time": "2019-08-06T08:03:45+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php72",
|
||||
"version": "v1.12.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-php72.git",
|
||||
"reference": "04ce3335667451138df4307d6a9b61565560199e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/04ce3335667451138df4307d6a9b61565560199e",
|
||||
"reference": "04ce3335667451138df4307d6a9b61565560199e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": ">=5.3.3"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.12-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Polyfill\\Php72\\": ""
|
||||
},
|
||||
"files": [
|
||||
"bootstrap.php"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Nicolas Grekas",
|
||||
"email": "p@tchwork.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions",
|
||||
"homepage": "https://symfony.com",
|
||||
"keywords": [
|
||||
"compatibility",
|
||||
"polyfill",
|
||||
"portable",
|
||||
"shim"
|
||||
],
|
||||
"time": "2019-08-06T08:03:45+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php73",
|
||||
"version": "v1.12.0",
|
||||
|
|
@ -2619,6 +3342,55 @@
|
|||
],
|
||||
"time": "2019-08-06T08:03:45+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/process",
|
||||
"version": "v5.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/process.git",
|
||||
"reference": "110f98bed214a007eb440c7bb14088fed96f847f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/process/zipball/110f98bed214a007eb440c7bb14088fed96f847f",
|
||||
"reference": "110f98bed214a007eb440c7bb14088fed96f847f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.2.5"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "5.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\Process\\": ""
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony Process Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-11-18T17:27:11+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/service-contracts",
|
||||
"version": "v2.0.0",
|
||||
|
|
@ -2677,6 +3449,56 @@
|
|||
],
|
||||
"time": "2019-11-09T09:18:34+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/stopwatch",
|
||||
"version": "v5.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/stopwatch.git",
|
||||
"reference": "d410282956706e0b08681a5527447a8e6b6f421e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/stopwatch/zipball/d410282956706e0b08681a5527447a8e6b6f421e",
|
||||
"reference": "d410282956706e0b08681a5527447a8e6b6f421e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.2.5",
|
||||
"symfony/service-contracts": "^1.0|^2"
|
||||
},
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "5.0-dev"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Symfony\\Component\\Stopwatch\\": ""
|
||||
},
|
||||
"exclude-from-classmap": [
|
||||
"/Tests/"
|
||||
]
|
||||
},
|
||||
"notification-url": "https://packagist.org/downloads/",
|
||||
"license": [
|
||||
"MIT"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "Fabien Potencier",
|
||||
"email": "fabien@symfony.com"
|
||||
},
|
||||
{
|
||||
"name": "Symfony Community",
|
||||
"homepage": "https://symfony.com/contributors"
|
||||
}
|
||||
],
|
||||
"description": "Symfony Stopwatch Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2019-11-18T17:27:11+00:00"
|
||||
},
|
||||
{
|
||||
"name": "theseer/tokenizer",
|
||||
"version": "1.1.3",
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
namespace Cijber;
|
||||
|
||||
|
||||
use Cijber\OpenSSL\Instance;
|
||||
use FFI;
|
||||
|
||||
|
|
@ -22,7 +21,7 @@ class OpenSSL
|
|||
*
|
||||
* @return Instance
|
||||
*/
|
||||
static function getInstance(): Instance
|
||||
public static function getInstance(): Instance
|
||||
{
|
||||
if (static::$instance === null) {
|
||||
static::$instance = new Instance();
|
||||
|
|
@ -50,4 +49,4 @@ class OpenSSL
|
|||
{
|
||||
return static::getStdLib()->malloc($size);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,13 +3,14 @@
|
|||
|
||||
namespace Cijber\OpenSSL;
|
||||
|
||||
|
||||
use Cijber\OpenSSL;
|
||||
use Cijber\OpenSSL\C\CBackedObjectWithOwner;
|
||||
use RuntimeException;
|
||||
|
||||
class BIO extends CBackedObjectWithOwner
|
||||
{
|
||||
const TYPE = "BIO*";
|
||||
|
||||
const CTRL_RESET = 1;
|
||||
const CTRL_EOF = 2;
|
||||
const CTRL_INFO = 3;
|
||||
|
|
@ -250,7 +251,7 @@ class BIO extends CBackedObjectWithOwner
|
|||
* @param string $data
|
||||
* @return int
|
||||
*/
|
||||
function write(string $data): int
|
||||
public function write(string $data): int
|
||||
{
|
||||
$len = $this->ffi->BIO_write($this->cObj, $data, strlen($data));
|
||||
if ($len === -2) {
|
||||
|
|
@ -273,7 +274,7 @@ class BIO extends CBackedObjectWithOwner
|
|||
*
|
||||
* @return int
|
||||
*/
|
||||
function getType(): int
|
||||
public function getType(): int
|
||||
{
|
||||
return $this->ffi->BIO_method_type($this->cObj);
|
||||
}
|
||||
|
|
@ -284,7 +285,7 @@ class BIO extends CBackedObjectWithOwner
|
|||
* @param int $chunkSize max amount of bytes to read in this operation
|
||||
* @return string
|
||||
*/
|
||||
function read(int $chunkSize = 4096): string
|
||||
public function read(int $chunkSize = 4096): string
|
||||
{
|
||||
$data = OpenSSL\C\Memory::new($chunkSize);
|
||||
$len = $this->ffi->BIO_read($this->cObj, $data->get(), $chunkSize);
|
||||
|
|
@ -308,7 +309,7 @@ class BIO extends CBackedObjectWithOwner
|
|||
*
|
||||
* @return int
|
||||
*/
|
||||
function tell()
|
||||
public function tell()
|
||||
{
|
||||
if (($this->getType() & self::TYPE_FILE) !== self::TYPE_FILE) {
|
||||
throw new RuntimeException("Can't tell on non-file BIO");
|
||||
|
|
@ -326,7 +327,7 @@ class BIO extends CBackedObjectWithOwner
|
|||
/**
|
||||
* Reset position in BIO
|
||||
*/
|
||||
function reset(): void
|
||||
public function reset(): void
|
||||
{
|
||||
$res = (int)$this->ctrl(self::CTRL_RESET, 0, null);
|
||||
|
||||
|
|
@ -346,7 +347,7 @@ class BIO extends CBackedObjectWithOwner
|
|||
*
|
||||
* @param int $offset
|
||||
*/
|
||||
function seek(int $offset)
|
||||
public function seek(int $offset)
|
||||
{
|
||||
if (($this->getType() & self::TYPE_FILE) !== self::TYPE_FILE) {
|
||||
throw new RuntimeException("Can't seek in non-file BIO");
|
||||
|
|
@ -364,7 +365,7 @@ class BIO extends CBackedObjectWithOwner
|
|||
*
|
||||
* @return bool
|
||||
*/
|
||||
function eof(): bool
|
||||
public function eof(): bool
|
||||
{
|
||||
return (int)$this->ctrl(self::CTRL_EOF, 0, null) === 1;
|
||||
}
|
||||
|
|
@ -377,8 +378,8 @@ class BIO extends CBackedObjectWithOwner
|
|||
* @param mixed $parg
|
||||
* @return mixed
|
||||
*/
|
||||
function ctrl(int $prop, int $larg = 0, $parg = null)
|
||||
public function ctrl(int $prop, int $larg = 0, $parg = null)
|
||||
{
|
||||
return $this->ffi->BIO_ctrl($this->cObj, $prop, $larg, $parg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,12 +3,13 @@
|
|||
|
||||
namespace Cijber\OpenSSL\C;
|
||||
|
||||
|
||||
use FFI;
|
||||
use FFI\CData;
|
||||
|
||||
class CBackedObject
|
||||
{
|
||||
const TYPE = "void*";
|
||||
|
||||
protected CData $cObj;
|
||||
protected bool $freed = false;
|
||||
|
||||
|
|
@ -32,7 +33,7 @@ class CBackedObject
|
|||
/**
|
||||
* Free backing C object, object is useless after this operation
|
||||
*/
|
||||
public final function free()
|
||||
final public function free()
|
||||
{
|
||||
if ($this->freed) {
|
||||
return;
|
||||
|
|
@ -51,4 +52,4 @@ class CBackedObject
|
|||
{
|
||||
$this->free();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
namespace Cijber\OpenSSL\C;
|
||||
|
||||
|
||||
use FFI;
|
||||
use FFI\CData;
|
||||
|
||||
|
|
@ -16,4 +15,17 @@ class CBackedObjectWithOwner extends CBackedObject
|
|||
parent::__construct($cObj);
|
||||
$this->ffi = $ffi;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Cast an CData as
|
||||
*
|
||||
* @param FFI $ffi
|
||||
* @param CData $cData
|
||||
* @return static
|
||||
* @internal
|
||||
*/
|
||||
public static function cast(FFI $ffi, CData $cData)
|
||||
{
|
||||
return new static($ffi, FFI::cast(static::TYPE, $cData));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
namespace Cijber\OpenSSL\C;
|
||||
|
||||
|
||||
use Cijber\OpenSSL;
|
||||
use FFI;
|
||||
use FFI\CData;
|
||||
|
|
@ -45,4 +44,4 @@ class Memory extends CBackedObject
|
|||
{
|
||||
return FFI::addr($this->cObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
namespace Cijber\OpenSSL;
|
||||
|
||||
|
||||
use FFI;
|
||||
|
||||
/**
|
||||
|
|
@ -77,4 +76,4 @@ class Instance
|
|||
|
||||
return $this->ffi;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,13 +3,14 @@
|
|||
|
||||
namespace Cijber\OpenSSL;
|
||||
|
||||
|
||||
use Cijber\OpenSSL;
|
||||
use Cijber\OpenSSL\C\Memory;
|
||||
use FFI;
|
||||
|
||||
class PKCS7 extends OpenSSL\C\CBackedObjectWithOwner
|
||||
{
|
||||
const TYPE = "PKCS7*";
|
||||
|
||||
/**
|
||||
* NID_pkcs7
|
||||
*/
|
||||
|
|
@ -104,4 +105,4 @@ class PKCS7 extends OpenSSL\C\CBackedObjectWithOwner
|
|||
$mem->freed();
|
||||
return new static($ffi, $res);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,14 +3,13 @@
|
|||
|
||||
namespace Cijber\OpenSSL\PKCS7;
|
||||
|
||||
|
||||
use Cijber\OpenSSL\PKCS7;
|
||||
|
||||
trait Helpers
|
||||
{
|
||||
protected PKCS7 $pkcs7;
|
||||
|
||||
function toDER(): string
|
||||
public function toDER(): string
|
||||
{
|
||||
return $this->pkcs7->toDER();
|
||||
}
|
||||
|
|
@ -27,4 +26,4 @@ trait Helpers
|
|||
{
|
||||
$this->pkcs7 = $pkcs7;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,12 +3,11 @@
|
|||
|
||||
namespace Cijber\OpenSSL\PKCS7;
|
||||
|
||||
|
||||
class Signed
|
||||
{
|
||||
use Helpers;
|
||||
|
||||
function getSigners() {
|
||||
|
||||
public function getSigners()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,12 +3,13 @@
|
|||
|
||||
namespace Cijber\OpenSSL;
|
||||
|
||||
|
||||
use Cijber\OpenSSL;
|
||||
use Cijber\OpenSSL\C\CBackedObjectWithOwner;
|
||||
|
||||
class X509 extends CBackedObjectWithOwner
|
||||
{
|
||||
const TYPE = "X509*";
|
||||
|
||||
public static function new(): X509
|
||||
{
|
||||
$ffi = OpenSSL::getFFI();
|
||||
|
|
@ -20,4 +21,4 @@ class X509 extends CBackedObjectWithOwner
|
|||
{
|
||||
$this->ffi->X509_free($this->cObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
namespace Cijber\OpenSSL;
|
||||
|
||||
|
||||
use Cijber\OpenSSL;
|
||||
use Cijber\OpenSSL\C\CBackedObjectWithOwner;
|
||||
|
||||
|
|
@ -20,4 +19,4 @@ class X509Store extends CBackedObjectWithOwner
|
|||
{
|
||||
$this->ffi->X509_STORE_free($this->cObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue