From dcab33c2e10bb204990efb4f791dd24957025a30 Mon Sep 17 00:00:00 2001 From: HerrHase Date: Mon, 11 Oct 2021 15:46:43 +0200 Subject: [PATCH] adding new major release --- .env.example | 4 + .gitignore | 126 +- README.md | 122 +- .../DirectusControllerAbstract.php | 34 +- app/Controllers/PageController.php | 56 + app/Flight/FlightAbstract.php | 30 + src/Functions.php => app/Functions/Blade.php | 0 {src => app}/Helpers/MarkdownHelper.php | 12 +- {src => app}/Repositories/Manager.php | 14 +- app/Repositories/PageRepository.php | 48 + app/Repositories/RepositoryAbstract.php | 36 + app/bootstrap.php | 37 + composer.json | 15 +- composer.lock | 1680 ++++++++++-- public/index.php | 10 + resources/views/layout.blade.php | 38 + resources/views/page/404.blade.php | 8 + resources/views/page/default.blade.php | 12 + resources/views/partials/svg.blade.php | 3 + snapshot.yaml | 2341 +++++++++++++++++ src/Collections/AbstractCollection.php | 114 - src/Collections/ItemCollection.php | 28 - src/FlightAbstract.php | 27 - .../PaginationRepositoryAbstract.php | 179 -- src/Repositories/RepositoryAbstract.php | 38 - 25 files changed, 4244 insertions(+), 768 deletions(-) create mode 100644 .env.example rename {src => app}/Controllers/DirectusControllerAbstract.php (54%) create mode 100644 app/Controllers/PageController.php create mode 100644 app/Flight/FlightAbstract.php rename src/Functions.php => app/Functions/Blade.php (100%) rename {src => app}/Helpers/MarkdownHelper.php (80%) rename {src => app}/Repositories/Manager.php (72%) create mode 100644 app/Repositories/PageRepository.php create mode 100644 app/Repositories/RepositoryAbstract.php create mode 100644 app/bootstrap.php create mode 100644 public/index.php create mode 100644 resources/views/layout.blade.php create mode 100644 resources/views/page/404.blade.php create mode 100644 resources/views/page/default.blade.php create mode 100644 resources/views/partials/svg.blade.php create mode 100644 snapshot.yaml delete mode 100644 src/Collections/AbstractCollection.php delete mode 100644 src/Collections/ItemCollection.php delete mode 100644 src/FlightAbstract.php delete mode 100644 src/Repositories/PaginationRepositoryAbstract.php delete mode 100644 src/Repositories/RepositoryAbstract.php diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..c5f35f6 --- /dev/null +++ b/.env.example @@ -0,0 +1,4 @@ +APP_DEBUG=false + +DIRECTUS_API_URL= +DIRECTUS_API_TOKEN= \ No newline at end of file diff --git a/.gitignore b/.gitignore index 2909899..ed41d11 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,123 @@ -composer.phar +# ---> Node +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz -/vendor/ -node_modules +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file .env -*.log -rysnc_exclude +.env.test + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next +out + +# Nuxt.js build / generate output +.nuxt + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* + +vendor + +storage/cache +!storage/cache/.gitkeep + + diff --git a/README.md b/README.md index 0bce987..5a80831 100644 --- a/README.md +++ b/README.md @@ -1,97 +1,35 @@ # Super Gear Directus -Small Libary to request Directus API. Works with [http://flightphp.com/](Flight). +Project to using a Directus Instance as CMS. Structure is inspired by Laravel, using [FlightPHP](https://github.com/mikecao/flight) +for handle Request. -## Install +## Installation -```bash -composer require tentakelfabrik/super-gear-directus -``` - -## Requirements - -For handle token and url for the Directus Server you have to use -[https://github.com/vlucas/phpdotenv](vlucas/phpdotenv), - -```php -env('DIRECTUS_API_URL'), -env('DIRECTUS_API_TOKEN') -``` - -## Controller +Download last Release, a Composer Installer will be Available in a Future Release. -Example how to use SuperGear\\Directus\\Controllers\\DirectusControllerAbstract, +## Snapshot -```php -class PageController extends DirectusControllerAbstract -{ - /** slug for home */ - const HOME_SLUG = 'home'; +There is a Snapshot for a Basic Setup for the Directus Instance. - /** set default view */ - protected $defaultView = 'page/default'; +## Quickstart - /** - * get home page from slug - * - * - */ - public function indexAction() - { - $repository = Manager::get('Page'); - $page = $repository->findOneBySlug(self::HOME_SLUG); +Create a **.env** from **.env.example** adding token and url for Directus Instance. - if ($this->notFound($page)) { - $this->app->redirect('404'); - } - - $this->render($page); - } - - /** - * get single page from slug - * - * - * @param string $slug - */ - public function getAction($slug) - { - $repository = Manager::get('Page'); - $page = $repository->findOneBySlug($slug); - - if ($this->notFound($page)) { - $this->app->redirect('404'); - } - - $this->render($page); - } - - /** - * if page not found - * - */ - public function notFoundAction() - { - $page = [ - 'data' => [ - 'view' => 'page/404' - ] - ]; - - $this->render($page); - } -} +``` +DIRECTUS_API_URL= +DIRECTUS_API_TOKEN= ``` ## Repositories -Example to use the SuperGear\\Directus\\Respositories\\RepositoryAbstract, +For getting Data use **App\\Respositories\\RepositoryAbstract** to create Repository-Classes. +This is the default class to handle ```PHP class PageRepository extends RepositoryAbstract { - /** name of the collection */ - protected $name = 'page'; + /** endpoint */ + protected $endpoint = 'pages'; /** * find single page with a slug, @@ -102,25 +40,19 @@ class PageRepository extends RepositoryAbstract */ public function findOneBySlug($slug) { - return $this->itemCollection->findOne($this->name, [ - 'filter[slug][eq]' => $slug, - 'filter[status][eq]' => 'published' - ]); - } + if (!$slug) { + $slug = [ '_null' => 'true' ]; + } - /** - * find single page with a slug, - * page must be published - * - * @param string $slug - * @return array - */ - public function findByView($view) - { - return $this->itemCollection->find($this->name, [ - 'filter[view][eq]' => $view, - 'filter[status][eq]' => 'published' - ]); + return $this->queryBuilder + ->fields(['title', 'slug', 'content', 'view', 'meta', 'media_teaser.*', 'media_hero.*']) + ->aliases('view', 'template') + ->filter([ + 'status' => 'published', + 'slug' => $slug + ]) + ->findOne(); } } ``` + diff --git a/src/Controllers/DirectusControllerAbstract.php b/app/Controllers/DirectusControllerAbstract.php similarity index 54% rename from src/Controllers/DirectusControllerAbstract.php rename to app/Controllers/DirectusControllerAbstract.php index b1d9e09..5569dc4 100644 --- a/src/Controllers/DirectusControllerAbstract.php +++ b/app/Controllers/DirectusControllerAbstract.php @@ -1,21 +1,22 @@ app->get('flight.views.path').'/'.$view.'.blade.php'); + $result = false; + + if (file_exists($this->app->get('flight.views.path').'/'.$view.'.blade.php')) { + $result = true; + } + + return $result; } /** @@ -45,23 +52,24 @@ abstract class DirectusControllerAbstract extends FlightAbstract * @param array $data [description] * @return [type] [description] */ - protected function render($item, $data = []) + protected function render($page, $data = []) { $view = $this->defaultView; // if view isset in page and file exists - if (isset($item['data']['view'])) { - if ($this->viewExists($item['data']['view'])) { - $view = $item['data']['view']; + if (isset($page['data']['view'])) { + if ($this->viewExists($page['data']['view'])) { + $view = $page['data']['view']; } else { - throw new Exception('View '.$item['data']['view'].' not exists'); + throw new Exception('View '.$page['data']['view'].' not exists'); } } else if (!$this->viewExists($view)) { throw new Exception('View '.$view.' not exists'); } $this->app->render($view, array_merge([ - 'page' => $item + 'page' => $page, + 'flight' => $this->app ], $data )); diff --git a/app/Controllers/PageController.php b/app/Controllers/PageController.php new file mode 100644 index 0000000..23f3bee --- /dev/null +++ b/app/Controllers/PageController.php @@ -0,0 +1,56 @@ + [ + 'title' => '404', + 'view' => 'page/404' + ] + ]; + + /** + * get single page from slug + * + * + * @param string $slug + */ + public function getAction($slug = NULL) + { + $repository = Manager::get('Page'); + $page = $repository->findOneBySlug($slug); + + if ($page['data'] === NULL) { + $this->app>redirect('/404', 301); + } else { + $this->render($page); + } + } + + /** + * if page not found + * + */ + public function notFoundAction() + { + $this->render($this->page404); + } +} diff --git a/app/Flight/FlightAbstract.php b/app/Flight/FlightAbstract.php new file mode 100644 index 0000000..0d4f5b7 --- /dev/null +++ b/app/Flight/FlightAbstract.php @@ -0,0 +1,30 @@ +app = Flight::app(); + } +} diff --git a/src/Functions.php b/app/Functions/Blade.php similarity index 100% rename from src/Functions.php rename to app/Functions/Blade.php diff --git a/src/Helpers/MarkdownHelper.php b/app/Helpers/MarkdownHelper.php similarity index 80% rename from src/Helpers/MarkdownHelper.php rename to app/Helpers/MarkdownHelper.php index 2afa3a5..9ecd72b 100644 --- a/src/Helpers/MarkdownHelper.php +++ b/app/Helpers/MarkdownHelper.php @@ -1,16 +1,18 @@ 'true' ]; + } + + return $this->queryBuilder + ->fields([ + 'title', 'slug', 'content', 'view', 'meta', + 'media_teaser.*', + 'media_hero.*' + ]) + ->aliases('view', 'template') + ->filter([ + 'status' => 'published', + 'slug' => $slug + ]) + ->findOne(); + } +} diff --git a/app/Repositories/RepositoryAbstract.php b/app/Repositories/RepositoryAbstract.php new file mode 100644 index 0000000..39a552c --- /dev/null +++ b/app/Repositories/RepositoryAbstract.php @@ -0,0 +1,36 @@ +queryBuilder = $pirectus->items($this->endpoint); + } else { + throw new \Exception('Error! Pirectus not initialized!'); + } + } +} \ No newline at end of file diff --git a/app/bootstrap.php b/app/bootstrap.php new file mode 100644 index 0000000..541ab02 --- /dev/null +++ b/app/bootstrap.php @@ -0,0 +1,37 @@ +load(); + +// display all errors if debug is true +if ($_ENV['APP_DEBUG'] === true) { + error_reporting(E_ALL); + ini_set('display_errors', 1); +} + +// create app +$flight = Flight::app(); + +// setting view path +$flight->set('flight.views.path', __DIR__.'/../resources/views'); + +// adding blade for templates +$flight->register('view', 'Jenssegers\Blade\Blade', [ $flight->get('flight.views.path'), __DIR__.'/../storage/cache']); +$flight->map('render', function($view, $data) { + echo Flight::view()->make($view, $data); +}); + +// setting path +$flight->set('basePath', __DIR__.'/../'); +$flight->set('publicPath', __DIR__.'/../public'); +$flight->set('storagePath', __DIR__.'/../storage'); + +// adding pirectus +$flight->register('pirectus', 'Pirectus\Pirectus', [ $_ENV['DIRECTUS_API_URL'], [ + 'auth' => new \Pirectus\Auth\TokenAuth($_ENV['DIRECTUS_API_TOKEN']) + ] +]); \ No newline at end of file diff --git a/composer.json b/composer.json index d318506..dd2a99d 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "tentakelfabrik/super-gear-directus", - "version": "0.3.0", - "type": "library", + "version": "1.0.0-rc", + "type": "project", "license": "MIT", "authors": [ { @@ -12,15 +12,16 @@ ], "minimum-stability": "stable", "require": { - "php": "^7.0", - "mikecao/flight": "^1.2", + "mikecao/flight": "1.3.*", "erusev/parsedown": "1.7.*", - "vlucas/phpdotenv": "3.3.*", - "jenssegers/blade": "v1.2.3" + "vlucas/phpdotenv": "5.3.*", + "jenssegers/blade": "1.4.*", + "tentakelfabrik/pirectus": "^0.1.2", + "cocur/slugify": "^4.0" }, "autoload": { "psr-4": { - "SuperGear\\Directus\\": "src/" + "App\\": "app/" } } } diff --git a/composer.lock b/composer.lock index a625e2b..475b371 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,82 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "7f0e5472c762cc81597c32851bf0486c", + "content-hash": "fcd79dd392240661e898bba640146723", "packages": [ + { + "name": "cocur/slugify", + "version": "v4.0.0", + "source": { + "type": "git", + "url": "https://github.com/cocur/slugify.git", + "reference": "3f1ffc300f164f23abe8b64ffb3f92d35cec8307" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/cocur/slugify/zipball/3f1ffc300f164f23abe8b64ffb3f92d35cec8307", + "reference": "3f1ffc300f164f23abe8b64ffb3f92d35cec8307", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "php": ">=7.0" + }, + "conflict": { + "symfony/config": "<3.4 || >=4,<4.3", + "symfony/dependency-injection": "<3.4 || >=4,<4.3", + "symfony/http-kernel": "<3.4 || >=4,<4.3", + "twig/twig": "<2.12.1" + }, + "require-dev": { + "laravel/framework": "~5.1", + "latte/latte": "~2.2", + "league/container": "^2.2.0", + "mikey179/vfsstream": "~1.6.8", + "mockery/mockery": "^1.3", + "nette/di": "~2.4", + "phpunit/phpunit": "^5.7.27", + "pimple/pimple": "~1.1", + "plumphp/plum": "~0.1", + "symfony/config": "^3.4 || ^4.3 || ^5.0", + "symfony/dependency-injection": "^3.4 || ^4.3 || ^5.0", + "symfony/http-kernel": "^3.4 || ^4.3 || ^5.0", + "twig/twig": "^2.12.1 || ~3.0", + "zendframework/zend-modulemanager": "~2.2", + "zendframework/zend-servicemanager": "~2.2", + "zendframework/zend-view": "~2.2" + }, + "type": "library", + "autoload": { + "psr-4": { + "Cocur\\Slugify\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Florian Eckerstorfer", + "email": "florian@eckerstorfer.co", + "homepage": "https://florian.ec" + }, + { + "name": "Ivo Bathke", + "email": "ivo.bathke@gmail.com" + } + ], + "description": "Converts a string into a slug.", + "keywords": [ + "slug", + "slugify" + ], + "support": { + "issues": "https://github.com/cocur/slugify/issues", + "source": "https://github.com/cocur/slugify/tree/master" + }, + "time": "2019-12-14T13:04:14+00:00" + }, { "name": "doctrine/inflector", "version": "2.0.3", @@ -81,6 +155,24 @@ "uppercase", "words" ], + "support": { + "issues": "https://github.com/doctrine/inflector/issues", + "source": "https://github.com/doctrine/inflector/tree/2.0.x" + }, + "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": "2020-05-29T15:13:26+00:00" }, { @@ -127,31 +219,508 @@ "markdown", "parser" ], + "support": { + "issues": "https://github.com/erusev/parsedown/issues", + "source": "https://github.com/erusev/parsedown/tree/1.7.x" + }, "time": "2019-12-30T22:54:17+00:00" }, + { + "name": "graham-campbell/result-type", + "version": "v1.0.2", + "source": { + "type": "git", + "url": "https://github.com/GrahamCampbell/Result-Type.git", + "reference": "84afea85c6841deeea872f36249a206e878a5de0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/84afea85c6841deeea872f36249a206e878a5de0", + "reference": "84afea85c6841deeea872f36249a206e878a5de0", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "phpoption/phpoption": "^1.8" + }, + "require-dev": { + "phpunit/phpunit": "^6.5.14 || ^7.5.20 || ^8.5.19 || ^9.5.8" + }, + "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" + } + ], + "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.0.2" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/graham-campbell/result-type", + "type": "tidelift" + } + ], + "time": "2021-08-28T21:34:50+00:00" + }, + { + "name": "guzzlehttp/guzzle", + "version": "7.3.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "7008573787b430c1c1f650e3722d9bba59967628" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/7008573787b430c1c1f650e3722d9bba59967628", + "reference": "7008573787b430c1c1f650e3722d9bba59967628", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^1.4", + "guzzlehttp/psr7": "^1.7 || ^2.0", + "php": "^7.2.5 || ^8.0", + "psr/http-client": "^1.0" + }, + "provide": { + "psr/http-client-implementation": "1.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.4.1", + "ext-curl": "*", + "php-http/client-integration-tests": "^3.0", + "phpunit/phpunit": "^8.5.5 || ^9.3.5", + "psr/log": "^1.1" + }, + "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": { + "branch-alias": { + "dev-master": "7.3-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", + "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.3.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://github.com/alexeyshockov", + "type": "github" + }, + { + "url": "https://github.com/gmponos", + "type": "github" + } + ], + "time": "2021-03-23T11:33:13+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "136a635e2b4a49b9d79e9c8fee267ffb257fdba0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/136a635e2b4a49b9d79e9c8fee267ffb257fdba0", + "reference": "136a635e2b4a49b9d79e9c8fee267ffb257fdba0", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "symfony/phpunit-bridge": "^4.4 || ^5.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.5-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "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/1.5.0" + }, + "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": "2021-10-07T13:05:22+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "2.1.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "089edd38f5b8abba6cb01567c2a8aaa47cec4c72" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/089edd38f5b8abba6cb01567c2a8aaa47cec4c72", + "reference": "089edd38f5b8abba6cb01567c2a8aaa47cec4c72", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.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.4.1", + "http-interop/http-factory-tests": "^0.9", + "phpunit/phpunit": "^8.5.8 || ^9.3.10" + }, + "suggest": { + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "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.1.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": "2021-10-06T17:43:30+00:00" + }, + { + "name": "illuminate/bus", + "version": "v8.63.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/bus.git", + "reference": "a222094903c473b6b0ade0b0b0e20b83ae1472b6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/bus/zipball/a222094903c473b6b0ade0b0b0e20b83ae1472b6", + "reference": "a222094903c473b6b0ade0b0b0e20b83ae1472b6", + "shasum": "" + }, + "require": { + "illuminate/collections": "^8.0", + "illuminate/contracts": "^8.0", + "illuminate/pipeline": "^8.0", + "illuminate/support": "^8.0", + "php": "^7.3|^8.0" + }, + "suggest": { + "illuminate/queue": "Required to use closures when chaining jobs (^7.0)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "8.x-dev" + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Bus\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Bus package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2021-09-15T14:32:50+00:00" + }, + { + "name": "illuminate/collections", + "version": "v8.63.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/collections.git", + "reference": "8e6c29c49f28b90e9de0cac1c14290feb99202c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/collections/zipball/8e6c29c49f28b90e9de0cac1c14290feb99202c5", + "reference": "8e6c29c49f28b90e9de0cac1c14290feb99202c5", + "shasum": "" + }, + "require": { + "illuminate/contracts": "^8.0", + "illuminate/macroable": "^8.0", + "php": "^7.3|^8.0" + }, + "suggest": { + "symfony/var-dumper": "Required to use the dump method (^5.1.4)." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "8.x-dev" + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Support\\": "" + }, + "files": [ + "helpers.php" + ] + }, + "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": "2021-09-30T15:04:19+00:00" + }, { "name": "illuminate/container", - "version": "v6.18.19", + "version": "v8.63.0", "source": { "type": "git", "url": "https://github.com/illuminate/container.git", - "reference": "3147dc925108b7463be7701ddd50ae947ee6c0fd" + "reference": "ef73feb5216ef97ab7023cf59c0c8dbbd5505a9d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/container/zipball/3147dc925108b7463be7701ddd50ae947ee6c0fd", - "reference": "3147dc925108b7463be7701ddd50ae947ee6c0fd", + "url": "https://api.github.com/repos/illuminate/container/zipball/ef73feb5216ef97ab7023cf59c0c8dbbd5505a9d", + "reference": "ef73feb5216ef97ab7023cf59c0c8dbbd5505a9d", "shasum": "" }, "require": { - "illuminate/contracts": "^6.0", - "php": "^7.2", + "illuminate/contracts": "^8.0", + "php": "^7.3|^8.0", "psr/container": "^1.0" }, + "provide": { + "psr/container-implementation": "1.0" + }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.x-dev" + "dev-master": "8.x-dev" } }, "autoload": { @@ -171,31 +740,35 @@ ], "description": "The Illuminate Container package.", "homepage": "https://laravel.com", - "time": "2020-06-01T14:59:29+00:00" + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2021-09-15T14:32:50+00:00" }, { "name": "illuminate/contracts", - "version": "v6.18.19", + "version": "v8.63.0", "source": { "type": "git", "url": "https://github.com/illuminate/contracts.git", - "reference": "147855644b77121fdc58643230d9c042ff182ff0" + "reference": "ab4bb4ec3b36905ccf972c84f9aaa2bdd1153913" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/contracts/zipball/147855644b77121fdc58643230d9c042ff182ff0", - "reference": "147855644b77121fdc58643230d9c042ff182ff0", + "url": "https://api.github.com/repos/illuminate/contracts/zipball/ab4bb4ec3b36905ccf972c84f9aaa2bdd1153913", + "reference": "ab4bb4ec3b36905ccf972c84f9aaa2bdd1153913", "shasum": "" }, "require": { - "php": "^7.2", + "php": "^7.3|^8.0", "psr/container": "^1.0", "psr/simple-cache": "^1.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.x-dev" + "dev-master": "8.x-dev" } }, "autoload": { @@ -215,38 +788,48 @@ ], "description": "The Illuminate Contracts package.", "homepage": "https://laravel.com", - "time": "2020-05-13T20:53:59+00:00" + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2021-09-08T12:09:40+00:00" }, { "name": "illuminate/events", - "version": "v6.18.19", + "version": "v8.63.0", "source": { "type": "git", "url": "https://github.com/illuminate/events.git", - "reference": "baaafafe6572e75ac8c0387261c4b38e85d5c41f" + "reference": "b7f06cafb6c09581617f2ca05d69e9b159e5a35d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/events/zipball/baaafafe6572e75ac8c0387261c4b38e85d5c41f", - "reference": "baaafafe6572e75ac8c0387261c4b38e85d5c41f", + "url": "https://api.github.com/repos/illuminate/events/zipball/b7f06cafb6c09581617f2ca05d69e9b159e5a35d", + "reference": "b7f06cafb6c09581617f2ca05d69e9b159e5a35d", "shasum": "" }, "require": { - "illuminate/container": "^6.0", - "illuminate/contracts": "^6.0", - "illuminate/support": "^6.0", - "php": "^7.2" + "illuminate/bus": "^8.0", + "illuminate/collections": "^8.0", + "illuminate/container": "^8.0", + "illuminate/contracts": "^8.0", + "illuminate/macroable": "^8.0", + "illuminate/support": "^8.0", + "php": "^7.3|^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.x-dev" + "dev-master": "8.x-dev" } }, "autoload": { "psr-4": { "Illuminate\\Events\\": "" - } + }, + "files": [ + "functions.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -260,39 +843,49 @@ ], "description": "The Illuminate Events package.", "homepage": "https://laravel.com", - "time": "2020-06-08T19:10:21+00:00" + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2021-09-15T14:32:50+00:00" }, { "name": "illuminate/filesystem", - "version": "v6.18.19", + "version": "v8.63.0", "source": { "type": "git", "url": "https://github.com/illuminate/filesystem.git", - "reference": "5f2cb50514bfac44db2421580bee22cdde7b789a" + "reference": "f33219e5550f8f280169e933b91a95250920de06" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/filesystem/zipball/5f2cb50514bfac44db2421580bee22cdde7b789a", - "reference": "5f2cb50514bfac44db2421580bee22cdde7b789a", + "url": "https://api.github.com/repos/illuminate/filesystem/zipball/f33219e5550f8f280169e933b91a95250920de06", + "reference": "f33219e5550f8f280169e933b91a95250920de06", "shasum": "" }, "require": { - "illuminate/contracts": "^6.0", - "illuminate/support": "^6.0", - "php": "^7.2", - "symfony/finder": "^4.3.4" + "illuminate/collections": "^8.0", + "illuminate/contracts": "^8.0", + "illuminate/macroable": "^8.0", + "illuminate/support": "^8.0", + "php": "^7.3|^8.0", + "symfony/finder": "^5.1.4" }, "suggest": { - "league/flysystem": "Required to use the Flysystem local and FTP drivers (^1.0.34).", + "ext-ftp": "Required to use the Flysystem FTP driver.", + "illuminate/http": "Required for handling uploaded files (^7.0).", + "league/flysystem": "Required to use the Flysystem local and FTP drivers (^1.1).", "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^1.0).", "league/flysystem-cached-adapter": "Required to use the Flysystem cache (^1.0).", "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (^1.0).", - "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.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 (^5.1.4).", + "symfony/mime": "Required to enable support for guessing extensions (^5.1.4)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.x-dev" + "dev-master": "8.x-dev" } }, "autoload": { @@ -312,45 +905,146 @@ ], "description": "The Illuminate Filesystem package.", "homepage": "https://laravel.com", - "time": "2020-06-02T15:24:59+00:00" + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2021-07-20T13:46:01+00:00" + }, + { + "name": "illuminate/macroable", + "version": "v8.62.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/macroable.git", + "reference": "300aa13c086f25116b5f3cde3ca54ff5c822fb05" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/macroable/zipball/300aa13c086f25116b5f3cde3ca54ff5c822fb05", + "reference": "300aa13c086f25116b5f3cde3ca54ff5c822fb05", + "shasum": "" + }, + "require": { + "php": "^7.3|^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "8.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": "2020-10-27T15:20:30+00:00" + }, + { + "name": "illuminate/pipeline", + "version": "v8.63.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/pipeline.git", + "reference": "23aeff5b26ae4aee3f370835c76bd0f4e93f71d2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/pipeline/zipball/23aeff5b26ae4aee3f370835c76bd0f4e93f71d2", + "reference": "23aeff5b26ae4aee3f370835c76bd0f4e93f71d2", + "shasum": "" + }, + "require": { + "illuminate/contracts": "^8.0", + "illuminate/support": "^8.0", + "php": "^7.3|^8.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "8.x-dev" + } + }, + "autoload": { + "psr-4": { + "Illuminate\\Pipeline\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + } + ], + "description": "The Illuminate Pipeline package.", + "homepage": "https://laravel.com", + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2021-03-26T18:39:16+00:00" }, { "name": "illuminate/support", - "version": "v6.18.19", + "version": "v8.63.0", "source": { "type": "git", "url": "https://github.com/illuminate/support.git", - "reference": "aafc887fd5d4a51a7c81833938bce28d9c607a6d" + "reference": "259993e2119e99be17c10486f66c5a13b7fe4a70" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/support/zipball/aafc887fd5d4a51a7c81833938bce28d9c607a6d", - "reference": "aafc887fd5d4a51a7c81833938bce28d9c607a6d", + "url": "https://api.github.com/repos/illuminate/support/zipball/259993e2119e99be17c10486f66c5a13b7fe4a70", + "reference": "259993e2119e99be17c10486f66c5a13b7fe4a70", "shasum": "" }, "require": { "doctrine/inflector": "^1.4|^2.0", "ext-json": "*", "ext-mbstring": "*", - "illuminate/contracts": "^6.0", - "nesbot/carbon": "^2.0", - "php": "^7.2" + "illuminate/collections": "^8.0", + "illuminate/contracts": "^8.0", + "illuminate/macroable": "^8.0", + "nesbot/carbon": "^2.31", + "php": "^7.3|^8.0", + "voku/portable-ascii": "^1.4.8" }, "conflict": { "tightenco/collect": "<5.5.33" }, "suggest": { - "illuminate/filesystem": "Required to use the composer class (^6.0).", - "moontoast/math": "Required to use ordered UUIDs (^1.1).", - "ramsey/uuid": "Required to use Str::uuid() (^3.7).", - "symfony/process": "Required to use the composer class (^4.3.4).", - "symfony/var-dumper": "Required to use the dd function (^4.3.4).", - "vlucas/phpdotenv": "Required to use the Env class and env helper (^3.3)." + "illuminate/filesystem": "Required to use the composer class (^8.0).", + "league/commonmark": "Required to use Str::markdown() and Stringable::markdown() (^1.3|^2.0.2).", + "ramsey/uuid": "Required to use Str::uuid() (^4.2.2).", + "symfony/process": "Required to use the composer class (^5.1.4).", + "symfony/var-dumper": "Required to use the dd function (^5.1.4).", + "vlucas/phpdotenv": "Required to use the Env class and env helper (^5.2)." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.x-dev" + "dev-master": "8.x-dev" } }, "autoload": { @@ -373,36 +1067,41 @@ ], "description": "The Illuminate Support package.", "homepage": "https://laravel.com", - "time": "2020-06-01T14:38:14+00:00" + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2021-10-04T13:02:25+00:00" }, { "name": "illuminate/view", - "version": "v6.18.19", + "version": "v8.63.0", "source": { "type": "git", "url": "https://github.com/illuminate/view.git", - "reference": "1b691e94f8fe8c2e3f05d14a2f63e98cdb332ea4" + "reference": "875ca9f548b17e1a225469e0b0f8bae3c9e4ff71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/view/zipball/1b691e94f8fe8c2e3f05d14a2f63e98cdb332ea4", - "reference": "1b691e94f8fe8c2e3f05d14a2f63e98cdb332ea4", + "url": "https://api.github.com/repos/illuminate/view/zipball/875ca9f548b17e1a225469e0b0f8bae3c9e4ff71", + "reference": "875ca9f548b17e1a225469e0b0f8bae3c9e4ff71", "shasum": "" }, "require": { "ext-json": "*", - "illuminate/container": "^6.0", - "illuminate/contracts": "^6.0", - "illuminate/events": "^6.0", - "illuminate/filesystem": "^6.0", - "illuminate/support": "^6.0", - "php": "^7.2", - "symfony/debug": "^4.3.4" + "illuminate/collections": "^8.0", + "illuminate/container": "^8.0", + "illuminate/contracts": "^8.0", + "illuminate/events": "^8.0", + "illuminate/filesystem": "^8.0", + "illuminate/macroable": "^8.0", + "illuminate/support": "^8.0", + "php": "^7.3|^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.x-dev" + "dev-master": "8.x-dev" } }, "autoload": { @@ -422,24 +1121,28 @@ ], "description": "The Illuminate View package.", "homepage": "https://laravel.com", - "time": "2020-01-21T20:50:14+00:00" + "support": { + "issues": "https://github.com/laravel/framework/issues", + "source": "https://github.com/laravel/framework" + }, + "time": "2021-09-20T14:39:52+00:00" }, { "name": "jenssegers/blade", - "version": "v1.2.3", + "version": "v1.4.0", "source": { "type": "git", "url": "https://github.com/jenssegers/blade.git", - "reference": "920cde2b9f881368b51d53ef6a0a086212f5fad1" + "reference": "22a3700e9fc469c19dd1c5e5bd1b9138195e421f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jenssegers/blade/zipball/920cde2b9f881368b51d53ef6a0a086212f5fad1", - "reference": "920cde2b9f881368b51d53ef6a0a086212f5fad1", + "url": "https://api.github.com/repos/jenssegers/blade/zipball/22a3700e9fc469c19dd1c5e5bd1b9138195e421f", + "reference": "22a3700e9fc469c19dd1c5e5bd1b9138195e421f", "shasum": "" }, "require": { - "illuminate/view": "^5.5|^6.0", + "illuminate/view": "^5.5|^6.0|^7.0|^8.0", "php": ">=7.0" }, "require-dev": { @@ -470,20 +1173,34 @@ "template", "view" ], - "time": "2019-09-24T06:50:30+00:00" + "support": { + "issues": "https://github.com/jenssegers/blade/issues", + "source": "https://github.com/jenssegers/blade/tree/v1.4.0" + }, + "funding": [ + { + "url": "https://github.com/jenssegers", + "type": "github" + }, + { + "url": "https://opencollective.com/jenssegers-blade", + "type": "open_collective" + } + ], + "time": "2020-09-17T08:25:26+00:00" }, { "name": "mikecao/flight", - "version": "v1.3.8", + "version": "v1.3.9", "source": { "type": "git", "url": "https://github.com/mikecao/flight.git", - "reference": "b3120f8db2ae3b358c1c7a412a92d7aa008a57b4" + "reference": "bc5e03ca59accb3ef37e31b6d4a2a9c78c7bb7ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mikecao/flight/zipball/b3120f8db2ae3b358c1c7a412a92d7aa008a57b4", - "reference": "b3120f8db2ae3b358c1c7a412a92d7aa008a57b4", + "url": "https://api.github.com/repos/mikecao/flight/zipball/bc5e03ca59accb3ef37e31b6d4a2a9c78c7bb7ce", + "reference": "bc5e03ca59accb3ef37e31b6d4a2a9c78c7bb7ce", "shasum": "" }, "require": { @@ -513,35 +1230,41 @@ ], "description": "Flight is a fast, simple, extensible framework for PHP. Flight enables you to quickly and easily build RESTful web applications.", "homepage": "http://flightphp.com", - "time": "2020-01-23T05:33:11+00:00" + "support": { + "issues": "https://github.com/mikecao/flight/issues", + "source": "https://github.com/mikecao/flight/tree/v1.3.9" + }, + "time": "2021-04-05T01:36:59+00:00" }, { "name": "nesbot/carbon", - "version": "2.35.0", + "version": "2.53.1", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "4b9bd835261ef23d36397a46a76b496a458305e5" + "reference": "f4655858a784988f880c1b8c7feabbf02dfdf045" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/4b9bd835261ef23d36397a46a76b496a458305e5", - "reference": "4b9bd835261ef23d36397a46a76b496a458305e5", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/f4655858a784988f880c1b8c7feabbf02dfdf045", + "reference": "f4655858a784988f880c1b8c7feabbf02dfdf045", "shasum": "" }, "require": { "ext-json": "*", "php": "^7.1.8 || ^8.0", "symfony/polyfill-mbstring": "^1.0", + "symfony/polyfill-php80": "^1.16", "symfony/translation": "^3.4 || ^4.0 || ^5.0" }, "require-dev": { "doctrine/orm": "^2.7", - "friendsofphp/php-cs-fixer": "^2.14 || ^3.0", - "kylekatarnls/multi-tester": "^1.1", - "phpmd/phpmd": "^2.8", - "phpstan/phpstan": "^0.11", - "phpunit/phpunit": "^7.5 || ^8.0", + "friendsofphp/php-cs-fixer": "^3.0", + "kylekatarnls/multi-tester": "^2.0", + "phpmd/phpmd": "^2.9", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^0.12.54", + "phpunit/phpunit": "^7.5.20 || ^8.5.14", "squizlabs/php_codesniffer": "^3.4" }, "bin": [ @@ -550,18 +1273,153 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.x-dev", - "dev-3.x": "3.x-dev" + "dev-3.x": "3.x-dev", + "dev-master": "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": { + "issues": "https://github.com/briannesbitt/Carbon/issues", + "source": "https://github.com/briannesbitt/Carbon" + }, + "funding": [ + { + "url": "https://opencollective.com/Carbon", + "type": "open_collective" + }, + { + "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", + "type": "tidelift" + } + ], + "time": "2021-09-06T09:29:23+00:00" + }, + { + "name": "phpoption/phpoption", + "version": "1.8.0", + "source": { + "type": "git", + "url": "https://github.com/schmittjoh/php-option.git", + "reference": "5455cb38aed4523f99977c4a12ef19da4bfe2a28" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/5455cb38aed4523f99977c4a12ef19da4bfe2a28", + "reference": "5455cb38aed4523f99977c4a12ef19da4bfe2a28", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.4.1", + "phpunit/phpunit": "^6.5.14 || ^7.0.20 || ^8.5.19 || ^9.5.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8-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" + }, + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk" + } + ], + "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.8.0" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpoption/phpoption", + "type": "tidelift" + } + ], + "time": "2021-08-28T21:27:29+00:00" + }, + { + "name": "psr/container", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf" }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/8622567409010282b7aeebe4bb841fe98b58dcaf", + "reference": "8622567409010282b7aeebe4bb841fe98b58dcaf", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", "autoload": { "psr-4": { - "Carbon\\": "src/Carbon/" + "Psr\\Container\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -570,95 +1428,94 @@ ], "authors": [ { - "name": "Brian Nesbitt", - "email": "brian@nesbot.com", - "homepage": "http://nesbot.com" - }, - { - "name": "kylekatarnls", - "homepage": "http://github.com/kylekatarnls" + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" } ], - "description": "An API extension for DateTime that supports 281 different languages.", - "homepage": "http://carbon.nesbot.com", + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", "keywords": [ - "date", - "datetime", - "time" + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" ], - "time": "2020-05-24T18:27:52+00:00" + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/1.1.1" + }, + "time": "2021-03-05T17:36:06+00:00" }, { - "name": "phpoption/phpoption", - "version": "1.7.4", + "name": "psr/http-client", + "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/schmittjoh/php-option.git", - "reference": "b2ada2ad5d8a32b89088b8adc31ecd2e3a13baf3" + "url": "https://github.com/php-fig/http-client.git", + "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/schmittjoh/php-option/zipball/b2ada2ad5d8a32b89088b8adc31ecd2e3a13baf3", - "reference": "b2ada2ad5d8a32b89088b8adc31ecd2e3a13baf3", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", + "reference": "2dfb5f6c5eff0e91e20e913f8c5452ed95b86621", "shasum": "" }, "require": { - "php": "^5.5.9 || ^7.0 || ^8.0" - }, - "require-dev": { - "bamarni/composer-bin-plugin": "^1.3", - "phpunit/phpunit": "^4.8.35 || ^5.0 || ^6.0 || ^7.0" + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { "psr-4": { - "PhpOption\\": "src/PhpOption/" + "Psr\\Http\\Client\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "Apache-2.0" + "MIT" ], "authors": [ { - "name": "Johannes M. Schmitt", - "email": "schmittjoh@gmail.com" - }, - { - "name": "Graham Campbell", - "email": "graham@alt-three.com" + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" } ], - "description": "Option Type for PHP", + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", "keywords": [ - "language", - "option", - "php", - "type" + "http", + "http-client", + "psr", + "psr-18" ], - "time": "2020-06-07T10:40:07+00:00" + "support": { + "source": "https://github.com/php-fig/http-client/tree/master" + }, + "time": "2020-06-29T06:28:15+00:00" }, { - "name": "psr/container", - "version": "1.0.0", + "name": "psr/http-factory", + "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/php-fig/container.git", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + "url": "https://github.com/php-fig/http-factory.git", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/12ac7fcd07e5b077433f5f2bee95b3a771bf61be", + "reference": "12ac7fcd07e5b077433f5f2bee95b3a771bf61be", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=7.0.0", + "psr/http-message": "^1.0" }, "type": "library", "extra": { @@ -668,7 +1525,7 @@ }, "autoload": { "psr-4": { - "Psr\\Container\\": "src/" + "Psr\\Http\\Message\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -681,29 +1538,34 @@ "homepage": "http://www.php-fig.org/" } ], - "description": "Common Container Interface (PHP FIG PSR-11)", - "homepage": "https://github.com/php-fig/container", + "description": "Common interfaces for PSR-7 HTTP message factories", "keywords": [ - "PSR-11", - "container", - "container-interface", - "container-interop", - "psr" + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" ], - "time": "2017-02-14T16:28:37+00:00" + "support": { + "source": "https://github.com/php-fig/http-factory/tree/master" + }, + "time": "2019-04-30T12:38:16+00:00" }, { - "name": "psr/log", - "version": "1.1.3", + "name": "psr/http-message", + "version": "1.0.1", "source": { "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc" + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", - "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", "shasum": "" }, "require": { @@ -712,12 +1574,12 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Log\\": "Psr/Log/" + "Psr\\Http\\Message\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -730,14 +1592,20 @@ "homepage": "http://www.php-fig.org/" } ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", "keywords": [ - "log", + "http", + "http-message", "psr", - "psr-3" + "psr-7", + "request", + "response" ], - "time": "2020-03-23T09:12:05+00:00" + "support": { + "source": "https://github.com/php-fig/http-message/tree/master" + }, + "time": "2016-08-06T14:39:51+00:00" }, { "name": "psr/simple-cache", @@ -785,45 +1653,85 @@ "psr-16", "simple-cache" ], + "support": { + "source": "https://github.com/php-fig/simple-cache/tree/master" + }, "time": "2017-10-23T01:57:42+00:00" }, { - "name": "symfony/debug", - "version": "v4.4.9", + "name": "ralouphie/getallheaders", + "version": "3.0.3", "source": { "type": "git", - "url": "https://github.com/symfony/debug.git", - "reference": "28f92d08bb6d1fddf8158e02c194ad43870007e6" + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/28f92d08bb6d1fddf8158e02c194ad43870007e6", - "reference": "28f92d08bb6d1fddf8158e02c194ad43870007e6", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", "shasum": "" }, "require": { - "php": ">=7.1.3", - "psr/log": "~1.0", - "symfony/polyfill-php80": "^1.15" - }, - "conflict": { - "symfony/http-kernel": "<3.4" + "php": ">=5.6" }, "require-dev": { - "symfony/http-kernel": "^3.4|^4.0|^5.0" + "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": "symfony/deprecation-contracts", + "version": "v2.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5f38c8804a9e97d23e0c8d63341088cd8a22d627", + "reference": "5f38c8804a9e97d23e0c8d63341088cd8a22d627", + "shasum": "" + }, + "require": { + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.4-dev" + "dev-main": "2.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { - "psr-4": { - "Symfony\\Component\\Debug\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" + "files": [ + "function.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -832,41 +1740,54 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Debug Component", + "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", - "time": "2020-05-24T08:33:35+00:00" + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v2.4.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": "2021-03-23T23:28:01+00:00" }, { "name": "symfony/finder", - "version": "v4.4.9", + "version": "v5.3.7", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "5729f943f9854c5781984ed4907bbb817735776b" + "reference": "a10000ada1e600d109a6c7632e9ac42e8bf2fb93" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/5729f943f9854c5781984ed4907bbb817735776b", - "reference": "5729f943f9854c5781984ed4907bbb817735776b", + "url": "https://api.github.com/repos/symfony/finder/zipball/a10000ada1e600d109a6c7632e9ac42e8bf2fb93", + "reference": "a10000ada1e600d109a6c7632e9ac42e8bf2fb93", "shasum": "" }, "require": { - "php": "^7.1.3" + "php": ">=7.2.5", + "symfony/polyfill-php80": "^1.16" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "4.4-dev" - } - }, "autoload": { "psr-4": { "Symfony\\Component\\Finder\\": "" @@ -889,26 +1810,43 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Finder Component", + "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", - "time": "2020-03-27T16:54:36+00:00" + "support": { + "source": "https://github.com/symfony/finder/tree/v5.3.7" + }, + "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": "2021-08-04T21:20:46+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.17.0", + "version": "v1.23.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9" + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e94c8b1bbe2bc77507a1056cdb06451c75b427f9", - "reference": "e94c8b1bbe2bc77507a1056cdb06451c75b427f9", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", + "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { "ext-ctype": "For best performance" @@ -916,7 +1854,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.17-dev" + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -949,24 +1891,41 @@ "polyfill", "portable" ], - "time": "2020-05-12T16:14:59+00:00" + "support": { + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.23.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": "2021-02-19T12:13:01+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.17.0", + "version": "v1.23.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "fa79b11539418b02fc5e1897267673ba2c19419c" + "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/fa79b11539418b02fc5e1897267673ba2c19419c", - "reference": "fa79b11539418b02fc5e1897267673ba2c19419c", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6", + "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.1" }, "suggest": { "ext-mbstring": "For best performance" @@ -974,7 +1933,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.17-dev" + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -1008,29 +1971,50 @@ "portable", "shim" ], - "time": "2020-05-12T16:47:27+00:00" + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.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": "2021-05-27T12:26:48+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.17.0", + "version": "v1.23.1", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "5e30b2799bc1ad68f7feb62b60a73743589438dd" + "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/5e30b2799bc1ad68f7feb62b60a73743589438dd", - "reference": "5e30b2799bc1ad68f7feb62b60a73743589438dd", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be", + "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be", "shasum": "" }, "require": { - "php": ">=7.0.8" + "php": ">=7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.17-dev" + "dev-main": "1.23-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { @@ -1070,27 +2054,45 @@ "portable", "shim" ], - "time": "2020-05-12T16:47:27+00:00" + "support": { + "source": "https://github.com/symfony/polyfill-php80/tree/v1.23.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": "2021-07-28T13:41:28+00:00" }, { "name": "symfony/translation", - "version": "v5.1.0", + "version": "v5.3.9", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "d387f07d4c15f9c09439cf3f13ddbe0b2c5e8be2" + "reference": "6e69f3551c1a3356cf6ea8d019bf039a0f8b6886" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/d387f07d4c15f9c09439cf3f13ddbe0b2c5e8be2", - "reference": "d387f07d4c15f9c09439cf3f13ddbe0b2c5e8be2", + "url": "https://api.github.com/repos/symfony/translation/zipball/6e69f3551c1a3356cf6ea8d019bf039a0f8b6886", + "reference": "6e69f3551c1a3356cf6ea8d019bf039a0f8b6886", "shasum": "" }, "require": { "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "^1.15", - "symfony/translation-contracts": "^2" + "symfony/polyfill-php80": "^1.16", + "symfony/translation-contracts": "^2.3" }, "conflict": { "symfony/config": "<4.4", @@ -1100,16 +2102,17 @@ "symfony/yaml": "<4.4" }, "provide": { - "symfony/translation-implementation": "2.0" + "symfony/translation-implementation": "2.3" }, "require-dev": { - "psr/log": "~1.0", + "psr/log": "^1|^2|^3", "symfony/config": "^4.4|^5.0", "symfony/console": "^4.4|^5.0", "symfony/dependency-injection": "^5.0", "symfony/finder": "^4.4|^5.0", "symfony/http-kernel": "^5.0", "symfony/intl": "^4.4|^5.0", + "symfony/polyfill-intl-icu": "^1.21", "symfony/service-contracts": "^1.1.2|^2", "symfony/yaml": "^4.4|^5.0" }, @@ -1119,12 +2122,10 @@ "symfony/yaml": "" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, "autoload": { + "files": [ + "Resources/functions.php" + ], "psr-4": { "Symfony\\Component\\Translation\\": "" }, @@ -1146,22 +2147,39 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Translation Component", + "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", - "time": "2020-05-30T20:35:19+00:00" + "support": { + "source": "https://github.com/symfony/translation/tree/v5.3.9" + }, + "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": "2021-08-26T08:22:53+00:00" }, { "name": "symfony/translation-contracts", - "version": "v2.1.2", + "version": "v2.4.0", "source": { "type": "git", "url": "https://github.com/symfony/translation-contracts.git", - "reference": "e5ca07c8f817f865f618aa072c2fe8e0e637340e" + "reference": "95c812666f3e91db75385749fe219c5e494c7f95" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/e5ca07c8f817f865f618aa072c2fe8e0e637340e", - "reference": "e5ca07c8f817f865f618aa072c2fe8e0e637340e", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/95c812666f3e91db75385749fe219c5e494c7f95", + "reference": "95c812666f3e91db75385749fe219c5e494c7f95", "shasum": "" }, "require": { @@ -1173,7 +2191,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-main": "2.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" } }, "autoload": { @@ -1205,34 +2227,100 @@ "interoperability", "standards" ], - "time": "2020-05-20T17:43:50+00:00" + "support": { + "source": "https://github.com/symfony/translation-contracts/tree/v2.4.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": "2021-03-23T23:28:01+00:00" + }, + { + "name": "tentakelfabrik/pirectus", + "version": "0.1.1", + "source": { + "type": "git", + "url": "https://github.com/tentakelfabrik/pirectus.git", + "reference": "64d168bb3d5e4c4d8eec3faa7cdcaba22fdd9ca0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/tentakelfabrik/pirectus/zipball/64d168bb3d5e4c4d8eec3faa7cdcaba22fdd9ca0", + "reference": "64d168bb3d5e4c4d8eec3faa7cdcaba22fdd9ca0", + "shasum": "" + }, + "require": { + "guzzlehttp/guzzle": "^7.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Pirectus\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Björn Hase", + "email": "me@tentakelfabrik.de", + "homepage": "https://tentakelfabrik.de" + } + ], + "support": { + "issues": "https://github.com/tentakelfabrik/pirectus/issues", + "source": "https://github.com/tentakelfabrik/pirectus/tree/v0.1.1" + }, + "time": "2021-10-11T07:32:53+00:00" }, { "name": "vlucas/phpdotenv", - "version": "v3.3.3", + "version": "v5.3.1", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "dbcc609971dd9b55f48b8008b553d79fd372ddde" + "reference": "accaddf133651d4b5cf81a119f25296736ffc850" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/dbcc609971dd9b55f48b8008b553d79fd372ddde", - "reference": "dbcc609971dd9b55f48b8008b553d79fd372ddde", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/accaddf133651d4b5cf81a119f25296736ffc850", + "reference": "accaddf133651d4b5cf81a119f25296736ffc850", "shasum": "" }, "require": { - "php": "^5.4 || ^7.0", - "phpoption/phpoption": "^1.5", - "symfony/polyfill-ctype": "^1.9" + "ext-pcre": "*", + "graham-campbell/result-type": "^1.0.2", + "php": "^7.1.3 || ^8.0", + "phpoption/phpoption": "^1.8", + "symfony/polyfill-ctype": "^1.23", + "symfony/polyfill-mbstring": "^1.23.1", + "symfony/polyfill-php80": "^1.23.1" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.0 || ^6.0" + "bamarni/composer-bin-plugin": "^1.4.1", + "ext-filter": "*", + "phpunit/phpunit": "^7.5.20 || ^8.5.21 || ^9.5.10" + }, + "suggest": { + "ext-filter": "Required to use the boolean validator." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "5.3-dev" } }, "autoload": { @@ -1245,10 +2333,13 @@ "BSD-3-Clause" ], "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk" + }, { "name": "Vance Lucas", - "email": "vance@vancelucas.com", - "homepage": "http://www.vancelucas.com" + "email": "vance@vancelucas.com" } ], "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", @@ -1257,7 +2348,95 @@ "env", "environment" ], - "time": "2019-03-06T09:39:45+00:00" + "support": { + "issues": "https://github.com/vlucas/phpdotenv/issues", + "source": "https://github.com/vlucas/phpdotenv/tree/v5.3.1" + }, + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv", + "type": "tidelift" + } + ], + "time": "2021-10-02T19:24:42+00:00" + }, + { + "name": "voku/portable-ascii", + "version": "1.5.6", + "source": { + "type": "git", + "url": "https://github.com/voku/portable-ascii.git", + "reference": "80953678b19901e5165c56752d087fc11526017c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/voku/portable-ascii/zipball/80953678b19901e5165c56752d087fc11526017c", + "reference": "80953678b19901e5165c56752d087fc11526017c", + "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": "http://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/1.5.6" + }, + "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": "2020-11-12T00:07:28+00:00" } ], "packages-dev": [], @@ -1266,8 +2445,7 @@ "stability-flags": [], "prefer-stable": false, "prefer-lowest": false, - "platform": { - "php": "^7.0" - }, - "platform-dev": [] + "platform": [], + "platform-dev": [], + "plugin-api-version": "2.1.0" } diff --git a/public/index.php b/public/index.php new file mode 100644 index 0000000..72c81ef --- /dev/null +++ b/public/index.php @@ -0,0 +1,10 @@ +route('GET /404', array(new App\Controllers\PageController, 'notFoundAction')); +$flight->route('GET /(@slug:[a-zA-Z0-9_-])', array(new App\Controllers\PageController, 'getAction')); + +$flight->start(); diff --git a/resources/views/layout.blade.php b/resources/views/layout.blade.php new file mode 100644 index 0000000..847b61d --- /dev/null +++ b/resources/views/layout.blade.php @@ -0,0 +1,38 @@ +@inject('pageRepository', 'App\Repositories\PageRepository') +@inject('markdownHelper', 'App\Helpers\MarkdownHelper') +@inject('slugify', 'Cocur\Slugify\Slugify') + + + + + + + + Elina Penner | {{ $page['data']['title'] }} + + + + + + + @stack('head') + + + + + +
+ @yield('content') +
+ + + + @stack('scripts') + + diff --git a/resources/views/page/404.blade.php b/resources/views/page/404.blade.php new file mode 100644 index 0000000..b0b8610 --- /dev/null +++ b/resources/views/page/404.blade.php @@ -0,0 +1,8 @@ +@extends('layout') + +@section('header') +@endsection + +@section('content') +Wrong? Go back! +@endsection diff --git a/resources/views/page/default.blade.php b/resources/views/page/default.blade.php new file mode 100644 index 0000000..251ed8d --- /dev/null +++ b/resources/views/page/default.blade.php @@ -0,0 +1,12 @@ +@extends('layout') + +@inject('markdownHelper', 'App\Helpers\MarkdownHelper') + +@section('content') +

+ {{ $page['data']['title'] }} +

+
+ {!! $markdownHelper->parse($page['data']['content']) !!} +
+@endsection diff --git a/resources/views/partials/svg.blade.php b/resources/views/partials/svg.blade.php new file mode 100644 index 0000000..0e90db4 --- /dev/null +++ b/resources/views/partials/svg.blade.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/snapshot.yaml b/snapshot.yaml new file mode 100644 index 0000000..5896ea5 --- /dev/null +++ b/snapshot.yaml @@ -0,0 +1,2341 @@ +version: 1 +directus: 9.0.0-rc.95 +collections: + - collection: menu_items + meta: + collection: menu_items + icon: null + note: null + display_template: null + hidden: true + singleton: false + translations: null + archive_field: null + archive_app_filter: true + archive_value: null + unarchive_value: null + sort_field: null + accountability: all + color: null + item_duplication_fields: null + schema: + name: menu_items + schema: db + comment: '' + collation: utf8_general_ci + engine: InnoDB + - collection: menus_menu_items + meta: + collection: menus_menu_items + icon: import_export + note: null + display_template: null + hidden: true + singleton: false + translations: null + archive_field: null + archive_app_filter: true + archive_value: null + unarchive_value: null + sort_field: null + accountability: all + color: null + item_duplication_fields: null + schema: + name: menus_menu_items + schema: db + comment: '' + collation: utf8_general_ci + engine: InnoDB + - collection: snippets + meta: + collection: snippets + icon: null + note: null + display_template: null + hidden: false + singleton: false + translations: null + archive_field: status + archive_app_filter: true + archive_value: archived + unarchive_value: draft + sort_field: sort + accountability: all + color: null + item_duplication_fields: null + schema: + name: snippets + schema: db + comment: '' + collation: utf8_general_ci + engine: InnoDB + - collection: posts + meta: + collection: posts + icon: null + note: null + display_template: null + hidden: false + singleton: false + translations: null + archive_field: status + archive_app_filter: true + archive_value: archived + unarchive_value: draft + sort_field: null + accountability: all + color: null + item_duplication_fields: null + schema: + name: posts + schema: db + comment: '' + collation: utf8_general_ci + engine: InnoDB + - collection: menus + meta: + collection: menus + icon: null + note: null + display_template: null + hidden: false + singleton: false + translations: null + archive_field: status + archive_app_filter: true + archive_value: archived + unarchive_value: draft + sort_field: null + accountability: all + color: null + item_duplication_fields: null + schema: + name: menus + schema: db + comment: '' + collation: utf8_general_ci + engine: InnoDB + - collection: pages + meta: + collection: pages + icon: null + note: null + display_template: null + hidden: false + singleton: false + translations: null + archive_field: status + archive_app_filter: true + archive_value: archived + unarchive_value: draft + sort_field: null + accountability: all + color: null + item_duplication_fields: null + schema: + name: pages + schema: db + comment: '' + collation: utf8_general_ci + engine: InnoDB +fields: + - collection: menu_items + field: page + type: string + schema: + name: page + table: menu_items + data_type: char + default_value: null + generation_expression: null + max_length: 36 + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: true + is_unique: false + is_primary_key: false + has_auto_increment: false + foreign_key_column: id + foreign_key_table: pages + comment: '' + meta: + collection: menu_items + field: page + special: null + interface: select-dropdown-m2o + options: + template: "{{title}} /\_{{slug}}" + display: raw + display_options: null + readonly: false + hidden: false + sort: 4 + width: full + group: null + translations: null + note: null + conditions: null + required: false + - collection: menus_menu_items + field: menu_items_id + type: string + schema: + name: menu_items_id + table: menus_menu_items + data_type: char + default_value: null + generation_expression: null + max_length: 36 + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: true + is_unique: false + is_primary_key: false + has_auto_increment: false + foreign_key_column: id + foreign_key_table: menu_items + comment: '' + meta: + collection: menus_menu_items + field: menu_items_id + special: null + interface: null + options: null + display: null + display_options: null + readonly: false + hidden: true + sort: null + width: full + group: null + translations: null + note: null + conditions: null + required: false + - collection: menus_menu_items + field: menus_id + type: string + schema: + name: menus_id + table: menus_menu_items + data_type: char + default_value: null + generation_expression: null + max_length: 36 + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: true + is_unique: false + is_primary_key: false + has_auto_increment: false + foreign_key_column: id + foreign_key_table: menus + comment: '' + meta: + collection: menus_menu_items + field: menus_id + special: null + interface: null + options: null + display: null + display_options: null + readonly: false + hidden: true + sort: null + width: full + group: null + translations: null + note: null + conditions: null + required: false + - collection: snippets + field: file + type: string + schema: + name: file + table: snippets + data_type: char + default_value: null + generation_expression: null + max_length: 36 + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: true + is_unique: false + is_primary_key: false + has_auto_increment: false + foreign_key_column: id + foreign_key_table: directus_files + comment: '' + meta: + collection: snippets + field: file + special: null + interface: file + options: null + display: file + display_options: null + readonly: false + hidden: false + sort: 7 + width: full + group: null + translations: null + note: null + conditions: null + required: false + - collection: snippets + field: user_created + type: string + schema: + name: user_created + table: snippets + data_type: char + default_value: null + generation_expression: null + max_length: 36 + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: true + is_unique: false + is_primary_key: false + has_auto_increment: false + foreign_key_column: id + foreign_key_table: directus_users + comment: '' + meta: + collection: snippets + field: user_created + special: + - user-created + interface: select-dropdown-m2o + options: + template: '{{avatar.$thumbnail}} {{first_name}} {{last_name}}' + display: user + display_options: null + readonly: true + hidden: true + sort: 8 + width: half + group: null + translations: null + note: null + conditions: null + required: false + - collection: snippets + field: user_updated + type: string + schema: + name: user_updated + table: snippets + data_type: char + default_value: null + generation_expression: null + max_length: 36 + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: true + is_unique: false + is_primary_key: false + has_auto_increment: false + foreign_key_column: id + foreign_key_table: directus_users + comment: '' + meta: + collection: snippets + field: user_updated + special: + - user-updated + interface: select-dropdown-m2o + options: + template: '{{avatar.$thumbnail}} {{first_name}} {{last_name}}' + display: user + display_options: null + readonly: true + hidden: true + sort: 10 + width: half + group: null + translations: null + note: null + conditions: null + required: false + - collection: posts + field: user_created + type: string + schema: + name: user_created + table: posts + data_type: char + default_value: null + generation_expression: null + max_length: 36 + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: true + is_unique: false + is_primary_key: false + has_auto_increment: false + foreign_key_column: id + foreign_key_table: directus_users + comment: '' + meta: + collection: posts + field: user_created + special: + - user-created + interface: select-dropdown-m2o + options: + template: '{{avatar.$thumbnail}} {{first_name}} {{last_name}}' + display: user + display_options: null + readonly: true + hidden: true + sort: null + width: half + group: null + translations: null + note: null + conditions: null + required: false + - collection: posts + field: user_updated + type: string + schema: + name: user_updated + table: posts + data_type: char + default_value: null + generation_expression: null + max_length: 36 + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: true + is_unique: false + is_primary_key: false + has_auto_increment: false + foreign_key_column: id + foreign_key_table: directus_users + comment: '' + meta: + collection: posts + field: user_updated + special: + - user-updated + interface: select-dropdown-m2o + options: + template: '{{avatar.$thumbnail}} {{first_name}} {{last_name}}' + display: user + display_options: null + readonly: true + hidden: true + sort: null + width: half + group: null + translations: null + note: null + conditions: null + required: false + - collection: menus + field: user_created + type: string + schema: + name: user_created + table: menus + data_type: char + default_value: null + generation_expression: null + max_length: 36 + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: true + is_unique: false + is_primary_key: false + has_auto_increment: false + foreign_key_column: id + foreign_key_table: directus_users + comment: '' + meta: + collection: menus + field: user_created + special: + - user-created + interface: select-dropdown-m2o + options: + template: '{{avatar.$thumbnail}} {{first_name}} {{last_name}}' + display: user + display_options: null + readonly: true + hidden: true + sort: 6 + width: half + group: null + translations: null + note: null + conditions: null + required: false + - collection: menus + field: user_updated + type: string + schema: + name: user_updated + table: menus + data_type: char + default_value: null + generation_expression: null + max_length: 36 + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: true + is_unique: false + is_primary_key: false + has_auto_increment: false + foreign_key_column: id + foreign_key_table: directus_users + comment: '' + meta: + collection: menus + field: user_updated + special: + - user-updated + interface: select-dropdown-m2o + options: + template: '{{avatar.$thumbnail}} {{first_name}} {{last_name}}' + display: user + display_options: null + readonly: true + hidden: true + sort: 8 + width: half + group: null + translations: null + note: null + conditions: null + required: false + - collection: pages + field: media_hero + type: string + schema: + name: media_hero + table: pages + data_type: char + default_value: null + generation_expression: null + max_length: 36 + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: true + is_unique: false + is_primary_key: false + has_auto_increment: false + foreign_key_column: id + foreign_key_table: directus_files + comment: '' + meta: + collection: pages + field: media_hero + special: null + interface: file-image + options: null + display: image + display_options: + circle: true + readonly: false + hidden: false + sort: 5 + width: full + group: null + translations: null + note: null + conditions: null + required: false + - collection: pages + field: media_teaser + type: string + schema: + name: media_teaser + table: pages + data_type: char + default_value: null + generation_expression: null + max_length: 36 + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: true + is_unique: false + is_primary_key: false + has_auto_increment: false + foreign_key_column: id + foreign_key_table: directus_files + comment: '' + meta: + collection: pages + field: media_teaser + special: null + interface: file-image + options: null + display: image + display_options: null + readonly: false + hidden: false + sort: 4 + width: full + group: null + translations: null + note: null + conditions: null + required: false + - collection: pages + field: user_created + type: string + schema: + name: user_created + table: pages + data_type: char + default_value: null + generation_expression: null + max_length: 36 + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: true + is_unique: false + is_primary_key: false + has_auto_increment: false + foreign_key_column: id + foreign_key_table: directus_users + comment: '' + meta: + collection: pages + field: user_created + special: + - user-created + interface: select-dropdown-m2o + options: + template: '{{avatar.$thumbnail}} {{first_name}} {{last_name}}' + display: user + display_options: null + readonly: true + hidden: true + sort: 10 + width: half + group: null + translations: null + note: null + conditions: null + required: false + - collection: pages + field: user_updated + type: string + schema: + name: user_updated + table: pages + data_type: char + default_value: null + generation_expression: null + max_length: 36 + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: true + is_unique: false + is_primary_key: false + has_auto_increment: false + foreign_key_column: id + foreign_key_table: directus_users + comment: '' + meta: + collection: pages + field: user_updated + special: + - user-updated + interface: select-dropdown-m2o + options: + template: '{{avatar.$thumbnail}} {{first_name}} {{last_name}}' + display: user + display_options: null + readonly: true + hidden: true + sort: 12 + width: half + group: null + translations: null + note: null + conditions: null + required: false + - collection: menu_items + field: id + type: uuid + schema: + name: id + table: menu_items + data_type: char + default_value: null + generation_expression: null + max_length: 36 + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: false + is_unique: false + is_primary_key: true + has_auto_increment: false + foreign_key_column: null + foreign_key_table: null + comment: '' + meta: + collection: menu_items + field: id + special: + - uuid + interface: input + options: null + display: null + display_options: null + readonly: true + hidden: true + sort: 1 + width: full + group: null + translations: null + note: null + conditions: null + required: false + - collection: menus_menu_items + field: id + type: integer + schema: + name: id + table: menus_menu_items + data_type: int unsigned + default_value: null + generation_expression: null + max_length: null + numeric_precision: 10 + numeric_scale: 0 + is_generated: false + is_nullable: false + is_unique: false + is_primary_key: true + has_auto_increment: true + foreign_key_column: null + foreign_key_table: null + comment: '' + meta: + collection: menus_menu_items + field: id + special: null + interface: null + options: null + display: null + display_options: null + readonly: false + hidden: true + sort: null + width: full + group: null + translations: null + note: null + conditions: null + required: false + - collection: snippets + field: id + type: uuid + schema: + name: id + table: snippets + data_type: char + default_value: null + generation_expression: null + max_length: 36 + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: false + is_unique: false + is_primary_key: true + has_auto_increment: false + foreign_key_column: null + foreign_key_table: null + comment: '' + meta: + collection: snippets + field: id + special: + - uuid + interface: input + options: null + display: null + display_options: null + readonly: true + hidden: true + sort: 1 + width: full + group: null + translations: null + note: null + conditions: null + required: false + - collection: posts + field: id + type: uuid + schema: + name: id + table: posts + data_type: char + default_value: null + generation_expression: null + max_length: 36 + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: false + is_unique: false + is_primary_key: true + has_auto_increment: false + foreign_key_column: null + foreign_key_table: null + comment: '' + meta: + collection: posts + field: id + special: + - uuid + interface: input + options: null + display: null + display_options: null + readonly: true + hidden: true + sort: null + width: full + group: null + translations: null + note: null + conditions: null + required: false + - collection: posts + field: title + type: string + schema: + name: title + table: posts + data_type: varchar + default_value: null + generation_expression: null + max_length: 255 + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: false + is_unique: true + is_primary_key: false + has_auto_increment: false + foreign_key_column: null + foreign_key_table: null + comment: '' + meta: + collection: posts + field: title + special: null + interface: input + options: + trim: true + display: raw + display_options: null + readonly: false + hidden: false + sort: null + width: full + group: null + translations: null + note: null + conditions: null + required: false + - collection: posts + field: slug + type: string + schema: + name: slug + table: posts + data_type: varchar + default_value: null + generation_expression: null + max_length: 255 + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: false + is_unique: true + is_primary_key: false + has_auto_increment: false + foreign_key_column: null + foreign_key_table: null + comment: '' + meta: + collection: posts + field: slug + special: null + interface: input + options: + slug: true + trim: true + display: raw + display_options: null + readonly: false + hidden: false + sort: null + width: full + group: null + translations: null + note: null + conditions: null + required: false + - collection: menus + field: id + type: uuid + schema: + name: id + table: menus + data_type: char + default_value: null + generation_expression: null + max_length: 36 + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: false + is_unique: false + is_primary_key: true + has_auto_increment: false + foreign_key_column: null + foreign_key_table: null + comment: '' + meta: + collection: menus + field: id + special: + - uuid + interface: input + options: null + display: null + display_options: null + readonly: true + hidden: true + sort: 1 + width: full + group: null + translations: null + note: null + conditions: null + required: false + - collection: menus + field: name + type: string + schema: + name: name + table: menus + data_type: varchar + default_value: null + generation_expression: null + max_length: 255 + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: false + is_unique: true + is_primary_key: false + has_auto_increment: false + foreign_key_column: null + foreign_key_table: null + comment: '' + meta: + collection: menus + field: name + special: null + interface: input + options: + trim: true + display: null + display_options: null + readonly: false + hidden: false + sort: 2 + width: full + group: null + translations: null + note: null + conditions: null + required: true + - collection: pages + field: id + type: uuid + schema: + name: id + table: pages + data_type: char + default_value: null + generation_expression: null + max_length: 36 + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: false + is_unique: false + is_primary_key: true + has_auto_increment: false + foreign_key_column: null + foreign_key_table: null + comment: '' + meta: + collection: pages + field: id + special: + - uuid + interface: input + options: null + display: null + display_options: null + readonly: true + hidden: true + sort: 1 + width: full + group: null + translations: null + note: null + conditions: null + required: false + - collection: pages + field: slug + type: string + schema: + name: slug + table: pages + data_type: varchar + default_value: null + generation_expression: null + max_length: 255 + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: true + is_unique: true + is_primary_key: false + has_auto_increment: false + foreign_key_column: null + foreign_key_table: null + comment: '' + meta: + collection: pages + field: slug + special: null + interface: input + options: + slug: true + trim: true + display: raw + display_options: null + readonly: false + hidden: false + sort: 3 + width: full + group: null + translations: null + note: null + conditions: null + required: false + - collection: menu_items + field: title + type: string + schema: + name: title + table: menu_items + data_type: varchar + default_value: null + generation_expression: null + max_length: 255 + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: true + is_unique: false + is_primary_key: false + has_auto_increment: false + foreign_key_column: null + foreign_key_table: null + comment: '' + meta: + collection: menu_items + field: title + special: null + interface: input + options: + trim: true + display: raw + display_options: null + readonly: false + hidden: false + sort: 2 + width: full + group: null + translations: null + note: null + conditions: null + required: false + - collection: menu_items + field: url + type: string + schema: + name: url + table: menu_items + data_type: varchar + default_value: null + generation_expression: null + max_length: 255 + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: true + is_unique: false + is_primary_key: false + has_auto_increment: false + foreign_key_column: null + foreign_key_table: null + comment: '' + meta: + collection: menu_items + field: url + special: null + interface: input + options: + trim: true + display: raw + display_options: null + readonly: false + hidden: false + sort: 5 + width: full + group: null + translations: null + note: null + conditions: null + required: false + - collection: menu_items + field: target + type: string + schema: + name: target + table: menu_items + data_type: varchar + default_value: null + generation_expression: null + max_length: 255 + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: true + is_unique: false + is_primary_key: false + has_auto_increment: false + foreign_key_column: null + foreign_key_table: null + comment: '' + meta: + collection: menu_items + field: target + special: null + interface: select-dropdown + options: + choices: + - text: New tab + value: _blank + allowOther: true + display: raw + display_options: null + readonly: false + hidden: false + sort: 3 + width: full + group: null + translations: null + note: null + conditions: null + required: false + - collection: snippets + field: status + type: string + schema: + name: status + table: snippets + data_type: varchar + default_value: draft + generation_expression: null + max_length: 255 + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: false + is_unique: false + is_primary_key: false + has_auto_increment: false + foreign_key_column: null + foreign_key_table: null + comment: '' + meta: + collection: snippets + field: status + special: null + interface: select-dropdown + options: + choices: + - text: $t:published + value: published + - text: $t:draft + value: draft + - text: $t:archived + value: archived + display: labels + display_options: + showAsDot: true + choices: + - background: '#00C897' + value: published + - background: '#D3DAE4' + value: draft + - background: '#F7971C' + value: archived + readonly: false + hidden: false + sort: 4 + width: full + group: null + translations: null + note: null + conditions: null + required: false + - collection: snippets + field: sort + type: integer + schema: + name: sort + table: snippets + data_type: int + default_value: null + generation_expression: null + max_length: null + numeric_precision: 10 + numeric_scale: 0 + is_generated: false + is_nullable: true + is_unique: false + is_primary_key: false + has_auto_increment: false + foreign_key_column: null + foreign_key_table: null + comment: '' + meta: + collection: snippets + field: sort + special: null + interface: input + options: null + display: null + display_options: null + readonly: false + hidden: true + sort: 5 + width: full + group: null + translations: null + note: null + conditions: null + required: false + - collection: snippets + field: date_created + type: timestamp + schema: + name: date_created + table: snippets + data_type: timestamp + default_value: null + generation_expression: null + max_length: null + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: true + is_unique: false + is_primary_key: false + has_auto_increment: false + foreign_key_column: null + foreign_key_table: null + comment: '' + meta: + collection: snippets + field: date_created + special: + - date-created + interface: datetime + options: null + display: datetime + display_options: + relative: true + readonly: true + hidden: true + sort: 9 + width: half + group: null + translations: null + note: null + conditions: null + required: false + - collection: snippets + field: date_updated + type: timestamp + schema: + name: date_updated + table: snippets + data_type: timestamp + default_value: null + generation_expression: null + max_length: null + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: true + is_unique: false + is_primary_key: false + has_auto_increment: false + foreign_key_column: null + foreign_key_table: null + comment: '' + meta: + collection: snippets + field: date_updated + special: + - date-updated + interface: datetime + options: null + display: datetime + display_options: + relative: true + readonly: true + hidden: true + sort: 11 + width: half + group: null + translations: null + note: null + conditions: null + required: false + - collection: snippets + field: content + type: text + schema: + name: content + table: snippets + data_type: text + default_value: null + generation_expression: null + max_length: 65535 + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: true + is_unique: false + is_primary_key: false + has_auto_increment: false + foreign_key_column: null + foreign_key_table: null + comment: '' + meta: + collection: snippets + field: content + special: null + interface: input-rich-text-md + options: null + display: raw + display_options: null + readonly: false + hidden: false + sort: 6 + width: full + group: null + translations: null + note: null + conditions: null + required: false + - collection: snippets + field: title + type: string + schema: + name: title + table: snippets + data_type: varchar + default_value: null + generation_expression: null + max_length: 255 + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: true + is_unique: false + is_primary_key: false + has_auto_increment: false + foreign_key_column: null + foreign_key_table: null + comment: '' + meta: + collection: snippets + field: title + special: null + interface: input + options: + trim: true + display: raw + display_options: null + readonly: false + hidden: false + sort: 2 + width: full + group: null + translations: null + note: null + conditions: null + required: false + - collection: snippets + field: slug + type: string + schema: + name: slug + table: snippets + data_type: varchar + default_value: null + generation_expression: null + max_length: 255 + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: true + is_unique: false + is_primary_key: false + has_auto_increment: false + foreign_key_column: null + foreign_key_table: null + comment: '' + meta: + collection: snippets + field: slug + special: null + interface: select-dropdown + options: + allowOther: true + display: raw + display_options: null + readonly: false + hidden: false + sort: 3 + width: full + group: null + translations: null + note: null + conditions: null + required: false + - collection: posts + field: status + type: string + schema: + name: status + table: posts + data_type: varchar + default_value: draft + generation_expression: null + max_length: 255 + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: false + is_unique: false + is_primary_key: false + has_auto_increment: false + foreign_key_column: null + foreign_key_table: null + comment: '' + meta: + collection: posts + field: status + special: null + interface: select-dropdown + options: + choices: + - text: $t:published + value: published + - text: $t:draft + value: draft + - text: $t:archived + value: archived + display: labels + display_options: + showAsDot: true + choices: + - background: '#00C897' + value: published + - background: '#D3DAE4' + value: draft + - background: '#F7971C' + value: archived + readonly: false + hidden: false + sort: null + width: full + group: null + translations: null + note: null + conditions: null + required: false + - collection: posts + field: date_created + type: timestamp + schema: + name: date_created + table: posts + data_type: timestamp + default_value: null + generation_expression: null + max_length: null + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: true + is_unique: false + is_primary_key: false + has_auto_increment: false + foreign_key_column: null + foreign_key_table: null + comment: '' + meta: + collection: posts + field: date_created + special: + - date-created + interface: datetime + options: null + display: datetime + display_options: + relative: true + readonly: true + hidden: true + sort: null + width: half + group: null + translations: null + note: null + conditions: null + required: false + - collection: posts + field: date_updated + type: timestamp + schema: + name: date_updated + table: posts + data_type: timestamp + default_value: null + generation_expression: null + max_length: null + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: true + is_unique: false + is_primary_key: false + has_auto_increment: false + foreign_key_column: null + foreign_key_table: null + comment: '' + meta: + collection: posts + field: date_updated + special: + - date-updated + interface: datetime + options: null + display: datetime + display_options: + relative: true + readonly: true + hidden: true + sort: null + width: half + group: null + translations: null + note: null + conditions: null + required: false + - collection: menus + field: status + type: string + schema: + name: status + table: menus + data_type: varchar + default_value: draft + generation_expression: null + max_length: 255 + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: false + is_unique: false + is_primary_key: false + has_auto_increment: false + foreign_key_column: null + foreign_key_table: null + comment: '' + meta: + collection: menus + field: status + special: null + interface: select-dropdown + options: + choices: + - text: $t:published + value: published + - text: $t:draft + value: draft + - text: $t:archived + value: archived + display: labels + display_options: + showAsDot: true + choices: + - background: '#00C897' + value: published + - background: '#D3DAE4' + value: draft + - background: '#F7971C' + value: archived + readonly: false + hidden: false + sort: 3 + width: full + group: null + translations: null + note: null + conditions: null + required: false + - collection: menus + field: date_created + type: timestamp + schema: + name: date_created + table: menus + data_type: timestamp + default_value: null + generation_expression: null + max_length: null + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: true + is_unique: false + is_primary_key: false + has_auto_increment: false + foreign_key_column: null + foreign_key_table: null + comment: '' + meta: + collection: menus + field: date_created + special: + - date-created + interface: datetime + options: null + display: datetime + display_options: + relative: true + readonly: true + hidden: true + sort: 7 + width: half + group: null + translations: null + note: null + conditions: null + required: false + - collection: menus + field: date_updated + type: timestamp + schema: + name: date_updated + table: menus + data_type: timestamp + default_value: null + generation_expression: null + max_length: null + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: true + is_unique: false + is_primary_key: false + has_auto_increment: false + foreign_key_column: null + foreign_key_table: null + comment: '' + meta: + collection: menus + field: date_updated + special: + - date-updated + interface: datetime + options: null + display: datetime + display_options: + relative: true + readonly: true + hidden: true + sort: 9 + width: half + group: null + translations: null + note: null + conditions: null + required: false + - collection: pages + field: status + type: string + schema: + name: status + table: pages + data_type: varchar + default_value: draft + generation_expression: null + max_length: 255 + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: false + is_unique: false + is_primary_key: false + has_auto_increment: false + foreign_key_column: null + foreign_key_table: null + comment: '' + meta: + collection: pages + field: status + special: null + interface: select-dropdown + options: + choices: + - text: $t:published + value: published + - text: $t:draft + value: draft + - text: $t:archived + value: archived + display: labels + display_options: + showAsDot: true + choices: + - background: '#00C897' + value: published + - background: '#D3DAE4' + value: draft + - background: '#F7971C' + value: archived + readonly: false + hidden: false + sort: 7 + width: full + group: null + translations: null + note: null + conditions: null + required: false + - collection: pages + field: date_created + type: timestamp + schema: + name: date_created + table: pages + data_type: timestamp + default_value: null + generation_expression: null + max_length: null + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: true + is_unique: false + is_primary_key: false + has_auto_increment: false + foreign_key_column: null + foreign_key_table: null + comment: '' + meta: + collection: pages + field: date_created + special: + - date-created + interface: datetime + options: null + display: datetime + display_options: + relative: true + readonly: true + hidden: true + sort: 11 + width: half + group: null + translations: null + note: null + conditions: null + required: false + - collection: pages + field: date_updated + type: timestamp + schema: + name: date_updated + table: pages + data_type: timestamp + default_value: null + generation_expression: null + max_length: null + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: true + is_unique: false + is_primary_key: false + has_auto_increment: false + foreign_key_column: null + foreign_key_table: null + comment: '' + meta: + collection: pages + field: date_updated + special: + - date-updated + interface: datetime + options: null + display: datetime + display_options: + relative: true + readonly: true + hidden: true + sort: 13 + width: half + group: null + translations: null + note: null + conditions: null + required: false + - collection: pages + field: title + type: string + schema: + name: title + table: pages + data_type: varchar + default_value: null + generation_expression: null + max_length: 255 + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: false + is_unique: false + is_primary_key: false + has_auto_increment: false + foreign_key_column: null + foreign_key_table: null + comment: '' + meta: + collection: pages + field: title + special: null + interface: input + options: + trim: true + display: raw + display_options: null + readonly: false + hidden: false + sort: 2 + width: full + group: null + translations: null + note: null + conditions: null + required: true + - collection: pages + field: meta + type: json + schema: + name: meta + table: pages + data_type: longtext + default_value: null + generation_expression: null + max_length: 4294967295 + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: true + is_unique: false + is_primary_key: false + has_auto_increment: false + foreign_key_column: null + foreign_key_table: null + comment: '' + meta: + collection: pages + field: meta + special: + - json + interface: list + options: + addLabel: add + fields: + - field: name + name: name + type: string + meta: + field: name + type: string + interface: input + options: + trim: true + - field: content + name: content + type: text + meta: + field: content + type: text + interface: input-multiline + options: + trim: true + template: '{{ name }}' + display: raw + display_options: null + readonly: false + hidden: false + sort: 8 + width: full + group: null + translations: null + note: null + conditions: null + required: false + - collection: pages + field: content + type: text + schema: + name: content + table: pages + data_type: text + default_value: null + generation_expression: null + max_length: 65535 + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: true + is_unique: false + is_primary_key: false + has_auto_increment: false + foreign_key_column: null + foreign_key_table: null + comment: '' + meta: + collection: pages + field: content + special: null + interface: input-rich-text-md + options: + customSyntax: null + display: raw + display_options: null + readonly: false + hidden: false + sort: 9 + width: full + group: null + translations: null + note: null + conditions: null + required: false + - collection: pages + field: template + type: string + schema: + name: template + table: pages + data_type: varchar + default_value: page/default + generation_expression: null + max_length: 255 + numeric_precision: null + numeric_scale: null + is_generated: false + is_nullable: true + is_unique: false + is_primary_key: false + has_auto_increment: false + foreign_key_column: null + foreign_key_table: null + comment: '' + meta: + collection: pages + field: template + special: null + interface: select-dropdown + options: + choices: + - text: Default + value: page/default + - text: Home + value: page/home + display: raw + display_options: null + readonly: false + hidden: false + sort: 6 + width: full + group: null + translations: null + note: null + conditions: null + required: false + - collection: menus + field: items + type: m2m + schema: null + meta: + collection: menus + field: items + special: + - m2m + interface: list-m2m + options: + template: '{{menu_items_id.title}} / {{menu_items_id.page.title}}' + display: raw + display_options: null + readonly: false + hidden: false + sort: 4 + width: full + group: null + translations: null + note: null + conditions: null + required: false +relations: + - collection: menu_items + field: page + related_collection: pages + schema: + table: menu_items + column: page + foreign_key_table: pages + foreign_key_column: id + constraint_name: menu_items_page_foreign + on_update: RESTRICT + on_delete: SET NULL + meta: + many_collection: menu_items + many_field: page + one_collection: pages + one_field: null + one_collection_field: null + one_allowed_collections: null + junction_field: null + sort_field: null + one_deselect_action: nullify + - collection: menus_menu_items + field: menu_items_id + related_collection: menu_items + schema: + table: menus_menu_items + column: menu_items_id + foreign_key_table: menu_items + foreign_key_column: id + constraint_name: menus_menu_items_menu_items_id_foreign + on_update: RESTRICT + on_delete: SET NULL + meta: + many_collection: menus_menu_items + many_field: menu_items_id + one_collection: menu_items + one_field: null + one_collection_field: null + one_allowed_collections: null + junction_field: menus_id + sort_field: null + one_deselect_action: nullify + - collection: menus_menu_items + field: menus_id + related_collection: menus + schema: + table: menus_menu_items + column: menus_id + foreign_key_table: menus + foreign_key_column: id + constraint_name: menus_menu_items_menus_id_foreign + on_update: RESTRICT + on_delete: CASCADE + meta: + many_collection: menus_menu_items + many_field: menus_id + one_collection: menus + one_field: items + one_collection_field: null + one_allowed_collections: null + junction_field: menu_items_id + sort_field: null + one_deselect_action: nullify + - collection: snippets + field: file + related_collection: directus_files + schema: + table: snippets + column: file + foreign_key_table: directus_files + foreign_key_column: id + constraint_name: snippets_file_foreign + on_update: RESTRICT + on_delete: RESTRICT + meta: + many_collection: snippets + many_field: file + one_collection: directus_files + one_field: null + one_collection_field: null + one_allowed_collections: null + junction_field: null + sort_field: null + one_deselect_action: nullify + - collection: snippets + field: user_created + related_collection: directus_users + schema: + table: snippets + column: user_created + foreign_key_table: directus_users + foreign_key_column: id + constraint_name: snippets_user_created_foreign + on_update: RESTRICT + on_delete: RESTRICT + meta: + many_collection: snippets + many_field: user_created + one_collection: directus_users + one_field: null + one_collection_field: null + one_allowed_collections: null + junction_field: null + sort_field: null + one_deselect_action: nullify + - collection: snippets + field: user_updated + related_collection: directus_users + schema: + table: snippets + column: user_updated + foreign_key_table: directus_users + foreign_key_column: id + constraint_name: snippets_user_updated_foreign + on_update: RESTRICT + on_delete: RESTRICT + meta: + many_collection: snippets + many_field: user_updated + one_collection: directus_users + one_field: null + one_collection_field: null + one_allowed_collections: null + junction_field: null + sort_field: null + one_deselect_action: nullify + - collection: posts + field: user_created + related_collection: directus_users + schema: + table: posts + column: user_created + foreign_key_table: directus_users + foreign_key_column: id + constraint_name: posts_user_created_foreign + on_update: RESTRICT + on_delete: RESTRICT + meta: + many_collection: posts + many_field: user_created + one_collection: directus_users + one_field: null + one_collection_field: null + one_allowed_collections: null + junction_field: null + sort_field: null + one_deselect_action: nullify + - collection: posts + field: user_updated + related_collection: directus_users + schema: + table: posts + column: user_updated + foreign_key_table: directus_users + foreign_key_column: id + constraint_name: posts_user_updated_foreign + on_update: RESTRICT + on_delete: RESTRICT + meta: + many_collection: posts + many_field: user_updated + one_collection: directus_users + one_field: null + one_collection_field: null + one_allowed_collections: null + junction_field: null + sort_field: null + one_deselect_action: nullify + - collection: menus + field: user_created + related_collection: directus_users + schema: + table: menus + column: user_created + foreign_key_table: directus_users + foreign_key_column: id + constraint_name: menus_user_created_foreign + on_update: RESTRICT + on_delete: RESTRICT + meta: + many_collection: menus + many_field: user_created + one_collection: directus_users + one_field: null + one_collection_field: null + one_allowed_collections: null + junction_field: null + sort_field: null + one_deselect_action: nullify + - collection: menus + field: user_updated + related_collection: directus_users + schema: + table: menus + column: user_updated + foreign_key_table: directus_users + foreign_key_column: id + constraint_name: menus_user_updated_foreign + on_update: RESTRICT + on_delete: RESTRICT + meta: + many_collection: menus + many_field: user_updated + one_collection: directus_users + one_field: null + one_collection_field: null + one_allowed_collections: null + junction_field: null + sort_field: null + one_deselect_action: nullify + - collection: pages + field: media_hero + related_collection: directus_files + schema: + table: pages + column: media_hero + foreign_key_table: directus_files + foreign_key_column: id + constraint_name: pages_media_hero_foreign + on_update: RESTRICT + on_delete: RESTRICT + meta: + many_collection: pages + many_field: media_hero + one_collection: directus_files + one_field: null + one_collection_field: null + one_allowed_collections: null + junction_field: null + sort_field: null + one_deselect_action: nullify + - collection: pages + field: media_teaser + related_collection: directus_files + schema: + table: pages + column: media_teaser + foreign_key_table: directus_files + foreign_key_column: id + constraint_name: pages_media_teaser_foreign + on_update: RESTRICT + on_delete: RESTRICT + meta: + many_collection: pages + many_field: media_teaser + one_collection: directus_files + one_field: null + one_collection_field: null + one_allowed_collections: null + junction_field: null + sort_field: null + one_deselect_action: nullify + - collection: pages + field: user_created + related_collection: directus_users + schema: + table: pages + column: user_created + foreign_key_table: directus_users + foreign_key_column: id + constraint_name: pages_user_created_foreign + on_update: RESTRICT + on_delete: RESTRICT + meta: + many_collection: pages + many_field: user_created + one_collection: directus_users + one_field: null + one_collection_field: null + one_allowed_collections: null + junction_field: null + sort_field: null + one_deselect_action: nullify + - collection: pages + field: user_updated + related_collection: directus_users + schema: + table: pages + column: user_updated + foreign_key_table: directus_users + foreign_key_column: id + constraint_name: pages_user_updated_foreign + on_update: RESTRICT + on_delete: RESTRICT + meta: + many_collection: pages + many_field: user_updated + one_collection: directus_users + one_field: null + one_collection_field: null + one_allowed_collections: null + junction_field: null + sort_field: null + one_deselect_action: nullify diff --git a/src/Collections/AbstractCollection.php b/src/Collections/AbstractCollection.php deleted file mode 100644 index 18cbad1..0000000 --- a/src/Collections/AbstractCollection.php +++ /dev/null @@ -1,114 +0,0 @@ -url = $url; - $this->token = $token; - } - - /** - * - * - * @param string $name - * @param array $parameters - * @return mixed - */ - public function findOne($name, $parameters = []) - { - // adding single to parameters - $parameters['single'] = true; - $response = $this->request($name, $this->endpoint, $parameters); - - return $response; - } - - /** - * - * - * @param string $name - * @param array $parameters - * @return mixed - * - */ - public function find($name, $parameters = []) - { - return $this->request($name, $this->endpoint, $parameters); - } - - /** - * request $endpoint - * - * @param string $name - * @param string $endpoint - * @param array $parameters - * @return mixed - * - */ - protected function request($name, $endpoint, $parameters = []) - { - // init curl and setup token - $curl = curl_init(); - - curl_setopt($curl, CURLOPT_HTTPHEADER, [ - 'Accept: application/json', - 'Content-Type: application/json', - 'Authorization: Bearer '.$this->token - ]); - - curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); - - $response = []; - - if (count($parameters) > 0) { - $query = http_build_query($parameters); - } - - $url = $this->url.$endpoint.'/'.$name; - - // query parameters are set, add them to url - if (isset($query)) { - $url = $url.'?'.$query; - } - - curl_setopt($curl, CURLOPT_URL, $url); - - $response = curl_exec($curl); - $code = curl_getinfo($curl, CURLINFO_HTTP_CODE); - $info = curl_getinfo($curl); - - curl_close($curl); - $response = json_decode($response, true); - - return $response; - } -} diff --git a/src/Collections/ItemCollection.php b/src/Collections/ItemCollection.php deleted file mode 100644 index 2a75cfc..0000000 --- a/src/Collections/ItemCollection.php +++ /dev/null @@ -1,28 +0,0 @@ -endpoint = '/items'; - - parent::__construct($url, $token); - } -} diff --git a/src/FlightAbstract.php b/src/FlightAbstract.php deleted file mode 100644 index 679b9eb..0000000 --- a/src/FlightAbstract.php +++ /dev/null @@ -1,27 +0,0 @@ -app = Flight::app(); - } -} diff --git a/src/Repositories/PaginationRepositoryAbstract.php b/src/Repositories/PaginationRepositoryAbstract.php deleted file mode 100644 index 51d7987..0000000 --- a/src/Repositories/PaginationRepositoryAbstract.php +++ /dev/null @@ -1,179 +0,0 @@ -maxPages = intval(round($results['meta']['filter_count'] / $limit)); - } - - /** - * getting offset for request - * - * @param integer - * @return integer - * - */ - protected function getOffset($page, $limit) - { - return (($page - 1) * $limit); - } - - /** - * get pages that are showing - * - * @param integer - * @return array - * - */ - protected function getPages($page) - { - // results - $pages = []; - - // count of pages that can be shown - $showPages = $this->showPages; - - // get avarage value to show pages - $averagePages = $this->showPages / 2; - - // run throw all pages - for ($i = 1; $i <= $this->maxPages; $i++) { - - // check if $page has to show - $show = false; - - // show always first and last page - if ($i === 1 || $i === $this->maxPages) { - $show = true; - } - - // if showing pages are aviable check if page can be shown - if ($show === false && $showPages > 0) { - - // if page from 1 to avarage - if (($i <= $averagePages && $page <= $averagePages) || - - // if page is less than maxPages - (($i >= ($maxPages - $averagePages)) && $page >= ($maxPages - $averagePages)) || - - // put current pages as avarage value - ($i >= ($page - $averagePages) && $i <= ($page + $averagePages))) { - $showPages--; - $show = true; - } - } - - if ($show) { - $pages[] = $i; - } - } - - return $pages; - } - - /** - * if previous is possible - * - * @param integer $page - * - */ - protected function getPrevious($page) - { - $result = NULL; - - if ($page > 1) { - $result = $page - 1; - } - - return $result; - } - - /** - * if next is possible - * - * @param integer $page - * - */ - protected function getNext($page) - { - $result = NULL; - - if ($page < $this->maxPages) { - $result = $page + 1; - } - - return $result; - } - - /** - * prepare query to get limited items - * - * @param integer $page - * @param integer $limit - * @param array $query - * - */ - protected function prepare($page, $limit, $query) - { - // setting page and limit - $this->page = $page; - $this->limit = $limit; - - return array_merge($query, [ - 'offset' => $this->getOffset($this->page, $this->limit), - 'limit' => $this->limit, - 'meta' => 'result_count,filter_count,total_count' - ]); - } - - /** - * paginate results - * - * @param integer $page - * @param integer $limit - * @param array $results - * - */ - protected function paginate($results) - { - $this->setMaxPages($this->limit, $results); - - $results['meta']['current'] = $this->page; - $results['meta']['previous'] = $this->getPrevious($this->page); - $results['meta']['next'] = $this->getNext($this->page); - $results['meta']['pages'] = $this->getPages($this->page); - $results['meta']['max_pages'] = $this->maxPages; - - return $results; - } -} \ No newline at end of file diff --git a/src/Repositories/RepositoryAbstract.php b/src/Repositories/RepositoryAbstract.php deleted file mode 100644 index 0641c00..0000000 --- a/src/Repositories/RepositoryAbstract.php +++ /dev/null @@ -1,38 +0,0 @@ -name) { - throw new \Exception('$name is not set!'); - }; - - $this->itemCollection = new ItemCollection( - env('DIRECTUS_API_URL'), - env('DIRECTUS_API_TOKEN') - ); - } -}