diff --git a/.gitignore b/.gitignore index e46637c..4dbb9c8 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ vendor .env views_cache resources/upload -resources/tmp \ No newline at end of file +resources/tmp +composer.lock \ No newline at end of file diff --git a/bootstrap.php b/bootstrap.php index 0a85d73..b9b36fc 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -13,7 +13,7 @@ const KERNEL_MODULES_DIR = __DIR__ . "/kernel/modules"; const KERNEL_ADMIN_THEMES_DIR = __DIR__ . "/kernel/admin_themes"; const CONSOLE_DIR = __DIR__ . "/kernel/console"; const RESOURCES_DIR = __DIR__ . "/resources"; - +const KERNEL_TEMPLATES_DIR = __DIR__ . "/kernel/templates"; const KERNEL_APP_MODULES_DIR = KERNEL_DIR . "/app_modules"; const APP_DIR = ROOT_DIR . "/app"; @@ -29,6 +29,7 @@ function getConst($text): array|false|string "{KERNEL}" => KERNEL_DIR, "{KERNEL_MODULES}" => KERNEL_MODULES_DIR, "{KERNEL_APP_MODULES}" => KERNEL_APP_MODULES_DIR, + "{KERNEL_TEMPLATES}" => KERNEL_TEMPLATES_DIR, "{CONSOLE}" => CONSOLE_DIR, "{APP}" => APP_DIR, ]; diff --git a/bootstrap/secure.php b/bootstrap/secure.php index 714beb3..a8baf09 100644 --- a/bootstrap/secure.php +++ b/bootstrap/secure.php @@ -2,7 +2,7 @@ $secure_config = [ 'web_auth_type' => 'email_code', // login_password, email_code - 'token_type' => 'crypt', // random_bytes, md5, crypt, hash, JWT + 'token_type' => 'hash', // random_bytes, md5, crypt, hash, JWT 'token_expired_time' => "+30 days", // +1 day ]; diff --git a/composer.json b/composer.json index ecf8197..84a938a 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,9 @@ "firebase/php-jwt": "^6.10", "k-adam/env-editor": "^2.0", "guzzlehttp/guzzle": "^7.9", - "phpmailer/phpmailer": "^6.9" + "phpmailer/phpmailer": "^6.9", + "zircote/swagger-php": "^4.11", + "doctrine/annotations": "^2.0" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock deleted file mode 100644 index 08443a2..0000000 --- a/composer.lock +++ /dev/null @@ -1,3292 +0,0 @@ -{ - "_readme": [ - "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", - "This file is @generated automatically" - ], - "content-hash": "18fbb67ed0b66029e924b0a6d32f646f", - "packages": [ - { - "name": "brick/math", - "version": "0.12.1", - "source": { - "type": "git", - "url": "https://github.com/brick/math.git", - "reference": "f510c0a40911935b77b86859eb5223d58d660df1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/brick/math/zipball/f510c0a40911935b77b86859eb5223d58d660df1", - "reference": "f510c0a40911935b77b86859eb5223d58d660df1", - "shasum": "" - }, - "require": { - "php": "^8.1" - }, - "require-dev": { - "php-coveralls/php-coveralls": "^2.2", - "phpunit/phpunit": "^10.1", - "vimeo/psalm": "5.16.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Brick\\Math\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "description": "Arbitrary-precision arithmetic library", - "keywords": [ - "Arbitrary-precision", - "BigInteger", - "BigRational", - "arithmetic", - "bigdecimal", - "bignum", - "bignumber", - "brick", - "decimal", - "integer", - "math", - "mathematics", - "rational" - ], - "support": { - "issues": "https://github.com/brick/math/issues", - "source": "https://github.com/brick/math/tree/0.12.1" - }, - "funding": [ - { - "url": "https://github.com/BenMorel", - "type": "github" - } - ], - "time": "2023-11-29T23:19:16+00:00" - }, - { - "name": "carbonphp/carbon-doctrine-types", - "version": "3.2.0", - "source": { - "type": "git", - "url": "https://github.com/CarbonPHP/carbon-doctrine-types.git", - "reference": "18ba5ddfec8976260ead6e866180bd5d2f71aa1d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/CarbonPHP/carbon-doctrine-types/zipball/18ba5ddfec8976260ead6e866180bd5d2f71aa1d", - "reference": "18ba5ddfec8976260ead6e866180bd5d2f71aa1d", - "shasum": "" - }, - "require": { - "php": "^8.1" - }, - "conflict": { - "doctrine/dbal": "<4.0.0 || >=5.0.0" - }, - "require-dev": { - "doctrine/dbal": "^4.0.0", - "nesbot/carbon": "^2.71.0 || ^3.0.0", - "phpunit/phpunit": "^10.3" - }, - "type": "library", - "autoload": { - "psr-4": { - "Carbon\\Doctrine\\": "src/Carbon/Doctrine/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "KyleKatarn", - "email": "kylekatarnls@gmail.com" - } - ], - "description": "Types to use Carbon in Doctrine", - "keywords": [ - "carbon", - "date", - "datetime", - "doctrine", - "time" - ], - "support": { - "issues": "https://github.com/CarbonPHP/carbon-doctrine-types/issues", - "source": "https://github.com/CarbonPHP/carbon-doctrine-types/tree/3.2.0" - }, - "funding": [ - { - "url": "https://github.com/kylekatarnls", - "type": "github" - }, - { - "url": "https://opencollective.com/Carbon", - "type": "open_collective" - }, - { - "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", - "type": "tidelift" - } - ], - "time": "2024-02-09T16:56:22+00:00" - }, - { - "name": "craft-group/phroute", - "version": "v2.1.2", - "source": { - "type": "git", - "url": "https://github.com/apuc/phroute.git", - "reference": "49180faae85e0ba3b0165901ad46e08508c81fac" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/apuc/phroute/zipball/49180faae85e0ba3b0165901ad46e08508c81fac", - "reference": "49180faae85e0ba3b0165901ad46e08508c81fac", - "shasum": "" - }, - "require": { - "php": ">=5.4.0" - }, - "require-dev": { - "phpunit/phpunit": "^5.0", - "satooshi/php-coveralls": "^1.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Phroute\\Phroute\\": "src/Phroute" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Kavalar", - "email": "apuc06@mail.ru" - } - ], - "description": "Fast, fully featured restful request router for PHP", - "keywords": [ - "router", - "routing" - ], - "support": { - "source": "https://github.com/apuc/phroute/tree/v2.1.2" - }, - "time": "2022-12-17T18:27:33+00:00" - }, - { - "name": "doctrine/inflector", - "version": "2.0.10", - "source": { - "type": "git", - "url": "https://github.com/doctrine/inflector.git", - "reference": "5817d0659c5b50c9b950feb9af7b9668e2c436bc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/5817d0659c5b50c9b950feb9af7b9668e2c436bc", - "reference": "5817d0659c5b50c9b950feb9af7b9668e2c436bc", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "require-dev": { - "doctrine/coding-standard": "^11.0", - "phpstan/phpstan": "^1.8", - "phpstan/phpstan-phpunit": "^1.1", - "phpstan/phpstan-strict-rules": "^1.3", - "phpunit/phpunit": "^8.5 || ^9.5", - "vimeo/psalm": "^4.25 || ^5.4" - }, - "type": "library", - "autoload": { - "psr-4": { - "Doctrine\\Inflector\\": "lib/Doctrine/Inflector" - } - }, - "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": "PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.", - "homepage": "https://www.doctrine-project.org/projects/inflector.html", - "keywords": [ - "inflection", - "inflector", - "lowercase", - "manipulation", - "php", - "plural", - "singular", - "strings", - "uppercase", - "words" - ], - "support": { - "issues": "https://github.com/doctrine/inflector/issues", - "source": "https://github.com/doctrine/inflector/tree/2.0.10" - }, - "funding": [ - { - "url": "https://www.doctrine-project.org/sponsorship.html", - "type": "custom" - }, - { - "url": "https://www.patreon.com/phpdoctrine", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finflector", - "type": "tidelift" - } - ], - "time": "2024-02-18T20:23:39+00:00" - }, - { - "name": "firebase/php-jwt", - "version": "v6.10.2", - "source": { - "type": "git", - "url": "https://github.com/firebase/php-jwt.git", - "reference": "30c19ed0f3264cb660ea496895cfb6ef7ee3653b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/firebase/php-jwt/zipball/30c19ed0f3264cb660ea496895cfb6ef7ee3653b", - "reference": "30c19ed0f3264cb660ea496895cfb6ef7ee3653b", - "shasum": "" - }, - "require": { - "php": "^8.0" - }, - "require-dev": { - "guzzlehttp/guzzle": "^7.4", - "phpspec/prophecy-phpunit": "^2.0", - "phpunit/phpunit": "^9.5", - "psr/cache": "^2.0||^3.0", - "psr/http-client": "^1.0", - "psr/http-factory": "^1.0" - }, - "suggest": { - "ext-sodium": "Support EdDSA (Ed25519) signatures", - "paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present" - }, - "type": "library", - "autoload": { - "psr-4": { - "Firebase\\JWT\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Neuman Vong", - "email": "neuman+pear@twilio.com", - "role": "Developer" - }, - { - "name": "Anant Narayanan", - "email": "anant@php.net", - "role": "Developer" - } - ], - "description": "A simple library to encode and decode JSON Web Tokens (JWT) in PHP. Should conform to the current spec.", - "homepage": "https://github.com/firebase/php-jwt", - "keywords": [ - "jwt", - "php" - ], - "support": { - "issues": "https://github.com/firebase/php-jwt/issues", - "source": "https://github.com/firebase/php-jwt/tree/v6.10.2" - }, - "time": "2024-11-24T11:22:49+00:00" - }, - { - "name": "graham-campbell/result-type", - "version": "v1.1.3", - "source": { - "type": "git", - "url": "https://github.com/GrahamCampbell/Result-Type.git", - "reference": "3ba905c11371512af9d9bdd27d99b782216b6945" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/3ba905c11371512af9d9bdd27d99b782216b6945", - "reference": "3ba905c11371512af9d9bdd27d99b782216b6945", - "shasum": "" - }, - "require": { - "php": "^7.2.5 || ^8.0", - "phpoption/phpoption": "^1.9.3" - }, - "require-dev": { - "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" - }, - "type": "library", - "autoload": { - "psr-4": { - "GrahamCampbell\\ResultType\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - } - ], - "description": "An Implementation Of The Result Type", - "keywords": [ - "Graham Campbell", - "GrahamCampbell", - "Result Type", - "Result-Type", - "result" - ], - "support": { - "issues": "https://github.com/GrahamCampbell/Result-Type/issues", - "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.1.3" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/graham-campbell/result-type", - "type": "tidelift" - } - ], - "time": "2024-07-20T21:45:45+00:00" - }, - { - "name": "guzzlehttp/guzzle", - "version": "7.9.2", - "source": { - "type": "git", - "url": "https://github.com/guzzle/guzzle.git", - "reference": "d281ed313b989f213357e3be1a179f02196ac99b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/d281ed313b989f213357e3be1a179f02196ac99b", - "reference": "d281ed313b989f213357e3be1a179f02196ac99b", - "shasum": "" - }, - "require": { - "ext-json": "*", - "guzzlehttp/promises": "^1.5.3 || ^2.0.3", - "guzzlehttp/psr7": "^2.7.0", - "php": "^7.2.5 || ^8.0", - "psr/http-client": "^1.0", - "symfony/deprecation-contracts": "^2.2 || ^3.0" - }, - "provide": { - "psr/http-client-implementation": "1.0" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.2", - "ext-curl": "*", - "guzzle/client-integration-tests": "3.0.2", - "php-http/message-factory": "^1.1", - "phpunit/phpunit": "^8.5.39 || ^9.6.20", - "psr/log": "^1.1 || ^2.0 || ^3.0" - }, - "suggest": { - "ext-curl": "Required for CURL handler support", - "ext-intl": "Required for Internationalized Domain Name (IDN) support", - "psr/log": "Required for using the Log middleware" - }, - "type": "library", - "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false - } - }, - "autoload": { - "files": [ - "src/functions_include.php" - ], - "psr-4": { - "GuzzleHttp\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Jeremy Lindblom", - "email": "jeremeamia@gmail.com", - "homepage": "https://github.com/jeremeamia" - }, - { - "name": "George Mponos", - "email": "gmponos@gmail.com", - "homepage": "https://github.com/gmponos" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://github.com/sagikazarmark" - }, - { - "name": "Tobias Schultze", - "email": "webmaster@tubo-world.de", - "homepage": "https://github.com/Tobion" - } - ], - "description": "Guzzle is a PHP HTTP client library", - "keywords": [ - "client", - "curl", - "framework", - "http", - "http client", - "psr-18", - "psr-7", - "rest", - "web service" - ], - "support": { - "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.9.2" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://github.com/Nyholm", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", - "type": "tidelift" - } - ], - "time": "2024-07-24T11:22:20+00:00" - }, - { - "name": "guzzlehttp/promises", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/guzzle/promises.git", - "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/f9c436286ab2892c7db7be8c8da4ef61ccf7b455", - "reference": "f9c436286ab2892c7db7be8c8da4ef61ccf7b455", - "shasum": "" - }, - "require": { - "php": "^7.2.5 || ^8.0" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.39 || ^9.6.20" - }, - "type": "library", - "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Promise\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" - }, - { - "name": "Tobias Schultze", - "email": "webmaster@tubo-world.de", - "homepage": "https://github.com/Tobion" - } - ], - "description": "Guzzle promises library", - "keywords": [ - "promise" - ], - "support": { - "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/2.0.4" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://github.com/Nyholm", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", - "type": "tidelift" - } - ], - "time": "2024-10-17T10:06:22+00:00" - }, - { - "name": "guzzlehttp/psr7", - "version": "2.7.0", - "source": { - "type": "git", - "url": "https://github.com/guzzle/psr7.git", - "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/a70f5c95fb43bc83f07c9c948baa0dc1829bf201", - "reference": "a70f5c95fb43bc83f07c9c948baa0dc1829bf201", - "shasum": "" - }, - "require": { - "php": "^7.2.5 || ^8.0", - "psr/http-factory": "^1.0", - "psr/http-message": "^1.1 || ^2.0", - "ralouphie/getallheaders": "^3.0" - }, - "provide": { - "psr/http-factory-implementation": "1.0", - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.2", - "http-interop/http-factory-tests": "0.9.0", - "phpunit/phpunit": "^8.5.39 || ^9.6.20" - }, - "suggest": { - "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" - }, - "type": "library", - "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - }, - { - "name": "George Mponos", - "email": "gmponos@gmail.com", - "homepage": "https://github.com/gmponos" - }, - { - "name": "Tobias Nyholm", - "email": "tobias.nyholm@gmail.com", - "homepage": "https://github.com/Nyholm" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://github.com/sagikazarmark" - }, - { - "name": "Tobias Schultze", - "email": "webmaster@tubo-world.de", - "homepage": "https://github.com/Tobion" - }, - { - "name": "Márk Sági-Kazár", - "email": "mark.sagikazar@gmail.com", - "homepage": "https://sagikazarmark.hu" - } - ], - "description": "PSR-7 message implementation that also provides common utility methods", - "keywords": [ - "http", - "message", - "psr-7", - "request", - "response", - "stream", - "uri", - "url" - ], - "support": { - "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/2.7.0" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://github.com/Nyholm", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", - "type": "tidelift" - } - ], - "time": "2024-07-18T11:15:46+00:00" - }, - { - "name": "illuminate/collections", - "version": "v11.34.2", - "source": { - "type": "git", - "url": "https://github.com/illuminate/collections.git", - "reference": "fd2103ddc121449a7926fc34a9d220e5b88183c1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/collections/zipball/fd2103ddc121449a7926fc34a9d220e5b88183c1", - "reference": "fd2103ddc121449a7926fc34a9d220e5b88183c1", - "shasum": "" - }, - "require": { - "illuminate/conditionable": "^11.0", - "illuminate/contracts": "^11.0", - "illuminate/macroable": "^11.0", - "php": "^8.2" - }, - "suggest": { - "symfony/var-dumper": "Required to use the dump method (^7.0)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "11.x-dev" - } - }, - "autoload": { - "files": [ - "helpers.php" - ], - "psr-4": { - "Illuminate\\Support\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Collections package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2024-11-27T14:51:56+00:00" - }, - { - "name": "illuminate/conditionable", - "version": "v11.34.2", - "source": { - "type": "git", - "url": "https://github.com/illuminate/conditionable.git", - "reference": "911df1bda950a3b799cf80671764e34eede131c6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/conditionable/zipball/911df1bda950a3b799cf80671764e34eede131c6", - "reference": "911df1bda950a3b799cf80671764e34eede131c6", - "shasum": "" - }, - "require": { - "php": "^8.0.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "11.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Support\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Conditionable package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2024-11-21T16:28:56+00:00" - }, - { - "name": "illuminate/container", - "version": "v11.34.2", - "source": { - "type": "git", - "url": "https://github.com/illuminate/container.git", - "reference": "b057b0bbb38d7c7524df1ca5c38e7318f4c64d26" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/container/zipball/b057b0bbb38d7c7524df1ca5c38e7318f4c64d26", - "reference": "b057b0bbb38d7c7524df1ca5c38e7318f4c64d26", - "shasum": "" - }, - "require": { - "illuminate/contracts": "^11.0", - "php": "^8.2", - "psr/container": "^1.1.1|^2.0.1" - }, - "provide": { - "psr/container-implementation": "1.1|2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "11.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Container\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Container package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2024-11-21T20:07:31+00:00" - }, - { - "name": "illuminate/contracts", - "version": "v11.34.2", - "source": { - "type": "git", - "url": "https://github.com/illuminate/contracts.git", - "reference": "184317f701ba20ca265e36808ed54b75b115972d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/contracts/zipball/184317f701ba20ca265e36808ed54b75b115972d", - "reference": "184317f701ba20ca265e36808ed54b75b115972d", - "shasum": "" - }, - "require": { - "php": "^8.2", - "psr/container": "^1.1.1|^2.0.1", - "psr/simple-cache": "^1.0|^2.0|^3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "11.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Contracts\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Contracts package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2024-11-25T15:33:38+00:00" - }, - { - "name": "illuminate/database", - "version": "v11.21.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/database.git", - "reference": "9df2b37cf3cee3962b26f3598718dcb2631561a8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/database/zipball/9df2b37cf3cee3962b26f3598718dcb2631561a8", - "reference": "9df2b37cf3cee3962b26f3598718dcb2631561a8", - "shasum": "" - }, - "require": { - "brick/math": "^0.9.3|^0.10.2|^0.11|^0.12", - "ext-pdo": "*", - "illuminate/collections": "^11.0", - "illuminate/container": "^11.0", - "illuminate/contracts": "^11.0", - "illuminate/macroable": "^11.0", - "illuminate/support": "^11.0", - "php": "^8.2" - }, - "suggest": { - "ext-filter": "Required to use the Postgres database driver.", - "fakerphp/faker": "Required to use the eloquent factory builder (^1.21).", - "illuminate/console": "Required to use the database commands (^11.0).", - "illuminate/events": "Required to use the observers with Eloquent (^11.0).", - "illuminate/filesystem": "Required to use the migrations (^11.0).", - "illuminate/pagination": "Required to paginate the result set (^11.0).", - "symfony/finder": "Required to use Eloquent model factories (^7.0)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "11.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Database\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Database package.", - "homepage": "https://laravel.com", - "keywords": [ - "database", - "laravel", - "orm", - "sql" - ], - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2024-08-15T18:42:07+00:00" - }, - { - "name": "illuminate/filesystem", - "version": "v11.21.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/filesystem.git", - "reference": "43b8d2af61dd6ca882e192fa4ca803d2294d4507" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/filesystem/zipball/43b8d2af61dd6ca882e192fa4ca803d2294d4507", - "reference": "43b8d2af61dd6ca882e192fa4ca803d2294d4507", - "shasum": "" - }, - "require": { - "illuminate/collections": "^11.0", - "illuminate/contracts": "^11.0", - "illuminate/macroable": "^11.0", - "illuminate/support": "^11.0", - "php": "^8.2", - "symfony/finder": "^7.0" - }, - "suggest": { - "ext-fileinfo": "Required to use the Filesystem class.", - "ext-ftp": "Required to use the Flysystem FTP driver.", - "ext-hash": "Required to use the Filesystem class.", - "illuminate/http": "Required for handling uploaded files (^7.0).", - "league/flysystem": "Required to use the Flysystem local driver (^3.0.16).", - "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^3.0).", - "league/flysystem-ftp": "Required to use the Flysystem FTP driver (^3.0).", - "league/flysystem-sftp-v3": "Required to use the Flysystem SFTP driver (^3.0).", - "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", - "symfony/filesystem": "Required to enable support for relative symbolic links (^7.0).", - "symfony/mime": "Required to enable support for guessing extensions (^7.0)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "11.x-dev" - } - }, - "autoload": { - "files": [ - "functions.php" - ], - "psr-4": { - "Illuminate\\Filesystem\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Filesystem package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2024-06-28T20:10:30+00:00" - }, - { - "name": "illuminate/macroable", - "version": "v11.34.2", - "source": { - "type": "git", - "url": "https://github.com/illuminate/macroable.git", - "reference": "e1cb9e51b9ed5d3c9bc1ab431d0a52fe42a990ed" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/macroable/zipball/e1cb9e51b9ed5d3c9bc1ab431d0a52fe42a990ed", - "reference": "e1cb9e51b9ed5d3c9bc1ab431d0a52fe42a990ed", - "shasum": "" - }, - "require": { - "php": "^8.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "11.x-dev" - } - }, - "autoload": { - "psr-4": { - "Illuminate\\Support\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Macroable package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2024-06-28T20:10:30+00:00" - }, - { - "name": "illuminate/support", - "version": "v11.34.2", - "source": { - "type": "git", - "url": "https://github.com/illuminate/support.git", - "reference": "2b718a86571baed50fdc5d5748a846c2e58e07eb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/support/zipball/2b718a86571baed50fdc5d5748a846c2e58e07eb", - "reference": "2b718a86571baed50fdc5d5748a846c2e58e07eb", - "shasum": "" - }, - "require": { - "doctrine/inflector": "^2.0", - "ext-ctype": "*", - "ext-filter": "*", - "ext-mbstring": "*", - "illuminate/collections": "^11.0", - "illuminate/conditionable": "^11.0", - "illuminate/contracts": "^11.0", - "illuminate/macroable": "^11.0", - "nesbot/carbon": "^2.72.2|^3.4", - "php": "^8.2", - "voku/portable-ascii": "^2.0.2" - }, - "conflict": { - "tightenco/collect": "<5.5.33" - }, - "replace": { - "spatie/once": "*" - }, - "suggest": { - "illuminate/filesystem": "Required to use the composer class (^11.0).", - "laravel/serializable-closure": "Required to use the once function (^1.3).", - "league/commonmark": "Required to use Str::markdown() and Stringable::markdown() (^2.0.2).", - "ramsey/uuid": "Required to use Str::uuid() (^4.7).", - "symfony/process": "Required to use the composer class (^7.0).", - "symfony/uid": "Required to use Str::ulid() (^7.0).", - "symfony/var-dumper": "Required to use the dd function (^7.0).", - "vlucas/phpdotenv": "Required to use the Env class and env helper (^5.6.1)." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "11.x-dev" - } - }, - "autoload": { - "files": [ - "functions.php", - "helpers.php" - ], - "psr-4": { - "Illuminate\\Support\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylor@laravel.com" - } - ], - "description": "The Illuminate Support package.", - "homepage": "https://laravel.com", - "support": { - "issues": "https://github.com/laravel/framework/issues", - "source": "https://github.com/laravel/framework" - }, - "time": "2024-11-27T14:58:17+00:00" - }, - { - "name": "itguild/eloquent-table", - "version": "0.4.3", - "source": { - "type": "git", - "url": "https://git.itguild.info/ItGuild/eloquent_table", - "reference": "708045664c438fcc6d5a0edc935ba79ef8160fc6" - }, - "require": { - "itguild/tables": "^1.0" - }, - "require-dev": { - "illuminate/database": "^12.0@dev", - "illuminate/filesystem": "^12.0@dev", - "twbs/bootstrap": "dev-main", - "vlucas/phpdotenv": "^5.6@dev" - }, - "type": "library", - "autoload": { - "psr-4": { - "Itguild\\EloquentTable\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kavalar", - "email": "apuc06@mail.ru" - } - ], - "time": "2024-08-29T10:15:41+00:00" - }, - { - "name": "itguild/forms", - "version": "0.1.5", - "source": { - "type": "git", - "url": "https://git.itguild.info/ItGuild/forms_bundle.git", - "reference": "45e57367d3f9571fde2b82fa2fd8126469ba6db6" - }, - "require": { - "itguild/php-cg-select-v2": "^0.1.0", - "rakit/validation": "^1.4", - "twbs/bootstrap": "5.0.2", - "vlucas/phpdotenv": "^5.6" - }, - "type": "library", - "autoload": { - "psr-4": { - "itguild\\forms\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kavalar", - "email": "apuc06@mail.ru" - } - ], - "time": "2024-11-28T10:18:58+00:00" - }, - { - "name": "itguild/php-cg-select-v2", - "version": "v0.1", - "source": { - "type": "git", - "url": "https://git.itguild.info/apuc/php-cg-select-v2", - "reference": "30c7844d96efaaab35b125db533a064f2254e169" - }, - "type": "library", - "autoload": { - "psr-4": { - "Itguild\\PhpCgSelectV2\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "ISC" - ], - "authors": [ - { - "name": "Kavalar", - "email": "apuc06@mail.ru" - } - ], - "description": "Wrapper for CG-Select", - "time": "2023-06-07T22:35:51+00:00" - }, - { - "name": "itguild/tables", - "version": "1.0.9", - "source": { - "type": "git", - "url": "https://git.itguild.info/ItGuild/tables", - "reference": "5effacf12fd68d31181304562deb7331cf42c1db" - }, - "type": "library", - "autoload": { - "psr-4": { - "Itguild\\Tables\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Kavalar", - "email": "apuc06@mail.ru" - } - ], - "time": "2024-11-28T08:57:17+00:00" - }, - { - "name": "josantonius/session", - "version": "v2.0.9", - "source": { - "type": "git", - "url": "https://github.com/josantonius/php-session.git", - "reference": "1547efc7874e83cf720a3df57575d61b3dee107a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/josantonius/php-session/zipball/1547efc7874e83cf720a3df57575d61b3dee107a", - "reference": "1547efc7874e83cf720a3df57575d61b3dee107a", - "shasum": "" - }, - "require": { - "php": "^8.0" - }, - "require-dev": { - "phpmd/phpmd": "^2.12", - "phpunit/phpunit": "^9.5", - "squizlabs/php_codesniffer": "^3.7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-4": { - "Josantonius\\Session\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Josantonius", - "email": "hello@josantonius.dev", - "homepage": "https://josantonius.dev", - "role": "Developer" - } - ], - "description": "PHP library for handling sessions.", - "keywords": [ - "php", - "session" - ], - "support": { - "discussions": "https://github.com/josantonius/php-session/discussions", - "issues": "https://github.com/josantonius/php-session/issues", - "source": "https://github.com/josantonius/php-session" - }, - "funding": [ - { - "url": "https://github.com/Josantonius", - "type": "github" - } - ], - "time": "2024-05-20T09:12:44+00:00" - }, - { - "name": "k-adam/env-editor", - "version": "2.0.0", - "source": { - "type": "git", - "url": "https://github.com/K-Adam/php-env-editor.git", - "reference": "894855dff5df4e6fce3c83dd00941a19f99fc5d5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/K-Adam/php-env-editor/zipball/894855dff5df4e6fce3c83dd00941a19f99fc5d5", - "reference": "894855dff5df4e6fce3c83dd00941a19f99fc5d5", - "shasum": "" - }, - "require": { - "php": ">=8.0" - }, - "require-dev": { - "phpunit/phpunit": "9.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "EnvEditor\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Adam Kecskes", - "email": "kecskes.adam@outlook.com" - } - ], - "description": ".env editor library", - "keywords": [ - "dot-env", - "env", - "env-editor", - "env-loader", - "env-php", - "env-writer" - ], - "support": { - "issues": "https://github.com/K-Adam/php-env-editor/issues", - "source": "https://github.com/K-Adam/php-env-editor/tree/2.0.0" - }, - "time": "2022-06-05T11:17:23+00:00" - }, - { - "name": "madesimple/php-arrays", - "version": "v2.1.0", - "source": { - "type": "git", - "url": "https://github.com/pdscopes/php-arrays.git", - "reference": "e0b921ab295a965dbc125c33bdde864721c59f08" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/pdscopes/php-arrays/zipball/e0b921ab295a965dbc125c33bdde864721c59f08", - "reference": "e0b921ab295a965dbc125c33bdde864721c59f08", - "shasum": "" - }, - "require": { - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "^9.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "MadeSimple\\Arrays\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Peter Scopes", - "email": "peter.scopes@gmail.com" - } - ], - "description": "Helper functions for manipulating arrays", - "support": { - "issues": "https://github.com/pdscopes/php-arrays/issues", - "source": "https://github.com/pdscopes/php-arrays/tree/v2.1.0" - }, - "time": "2022-02-25T14:48:55+00:00" - }, - { - "name": "madesimple/php-form-validator", - "version": "v2.9.0", - "source": { - "type": "git", - "url": "https://github.com/pdscopes/php-form-validator.git", - "reference": "d41665ab5cf7f028ab1eae204ab9f2f72dfeab5a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/pdscopes/php-form-validator/zipball/d41665ab5cf7f028ab1eae204ab9f2f72dfeab5a", - "reference": "d41665ab5cf7f028ab1eae204ab9f2f72dfeab5a", - "shasum": "" - }, - "require": { - "madesimple/php-arrays": "^2.0", - "php": ">=7.1" - }, - "require-dev": { - "phpunit/phpunit": "^9.5" - }, - "type": "library", - "autoload": { - "psr-4": { - "MadeSimple\\Validator\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Peter Scopes", - "email": "peter.scopes@gmail.com" - } - ], - "description": "Simple, extendable form validator for multi-dimensional forms", - "support": { - "issues": "https://github.com/pdscopes/php-form-validator/issues", - "source": "https://github.com/pdscopes/php-form-validator/tree/v2.9.0" - }, - "time": "2022-07-09T12:08:20+00:00" - }, - { - "name": "nesbot/carbon", - "version": "3.8.2", - "source": { - "type": "git", - "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "e1268cdbc486d97ce23fef2c666dc3c6b6de9947" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/e1268cdbc486d97ce23fef2c666dc3c6b6de9947", - "reference": "e1268cdbc486d97ce23fef2c666dc3c6b6de9947", - "shasum": "" - }, - "require": { - "carbonphp/carbon-doctrine-types": "<100.0", - "ext-json": "*", - "php": "^8.1", - "psr/clock": "^1.0", - "symfony/clock": "^6.3 || ^7.0", - "symfony/polyfill-mbstring": "^1.0", - "symfony/translation": "^4.4.18 || ^5.2.1|| ^6.0 || ^7.0" - }, - "provide": { - "psr/clock-implementation": "1.0" - }, - "require-dev": { - "doctrine/dbal": "^3.6.3 || ^4.0", - "doctrine/orm": "^2.15.2 || ^3.0", - "friendsofphp/php-cs-fixer": "^3.57.2", - "kylekatarnls/multi-tester": "^2.5.3", - "ondrejmirtes/better-reflection": "^6.25.0.4", - "phpmd/phpmd": "^2.15.0", - "phpstan/extension-installer": "^1.3.1", - "phpstan/phpstan": "^1.11.2", - "phpunit/phpunit": "^10.5.20", - "squizlabs/php_codesniffer": "^3.9.0" - }, - "bin": [ - "bin/carbon" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.x-dev", - "dev-2.x": "2.x-dev" - }, - "laravel": { - "providers": [ - "Carbon\\Laravel\\ServiceProvider" - ] - }, - "phpstan": { - "includes": [ - "extension.neon" - ] - } - }, - "autoload": { - "psr-4": { - "Carbon\\": "src/Carbon/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Brian Nesbitt", - "email": "brian@nesbot.com", - "homepage": "https://markido.com" - }, - { - "name": "kylekatarnls", - "homepage": "https://github.com/kylekatarnls" - } - ], - "description": "An API extension for DateTime that supports 281 different languages.", - "homepage": "https://carbon.nesbot.com", - "keywords": [ - "date", - "datetime", - "time" - ], - "support": { - "docs": "https://carbon.nesbot.com/docs", - "issues": "https://github.com/briannesbitt/Carbon/issues", - "source": "https://github.com/briannesbitt/Carbon" - }, - "funding": [ - { - "url": "https://github.com/sponsors/kylekatarnls", - "type": "github" - }, - { - "url": "https://opencollective.com/Carbon#sponsor", - "type": "opencollective" - }, - { - "url": "https://tidelift.com/subscription/pkg/packagist-nesbot-carbon?utm_source=packagist-nesbot-carbon&utm_medium=referral&utm_campaign=readme", - "type": "tidelift" - } - ], - "time": "2024-11-07T17:46:48+00:00" - }, - { - "name": "phpmailer/phpmailer", - "version": "v6.9.3", - "source": { - "type": "git", - "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "2f5c94fe7493efc213f643c23b1b1c249d40f47e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/2f5c94fe7493efc213f643c23b1b1c249d40f47e", - "reference": "2f5c94fe7493efc213f643c23b1b1c249d40f47e", - "shasum": "" - }, - "require": { - "ext-ctype": "*", - "ext-filter": "*", - "ext-hash": "*", - "php": ">=5.5.0" - }, - "require-dev": { - "dealerdirect/phpcodesniffer-composer-installer": "^1.0", - "doctrine/annotations": "^1.2.6 || ^1.13.3", - "php-parallel-lint/php-console-highlighter": "^1.0.0", - "php-parallel-lint/php-parallel-lint": "^1.3.2", - "phpcompatibility/php-compatibility": "^9.3.5", - "roave/security-advisories": "dev-latest", - "squizlabs/php_codesniffer": "^3.7.2", - "yoast/phpunit-polyfills": "^1.0.4" - }, - "suggest": { - "decomplexity/SendOauth2": "Adapter for using XOAUTH2 authentication", - "ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses", - "ext-openssl": "Needed for secure SMTP sending and DKIM signing", - "greew/oauth2-azure-provider": "Needed for Microsoft Azure XOAUTH2 authentication", - "hayageek/oauth2-yahoo": "Needed for Yahoo XOAUTH2 authentication", - "league/oauth2-google": "Needed for Google XOAUTH2 authentication", - "psr/log": "For optional PSR-3 debug logging", - "symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)", - "thenetworg/oauth2-azure": "Needed for Microsoft XOAUTH2 authentication" - }, - "type": "library", - "autoload": { - "psr-4": { - "PHPMailer\\PHPMailer\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-2.1-only" - ], - "authors": [ - { - "name": "Marcus Bointon", - "email": "phpmailer@synchromedia.co.uk" - }, - { - "name": "Jim Jagielski", - "email": "jimjag@gmail.com" - }, - { - "name": "Andy Prevost", - "email": "codeworxtech@users.sourceforge.net" - }, - { - "name": "Brent R. Matzelle" - } - ], - "description": "PHPMailer is a full-featured email creation and transfer class for PHP", - "support": { - "issues": "https://github.com/PHPMailer/PHPMailer/issues", - "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.9.3" - }, - "funding": [ - { - "url": "https://github.com/Synchro", - "type": "github" - } - ], - "time": "2024-11-24T18:04:13+00:00" - }, - { - "name": "phpoption/phpoption", - "version": "1.9.3", - "source": { - "type": "git", - "url": "https://github.com/schmittjoh/php-option.git", - "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/e3fac8b24f56113f7cb96af14958c0dd16330f54", - "reference": "e3fac8b24f56113f7cb96af14958c0dd16330f54", - "shasum": "" - }, - "require": { - "php": "^7.2.5 || ^8.0" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.2", - "phpunit/phpunit": "^8.5.39 || ^9.6.20 || ^10.5.28" - }, - "type": "library", - "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false - }, - "branch-alias": { - "dev-master": "1.9-dev" - } - }, - "autoload": { - "psr-4": { - "PhpOption\\": "src/PhpOption/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com", - "homepage": "https://github.com/schmittjoh" - }, - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - } - ], - "description": "Option Type for PHP", - "keywords": [ - "language", - "option", - "php", - "type" - ], - "support": { - "issues": "https://github.com/schmittjoh/php-option/issues", - "source": "https://github.com/schmittjoh/php-option/tree/1.9.3" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption", - "type": "tidelift" - } - ], - "time": "2024-07-20T21:41:07+00:00" - }, - { - "name": "psr/clock", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/clock.git", - "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/clock/zipball/e41a24703d4560fd0acb709162f73b8adfc3aa0d", - "reference": "e41a24703d4560fd0acb709162f73b8adfc3aa0d", - "shasum": "" - }, - "require": { - "php": "^7.0 || ^8.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Psr\\Clock\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for reading the clock.", - "homepage": "https://github.com/php-fig/clock", - "keywords": [ - "clock", - "now", - "psr", - "psr-20", - "time" - ], - "support": { - "issues": "https://github.com/php-fig/clock/issues", - "source": "https://github.com/php-fig/clock/tree/1.0.0" - }, - "time": "2022-11-25T14:36:26+00:00" - }, - { - "name": "psr/container", - "version": "2.0.2", - "source": { - "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", - "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", - "shasum": "" - }, - "require": { - "php": ">=7.4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Container\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", - "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" - ], - "support": { - "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/2.0.2" - }, - "time": "2021-11-05T16:47:00+00:00" - }, - { - "name": "psr/http-client", - "version": "1.0.3", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-client.git", - "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-client/zipball/bb5906edc1c324c9a05aa0873d40117941e5fa90", - "reference": "bb5906edc1c324c9a05aa0873d40117941e5fa90", - "shasum": "" - }, - "require": { - "php": "^7.0 || ^8.0", - "psr/http-message": "^1.0 || ^2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Client\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP clients", - "homepage": "https://github.com/php-fig/http-client", - "keywords": [ - "http", - "http-client", - "psr", - "psr-18" - ], - "support": { - "source": "https://github.com/php-fig/http-client" - }, - "time": "2023-09-23T14:17:50+00:00" - }, - { - "name": "psr/http-factory", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-factory.git", - "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-factory/zipball/2b4765fddfe3b508ac62f829e852b1501d3f6e8a", - "reference": "2b4765fddfe3b508ac62f829e852b1501d3f6e8a", - "shasum": "" - }, - "require": { - "php": ">=7.1", - "psr/http-message": "^1.0 || ^2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "PSR-17: Common interfaces for PSR-7 HTTP message factories", - "keywords": [ - "factory", - "http", - "message", - "psr", - "psr-17", - "psr-7", - "request", - "response" - ], - "support": { - "source": "https://github.com/php-fig/http-factory" - }, - "time": "2024-04-15T12:06:14+00:00" - }, - { - "name": "psr/http-message", - "version": "2.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/http-message.git", - "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/http-message/zipball/402d35bcb92c70c026d1a6a9883f06b2ead23d71", - "reference": "402d35bcb92c70c026d1a6a9883f06b2ead23d71", - "shasum": "" - }, - "require": { - "php": "^7.2 || ^8.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Http\\Message\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interface for HTTP messages", - "homepage": "https://github.com/php-fig/http-message", - "keywords": [ - "http", - "http-message", - "psr", - "psr-7", - "request", - "response" - ], - "support": { - "source": "https://github.com/php-fig/http-message/tree/2.0" - }, - "time": "2023-04-04T09:54:51+00:00" - }, - { - "name": "psr/simple-cache", - "version": "3.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/simple-cache.git", - "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/764e0b3939f5ca87cb904f570ef9be2d78a07865", - "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865", - "shasum": "" - }, - "require": { - "php": ">=8.0.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "3.0.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\SimpleCache\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "https://www.php-fig.org/" - } - ], - "description": "Common interfaces for simple caching", - "keywords": [ - "cache", - "caching", - "psr", - "psr-16", - "simple-cache" - ], - "support": { - "source": "https://github.com/php-fig/simple-cache/tree/3.0.0" - }, - "time": "2021-10-29T13:26:27+00:00" - }, - { - "name": "rakit/validation", - "version": "v1.4.0", - "source": { - "type": "git", - "url": "https://github.com/rakit/validation.git", - "reference": "ff003a35cdf5030a5f2482299f4c93f344a35b29" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/rakit/validation/zipball/ff003a35cdf5030a5f2482299f4c93f344a35b29", - "reference": "ff003a35cdf5030a5f2482299f4c93f344a35b29", - "shasum": "" - }, - "require": { - "ext-mbstring": "*", - "php": ">=7.0" - }, - "require-dev": { - "php-coveralls/php-coveralls": "^2.2", - "phpunit/phpunit": "^6.5", - "squizlabs/php_codesniffer": "^3" - }, - "type": "library", - "autoload": { - "psr-4": { - "Rakit\\Validation\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Muhammad Syifa", - "email": "emsifa@gmail.com" - } - ], - "description": "PHP Laravel like standalone validation library", - "support": { - "issues": "https://github.com/rakit/validation/issues", - "source": "https://github.com/rakit/validation/tree/v1.4.0" - }, - "time": "2020-08-27T05:07:01+00:00" - }, - { - "name": "ralouphie/getallheaders", - "version": "3.0.3", - "source": { - "type": "git", - "url": "https://github.com/ralouphie/getallheaders.git", - "reference": "120b605dfeb996808c31b6477290a714d356e822" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", - "reference": "120b605dfeb996808c31b6477290a714d356e822", - "shasum": "" - }, - "require": { - "php": ">=5.6" - }, - "require-dev": { - "php-coveralls/php-coveralls": "^2.1", - "phpunit/phpunit": "^5 || ^6.5" - }, - "type": "library", - "autoload": { - "files": [ - "src/getallheaders.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ralph Khattar", - "email": "ralph.khattar@gmail.com" - } - ], - "description": "A polyfill for getallheaders.", - "support": { - "issues": "https://github.com/ralouphie/getallheaders/issues", - "source": "https://github.com/ralouphie/getallheaders/tree/develop" - }, - "time": "2019-03-08T08:55:37+00:00" - }, - { - "name": "samejack/php-argv", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/samejack/php-argv.git", - "reference": "0551f0f7fd38a5e9dcb316d5cc9028cdd62b21ac" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/samejack/php-argv/zipball/0551f0f7fd38a5e9dcb316d5cc9028cdd62b21ac", - "reference": "0551f0f7fd38a5e9dcb316d5cc9028cdd62b21ac", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "php-coveralls/php-coveralls": "*@stable", - "phpunit/phpunit": "~4.8|~5.7", - "squizlabs/php_codesniffer": "*@stable" - }, - "default-branch": true, - "type": "library", - "autoload": { - "psr-4": { - "samejack\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "SJ", - "email": "sj@toright.com", - "homepage": "http://blog.toright.com", - "role": "Developer" - } - ], - "description": "PHP CLI arguments parse.", - "homepage": "https://github.com/samejack/php-argv", - "keywords": [ - "cli", - "php" - ], - "support": { - "issues": "https://github.com/samejack/php-argv/issues", - "source": "https://github.com/samejack/php-argv/tree/1.0.3" - }, - "time": "2020-07-15T12:28:03+00:00" - }, - { - "name": "symfony/clock", - "version": "v7.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/clock.git", - "reference": "b81435fbd6648ea425d1ee96a2d8e68f4ceacd24" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/clock/zipball/b81435fbd6648ea425d1ee96a2d8e68f4ceacd24", - "reference": "b81435fbd6648ea425d1ee96a2d8e68f4ceacd24", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "psr/clock": "^1.0", - "symfony/polyfill-php83": "^1.28" - }, - "provide": { - "psr/clock-implementation": "1.0" - }, - "type": "library", - "autoload": { - "files": [ - "Resources/now.php" - ], - "psr-4": { - "Symfony\\Component\\Clock\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] - }, - "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": "Decouples applications from the system clock", - "homepage": "https://symfony.com", - "keywords": [ - "clock", - "psr20", - "time" - ], - "support": { - "source": "https://github.com/symfony/clock/tree/v7.2.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-25T14:21:43+00:00" - }, - { - "name": "symfony/deprecation-contracts", - "version": "v3.5.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", - "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", - "shasum": "" - }, - "require": { - "php": ">=8.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "files": [ - "function.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": "A generic function and convention to trigger deprecation notices", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-25T14:20:29+00:00" - }, - { - "name": "symfony/finder", - "version": "v7.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "6de263e5868b9a137602dd1e33e4d48bfae99c49" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/6de263e5868b9a137602dd1e33e4d48bfae99c49", - "reference": "6de263e5868b9a137602dd1e33e4d48bfae99c49", - "shasum": "" - }, - "require": { - "php": ">=8.2" - }, - "require-dev": { - "symfony/filesystem": "^6.4|^7.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - }, - "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": "Finds files and directories via an intuitive fluent interface", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/finder/tree/v7.2.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-10-23T06:56:12+00:00" - }, - { - "name": "symfony/polyfill-ctype", - "version": "v1.31.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/a3cc8b044a6ea513310cbd48ef7333b384945638", - "reference": "a3cc8b044a6ea513310cbd48ef7333b384945638", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "provide": { - "ext-ctype": "*" - }, - "suggest": { - "ext-ctype": "For best performance" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Ctype\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Gert de Pagter", - "email": "BackEndTea@gmail.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for ctype functions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "ctype", - "polyfill", - "portable" - ], - "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.31.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-09T11:45:10+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.31.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", - "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "provide": { - "ext-mbstring": "*" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - } - }, - "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 for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-09T11:45:10+00:00" - }, - { - "name": "symfony/polyfill-php80", - "version": "v1.31.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", - "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-09T11:45:10+00:00" - }, - { - "name": "symfony/polyfill-php81", - "version": "v1.31.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", - "reference": "4a4cfc2d253c21a5ad0e53071df248ed48c6ce5c", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php81\\": "" - }, - "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 8.1+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.31.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-09T11:45:10+00:00" - }, - { - "name": "symfony/polyfill-php83", - "version": "v1.31.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php83.git", - "reference": "2fb86d65e2d424369ad2905e83b236a8805ba491" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/2fb86d65e2d424369ad2905e83b236a8805ba491", - "reference": "2fb86d65e2d424369ad2905e83b236a8805ba491", - "shasum": "" - }, - "require": { - "php": ">=7.2" - }, - "type": "library", - "extra": { - "thanks": { - "url": "https://github.com/symfony/polyfill", - "name": "symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php83\\": "" - }, - "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 8.3+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-php83/tree/v1.31.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-09T11:45:10+00:00" - }, - { - "name": "symfony/translation", - "version": "v7.2.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/translation.git", - "reference": "dc89e16b44048ceecc879054e5b7f38326ab6cc5" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/dc89e16b44048ceecc879054e5b7f38326ab6cc5", - "reference": "dc89e16b44048ceecc879054e5b7f38326ab6cc5", - "shasum": "" - }, - "require": { - "php": ">=8.2", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/polyfill-mbstring": "~1.0", - "symfony/translation-contracts": "^2.5|^3.0" - }, - "conflict": { - "symfony/config": "<6.4", - "symfony/console": "<6.4", - "symfony/dependency-injection": "<6.4", - "symfony/http-client-contracts": "<2.5", - "symfony/http-kernel": "<6.4", - "symfony/service-contracts": "<2.5", - "symfony/twig-bundle": "<6.4", - "symfony/yaml": "<6.4" - }, - "provide": { - "symfony/translation-implementation": "2.3|3.0" - }, - "require-dev": { - "nikic/php-parser": "^4.18|^5.0", - "psr/log": "^1|^2|^3", - "symfony/config": "^6.4|^7.0", - "symfony/console": "^6.4|^7.0", - "symfony/dependency-injection": "^6.4|^7.0", - "symfony/finder": "^6.4|^7.0", - "symfony/http-client-contracts": "^2.5|^3.0", - "symfony/http-kernel": "^6.4|^7.0", - "symfony/intl": "^6.4|^7.0", - "symfony/polyfill-intl-icu": "^1.21", - "symfony/routing": "^6.4|^7.0", - "symfony/service-contracts": "^2.5|^3", - "symfony/yaml": "^6.4|^7.0" - }, - "type": "library", - "autoload": { - "files": [ - "Resources/functions.php" - ], - "psr-4": { - "Symfony\\Component\\Translation\\": "" - }, - "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": "Provides tools to internationalize your application", - "homepage": "https://symfony.com", - "support": { - "source": "https://github.com/symfony/translation/tree/v7.2.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-11-12T20:47:56+00:00" - }, - { - "name": "symfony/translation-contracts", - "version": "v3.5.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/translation-contracts.git", - "reference": "4667ff3bd513750603a09c8dedbea942487fb07c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/4667ff3bd513750603a09c8dedbea942487fb07c", - "reference": "4667ff3bd513750603a09c8dedbea942487fb07c", - "shasum": "" - }, - "require": { - "php": ">=8.1" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "3.5-dev" - }, - "thanks": { - "name": "symfony/contracts", - "url": "https://github.com/symfony/contracts" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Contracts\\Translation\\": "" - }, - "exclude-from-classmap": [ - "/Test/" - ] - }, - "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 translation", - "homepage": "https://symfony.com", - "keywords": [ - "abstractions", - "contracts", - "decoupling", - "interfaces", - "interoperability", - "standards" - ], - "support": { - "source": "https://github.com/symfony/translation-contracts/tree/v3.5.1" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2024-09-25T14:20:29+00:00" - }, - { - "name": "twbs/bootstrap", - "version": "v5.0.2", - "source": { - "type": "git", - "url": "https://github.com/twbs/bootstrap.git", - "reference": "688bce4fa695cc360a0d084e34f029b0c192b223" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/twbs/bootstrap/zipball/688bce4fa695cc360a0d084e34f029b0c192b223", - "reference": "688bce4fa695cc360a0d084e34f029b0c192b223", - "shasum": "" - }, - "replace": { - "twitter/bootstrap": "self.version" - }, - "type": "library", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mark Otto", - "email": "markdotto@gmail.com" - }, - { - "name": "Jacob Thornton", - "email": "jacobthornton@gmail.com" - } - ], - "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.", - "homepage": "https://getbootstrap.com/", - "keywords": [ - "JS", - "css", - "framework", - "front-end", - "mobile-first", - "responsive", - "sass", - "web" - ], - "support": { - "issues": "https://github.com/twbs/bootstrap/issues", - "source": "https://github.com/twbs/bootstrap/tree/v5.0.2" - }, - "time": "2021-06-22T18:29:16+00:00" - }, - { - "name": "twig/twig", - "version": "v3.16.0", - "source": { - "type": "git", - "url": "https://github.com/twigphp/Twig.git", - "reference": "475ad2dc97d65d8631393e721e7e44fb544f0561" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/475ad2dc97d65d8631393e721e7e44fb544f0561", - "reference": "475ad2dc97d65d8631393e721e7e44fb544f0561", - "shasum": "" - }, - "require": { - "php": ">=8.0.2", - "symfony/deprecation-contracts": "^2.5|^3", - "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-mbstring": "^1.3", - "symfony/polyfill-php81": "^1.29" - }, - "require-dev": { - "phpstan/phpstan": "^2.0", - "psr/container": "^1.0|^2.0", - "symfony/phpunit-bridge": "^5.4.9|^6.4|^7.0" - }, - "type": "library", - "autoload": { - "files": [ - "src/Resources/core.php", - "src/Resources/debug.php", - "src/Resources/escaper.php", - "src/Resources/string_loader.php" - ], - "psr-4": { - "Twig\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, - { - "name": "Twig Team", - "role": "Contributors" - }, - { - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "role": "Project Founder" - } - ], - "description": "Twig, the flexible, fast, and secure template language for PHP", - "homepage": "https://twig.symfony.com", - "keywords": [ - "templating" - ], - "support": { - "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.16.0" - }, - "funding": [ - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/twig/twig", - "type": "tidelift" - } - ], - "time": "2024-11-29T08:27:05+00:00" - }, - { - "name": "vlucas/phpdotenv", - "version": "v5.6.1", - "source": { - "type": "git", - "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/a59a13791077fe3d44f90e7133eb68e7d22eaff2", - "reference": "a59a13791077fe3d44f90e7133eb68e7d22eaff2", - "shasum": "" - }, - "require": { - "ext-pcre": "*", - "graham-campbell/result-type": "^1.1.3", - "php": "^7.2.5 || ^8.0", - "phpoption/phpoption": "^1.9.3", - "symfony/polyfill-ctype": "^1.24", - "symfony/polyfill-mbstring": "^1.24", - "symfony/polyfill-php80": "^1.24" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.8.2", - "ext-filter": "*", - "phpunit/phpunit": "^8.5.34 || ^9.6.13 || ^10.4.2" - }, - "suggest": { - "ext-filter": "Required to use the boolean validator." - }, - "type": "library", - "extra": { - "bamarni-bin": { - "bin-links": true, - "forward-command": false - }, - "branch-alias": { - "dev-master": "5.6-dev" - } - }, - "autoload": { - "psr-4": { - "Dotenv\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Graham Campbell", - "email": "hello@gjcampbell.co.uk", - "homepage": "https://github.com/GrahamCampbell" - }, - { - "name": "Vance Lucas", - "email": "vance@vancelucas.com", - "homepage": "https://github.com/vlucas" - } - ], - "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", - "keywords": [ - "dotenv", - "env", - "environment" - ], - "support": { - "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v5.6.1" - }, - "funding": [ - { - "url": "https://github.com/GrahamCampbell", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv", - "type": "tidelift" - } - ], - "time": "2024-07-20T21:52:34+00:00" - }, - { - "name": "voku/portable-ascii", - "version": "2.0.3", - "source": { - "type": "git", - "url": "https://github.com/voku/portable-ascii.git", - "reference": "b1d923f88091c6bf09699efcd7c8a1b1bfd7351d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/voku/portable-ascii/zipball/b1d923f88091c6bf09699efcd7c8a1b1bfd7351d", - "reference": "b1d923f88091c6bf09699efcd7c8a1b1bfd7351d", - "shasum": "" - }, - "require": { - "php": ">=7.0.0" - }, - "require-dev": { - "phpunit/phpunit": "~6.0 || ~7.0 || ~9.0" - }, - "suggest": { - "ext-intl": "Use Intl for transliterator_transliterate() support" - }, - "type": "library", - "autoload": { - "psr-4": { - "voku\\": "src/voku/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Lars Moelleken", - "homepage": "https://www.moelleken.org/" - } - ], - "description": "Portable ASCII library - performance optimized (ascii) string functions for php.", - "homepage": "https://github.com/voku/portable-ascii", - "keywords": [ - "ascii", - "clean", - "php" - ], - "support": { - "issues": "https://github.com/voku/portable-ascii/issues", - "source": "https://github.com/voku/portable-ascii/tree/2.0.3" - }, - "funding": [ - { - "url": "https://www.paypal.me/moelleken", - "type": "custom" - }, - { - "url": "https://github.com/voku", - "type": "github" - }, - { - "url": "https://opencollective.com/portable-ascii", - "type": "open_collective" - }, - { - "url": "https://www.patreon.com/voku", - "type": "patreon" - }, - { - "url": "https://tidelift.com/funding/github/packagist/voku/portable-ascii", - "type": "tidelift" - } - ], - "time": "2024-11-21T01:49:47+00:00" - } - ], - "packages-dev": [], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": { - "samejack/php-argv": 20 - }, - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "ext-zip": "*" - }, - "platform-dev": [], - "plugin-api-version": "2.6.0" -} diff --git a/kernel/CgRouteCollector.php b/kernel/CgRouteCollector.php index 6c3b6d5..f7bbd49 100644 --- a/kernel/CgRouteCollector.php +++ b/kernel/CgRouteCollector.php @@ -46,8 +46,16 @@ class CgRouteCollector extends RouteCollector //TODO } - public function console($route, $handler, array $filters = []): void + /** + * @param $route + * @param $handler + * @param array $filters + * @param array $additionalInfo + * @return void + */ + public function console($route, $handler, array $filters = [], array $additionalInfo = []): void { - $this->addRoute(Route::GET, $route, $handler, $filters); + $additionalInfo['type'] = "console"; + $this->addRoute(Route::GET, $route, $handler, $filters, $additionalInfo); } } \ No newline at end of file diff --git a/kernel/CgView.php b/kernel/CgView.php index 792c540..5934f82 100644 --- a/kernel/CgView.php +++ b/kernel/CgView.php @@ -10,6 +10,8 @@ class CgView public array $varToLayout = []; public bool|string $layout = false; + protected array $metaArr = []; + public function __construct() { @@ -34,14 +36,37 @@ class CgView $this->varToLayout[$key] = $value; } - private function createContent(string $view, array $data = []): false|string + public function setTitle(string $title): void + { + $this->addVarToLayout('title', $title); + } + + public function setMeta(array $meta): void + { + foreach ($meta as $key => $value){ + $this->metaArr[$key] = $value; + } + } + + public function getMeta(): string + { + $meta = ""; + foreach ($this->metaArr as $key => $value){ + $meta .= ""; + } + + return $meta; + } + + private function createContent(string $viewFile, array $data = []): false|string { ob_start(); + $view = $this; foreach ($data as $key => $datum) { ${"$key"} = $datum; } - include($this->viewPath . $view); + include($this->viewPath . $viewFile); $content = ob_get_contents(); ob_end_clean(); @@ -50,6 +75,10 @@ class CgView $file_content = $content; + if (!isset($title)){ + $title = "No Title"; + } + $layoutPath = $this->viewPath; if ($this->layout) { diff --git a/kernel/admin_themes/default/layout/main.php b/kernel/admin_themes/default/layout/main.php index 5864fb1..db00106 100644 --- a/kernel/admin_themes/default/layout/main.php +++ b/kernel/admin_themes/default/layout/main.php @@ -2,15 +2,18 @@ /** * @var $content * @var string $resources + * @var string $title + * @var \kernel\CgView $view */ \Josantonius\Session\Facades\Session::start(); ?> - Sidebar 01 + <?= $title ?> + getMeta() ?> diff --git a/kernel/app_modules/slider/controllers/SliderRestController.php b/kernel/app_modules/slider/controllers/SliderRestController.php new file mode 100644 index 0000000..7216184 --- /dev/null +++ b/kernel/app_modules/slider/controllers/SliderRestController.php @@ -0,0 +1,10 @@ +get($string, $foreground_color, $background_color) . "\n"; } + public function inLine($string, $foreground_color = null, $background_color = null): void + { + echo $this->get($string, $foreground_color, $background_color) ; + } + // Returns all foreground color names public function getForegroundColors() { @@ -75,4 +82,16 @@ class Out { return array_keys($this->background_colors); } + +// public function printHeaderTable(): void +// { +// echo "\n+-----------------------------+-----------------------------+-----------------------------+-----------------------------+\n"; +// printf("%-30s", "| Routs"); +// printf("%-30s", "| Description"); +// printf("%-30s", "| Params"); +// printf("%-30s", "| Params description"); +// printf("%-30s", "|"); +// echo "\n+-----------------------------+-----------------------------+-----------------------------+-----------------------------+\n"; +// } + } \ No newline at end of file diff --git a/kernel/console/controllers/KernelController.php b/kernel/console/controllers/KernelController.php index 147d84f..13efa75 100644 --- a/kernel/console/controllers/KernelController.php +++ b/kernel/console/controllers/KernelController.php @@ -27,7 +27,7 @@ class KernelController extends ConsoleController if (file_exists(ROOT_DIR . $this->argv['path'])) { $tmpKernelDirFull = RESOURCES_DIR . '/tmp/ad/kernel/kernel'; - $this->files->copy_folder(KERNEL_DIR, $tmpKernelDirFull); + $this->files->copy_folder(ROOT_DIR . $this->argv['path'], $tmpKernelDirFull); $this->out->r("Ядро скопировано во временную папку", 'green'); } else { $this->out->r("Ядро не найдено", 'red'); @@ -65,11 +65,19 @@ class KernelController extends ConsoleController $this->out->r("/composer.json не найден", 'red'); } - if (!is_dir(RESOURCES_DIR . '/tmp/app')) { - mkdir(RESOURCES_DIR . '/tmp/app'); + if (!is_dir(RESOURCES_DIR . '/tmp/kernel')) { + mkdir(RESOURCES_DIR . '/tmp/kernel'); + } + + if (file_exists(KERNEL_DIR . '/manifest.json')) { + $manifest = json_decode(file_get_contents(KERNEL_DIR . '/manifest.json'), true); + $version = $manifest['version'] ?? ''; + $this->files->pack(RESOURCES_DIR . '/tmp/ad/kernel/', RESOURCES_DIR . '/tmp/kernel/kernel_v' . $version . '.igk'); + } + else { + $this->files->pack(RESOURCES_DIR . '/tmp/ad/kernel/', RESOURCES_DIR . '/tmp/kernel/kernel.igk'); } - $this->files->pack(RESOURCES_DIR . '/tmp/ad/kernel/', RESOURCES_DIR . '/tmp/kernel/kernel.igk'); $this->files->recursiveRemoveDir(RESOURCES_DIR . '/tmp/ad/kernel/'); } diff --git a/kernel/console/controllers/MainController.php b/kernel/console/controllers/MainController.php index eecee1d..31a55bf 100644 --- a/kernel/console/controllers/MainController.php +++ b/kernel/console/controllers/MainController.php @@ -2,7 +2,9 @@ namespace kernel\console\controllers; +use kernel\App; use kernel\console\ConsoleController; +use kernel\helpers\Debug; class MainController extends ConsoleController { @@ -12,4 +14,25 @@ class MainController extends ConsoleController $this->out->r("Привет", "green"); } + public function actionHelp(): void + { + $routs = App::$collector->getData()->getStaticRoutes(); + foreach ($routs as $rout => $data){ + $additionalInfo = $data['GET'][3]; + if (isset($additionalInfo['description']) and $additionalInfo['type'] === "console"){ + $this->out->inLine($rout . " - ", "green"); + $this->out->inLine($additionalInfo['description'], 'yellow'); + $this->out->r(""); + if (isset($additionalInfo['params'])){ + foreach ($additionalInfo['params'] as $key => $param){ + $this->out->inLine($key . " - ", "green"); + $this->out->inLine($param, 'yellow'); + $this->out->r(""); + } + } + $this->out->r(""); + } + } + } + } \ No newline at end of file diff --git a/kernel/console/controllers/ModuleController.php b/kernel/console/controllers/ModuleController.php index db59f58..2898770 100644 --- a/kernel/console/controllers/ModuleController.php +++ b/kernel/console/controllers/ModuleController.php @@ -90,4 +90,33 @@ class ModuleController extends ConsoleController } } + public function actionConstructModule(): void + { + $this->out->r("Введите slug модуля:", 'yellow'); + $slug = substr(fgets(STDIN), 0, -1); + $slug = strtolower($slug); + + $this->out->r("Введите название модуля:", 'yellow'); + $name = substr(fgets(STDIN), 0, -1); + + $this->out->r("Введите автора модуля:", 'yellow'); + $author = substr(fgets(STDIN), 0, -1); + + $this->out->r("Введите название пунтка меню для модуля:", 'yellow'); + $label = substr(fgets(STDIN), 0, -1); + + $moduleService = new ModuleService(); + $moduleService->createDirs($slug); + + $moduleService->createModuleByParams([ + 'slug' => $slug, + 'model' => ucfirst($slug), + 'author' => $author, + 'name' => $name, + 'label' => $label, + ]); + + $this->out->r("Модуль $slug создан", 'green'); + } + } \ No newline at end of file diff --git a/kernel/console/migrations/stubs/migration.stub b/kernel/console/migrations/stubs/migration.stub index 88fa2f3..16abcae 100644 --- a/kernel/console/migrations/stubs/migration.stub +++ b/kernel/console/migrations/stubs/migration.stub @@ -6,6 +6,7 @@ use Illuminate\Support\Facades\Schema; return new class extends Migration { + public string $migration; /** * Run the migrations. */ diff --git a/kernel/console/routs/cli.php b/kernel/console/routs/cli.php index 693ff3c..d0f1032 100644 --- a/kernel/console/routs/cli.php +++ b/kernel/console/routs/cli.php @@ -1,41 +1,96 @@ console("hello", [\kernel\console\controllers\MainController::class, "indexAction"]); +App::$collector->console("help", [\kernel\console\controllers\MainController::class, "actionHelp"]); App::$collector->group(["prefix" => "migration"], callback: function (RouteCollector $router){ - App::$collector->console('run', [\kernel\console\controllers\MigrationController::class, 'actionRun']); - App::$collector->console('init', [\kernel\console\controllers\MigrationController::class, 'actionCreateMigrationTable']); - App::$collector->console('create', [\kernel\console\controllers\MigrationController::class, 'actionCreate']); - App::$collector->console('rollback', [\kernel\console\controllers\MigrationController::class, 'actionRollback']); + App::$collector->console('run', + [MigrationController::class, 'actionRun'], + additionalInfo: ['description' => 'Запуск существующих миграций'] + ); + App::$collector->console('init', + [MigrationController::class, 'actionCreateMigrationTable'], + additionalInfo: ['description' => 'Инициализация миграций'] + ); + App::$collector->console('create', + [MigrationController::class, 'actionCreate'], + additionalInfo: ['description' => 'Создание миграции', 'params' => ['--name' => 'Название миграции', '--path' => 'Путь по которому будет создана миграция']] + ); + App::$collector->console('rollback', + [MigrationController::class, 'actionRollback'], + additionalInfo: ['description' => 'Откатить миграции'] + ); }); App::$collector->group(["prefix" => "admin-theme"], callback: function (RouteCollector $router){ - App::$collector->console('install', [\kernel\console\controllers\AdminThemeController::class, 'actionInstallTheme']); - App::$collector->console('uninstall', [\kernel\console\controllers\AdminThemeController::class, 'actionUninstallTheme']); + App::$collector->console('install', + [\kernel\console\controllers\AdminThemeController::class, 'actionInstallTheme'], + additionalInfo: ['description' => 'Установить тему админ-панели', 'params' => ['--path' => 'Путь к устанавливаемой теме']] + ); + App::$collector->console('uninstall', + [\kernel\console\controllers\AdminThemeController::class, 'actionUninstallTheme'], + additionalInfo: ['description' => 'Удалить тему админ-панели', 'params' => ['--path' => 'Путь к удаляемой теме']] + ); }); App::$collector->group(["prefix" => "secure"], callback: function (RouteCollector $router){ - App::$collector->console('create-secret-key', [\kernel\console\controllers\SecureController::class, 'actionCreateSecretKey']); + App::$collector->console('create-secret-key', + [\kernel\console\controllers\SecureController::class, 'actionCreateSecretKey'], + additionalInfo: ['description' => 'Генерация секрктного ключа и запись его в .env'] + ); }); App::$collector->group(["prefix" => "admin"], callback: function (RouteCollector $router){ - App::$collector->console('init', [\kernel\console\controllers\AdminConsoleController::class, 'actionInit']); + App::$collector->console('init', + [\kernel\console\controllers\AdminConsoleController::class, 'actionInit'], + additionalInfo: ['description' => 'Инициализация админ-панели'] + ); }); App::$collector->group(["prefix" => "module"], callback: function (RouteCollector $router){ - App::$collector->console('install', [\kernel\console\controllers\ModuleController::class, 'actionInstallModule']); - App::$collector->console('uninstall', [\kernel\console\controllers\ModuleController::class, 'actionUninstallModule']); - App::$collector->console('pack', [\kernel\console\controllers\ModuleController::class, 'actionPackModule']); - App::$collector->console('update', [\kernel\console\controllers\ModuleController::class, 'actionUpdateModule']); + App::$collector->console('install', + [\kernel\console\controllers\ModuleController::class, 'actionInstallModule'], + additionalInfo: ['description' => 'Установка модуля', 'params' => ['--path' => 'Путь к устанавливаемому модулю']] + ); + App::$collector->console('uninstall', + [\kernel\console\controllers\ModuleController::class, 'actionUninstallModule'], + additionalInfo: ['description' => 'Удалить модуль', 'params' => ['--path' => 'Путь к удаляемому модулю']] + ); + App::$collector->console('pack', + [\kernel\console\controllers\ModuleController::class, 'actionPackModule'], + additionalInfo: ['description' => 'Заархивировать модуль', 'params' => ['--path' => 'Путь к модулю, который нужно заархивировать']] + ); + App::$collector->console('update', + [\kernel\console\controllers\ModuleController::class, 'actionUpdateModule'], + additionalInfo: ['description' => 'Обновить модуль', 'params' => ['--path' => 'Путь к архиву с модулем']] + ); + App::$collector->console('construct', + [\kernel\console\controllers\ModuleController::class, 'actionConstructModule'], + additionalInfo: ['description' => 'Сгенерировать модуль'] + ); }); App::$collector->group(["prefix" => "kernel"], callback: function (RouteCollector $router){ -// App::$collector->console('install', [\kernel\console\controllers\ModuleController::class, 'actionInstallModule']); -// App::$collector->console('uninstall', [\kernel\console\controllers\ModuleController::class, 'actionUninstallModule']); - App::$collector->console('pack', [\kernel\console\controllers\KernelController::class, 'actionPackKernel']); - App::$collector->console('update', [\kernel\console\controllers\KernelController::class, 'actionUpdateKernel']); + App::$collector->console('pack', + [\kernel\console\controllers\KernelController::class, 'actionPackKernel'], + additionalInfo: ['description' => 'Заархивировать ядро', 'params' => ['--path' => 'Путь к ядру']] + ); + App::$collector->console('update', + [\kernel\console\controllers\KernelController::class, 'actionUpdateKernel'], + additionalInfo: [ + 'description' => 'Обновить модуль', + 'params' => + [ + '--path' => 'Путь к архиву ядра', + 'bootstrap' => 'Обновить bootstrap', + 'composer' => 'Обновить composer', + 'env' => 'Обновить .env.example' + ] + ] + ); }); diff --git a/kernel/controllers/ModuleController.php b/kernel/controllers/ModuleController.php index ea08cd4..e0fc983 100644 --- a/kernel/controllers/ModuleController.php +++ b/kernel/controllers/ModuleController.php @@ -12,6 +12,7 @@ use kernel\models\Option; use kernel\modules\module_shop_client\services\ModuleShopClientService; use kernel\modules\user\service\UserService; use kernel\Request; +use kernel\services\MigrationService; use kernel\services\ModuleService; class ModuleController extends AdminController diff --git a/kernel/manifest.json b/kernel/manifest.json new file mode 100644 index 0000000..65282d4 --- /dev/null +++ b/kernel/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "Kernel", + "version": "0.2", + "author": "ITGuild", + "slug": "kernel", + "type": "kernel", + "description": "Kernel" +} diff --git a/kernel/modules/menu/migrations/2024_09_23_125545_create_menu_table.php b/kernel/modules/menu/migrations/2024_09_23_125545_create_menu_table.php index 60ee3b6..c27b7a9 100644 --- a/kernel/modules/menu/migrations/2024_09_23_125545_create_menu_table.php +++ b/kernel/modules/menu/migrations/2024_09_23_125545_create_menu_table.php @@ -6,6 +6,7 @@ use Illuminate\Support\Facades\Schema; return new class extends Migration { + public string $migration; /** * Run the migrations. */ diff --git a/kernel/modules/module_shop_client/controllers/ModuleShopClientController.php b/kernel/modules/module_shop_client/controllers/ModuleShopClientController.php index a83f465..d2d9b7e 100644 --- a/kernel/modules/module_shop_client/controllers/ModuleShopClientController.php +++ b/kernel/modules/module_shop_client/controllers/ModuleShopClientController.php @@ -12,8 +12,8 @@ use kernel\helpers\Files; use kernel\helpers\RESTClient; use kernel\helpers\SMTP; use kernel\Mailing; -use kernel\modules\module_shop_client\services\ModuleShopClientService; use kernel\Request; +use kernel\services\KernelService; use kernel\services\ModuleService; use kernel\services\ModuleShopService; use kernel\services\TokenService; @@ -24,6 +24,7 @@ class ModuleShopClientController extends AdminController protected Client $client; protected ModuleService $moduleService; + protected KernelService $kernelService; protected function init(): void { @@ -32,6 +33,7 @@ class ModuleShopClientController extends AdminController $this->client = new Client(); $this->moduleService = new ModuleService(); + $this->kernelService = new KernelService(); } /** @@ -55,6 +57,7 @@ class ModuleShopClientController extends AdminController 'page_number' => $page_number, 'module_count' => $module_count, 'per_page' => $per_page, + 'kernelService' => new KernelService(), ]); } else { $this->cgView->render("module_shop_error_connection.php"); @@ -112,6 +115,36 @@ class ModuleShopClientController extends AdminController $this->redirect('/admin/module_shop_client', 302); } + public function actionRenderKernelUpdateForm(): void + { + $this->cgView->render("kernel_update.php"); + } + + #[NoReturn] public function actionKernelUpdate(): void + { + $request = new Request(); + $modules_info = RESTClient::request($_ENV['MODULE_SHOP_URL'] . '/api/module_shop/gb_slug'); + + $modules_info = json_decode($modules_info->getBody()->getContents(), true); + foreach ($modules_info as $module) { + if ($module['slug'] === 'kernel') { + $path = $module['path_to_archive']; + } + } + if (isset($path)) { + Files::uploadByUrl($_ENV['MODULE_SHOP_URL'] . $path, RESOURCES_DIR . "/tmp/kernel"); + if ($this->kernelService->updateKernel('/resources/tmp/kernel/' . basename($path))) { + Flash::setMessage("success", "Ядро успешно обновлено."); + } else { + Flash::setMessage("error", "Ошибка обновления ядра."); + } + } else { + Flash::setMessage("error", "Ошибка обновления ядра."); + } + + $this->redirect('/admin/module_shop_client', 302); + } + #[NoReturn] public function actionDelete(): void { $request = new Request(); @@ -131,13 +164,6 @@ class ModuleShopClientController extends AdminController $request = new Request(); $address = $request->post("email"); -// $mailing = new Mailing(); -// $mailing->send_html("login_by_code.php", ['code' => mt_rand(100000, 999999)], [ -// 'address' => $address, -// 'subject' => "Код авторизации", -// "from_name" => $_ENV['APP_NAME'] -// ]); - $moduleShopService = new ModuleShopService(); $result = $moduleShopService->email_auth($address); @@ -153,13 +179,6 @@ class ModuleShopClientController extends AdminController $request = new Request(); $code = $request->post("code"); -// $mailing = new Mailing(); -// $mailing->send_html("login_by_code.php", ['code' => mt_rand(100000, 999999)], [ -// 'address' => $address, -// 'subject' => "Код авторизации", -// "from_name" => $_ENV['APP_NAME'] -// ]); - $moduleShopService = new ModuleShopService(); $result = $moduleShopService->code_check($code); diff --git a/kernel/modules/module_shop_client/routs/module_shop_client.php b/kernel/modules/module_shop_client/routs/module_shop_client.php index 5004486..7e7a00a 100644 --- a/kernel/modules/module_shop_client/routs/module_shop_client.php +++ b/kernel/modules/module_shop_client/routs/module_shop_client.php @@ -17,6 +17,10 @@ App::$collector->group(["prefix" => "admin"], function (RouteCollector $router){ App::$collector->get('/update', [\kernel\modules\module_shop_client\controllers\ModuleShopClientController::class, 'actionUpdate']); App::$collector->post('/auth', [\kernel\modules\module_shop_client\controllers\ModuleShopClientController::class, 'actionAuth']); App::$collector->post('/code_check', [\kernel\modules\module_shop_client\controllers\ModuleShopClientController::class, 'actionCodeCheck']); + App::$collector->group(["prefix" => "kernel"], function (RouteCollector $router) { + App::$collector->get('/update_form', [\kernel\modules\module_shop_client\controllers\ModuleShopClientController::class, 'actionRenderKernelUpdateForm']); + App::$collector->post('/update', [\kernel\modules\module_shop_client\controllers\ModuleShopClientController::class, 'actionKernelUpdate']); + }); }); }); }); \ No newline at end of file diff --git a/kernel/modules/module_shop_client/views/index.php b/kernel/modules/module_shop_client/views/index.php index bfe766d..da38552 100644 --- a/kernel/modules/module_shop_client/views/index.php +++ b/kernel/modules/module_shop_client/views/index.php @@ -5,6 +5,7 @@ * @var int $page_number * @var int $per_page * @var \kernel\services\ModuleService $moduleService + * @var \kernel\services\KernelService $kernelService */ use Itguild\Tables\ListJsonTable; @@ -37,21 +38,23 @@ $table->addAction(function ($row, $url) use ($moduleService) { }); $table->addAction(function ($row, $url) use ($moduleService){ - if ($moduleService->isInstall($row['slug'])){ - $url = "$url/delete/?slug=" . $row['slug']; + if ($row['slug'] !== 'kernel') { + if ($moduleService->isInstall($row['slug'])) { + $url = "$url/delete/?slug=" . $row['slug']; - return \kernel\widgets\IconBtn\IconBtnDeleteWidget::create(['url' => $url])->run(); - } - else { - $url = "$url/install/?id=" . $row['id']; + return \kernel\widgets\IconBtn\IconBtnDeleteWidget::create(['url' => $url])->run(); + } else { + $url = "$url/install/?id=" . $row['id']; - return \kernel\widgets\IconBtn\IconBtnInstallWidget::create(['url' => $url])->run(); + return \kernel\widgets\IconBtn\IconBtnInstallWidget::create(['url' => $url])->run(); + } } + return null; }); -$table->addAction(function ($row, $url) use ($moduleService){ +$table->addAction(function ($row, $url) use ($moduleService, $kernelService){ $slug = $row['slug']; - if ($moduleService->isInstall($slug)){ + if ($moduleService->isInstall($slug)) { if (!$moduleService->isLastVersion($slug)) { $url = "$url/update/?slug=" . $slug; @@ -59,6 +62,14 @@ $table->addAction(function ($row, $url) use ($moduleService){ } } + if ($slug === 'kernel') { + if (!$kernelService->isLastVersion()) { + $url = "$url/kernel/update_form/"; + + return \kernel\widgets\IconBtn\IconBtnUpdateWidget::create(['url' => $url])->run(); + } + } + return false; }); diff --git a/kernel/modules/module_shop_client/views/kernel_update.php b/kernel/modules/module_shop_client/views/kernel_update.php new file mode 100644 index 0000000..0bbe204 --- /dev/null +++ b/kernel/modules/module_shop_client/views/kernel_update.php @@ -0,0 +1,39 @@ +run(); + +echo \kernel\helpers\Html::h(2, "Выберите нужные файлы для обновления"); + +$form = new ActiveForm(); +$form->beginForm("/admin/module_shop_client/kernel/update/", enctype: 'multipart/form-data'); + +$form->field(\itguild\forms\inputs\Select::class, "files[]", [ + 'class' => "form-control", + 'multiple' => "multiple", +]) + ->setLabel("Дополнительные файлы") + ->setOptions([ + '.env.example' => '.env.example', + 'bootstrap.php' => 'bootstrap', + 'composer.json' => 'composer.json', + ]) + ->render(); +?> + +
+
+ field(\itguild\forms\inputs\Button::class, name: "btn-submit", params: [ + 'class' => "btn btn-primary ", + 'value' => 'Отправить', + 'typeInput' => 'submit' + ]) + ->render(); + ?> +
+ +
+endForm(); \ No newline at end of file diff --git a/kernel/modules/module_shop_client/views/login_at_module_shop.php b/kernel/modules/module_shop_client/views/login_at_module_shop.php index b635740..c68105f 100644 --- a/kernel/modules/module_shop_client/views/login_at_module_shop.php +++ b/kernel/modules/module_shop_client/views/login_at_module_shop.php @@ -9,7 +9,7 @@ echo \kernel\helpers\Html::h(2, "Форма авторизации/регист $form = new ActiveForm(); $form->beginForm("/admin/module_shop_client/auth/"); -$form->field(\itguild\forms\inputs\TextInput::class, 'email', [ +$form->field(\itguild\forms\inputs\EmailInput::class, 'email', [ 'class' => "form-control", 'placeholder' => 'Email', ]) diff --git a/kernel/modules/option/migrations/2024_09_23_125716_create_option_table.php b/kernel/modules/option/migrations/2024_09_23_125716_create_option_table.php index d2468a7..17edd23 100644 --- a/kernel/modules/option/migrations/2024_09_23_125716_create_option_table.php +++ b/kernel/modules/option/migrations/2024_09_23_125716_create_option_table.php @@ -6,6 +6,7 @@ use Illuminate\Support\Facades\Schema; return new class extends Migration { + public string $migration; /** * Run the migrations. */ diff --git a/kernel/modules/post/PostModule.php b/kernel/modules/post/PostModule.php index b56971c..f45e55c 100644 --- a/kernel/modules/post/PostModule.php +++ b/kernel/modules/post/PostModule.php @@ -5,17 +5,22 @@ namespace kernel\modules\post; use kernel\helpers\Debug; use kernel\Module; use kernel\modules\menu\service\MenuService; +use kernel\services\MigrationService; class PostModule extends Module { public MenuService $menuService; + public MigrationService $migrationService; public function __construct() { $this->menuService = new MenuService(); + $this->migrationService = new MigrationService(); } public function init(): void { + $this->migrationService->runAtPath("{KERNEL_MODULES}/post/migrations"); + $this->menuService->createItem([ "label" => "Посты", "url" => "/admin/post", @@ -26,5 +31,6 @@ class PostModule extends Module public function deactivate(): void { $this->menuService->removeItemBySlug("post"); + $this->migrationService->rollbackAtPath("{KERNEL_MODULES}/post/migrations"); } } \ No newline at end of file diff --git a/kernel/modules/post/migrations/2024_09_23_130017_create_post_table.php b/kernel/modules/post/migrations/2024_09_23_130017_create_post_table.php index 6556a6a..4144a14 100644 --- a/kernel/modules/post/migrations/2024_09_23_130017_create_post_table.php +++ b/kernel/modules/post/migrations/2024_09_23_130017_create_post_table.php @@ -6,6 +6,8 @@ use Illuminate\Support\Facades\Schema; return new class extends Migration { + public string $migration; + /** * Run the migrations. */ diff --git a/kernel/modules/post/views/index.php b/kernel/modules/post/views/index.php index d82ecb5..045feb1 100644 --- a/kernel/modules/post/views/index.php +++ b/kernel/modules/post/views/index.php @@ -3,16 +3,13 @@ /** * @var \Illuminate\Database\Eloquent\Collection $contents * @var int $page_number + * @var \kernel\CgView $view */ -use kernel\IGTabel\action_column\DeleteActionColumn; -use kernel\IGTabel\action_column\EditActionColumn; -use kernel\IGTabel\action_column\ViewActionColumn; use kernel\modules\post\models\Post; use kernel\modules\user\models\User; use Itguild\EloquentTable\EloquentDataProvider; use Itguild\EloquentTable\ListEloquentTable; -use kernel\IGTabel\btn\PrimaryBtn; use kernel\widgets\IconBtn\IconBtnCreateWidget; use kernel\widgets\IconBtn\IconBtnDeleteWidget; use kernel\widgets\IconBtn\IconBtnEditWidget; @@ -25,6 +22,11 @@ $table = new ListEloquentTable(new EloquentDataProvider(Post::class, [ 'baseUrl' => "/admin/post" ])); +$view->setTitle("Список постов"); +$view->setMeta([ + 'description' => 'Список постов системы' +]); + $entityRelation = new \kernel\EntityRelation(); $additionals = $entityRelation->getEntityRelationsBySlug("post"); diff --git a/kernel/modules/post/views/view.php b/kernel/modules/post/views/view.php index e3693d1..537ee55 100644 --- a/kernel/modules/post/views/view.php +++ b/kernel/modules/post/views/view.php @@ -7,9 +7,6 @@ use kernel\modules\user\models\User; use Itguild\EloquentTable\ViewEloquentTable; use Itguild\EloquentTable\ViewJsonTableEloquentModel; -use kernel\IGTabel\btn\DangerBtn; -use kernel\IGTabel\btn\PrimaryBtn; -use kernel\IGTabel\btn\SuccessBtn; use kernel\widgets\IconBtn\IconBtnDeleteWidget; use kernel\widgets\IconBtn\IconBtnEditWidget; use kernel\widgets\IconBtn\IconBtnListWidget; diff --git a/kernel/modules/secure/controllers/SecureRestController.php b/kernel/modules/secure/controllers/SecureRestController.php index 7e82699..163964f 100644 --- a/kernel/modules/secure/controllers/SecureRestController.php +++ b/kernel/modules/secure/controllers/SecureRestController.php @@ -36,14 +36,16 @@ class SecureRestController extends RestController $res = []; if ($model) { if (password_verify($data["password"], $model->password_hash)) { - $model->access_token_expires_at = date("Y-m-d H:i:s", strtotime(App::$secure['token_expired_time'])); - $model->access_token = match (App::$secure['token_type']) { - "JWT" => TokenService::JWT($_ENV['SECRET_KEY'], 'HS256'), - "md5" => TokenService::md5(), - "crypt" => TokenService::crypt(), - "hash" => TokenService::hash('sha256'), - default => TokenService::random_bytes(20), - }; + if ($model->access_token_expires_at < date("Y-m-d H:i:s") or $model->access_token === null){ + $model->access_token_expires_at = date("Y-m-d H:i:s", strtotime(App::$secure['token_expired_time'])); + $model->access_token = match (App::$secure['token_type']) { + "JWT" => TokenService::JWT($_ENV['SECRET_KEY'], 'HS256'), + "md5" => TokenService::md5(), + "crypt" => TokenService::crypt(), + "hash" => TokenService::hash('sha256'), + default => TokenService::random_bytes(20), + }; + } $res = [ "access_token" => $model->access_token, diff --git a/kernel/modules/secure/migrations/2024_12_09_081420_create_secret_code_table.php b/kernel/modules/secure/migrations/2024_12_09_081420_create_secret_code_table.php index c5acce1..a6ab989 100644 --- a/kernel/modules/secure/migrations/2024_12_09_081420_create_secret_code_table.php +++ b/kernel/modules/secure/migrations/2024_12_09_081420_create_secret_code_table.php @@ -6,6 +6,8 @@ use Illuminate\Support\Facades\Schema; return new class extends Migration { + public string $migration; + /** * Run the migrations. */ diff --git a/kernel/modules/user/migrations/2024_09_23_125827_create_user_table.php b/kernel/modules/user/migrations/2024_09_23_125827_create_user_table.php index 774213a..a762579 100644 --- a/kernel/modules/user/migrations/2024_09_23_125827_create_user_table.php +++ b/kernel/modules/user/migrations/2024_09_23_125827_create_user_table.php @@ -6,6 +6,8 @@ use Illuminate\Support\Facades\Schema; return new class extends Migration { + public string $migration; + /** * Run the migrations. * diff --git a/kernel/services/ConsoleService.php b/kernel/services/ConsoleService.php new file mode 100644 index 0000000..25c3d5c --- /dev/null +++ b/kernel/services/ConsoleService.php @@ -0,0 +1,21 @@ +moduleService = new ModuleService(); + $this->files = new Files(); + } + + public function getKernelInfo(): false|array|string + { + $info = []; + $info['path'] = KERNEL_DIR; + if (file_exists(KERNEL_DIR . "/manifest.json")) { + $manifest = json_decode(file_get_contents(KERNEL_DIR . "/manifest.json"), true); + $manifest = getConst($manifest); + $info = array_merge($info, $manifest); + } + + return $info; + } + + public function isLastVersion(): bool + { + if ($this->moduleService->isServerAvailable()) { + $modules_info = RESTClient::request($_ENV['MODULE_SHOP_URL'] . '/api/module_shop/gb_slug'); + + $modules_info = json_decode($modules_info->getBody()->getContents(), true); + + $kernel_info = $this->getKernelInfo(); + foreach ($modules_info as $mod) { + if ($mod['slug'] === $kernel_info['slug'] && $mod['version'] === $kernel_info['version']) { + return true; + } + } + } + + return false; + } + + public function updateKernel(string $path): bool + { + $request = new Request(); + $files = $request->post('files'); + + $zip = new ZipArchive; + if (file_exists(ROOT_DIR . $path)) { + $tmpKernelDir = md5(time()); + $res = $zip->open(ROOT_DIR . $path); + if ($res === TRUE) { + $tmpKernelDirFull = RESOURCES_DIR . '/tmp/kernel/' . $tmpKernelDir . "/"; + $zip->extractTo($tmpKernelDirFull); + $zip->close(); + $this->files->recursiveRemoveKernelDir(); + $this->files->copy_folder($tmpKernelDirFull . 'kernel' , ROOT_DIR . "/kernel"); + + foreach ($files as $file) { + if ($file === 'bootstrap') { + $this->files->recursiveRemoveDir(ROOT_DIR . '/bootstrap'); + $this->files->copy_folder($tmpKernelDirFull . 'bootstrap' , ROOT_DIR . '/bootstrap'); + } + copy($tmpKernelDirFull . $file , ROOT_DIR . '/' . $file); + } + + $this->files->recursiveRemoveDir($tmpKernelDirFull); + unlink(ROOT_DIR . $path); + + return true; + } + } + + return false; + } +} \ No newline at end of file diff --git a/kernel/services/MigrationService.php b/kernel/services/MigrationService.php index aabee7b..d5f436a 100644 --- a/kernel/services/MigrationService.php +++ b/kernel/services/MigrationService.php @@ -36,4 +36,25 @@ class MigrationService } } + public function rollbackAtPath(string $path): void + { + $path = getConst($path); + try { + $filesystem = new Filesystem(); + $dmr = new DatabaseMigrationRepository(App::$db->capsule->getDatabaseManager(), 'migration'); + + $m = new Migrator($dmr, App::$db->capsule->getDatabaseManager(), $filesystem); + + $migrationFiles = $m->getMigrationFiles($path); + foreach ($migrationFiles as $name => $migrationFile){ + $migrationInstance = $filesystem->getRequire($migrationFile); + $migrationInstance->migration = $name; + $migrationInstance->down(); + $dmr->delete($migrationInstance); + } + } catch (\Exception $e) { + throw new \Exception('Не удалось откатить миграции'); + } + } + } \ No newline at end of file diff --git a/kernel/services/ModuleService.php b/kernel/services/ModuleService.php index 50a3603..7beb721 100644 --- a/kernel/services/ModuleService.php +++ b/kernel/services/ModuleService.php @@ -10,7 +10,6 @@ use kernel\helpers\Files; use kernel\helpers\Manifest; use kernel\helpers\RESTClient; use kernel\models\Option; -use MongoDB\Driver\Session; use ZipArchive; class ModuleService @@ -444,10 +443,11 @@ class ModuleService public function isLastVersion(string $slug): bool { - if ($this->isServerAvailable()){ + if ($this->isServerAvailable()) { $modules_info = RESTClient::request($_ENV['MODULE_SHOP_URL'] . '/api/module_shop/gb_slug'); $modules_info = json_decode($modules_info->getBody()->getContents(), true); + $mod_info = $this->getModuleInfoBySlug($slug); foreach ($modules_info as $mod) { if ($mod['slug'] === $mod_info['slug'] && $mod['version'] === $mod_info['version']) { @@ -473,18 +473,20 @@ class ModuleService public function isShopModule(string $slug): bool { - if ($this->isServerAvailable()){ + if ($this->isServerAvailable()) { $modules_info = RESTClient::request($_ENV['MODULE_SHOP_URL'] . '/api/module_shop/gb_slug'); - if (!$this->issetModuleShopToken()){ + if (!$this->issetModuleShopToken()) { return false; } $modules_info = json_decode($modules_info->getBody()->getContents(), true); - $mod_info = $this->getModuleInfoBySlug($slug); - foreach ($modules_info as $mod) { - if ($mod['slug'] === $mod_info['slug']) { - return true; + if (isset($modules_info)) { + $mod_info = $this->getModuleInfoBySlug($slug); + foreach ($modules_info as $mod) { + if ($mod['slug'] === $mod_info['slug']) { + return true; + } } } } @@ -505,7 +507,7 @@ class ModuleService public function isServerAvailable(): bool { - if (null !== $this->serverAvailable){ + if (null !== $this->serverAvailable) { return $this->serverAvailable; } @@ -522,11 +524,58 @@ class ModuleService public function issetModuleShopToken(): bool { - if (!empty($_ENV['MODULE_SHOP_TOKEN'])){ + if (!empty($_ENV['MODULE_SHOP_TOKEN'])) { return true; } return false; } + public function createDirs(string $slug): void + { + mkdir(KERNEL_APP_MODULES_DIR . "/$slug"); + mkdir(KERNEL_APP_MODULES_DIR . "/$slug/controllers"); + mkdir(KERNEL_APP_MODULES_DIR . "/$slug/migrations"); + mkdir(KERNEL_APP_MODULES_DIR . "/$slug/services"); + mkdir(KERNEL_APP_MODULES_DIR . "/$slug/models"); + mkdir(KERNEL_APP_MODULES_DIR . "/$slug/models/forms"); + mkdir(KERNEL_APP_MODULES_DIR . "/$slug/routs"); + mkdir(KERNEL_APP_MODULES_DIR . "/$slug/views"); + + mkdir(APP_DIR . "/modules/$slug"); + mkdir(APP_DIR . "/modules/$slug/controllers"); + mkdir(APP_DIR . "/modules/$slug/routs"); + } + + public function createModuleByParams(array $params): void + { + $slug = $params['slug']; + $model = $params['model']; + + $this->createModuleFileByTemplate(KERNEL_TEMPLATES_DIR . '/manifests/manifest_template', APP_DIR . "/modules/$slug/manifest.json", $params); + $this->createModuleFileByTemplate(KERNEL_TEMPLATES_DIR . '/controllers/kernel_controller_template', KERNEL_APP_MODULES_DIR . '/' . $slug . '/controllers/' . $model . 'Controller.php', $params); + $this->createModuleFileByTemplate(KERNEL_TEMPLATES_DIR . '/controllers/app_controller_template', APP_DIR . '/modules/' . $slug . '/controllers/' . $model . 'Controller.php', $params); + $this->createModuleFileByTemplate(KERNEL_TEMPLATES_DIR . '/routs/kernel_routs_template', KERNEL_APP_MODULES_DIR . '/' . $slug . '/routs/' . $slug . '.php', $params); + $this->createModuleFileByTemplate(KERNEL_TEMPLATES_DIR . '/routs/app_routs_template', APP_DIR . '/modules/' . $slug . '/routs/' . $slug . '.php', $params); + $this->createModuleFileByTemplate(KERNEL_TEMPLATES_DIR . '/module_files/kernel_module_file_template', KERNEL_APP_MODULES_DIR . '/' . $slug . '/' . $model . 'Module.php', $params); + $this->createModuleFileByTemplate(KERNEL_TEMPLATES_DIR . '/module_files/app_module_file_template', APP_DIR . '/modules/' . $slug . '/' . $model . 'Module.php', $params); + $this->createModuleFileByTemplate(KERNEL_TEMPLATES_DIR . '/models/model_template', KERNEL_APP_MODULES_DIR . '/' . $slug . '/models/' . $model . '.php', $params); + $this->createModuleFileByTemplate(KERNEL_TEMPLATES_DIR . '/models/forms/create_form_template', KERNEL_APP_MODULES_DIR . '/' . $slug . '/models/forms/Create' . $model . 'Form.php', $params); + $this->createModuleFileByTemplate(KERNEL_TEMPLATES_DIR . '/services/service_template', KERNEL_APP_MODULES_DIR . '/' . $slug . '/services/' . $model . 'Service.php', $params); + $this->createModuleFileByTemplate(KERNEL_TEMPLATES_DIR . '/views/index_template', KERNEL_APP_MODULES_DIR . '/' . $slug . '/views/index.php', $params); + $this->createModuleFileByTemplate(KERNEL_TEMPLATES_DIR . '/views/view_template', KERNEL_APP_MODULES_DIR . '/' . $slug . '/views/view.php', $params); + $this->createModuleFileByTemplate(KERNEL_TEMPLATES_DIR . '/views/form_template', KERNEL_APP_MODULES_DIR . '/' . $slug . '/views/form.php', $params); + } + + public function createModuleFileByTemplate(string $templatePath, string $filePath, array $params): void + { + $data = file_get_contents($templatePath); + + foreach ($params as $key => $param){ + $data = str_replace("{" . $key . "}", $param, $data); + } + + file_put_contents($filePath, $data); + } + } \ No newline at end of file diff --git a/kernel/services/TokenService.php b/kernel/services/TokenService.php index de5a4dd..b24096b 100644 --- a/kernel/services/TokenService.php +++ b/kernel/services/TokenService.php @@ -32,7 +32,7 @@ class TokenService */ public static function md5(): string { - return md5(microtime() . self::getSalt() . time()); + return md5(microtime() . self::getSalt(10) . time()); } /** @@ -40,7 +40,7 @@ class TokenService */ public static function crypt(): string { - return crypt(microtime(), self::getSalt()); + return crypt(microtime(), self::getSalt(20)); } /** @@ -48,15 +48,15 @@ class TokenService */ public static function hash(string $alg): string { - return hash($alg, self::getSalt()); + return hash($alg, self::getSalt(10)); } /** * @throws RandomException */ - public static function getSalt(): string + public static function getSalt(int $length): string { - return bin2hex(random_bytes(10)); + return bin2hex(random_bytes($length)); } } \ No newline at end of file diff --git a/kernel/templates/controllers/app_controller_template b/kernel/templates/controllers/app_controller_template new file mode 100644 index 0000000..03e0772 --- /dev/null +++ b/kernel/templates/controllers/app_controller_template @@ -0,0 +1,8 @@ +cgView->viewPath = KERNEL_APP_MODULES_DIR . "/{slug}/views/"; + $this->{slug}Service = new {model}Service(); + } + + public function actionCreate(): void + { + $this->cgView->render("form.php"); + } + + #[NoReturn] public function actionAdd(): void + { + ${slug}Form = new Create{model}Form(); + ${slug}Form->load($_REQUEST); + if (${slug}Form->validate()){ + ${slug} = $this->{slug}Service->create(${slug}Form); + if (${slug}){ + $this->redirect("/admin/{slug}/view/" . ${slug}->id); + } + } + $this->redirect("/admin/{slug}/create"); + } + + public function actionIndex($page_number = 1): void + { + $this->cgView->render("index.php", ['page_number' => $page_number]); + } + + /** + * @throws Exception + */ + public function actionView($id): void + { + ${slug} = {model}::find($id); + + if (!${slug}){ + throw new Exception(message: "The {slug} not found"); + } + $this->cgView->render("view.php", ['{slug}' => ${slug}]); + } + + /** + * @throws Exception + */ + public function actionUpdate($id): void + { + $model = {model}::find($id); + if (!$model){ + throw new Exception(message: "The {slug} not found"); + } + + $this->cgView->render("form.php", ['model' => $model]); + } + + /** + * @throws Exception + */ + public function actionEdit($id): void + { + ${slug} = {model}::find($id); + if (!${slug}){ + throw new Exception(message: "The {slug} not found"); + } + ${slug}Form = new Create{model}Form(); + ${slug}Service = new {model}Service(); + ${slug}Form->load($_REQUEST); + if (${slug}Form->validate()) { + ${slug} = ${slug}Service->update(${slug}Form, ${slug}); + if (${slug}) { + $this->redirect("/admin/{slug}/view/" . ${slug}->id); + } + } + $this->redirect("/admin/{slug}/update/" . $id); + } + + #[NoReturn] public function actionDelete($id): void + { + ${slug} = {model}::find($id)->first(); + ${slug}->delete(); + $this->redirect("/admin/{slug}/"); + } +} \ No newline at end of file diff --git a/kernel/templates/manifests/manifest_template b/kernel/templates/manifests/manifest_template new file mode 100644 index 0000000..7704dd4 --- /dev/null +++ b/kernel/templates/manifests/manifest_template @@ -0,0 +1,11 @@ +{ + "name": "{name}", + "version": "0.1", + "author": "{author}", + "slug": "{slug}", + "description": "{name} module", + "module_class": "app\\modules\\{slug}\\{model}Module", + "module_class_file": "{APP}/modules/{slug}/{model}Module.php", + "routs": "routs/{slug}.php", + "migration_path": "migrations" +} \ No newline at end of file diff --git a/kernel/templates/models/forms/create_form_template b/kernel/templates/models/forms/create_form_template new file mode 100644 index 0000000..e5b4f2b --- /dev/null +++ b/kernel/templates/models/forms/create_form_template @@ -0,0 +1,25 @@ + 'required|min-str-len:5|max-str-len:30', + // 'entity' => 'required', + // 'slug' => '', + // 'status' => '' + // ]; + return [ + + ]; + } + +} \ No newline at end of file diff --git a/kernel/templates/models/model_template b/kernel/templates/models/model_template new file mode 100644 index 0000000..cc6f55a --- /dev/null +++ b/kernel/templates/models/model_template @@ -0,0 +1,47 @@ + 'Заголовок', + // 'entity' => 'Сущность', + // 'slug' => 'Slug', + // 'status' => 'Статус', + // ] + + return [ + + ]; + } + + /** + * @return string[] + */ + public static function getStatus(): array + { + return [ + self::DISABLE_STATUS => "Не активный", + self::ACTIVE_STATUS => "Активный", + ]; + } + +} \ No newline at end of file diff --git a/kernel/templates/module_files/app_module_file_template b/kernel/templates/module_files/app_module_file_template new file mode 100644 index 0000000..ef58aee --- /dev/null +++ b/kernel/templates/module_files/app_module_file_template @@ -0,0 +1,8 @@ +menuService = new MenuService(); + } + + public function init(): void + { + $this->menuService->createItem([ + "label" => "{label}", + "url" => "/admin/{slug}", + "slug" => "{slug}", + ]); + } + + public function deactivate(): void + { + $this->menuService->removeItemBySlug("{slug}"); + } +} \ No newline at end of file diff --git a/kernel/templates/routs/app_routs_template b/kernel/templates/routs/app_routs_template new file mode 100644 index 0000000..a9558ba --- /dev/null +++ b/kernel/templates/routs/app_routs_template @@ -0,0 +1,2 @@ +group(["prefix" => "admin"], function (CgRouteCollector $router) { + App::$collector->group(["before" => "auth"], function (RouteCollector $router) { + App::$collector->group(["prefix" => "{slug}"], function (CGRouteCollector $router) { + App::$collector->get('/', [\app\modules\{slug}\controllers\{model}Controller::class, 'actionIndex']); + App::$collector->get('/page/{page_number}', [\app\modules\{slug}\controllers\{model}Controller::class, 'actionIndex']); + App::$collector->get('/create', [\app\modules\{slug}\controllers\{model}Controller::class, 'actionCreate']); + App::$collector->post("/", [\app\modules\{slug}\controllers\{model}Controller::class, 'actionAdd']); + App::$collector->get('/view/{id}', [\app\modules\{slug}\controllers\{model}Controller::class, 'actionView']); + App::$collector->any('/update/{id}', [\app\modules\{slug}\controllers\{model}Controller::class, 'actionUpdate']); + App::$collector->any("/edit/{id}", [\app\modules\{slug}\controllers\{model}Controller::class, 'actionEdit']); + App::$collector->get('/delete/{id}', [\app\modules\{slug}\controllers\{model}Controller::class, 'actionDelete']); + }); + }); +}); \ No newline at end of file diff --git a/kernel/templates/services/service_template b/kernel/templates/services/service_template new file mode 100644 index 0000000..e456e4e --- /dev/null +++ b/kernel/templates/services/service_template @@ -0,0 +1,39 @@ +content = $form_model->getItem('content'); + // $model->user_id = $form_model->getItem('user_id'); + // $model->title = $form_model->getItem('title'); + // $model->slug = Slug::createSlug($form_model->getItem('title'), {model}::class); // Генерация уникального slug + + if ($model->save()){ + return $model; + } + + return false; + } + + public function update(FormModel $form_model, {model} ${slug}): false|{model} + { + // Пример обновления: + // ${slug}->content = $form_model->getItem('content'); + // ${slug}->user_id = $form_model->getItem('user_id'); + + if (${slug}->save()){ + return ${slug}; + } + + return false; + } +} \ No newline at end of file diff --git a/kernel/templates/views/form_template b/kernel/templates/views/form_template new file mode 100644 index 0000000..180618b --- /dev/null +++ b/kernel/templates/views/form_template @@ -0,0 +1,55 @@ +beginForm(isset($model) ? "/admin/{slug}/edit/" . $model->id : "/admin/{slug}", 'multipart/form-data'); + +// Пример формы: + +/* +$form->field(\itguild\forms\inputs\TextInput::class, 'title', [ + 'class' => "form-control", + 'placeholder' => 'Заголовок поста', + 'value' => $model->title ?? '' +]) + ->setLabel("Заголовок") + ->render(); + +$form->field(class: \itguild\forms\inputs\Select::class, name: "user_id", params: [ + 'class' => "form-control", + 'value' => $model->user_id ?? '' +]) + ->setLabel("Пользователи") + ->setOptions(\kernel\modules\user\service\UserService::createUsernameArr()) + ->render(); +*/ + +?> +
+
+ field(\itguild\forms\inputs\Button::class, name: "btn-submit", params: [ + 'class' => "btn btn-primary ", + 'value' => 'Отправить', + 'typeInput' => 'submit' + ]) + ->render(); + ?> +
+
+ field(\itguild\forms\inputs\Button::class, name: "btn-reset", params: [ + 'class' => "btn btn-warning", + 'value' => 'Сбросить', + 'typeInput' => 'reset' + ]) + ->render(); + ?> +
+
+endForm(); diff --git a/kernel/templates/views/index_template b/kernel/templates/views/index_template new file mode 100644 index 0000000..a7a7171 --- /dev/null +++ b/kernel/templates/views/index_template @@ -0,0 +1,68 @@ +setTitle("Список {slug}"); +$view->setMeta([ + 'description' => 'Список {slug} системы' +]); + +//Для использования таблицы с моделью, необходимо создать таблицу в базе данных +//$table = new ListEloquentTable(new EloquentDataProvider({model}::class, [ +// 'currentPage' => $page_number, +// 'perPage' => 8, +// 'params' => ["class" => "table table-bordered", "border" => "2"], +// 'baseUrl' => "/admin/{slug}" +//])); + + +$table = new \Itguild\Tables\ListJsonTable(json_encode( + [ + 'meta' => [ + 'total' => 0, + 'totalWithFilters' => 0, + 'columns' => [ + 'title', + 'slug', + 'status', + ], + 'perPage' => 5, + 'currentPage' => 1, + 'baseUrl' => '/admin/some', + 'params' => [ + 'class' => 'table table-bordered', + 'border' => 2 + ] + ], + 'filters' => [], + 'data' => [], + ] +)); + +$table->beforePrint(function () { + return IconBtnCreateWidget::create(['url' => '/admin/{slug}/create'])->run(); +}); + +$table->addAction(function($row) { + return IconBtnViewWidget::create(['url' => '/admin/{slug}/view/' . $row['id']])->run(); +}); +$table->addAction(function($row) { + return IconBtnEditWidget::create(['url' => '/admin/{slug}/update/' . $row['id']])->run(); +}); +$table->addAction(function($row) { + return IconBtnDeleteWidget::create(['url' => '/admin/{slug}/delete/' . $row['id']])->run(); +}); +$table->create(); +$table->render(); \ No newline at end of file diff --git a/kernel/templates/views/view_template b/kernel/templates/views/view_template new file mode 100644 index 0000000..1ce19c5 --- /dev/null +++ b/kernel/templates/views/view_template @@ -0,0 +1,25 @@ + ["class" => "table table-bordered", "border" => "2"], + 'baseUrl' => "/admin/{slug}", +])); +$table->beforePrint(function () use (${slug}) { + $btn = IconBtnListWidget::create(['url' => '/admin/{slug}'])->run(); + $btn .= IconBtnEditWidget::create(['url' => '/admin/{slug}/update/' . ${slug}->id])->run(); + $btn .= IconBtnDeleteWidget::create(['url' => '/admin/{slug}/delete/' . ${slug}->id])->run(); + return $btn; +}); + +$table->create(); +$table->render(); \ No newline at end of file