From 9063173171feb62f13757e2929ca224d19ce2014 Mon Sep 17 00:00:00 2001 From: mitsuha_s Date: Mon, 17 Jul 2023 13:40:16 +0300 Subject: [PATCH 01/24] Add initial set of files --- .env | 20 + .gitignore | 10 + bin/console | 17 + composer.json | 67 + composer.lock | 2421 ++++++++++++++++++++++++++++++++ config/bundles.php | 5 + config/packages/cache.yaml | 19 + config/packages/framework.yaml | 25 + config/packages/routing.yaml | 12 + config/preload.php | 5 + config/routes.yaml | 5 + config/routes/framework.yaml | 4 + config/services.yaml | 24 + public/index.php | 9 + src/Controller/.gitignore | 0 src/Kernel.php | 11 + symfony.lock | 58 + 17 files changed, 2712 insertions(+) create mode 100644 .env create mode 100644 .gitignore create mode 100755 bin/console create mode 100644 composer.json create mode 100644 composer.lock create mode 100644 config/bundles.php create mode 100644 config/packages/cache.yaml create mode 100644 config/packages/framework.yaml create mode 100644 config/packages/routing.yaml create mode 100644 config/preload.php create mode 100644 config/routes.yaml create mode 100644 config/routes/framework.yaml create mode 100644 config/services.yaml create mode 100644 public/index.php create mode 100644 src/Controller/.gitignore create mode 100644 src/Kernel.php create mode 100644 symfony.lock diff --git a/.env b/.env new file mode 100644 index 0000000..73bed4f --- /dev/null +++ b/.env @@ -0,0 +1,20 @@ +# In all environments, the following files are loaded if they exist, +# the latter taking precedence over the former: +# +# * .env contains default values for the environment variables needed by the app +# * .env.local uncommitted file with local overrides +# * .env.$APP_ENV committed environment-specific defaults +# * .env.$APP_ENV.local uncommitted environment-specific overrides +# +# Real environment variables win over .env files. +# +# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES. +# https://symfony.com/doc/current/configuration/secrets.html +# +# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2). +# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration + +###> symfony/framework-bundle ### +APP_ENV=dev +APP_SECRET=90c78b17302e6ff2e14213f129e3f5f4 +###< symfony/framework-bundle ### diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a67f91e --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ + +###> symfony/framework-bundle ### +/.env.local +/.env.local.php +/.env.*.local +/config/secrets/prod/prod.decrypt.private.php +/public/bundles/ +/var/ +/vendor/ +###< symfony/framework-bundle ### diff --git a/bin/console b/bin/console new file mode 100755 index 0000000..c933dc5 --- /dev/null +++ b/bin/console @@ -0,0 +1,17 @@ +#!/usr/bin/env php +=8.1", + "ext-ctype": "*", + "ext-iconv": "*", + "symfony/console": "6.3.*", + "symfony/dotenv": "6.3.*", + "symfony/flex": "^2", + "symfony/framework-bundle": "6.3.*", + "symfony/runtime": "6.3.*", + "symfony/yaml": "6.3.*" + }, + "require-dev": { + }, + "config": { + "allow-plugins": { + "php-http/discovery": true, + "symfony/flex": true, + "symfony/runtime": true + }, + "sort-packages": true + }, + "autoload": { + "psr-4": { + "App\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "App\\Tests\\": "tests/" + } + }, + "replace": { + "symfony/polyfill-ctype": "*", + "symfony/polyfill-iconv": "*", + "symfony/polyfill-php72": "*", + "symfony/polyfill-php73": "*", + "symfony/polyfill-php74": "*", + "symfony/polyfill-php80": "*", + "symfony/polyfill-php81": "*" + }, + "scripts": { + "auto-scripts": { + "cache:clear": "symfony-cmd", + "assets:install %PUBLIC_DIR%": "symfony-cmd" + }, + "post-install-cmd": [ + "@auto-scripts" + ], + "post-update-cmd": [ + "@auto-scripts" + ] + }, + "conflict": { + "symfony/symfony": "*" + }, + "extra": { + "symfony": { + "allow-contrib": false, + "require": "6.3.*" + } + } +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..238c9db --- /dev/null +++ b/composer.lock @@ -0,0 +1,2421 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", + "This file is @generated automatically" + ], + "content-hash": "eaf3840901e73993aa2482ef20a928b9", + "packages": [ + { + "name": "psr/cache", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "reference": "aa5030cfa5405eccfdcb1083ce040c2cb8d253bf", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "support": { + "source": "https://github.com/php-fig/cache/tree/3.0.0" + }, + "time": "2021-02-03T23:26:27+00:00" + }, + { + "name": "psr/container", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "shasum": "" + }, + "require": { + "php": ">=7.4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "support": { + "issues": "https://github.com/php-fig/container/issues", + "source": "https://github.com/php-fig/container/tree/2.0.2" + }, + "time": "2021-11-05T16:47:00+00:00" + }, + { + "name": "psr/event-dispatcher", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/event-dispatcher.git", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/event-dispatcher/zipball/dbefd12671e8a14ec7f180cab83036ed26714bb0", + "reference": "dbefd12671e8a14ec7f180cab83036ed26714bb0", + "shasum": "" + }, + "require": { + "php": ">=7.2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\EventDispatcher\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Standard interfaces for event handling.", + "keywords": [ + "events", + "psr", + "psr-14" + ], + "support": { + "issues": "https://github.com/php-fig/event-dispatcher/issues", + "source": "https://github.com/php-fig/event-dispatcher/tree/1.0.0" + }, + "time": "2019-01-08T18:20:26+00:00" + }, + { + "name": "psr/log", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", + "shasum": "" + }, + "require": { + "php": ">=8.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "support": { + "source": "https://github.com/php-fig/log/tree/3.0.0" + }, + "time": "2021-07-14T16:46:02+00:00" + }, + { + "name": "symfony/cache", + "version": "v6.3.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/cache.git", + "reference": "52cff7608ef6e38376ac11bd1fbb0a220107f066" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/cache/zipball/52cff7608ef6e38376ac11bd1fbb0a220107f066", + "reference": "52cff7608ef6e38376ac11bd1fbb0a220107f066", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/cache": "^2.0|^3.0", + "psr/log": "^1.1|^2|^3", + "symfony/cache-contracts": "^2.5|^3", + "symfony/service-contracts": "^2.5|^3", + "symfony/var-exporter": "^6.2.10" + }, + "conflict": { + "doctrine/dbal": "<2.13.1", + "symfony/dependency-injection": "<5.4", + "symfony/http-kernel": "<5.4", + "symfony/var-dumper": "<5.4" + }, + "provide": { + "psr/cache-implementation": "2.0|3.0", + "psr/simple-cache-implementation": "1.0|2.0|3.0", + "symfony/cache-implementation": "1.1|2.0|3.0" + }, + "require-dev": { + "cache/integration-tests": "dev-master", + "doctrine/dbal": "^2.13.1|^3.0", + "predis/predis": "^1.1|^2.0", + "psr/simple-cache": "^1.0|^2.0|^3.0", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/filesystem": "^5.4|^6.0", + "symfony/http-kernel": "^5.4|^6.0", + "symfony/messenger": "^5.4|^6.0", + "symfony/var-dumper": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Cache\\": "" + }, + "classmap": [ + "Traits/ValueWrapper.php" + ], + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides extended PSR-6, PSR-16 (and tags) implementations", + "homepage": "https://symfony.com", + "keywords": [ + "caching", + "psr6" + ], + "support": { + "source": "https://github.com/symfony/cache/tree/v6.3.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": "2023-06-24T11:51:27+00:00" + }, + { + "name": "symfony/cache-contracts", + "version": "v3.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/cache-contracts.git", + "reference": "ad945640ccc0ae6e208bcea7d7de4b39b569896b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/cache-contracts/zipball/ad945640ccc0ae6e208bcea7d7de4b39b569896b", + "reference": "ad945640ccc0ae6e208bcea7d7de4b39b569896b", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/cache": "^3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Cache\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to caching", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/cache-contracts/tree/v3.3.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": "2023-05-23T14:45:45+00:00" + }, + { + "name": "symfony/config", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/config.git", + "reference": "a5e00dec161b08c946a2c16eed02adbeedf827ae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/config/zipball/a5e00dec161b08c946a2c16eed02adbeedf827ae", + "reference": "a5e00dec161b08c946a2c16eed02adbeedf827ae", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/filesystem": "^5.4|^6.0", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/finder": "<5.4", + "symfony/service-contracts": "<2.5" + }, + "require-dev": { + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/finder": "^5.4|^6.0", + "symfony/messenger": "^5.4|^6.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/yaml": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Config\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/config/tree/v6.3.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": "2023-04-25T10:46:17+00:00" + }, + { + "name": "symfony/console", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7", + "reference": "8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/string": "^5.4|^6.0" + }, + "conflict": { + "symfony/dependency-injection": "<5.4", + "symfony/dotenv": "<5.4", + "symfony/event-dispatcher": "<5.4", + "symfony/lock": "<5.4", + "symfony/process": "<5.4" + }, + "provide": { + "psr/log-implementation": "1.0|2.0|3.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/lock": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/var-dumper": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Eases the creation of beautiful and testable command line interfaces", + "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command-line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v6.3.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": "2023-05-29T12:49:39+00:00" + }, + { + "name": "symfony/dependency-injection", + "version": "v6.3.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/dependency-injection.git", + "reference": "7abf242af21f196b65f20ab00ff251fdf3889b8d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/7abf242af21f196b65f20ab00ff251fdf3889b8d", + "reference": "7abf242af21f196b65f20ab00ff251fdf3889b8d", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/container": "^1.1|^2.0", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/service-contracts": "^2.5|^3.0", + "symfony/var-exporter": "^6.2.10" + }, + "conflict": { + "ext-psr": "<1.1|>=2", + "symfony/config": "<6.1", + "symfony/finder": "<5.4", + "symfony/proxy-manager-bridge": "<6.3", + "symfony/yaml": "<5.4" + }, + "provide": { + "psr/container-implementation": "1.1|2.0", + "symfony/service-implementation": "1.1|2.0|3.0" + }, + "require-dev": { + "symfony/config": "^6.1", + "symfony/expression-language": "^5.4|^6.0", + "symfony/yaml": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\DependencyInjection\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Allows you to standardize and centralize the way objects are constructed in your application", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/dependency-injection/tree/v6.3.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": "2023-06-24T11:51:27+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.3.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": "2023-05-23T14:45:45+00:00" + }, + { + "name": "symfony/dotenv", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/dotenv.git", + "reference": "ceadb434fe2a6763a03d2d110441745834f3dd1e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dotenv/zipball/ceadb434fe2a6763a03d2d110441745834f3dd1e", + "reference": "ceadb434fe2a6763a03d2d110441745834f3dd1e", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "conflict": { + "symfony/console": "<5.4", + "symfony/process": "<5.4" + }, + "require-dev": { + "symfony/console": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Dotenv\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Registers environment variables from a .env file", + "homepage": "https://symfony.com", + "keywords": [ + "dotenv", + "env", + "environment" + ], + "support": { + "source": "https://github.com/symfony/dotenv/tree/v6.3.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": "2023-04-21T14:41:17+00:00" + }, + { + "name": "symfony/error-handler", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/error-handler.git", + "reference": "99d2d814a6351461af350ead4d963bd67451236f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/error-handler/zipball/99d2d814a6351461af350ead4d963bd67451236f", + "reference": "99d2d814a6351461af350ead4d963bd67451236f", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/log": "^1|^2|^3", + "symfony/var-dumper": "^5.4|^6.0" + }, + "conflict": { + "symfony/deprecation-contracts": "<2.5" + }, + "require-dev": { + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/http-kernel": "^5.4|^6.0", + "symfony/serializer": "^5.4|^6.0" + }, + "bin": [ + "Resources/bin/patch-type-declarations" + ], + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\ErrorHandler\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools to manage errors and ease debugging PHP code", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/error-handler/tree/v6.3.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": "2023-05-10T12:03:13+00:00" + }, + { + "name": "symfony/event-dispatcher", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "3af8ac1a3f98f6dbc55e10ae59c9e44bfc38dfaa" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/3af8ac1a3f98f6dbc55e10ae59c9e44bfc38dfaa", + "reference": "3af8ac1a3f98f6dbc55e10ae59c9e44bfc38dfaa", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/event-dispatcher-contracts": "^2.5|^3" + }, + "conflict": { + "symfony/dependency-injection": "<5.4", + "symfony/service-contracts": "<2.5" + }, + "provide": { + "psr/event-dispatcher-implementation": "1.0", + "symfony/event-dispatcher-implementation": "2.0|3.0" + }, + "require-dev": { + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/error-handler": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/http-foundation": "^5.4|^6.0", + "symfony/service-contracts": "^2.5|^3", + "symfony/stopwatch": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/event-dispatcher/tree/v6.3.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": "2023-04-21T14:41:17+00:00" + }, + { + "name": "symfony/event-dispatcher-contracts", + "version": "v3.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher-contracts.git", + "reference": "a76aed96a42d2b521153fb382d418e30d18b59df" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/a76aed96a42d2b521153fb382d418e30d18b59df", + "reference": "a76aed96a42d2b521153fb382d418e30d18b59df", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/event-dispatcher": "^1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\EventDispatcher\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to dispatching event", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.3.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": "2023-05-23T14:45:45+00:00" + }, + { + "name": "symfony/filesystem", + "version": "v6.3.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/filesystem.git", + "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", + "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Filesystem\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides basic utilities for the filesystem", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/filesystem/tree/v6.3.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": "2023-06-01T08:30:39+00:00" + }, + { + "name": "symfony/finder", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "d9b01ba073c44cef617c7907ce2419f8d00d75e2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/d9b01ba073c44cef617c7907ce2419f8d00d75e2", + "reference": "d9b01ba073c44cef617c7907ce2419f8d00d75e2", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "symfony/filesystem": "^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Finds files and directories via an intuitive fluent interface", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/finder/tree/v6.3.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": "2023-04-02T01:25:41+00:00" + }, + { + "name": "symfony/flex", + "version": "v2.3.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/flex.git", + "reference": "3c9c3424efdafe33e0e3cfb5e87e50b34711fedf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/flex/zipball/3c9c3424efdafe33e0e3cfb5e87e50b34711fedf", + "reference": "3c9c3424efdafe33e0e3cfb5e87e50b34711fedf", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^2.1", + "php": ">=8.0" + }, + "require-dev": { + "composer/composer": "^2.1", + "symfony/dotenv": "^5.4|^6.0", + "symfony/filesystem": "^5.4|^6.0", + "symfony/phpunit-bridge": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0" + }, + "type": "composer-plugin", + "extra": { + "class": "Symfony\\Flex\\Flex" + }, + "autoload": { + "psr-4": { + "Symfony\\Flex\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien.potencier@gmail.com" + } + ], + "description": "Composer plugin for Symfony", + "support": { + "issues": "https://github.com/symfony/flex/issues", + "source": "https://github.com/symfony/flex/tree/v2.3.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": "2023-05-27T07:38:25+00:00" + }, + { + "name": "symfony/framework-bundle", + "version": "v6.3.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/framework-bundle.git", + "reference": "42b0707efba17ca7c6af7373cb1b1a1b4f24f772" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/42b0707efba17ca7c6af7373cb1b1a1b4f24f772", + "reference": "42b0707efba17ca7c6af7373cb1b1a1b4f24f772", + "shasum": "" + }, + "require": { + "composer-runtime-api": ">=2.1", + "ext-xml": "*", + "php": ">=8.1", + "symfony/cache": "^5.4|^6.0", + "symfony/config": "^6.1", + "symfony/dependency-injection": "^6.3.1", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/error-handler": "^6.1", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/filesystem": "^5.4|^6.0", + "symfony/finder": "^5.4|^6.0", + "symfony/http-foundation": "^6.3", + "symfony/http-kernel": "^6.3", + "symfony/polyfill-mbstring": "~1.0", + "symfony/routing": "^5.4|^6.0" + }, + "conflict": { + "doctrine/annotations": "<1.13.1", + "doctrine/persistence": "<1.3", + "phpdocumentor/reflection-docblock": "<3.2.2", + "phpdocumentor/type-resolver": "<1.4.0", + "symfony/asset": "<5.4", + "symfony/clock": "<6.3", + "symfony/console": "<5.4", + "symfony/dom-crawler": "<6.3", + "symfony/dotenv": "<5.4", + "symfony/form": "<5.4", + "symfony/http-client": "<6.3", + "symfony/lock": "<5.4", + "symfony/mailer": "<5.4", + "symfony/messenger": "<6.3", + "symfony/mime": "<6.2", + "symfony/property-access": "<5.4", + "symfony/property-info": "<5.4", + "symfony/security-core": "<5.4", + "symfony/security-csrf": "<5.4", + "symfony/serializer": "<6.3", + "symfony/stopwatch": "<5.4", + "symfony/translation": "<6.2.8", + "symfony/twig-bridge": "<5.4", + "symfony/twig-bundle": "<5.4", + "symfony/validator": "<6.3", + "symfony/web-profiler-bundle": "<5.4", + "symfony/workflow": "<5.4" + }, + "require-dev": { + "doctrine/annotations": "^1.13.1|^2", + "doctrine/persistence": "^1.3|^2|^3", + "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", + "symfony/asset": "^5.4|^6.0", + "symfony/asset-mapper": "^6.3", + "symfony/browser-kit": "^5.4|^6.0", + "symfony/clock": "^6.2", + "symfony/console": "^5.4.9|^6.0.9", + "symfony/css-selector": "^5.4|^6.0", + "symfony/dom-crawler": "^6.3", + "symfony/dotenv": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/form": "^5.4|^6.0", + "symfony/html-sanitizer": "^6.1", + "symfony/http-client": "^6.3", + "symfony/lock": "^5.4|^6.0", + "symfony/mailer": "^5.4|^6.0", + "symfony/messenger": "^6.3", + "symfony/mime": "^6.2", + "symfony/notifier": "^5.4|^6.0", + "symfony/polyfill-intl-icu": "~1.0", + "symfony/process": "^5.4|^6.0", + "symfony/property-info": "^5.4|^6.0", + "symfony/rate-limiter": "^5.4|^6.0", + "symfony/scheduler": "^6.3", + "symfony/security-bundle": "^5.4|^6.0", + "symfony/semaphore": "^5.4|^6.0", + "symfony/serializer": "^6.3", + "symfony/stopwatch": "^5.4|^6.0", + "symfony/string": "^5.4|^6.0", + "symfony/translation": "^6.2.8", + "symfony/twig-bundle": "^5.4|^6.0", + "symfony/uid": "^5.4|^6.0", + "symfony/validator": "^6.3", + "symfony/web-link": "^5.4|^6.0", + "symfony/workflow": "^5.4|^6.0", + "symfony/yaml": "^5.4|^6.0", + "twig/twig": "^2.10|^3.0" + }, + "type": "symfony-bundle", + "autoload": { + "psr-4": { + "Symfony\\Bundle\\FrameworkBundle\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides a tight integration between Symfony components and the Symfony full-stack framework", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/framework-bundle/tree/v6.3.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": "2023-06-24T09:59:31+00:00" + }, + { + "name": "symfony/http-foundation", + "version": "v6.3.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-foundation.git", + "reference": "e0ad0d153e1c20069250986cd9e9dd1ccebb0d66" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e0ad0d153e1c20069250986cd9e9dd1ccebb0d66", + "reference": "e0ad0d153e1c20069250986cd9e9dd1ccebb0d66", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-mbstring": "~1.1", + "symfony/polyfill-php83": "^1.27" + }, + "conflict": { + "symfony/cache": "<6.2" + }, + "require-dev": { + "doctrine/dbal": "^2.13.1|^3.0", + "predis/predis": "^1.1|^2.0", + "symfony/cache": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/http-kernel": "^5.4.12|^6.0.12|^6.1.4", + "symfony/mime": "^5.4|^6.0", + "symfony/rate-limiter": "^5.2|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpFoundation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Defines an object-oriented layer for the HTTP specification", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/http-foundation/tree/v6.3.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": "2023-06-24T11:51:27+00:00" + }, + { + "name": "symfony/http-kernel", + "version": "v6.3.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-kernel.git", + "reference": "161e16fd2e35fb4881a43bc8b383dfd5be4ac374" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/161e16fd2e35fb4881a43bc8b383dfd5be4ac374", + "reference": "161e16fd2e35fb4881a43bc8b383dfd5be4ac374", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/log": "^1|^2|^3", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/error-handler": "^6.3", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/http-foundation": "^6.2.7", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "symfony/browser-kit": "<5.4", + "symfony/cache": "<5.4", + "symfony/config": "<6.1", + "symfony/console": "<5.4", + "symfony/dependency-injection": "<6.3", + "symfony/doctrine-bridge": "<5.4", + "symfony/form": "<5.4", + "symfony/http-client": "<5.4", + "symfony/http-client-contracts": "<2.5", + "symfony/mailer": "<5.4", + "symfony/messenger": "<5.4", + "symfony/translation": "<5.4", + "symfony/translation-contracts": "<2.5", + "symfony/twig-bridge": "<5.4", + "symfony/validator": "<5.4", + "symfony/var-dumper": "<6.3", + "twig/twig": "<2.13" + }, + "provide": { + "psr/log-implementation": "1.0|2.0|3.0" + }, + "require-dev": { + "psr/cache": "^1.0|^2.0|^3.0", + "symfony/browser-kit": "^5.4|^6.0", + "symfony/clock": "^6.2", + "symfony/config": "^6.1", + "symfony/console": "^5.4|^6.0", + "symfony/css-selector": "^5.4|^6.0", + "symfony/dependency-injection": "^6.3", + "symfony/dom-crawler": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/finder": "^5.4|^6.0", + "symfony/http-client-contracts": "^2.5|^3", + "symfony/process": "^5.4|^6.0", + "symfony/property-access": "^5.4.5|^6.0.5", + "symfony/routing": "^5.4|^6.0", + "symfony/serializer": "^6.3", + "symfony/stopwatch": "^5.4|^6.0", + "symfony/translation": "^5.4|^6.0", + "symfony/translation-contracts": "^2.5|^3", + "symfony/uid": "^5.4|^6.0", + "symfony/validator": "^6.3", + "symfony/var-exporter": "^6.2", + "twig/twig": "^2.13|^3.0.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpKernel\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides a structured process for converting a Request into a Response", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/http-kernel/tree/v6.3.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": "2023-06-26T06:07:32+00:00" + }, + { + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "511a08c03c1960e08a883f4cffcacd219b758354" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354", + "reference": "511a08c03c1960e08a883f4cffcacd219b758354", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's grapheme_* functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "grapheme", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.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": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.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": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.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": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/polyfill-php83", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php83.git", + "reference": "508c652ba3ccf69f8c97f251534f229791b52a57" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php83/zipball/508c652ba3ccf69f8c97f251534f229791b52a57", + "reference": "508c652ba3ccf69f8c97f251534f229791b52a57", + "shasum": "" + }, + "require": { + "php": ">=7.1", + "symfony/polyfill-php80": "^1.14" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Php83\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.3+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-php83/tree/v1.27.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": "2022-11-03T14:55:06+00:00" + }, + { + "name": "symfony/routing", + "version": "v6.3.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/routing.git", + "reference": "d37ad1779c38b8eb71996d17dc13030dcb7f9cf5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/routing/zipball/d37ad1779c38b8eb71996d17dc13030dcb7f9cf5", + "reference": "d37ad1779c38b8eb71996d17dc13030dcb7f9cf5", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "conflict": { + "doctrine/annotations": "<1.12", + "symfony/config": "<6.2", + "symfony/dependency-injection": "<5.4", + "symfony/yaml": "<5.4" + }, + "require-dev": { + "doctrine/annotations": "^1.12|^2", + "psr/log": "^1|^2|^3", + "symfony/config": "^6.2", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/http-foundation": "^5.4|^6.0", + "symfony/yaml": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Routing\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Maps an HTTP request to a set of configuration variables", + "homepage": "https://symfony.com", + "keywords": [ + "router", + "routing", + "uri", + "url" + ], + "support": { + "source": "https://github.com/symfony/routing/tree/v6.3.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": "2023-06-05T15:30:22+00:00" + }, + { + "name": "symfony/runtime", + "version": "v6.3.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/runtime.git", + "reference": "8e83b5d8e0ace903e1a91dedfe08a84ed2a54b0d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/runtime/zipball/8e83b5d8e0ace903e1a91dedfe08a84ed2a54b0d", + "reference": "8e83b5d8e0ace903e1a91dedfe08a84ed2a54b0d", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0|^2.0", + "php": ">=8.1" + }, + "conflict": { + "symfony/dotenv": "<5.4" + }, + "require-dev": { + "composer/composer": "^1.0.2|^2.0", + "symfony/console": "^5.4.9|^6.0.9", + "symfony/dotenv": "^5.4|^6.0", + "symfony/http-foundation": "^5.4|^6.0", + "symfony/http-kernel": "^5.4|^6.0" + }, + "type": "composer-plugin", + "extra": { + "class": "Symfony\\Component\\Runtime\\Internal\\ComposerPlugin" + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Runtime\\": "", + "Symfony\\Runtime\\Symfony\\Component\\": "Internal/" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Enables decoupling PHP applications from global state", + "homepage": "https://symfony.com", + "keywords": [ + "runtime" + ], + "support": { + "source": "https://github.com/symfony/runtime/tree/v6.3.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": "2023-06-21T12:08:28+00:00" + }, + { + "name": "symfony/service-contracts", + "version": "v3.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/service-contracts.git", + "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/40da9cc13ec349d9e4966ce18b5fbcd724ab10a4", + "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "psr/container": "^2.0" + }, + "conflict": { + "ext-psr": "<1.1|>=2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Service\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to writing services", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/service-contracts/tree/v3.3.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": "2023-05-23T14:45:45+00:00" + }, + { + "name": "symfony/string", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/string.git", + "reference": "f2e190ee75ff0f5eced645ec0be5c66fac81f51f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/string/zipball/f2e190ee75ff0f5eced645ec0be5c66fac81f51f", + "reference": "f2e190ee75ff0f5eced645ec0be5c66fac81f51f", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/translation-contracts": "<2.5" + }, + "require-dev": { + "symfony/error-handler": "^5.4|^6.0", + "symfony/http-client": "^5.4|^6.0", + "symfony/intl": "^6.2", + "symfony/translation-contracts": "^2.5|^3.0", + "symfony/var-exporter": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], + "support": { + "source": "https://github.com/symfony/string/tree/v6.3.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": "2023-03-21T21:06:29+00:00" + }, + { + "name": "symfony/var-dumper", + "version": "v6.3.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-dumper.git", + "reference": "c81268d6960ddb47af17391a27d222bd58cf0515" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/c81268d6960ddb47af17391a27d222bd58cf0515", + "reference": "c81268d6960ddb47af17391a27d222bd58cf0515", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/console": "<5.4" + }, + "require-dev": { + "ext-iconv": "*", + "symfony/console": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/uid": "^5.4|^6.0", + "twig/twig": "^2.13|^3.0.4" + }, + "bin": [ + "Resources/bin/var-dump-server" + ], + "type": "library", + "autoload": { + "files": [ + "Resources/functions/dump.php" + ], + "psr-4": { + "Symfony\\Component\\VarDumper\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides mechanisms for walking through any arbitrary PHP variable", + "homepage": "https://symfony.com", + "keywords": [ + "debug", + "dump" + ], + "support": { + "source": "https://github.com/symfony/var-dumper/tree/v6.3.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": "2023-06-21T12:08:28+00:00" + }, + { + "name": "symfony/var-exporter", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-exporter.git", + "reference": "db5416d04269f2827d8c54331ba4cfa42620d350" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/db5416d04269f2827d8c54331ba4cfa42620d350", + "reference": "db5416d04269f2827d8c54331ba4cfa42620d350", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "require-dev": { + "symfony/var-dumper": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\VarExporter\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Allows exporting any serializable PHP data structure to plain PHP code", + "homepage": "https://symfony.com", + "keywords": [ + "clone", + "construct", + "export", + "hydrate", + "instantiate", + "lazy-loading", + "proxy", + "serialize" + ], + "support": { + "source": "https://github.com/symfony/var-exporter/tree/v6.3.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": "2023-04-21T08:48:44+00:00" + }, + { + "name": "symfony/yaml", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "a9a8337aa641ef2aa39c3e028f9107ec391e5927" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/a9a8337aa641ef2aa39c3e028f9107ec391e5927", + "reference": "a9a8337aa641ef2aa39c3e028f9107ec391e5927", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "symfony/console": "<5.4" + }, + "require-dev": { + "symfony/console": "^5.4|^6.0" + }, + "bin": [ + "Resources/bin/yaml-lint" + ], + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Loads and dumps YAML files", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/yaml/tree/v6.3.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": "2023-04-28T13:28:14+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": true, + "prefer-lowest": false, + "platform": { + "php": ">=8.1", + "ext-ctype": "*", + "ext-iconv": "*" + }, + "platform-dev": [], + "plugin-api-version": "2.3.0" +} diff --git a/config/bundles.php b/config/bundles.php new file mode 100644 index 0000000..49d3fb6 --- /dev/null +++ b/config/bundles.php @@ -0,0 +1,5 @@ + ['all' => true], +]; diff --git a/config/packages/cache.yaml b/config/packages/cache.yaml new file mode 100644 index 0000000..6899b72 --- /dev/null +++ b/config/packages/cache.yaml @@ -0,0 +1,19 @@ +framework: + cache: + # Unique name of your app: used to compute stable namespaces for cache keys. + #prefix_seed: your_vendor_name/app_name + + # The "app" cache stores to the filesystem by default. + # The data in this cache should persist between deploys. + # Other options include: + + # Redis + #app: cache.adapter.redis + #default_redis_provider: redis://localhost + + # APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues) + #app: cache.adapter.apcu + + # Namespaced pools use the above "app" backend by default + #pools: + #my.dedicated.cache: null diff --git a/config/packages/framework.yaml b/config/packages/framework.yaml new file mode 100644 index 0000000..6d85c29 --- /dev/null +++ b/config/packages/framework.yaml @@ -0,0 +1,25 @@ +# see https://symfony.com/doc/current/reference/configuration/framework.html +framework: + secret: '%env(APP_SECRET)%' + #csrf_protection: true + http_method_override: false + handle_all_throwables: true + + # Enables session support. Note that the session will ONLY be started if you read or write from it. + # Remove or comment this section to explicitly disable session support. + session: + handler_id: null + cookie_secure: auto + cookie_samesite: lax + storage_factory_id: session.storage.factory.native + + #esi: true + #fragments: true + php_errors: + log: true + +when@test: + framework: + test: true + session: + storage_factory_id: session.storage.factory.mock_file diff --git a/config/packages/routing.yaml b/config/packages/routing.yaml new file mode 100644 index 0000000..4b766ce --- /dev/null +++ b/config/packages/routing.yaml @@ -0,0 +1,12 @@ +framework: + router: + utf8: true + + # Configure how to generate URLs in non-HTTP contexts, such as CLI commands. + # See https://symfony.com/doc/current/routing.html#generating-urls-in-commands + #default_uri: http://localhost + +when@prod: + framework: + router: + strict_requirements: null diff --git a/config/preload.php b/config/preload.php new file mode 100644 index 0000000..5ebcdb2 --- /dev/null +++ b/config/preload.php @@ -0,0 +1,5 @@ + Date: Thu, 20 Jul 2023 18:27:25 +0300 Subject: [PATCH 02/24] controllers to add and show paste added --- .env | 10 + composer.json | 11 +- composer.lock | 2550 +++++++++++++++++++++- config/bundles.php | 4 + config/packages/doctrine.yaml | 46 + config/packages/doctrine_migrations.yaml | 6 + config/packages/twig.yaml | 6 + config/packages/validator.yaml | 13 + migrations/.gitignore | 0 migrations/Version20230720115905.php | 34 + migrations/Version20230720125632.php | 38 + migrations/Version20230720130259.php | 32 + src/Controller/PasteController.php | 54 + src/Entity/.gitignore | 0 src/Entity/Paste.php | 139 ++ src/Form/Type/PasteForm.php | 28 + src/Repository/.gitignore | 0 src/Repository/PasteRepository.php | 14 + symfony.lock | 61 + templates/base.html.twig | 16 + templates/paste.html.twig | 1 + 21 files changed, 3059 insertions(+), 4 deletions(-) create mode 100644 config/packages/doctrine.yaml create mode 100644 config/packages/doctrine_migrations.yaml create mode 100644 config/packages/twig.yaml create mode 100644 config/packages/validator.yaml create mode 100644 migrations/.gitignore create mode 100644 migrations/Version20230720115905.php create mode 100644 migrations/Version20230720125632.php create mode 100644 migrations/Version20230720130259.php create mode 100644 src/Controller/PasteController.php create mode 100644 src/Entity/.gitignore create mode 100644 src/Entity/Paste.php create mode 100644 src/Form/Type/PasteForm.php create mode 100644 src/Repository/.gitignore create mode 100644 src/Repository/PasteRepository.php create mode 100644 templates/base.html.twig create mode 100644 templates/paste.html.twig diff --git a/.env b/.env index 73bed4f..e141463 100644 --- a/.env +++ b/.env @@ -18,3 +18,13 @@ APP_ENV=dev APP_SECRET=90c78b17302e6ff2e14213f129e3f5f4 ###< symfony/framework-bundle ### + +###> doctrine/doctrine-bundle ### +# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url +# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml +# +# DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db" +# DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=8.0.32&charset=utf8mb4" +# DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=10.11.2-MariaDB&charset=utf8mb4" +DATABASE_URL="postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=15&charset=utf8" +###< doctrine/doctrine-bundle ### diff --git a/composer.json b/composer.json index 695595e..288abba 100644 --- a/composer.json +++ b/composer.json @@ -7,15 +7,19 @@ "php": ">=8.1", "ext-ctype": "*", "ext-iconv": "*", + "doctrine/doctrine-bundle": "^2.10", + "doctrine/doctrine-migrations-bundle": "^3.2", + "doctrine/orm": "^2.15", "symfony/console": "6.3.*", "symfony/dotenv": "6.3.*", "symfony/flex": "^2", + "symfony/form": "6.3.*", "symfony/framework-bundle": "6.3.*", "symfony/runtime": "6.3.*", + "symfony/twig-bundle": "6.3.*", + "symfony/validator": "6.3.*", "symfony/yaml": "6.3.*" }, - "require-dev": { - }, "config": { "allow-plugins": { "php-http/discovery": true, @@ -63,5 +67,8 @@ "allow-contrib": false, "require": "6.3.*" } + }, + "require-dev": { + "symfony/maker-bundle": "^1.50" } } diff --git a/composer.lock b/composer.lock index 238c9db..e63a245 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,1321 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "eaf3840901e73993aa2482ef20a928b9", + "content-hash": "f716d81393aa0f266916ea52e0fa0b53", "packages": [ + { + "name": "doctrine/cache", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/cache.git", + "reference": "1ca8f21980e770095a31456042471a57bc4c68fb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/cache/zipball/1ca8f21980e770095a31456042471a57bc4c68fb", + "reference": "1ca8f21980e770095a31456042471a57bc4c68fb", + "shasum": "" + }, + "require": { + "php": "~7.1 || ^8.0" + }, + "conflict": { + "doctrine/common": ">2.2,<2.4" + }, + "require-dev": { + "cache/integration-tests": "dev-master", + "doctrine/coding-standard": "^9", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "psr/cache": "^1.0 || ^2.0 || ^3.0", + "symfony/cache": "^4.4 || ^5.4 || ^6", + "symfony/var-exporter": "^4.4 || ^5.4 || ^6" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Cache library is a popular cache implementation that supports many different drivers such as redis, memcache, apc, mongodb and others.", + "homepage": "https://www.doctrine-project.org/projects/cache.html", + "keywords": [ + "abstraction", + "apcu", + "cache", + "caching", + "couchdb", + "memcached", + "php", + "redis", + "xcache" + ], + "support": { + "issues": "https://github.com/doctrine/cache/issues", + "source": "https://github.com/doctrine/cache/tree/2.2.0" + }, + "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%2Fcache", + "type": "tidelift" + } + ], + "time": "2022-05-20T20:07:39+00:00" + }, + { + "name": "doctrine/collections", + "version": "2.1.2", + "source": { + "type": "git", + "url": "https://github.com/doctrine/collections.git", + "reference": "db8cda536a034337f7dd63febecc713d4957f9ee" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/collections/zipball/db8cda536a034337f7dd63febecc713d4957f9ee", + "reference": "db8cda536a034337f7dd63febecc713d4957f9ee", + "shasum": "" + }, + "require": { + "doctrine/deprecations": "^1", + "php": "^8.1" + }, + "require-dev": { + "doctrine/coding-standard": "^10.0", + "ext-json": "*", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^9.5", + "vimeo/psalm": "^4.22" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Collections\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Collections library that adds additional functionality on top of PHP arrays.", + "homepage": "https://www.doctrine-project.org/projects/collections.html", + "keywords": [ + "array", + "collections", + "iterators", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/collections/issues", + "source": "https://github.com/doctrine/collections/tree/2.1.2" + }, + "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%2Fcollections", + "type": "tidelift" + } + ], + "time": "2022-12-27T23:41:38+00:00" + }, + { + "name": "doctrine/common", + "version": "3.4.3", + "source": { + "type": "git", + "url": "https://github.com/doctrine/common.git", + "reference": "8b5e5650391f851ed58910b3e3d48a71062eeced" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/common/zipball/8b5e5650391f851ed58910b3e3d48a71062eeced", + "reference": "8b5e5650391f851ed58910b3e3d48a71062eeced", + "shasum": "" + }, + "require": { + "doctrine/persistence": "^2.0 || ^3.0", + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9.0 || ^10.0", + "doctrine/collections": "^1", + "phpstan/phpstan": "^1.4.1", + "phpstan/phpstan-phpunit": "^1", + "phpunit/phpunit": "^7.5.20 || ^8.5 || ^9.0", + "squizlabs/php_codesniffer": "^3.0", + "symfony/phpunit-bridge": "^6.1", + "vimeo/psalm": "^4.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "PHP Doctrine Common project is a library that provides additional functionality that other Doctrine projects depend on such as better reflection support, proxies and much more.", + "homepage": "https://www.doctrine-project.org/projects/common.html", + "keywords": [ + "common", + "doctrine", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/common/issues", + "source": "https://github.com/doctrine/common/tree/3.4.3" + }, + "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%2Fcommon", + "type": "tidelift" + } + ], + "time": "2022-10-09T11:47:59+00:00" + }, + { + "name": "doctrine/dbal", + "version": "3.6.4", + "source": { + "type": "git", + "url": "https://github.com/doctrine/dbal.git", + "reference": "19f0dec95edd6a3c3c5ff1d188ea94c6b7fc903f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/19f0dec95edd6a3c3c5ff1d188ea94c6b7fc903f", + "reference": "19f0dec95edd6a3c3c5ff1d188ea94c6b7fc903f", + "shasum": "" + }, + "require": { + "composer-runtime-api": "^2", + "doctrine/cache": "^1.11|^2.0", + "doctrine/deprecations": "^0.5.3|^1", + "doctrine/event-manager": "^1|^2", + "php": "^7.4 || ^8.0", + "psr/cache": "^1|^2|^3", + "psr/log": "^1|^2|^3" + }, + "require-dev": { + "doctrine/coding-standard": "12.0.0", + "fig/log-test": "^1", + "jetbrains/phpstorm-stubs": "2022.3", + "phpstan/phpstan": "1.10.14", + "phpstan/phpstan-strict-rules": "^1.5", + "phpunit/phpunit": "9.6.7", + "psalm/plugin-phpunit": "0.18.4", + "squizlabs/php_codesniffer": "3.7.2", + "symfony/cache": "^5.4|^6.0", + "symfony/console": "^4.4|^5.4|^6.0", + "vimeo/psalm": "4.30.0" + }, + "suggest": { + "symfony/console": "For helpful console commands such as SQL execution and import of files." + }, + "bin": [ + "bin/doctrine-dbal" + ], + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\DBAL\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + } + ], + "description": "Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.", + "homepage": "https://www.doctrine-project.org/projects/dbal.html", + "keywords": [ + "abstraction", + "database", + "db2", + "dbal", + "mariadb", + "mssql", + "mysql", + "oci8", + "oracle", + "pdo", + "pgsql", + "postgresql", + "queryobject", + "sasql", + "sql", + "sqlite", + "sqlserver", + "sqlsrv" + ], + "support": { + "issues": "https://github.com/doctrine/dbal/issues", + "source": "https://github.com/doctrine/dbal/tree/3.6.4" + }, + "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%2Fdbal", + "type": "tidelift" + } + ], + "time": "2023-06-15T07:40:12+00:00" + }, + { + "name": "doctrine/deprecations", + "version": "v1.1.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/deprecations.git", + "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/deprecations/zipball/612a3ee5ab0d5dd97b7cf3874a6efe24325efac3", + "reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9", + "phpstan/phpstan": "1.4.10 || 1.10.15", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "psalm/plugin-phpunit": "0.18.4", + "psr/log": "^1 || ^2 || ^3", + "vimeo/psalm": "4.30.0 || 5.12.0" + }, + "suggest": { + "psr/log": "Allows logging deprecations via PSR-3 logger implementation" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.", + "homepage": "https://www.doctrine-project.org/", + "support": { + "issues": "https://github.com/doctrine/deprecations/issues", + "source": "https://github.com/doctrine/deprecations/tree/v1.1.1" + }, + "time": "2023-06-03T09:27:29+00:00" + }, + { + "name": "doctrine/doctrine-bundle", + "version": "2.10.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/DoctrineBundle.git", + "reference": "f9d59c90b6f525dfc2a2064a695cb56e0ab40311" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/f9d59c90b6f525dfc2a2064a695cb56e0ab40311", + "reference": "f9d59c90b6f525dfc2a2064a695cb56e0ab40311", + "shasum": "" + }, + "require": { + "doctrine/cache": "^1.11 || ^2.0", + "doctrine/dbal": "^3.6.0", + "doctrine/persistence": "^2.2 || ^3", + "doctrine/sql-formatter": "^1.0.1", + "php": "^7.4 || ^8.0", + "symfony/cache": "^5.4 || ^6.0", + "symfony/config": "^5.4 || ^6.0", + "symfony/console": "^5.4 || ^6.0", + "symfony/dependency-injection": "^5.4 || ^6.0", + "symfony/deprecation-contracts": "^2.1 || ^3", + "symfony/doctrine-bridge": "^5.4.19 || ^6.0.7", + "symfony/framework-bundle": "^5.4 || ^6.0", + "symfony/service-contracts": "^1.1.1 || ^2.0 || ^3" + }, + "conflict": { + "doctrine/annotations": ">=3.0", + "doctrine/orm": "<2.11 || >=3.0", + "twig/twig": "<1.34 || >=2.0 <2.4" + }, + "require-dev": { + "doctrine/annotations": "^1 || ^2", + "doctrine/coding-standard": "^9.0", + "doctrine/deprecations": "^1.0", + "doctrine/orm": "^2.11 || ^3.0", + "friendsofphp/proxy-manager-lts": "^1.0", + "phpunit/phpunit": "^9.5.26 || ^10.0", + "psalm/plugin-phpunit": "^0.18.4", + "psalm/plugin-symfony": "^4", + "psr/log": "^1.1.4 || ^2.0 || ^3.0", + "symfony/phpunit-bridge": "^6.1", + "symfony/property-info": "^5.4 || ^6.0", + "symfony/proxy-manager-bridge": "^5.4 || ^6.0", + "symfony/security-bundle": "^5.4 || ^6.0", + "symfony/twig-bridge": "^5.4 || ^6.0", + "symfony/validator": "^5.4 || ^6.0", + "symfony/web-profiler-bundle": "^5.4 || ^6.0", + "symfony/yaml": "^5.4 || ^6.0", + "twig/twig": "^1.34 || ^2.12 || ^3.0", + "vimeo/psalm": "^4.30" + }, + "suggest": { + "doctrine/orm": "The Doctrine ORM integration is optional in the bundle.", + "ext-pdo": "*", + "symfony/web-profiler-bundle": "To use the data collector." + }, + "type": "symfony-bundle", + "autoload": { + "psr-4": { + "Doctrine\\Bundle\\DoctrineBundle\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + }, + { + "name": "Doctrine Project", + "homepage": "https://www.doctrine-project.org/" + } + ], + "description": "Symfony DoctrineBundle", + "homepage": "https://www.doctrine-project.org", + "keywords": [ + "database", + "dbal", + "orm", + "persistence" + ], + "support": { + "issues": "https://github.com/doctrine/DoctrineBundle/issues", + "source": "https://github.com/doctrine/DoctrineBundle/tree/2.10.1" + }, + "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%2Fdoctrine-bundle", + "type": "tidelift" + } + ], + "time": "2023-06-28T07:47:41+00:00" + }, + { + "name": "doctrine/doctrine-migrations-bundle", + "version": "3.2.4", + "source": { + "type": "git", + "url": "https://github.com/doctrine/DoctrineMigrationsBundle.git", + "reference": "94e6b0fe1a50901d52f59dbb9b4b0737718b2c1e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/DoctrineMigrationsBundle/zipball/94e6b0fe1a50901d52f59dbb9b4b0737718b2c1e", + "reference": "94e6b0fe1a50901d52f59dbb9b4b0737718b2c1e", + "shasum": "" + }, + "require": { + "doctrine/doctrine-bundle": "~1.0|~2.0", + "doctrine/migrations": "^3.2", + "php": "^7.2|^8.0", + "symfony/framework-bundle": "~3.4|~4.0|~5.0|~6.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9", + "doctrine/orm": "^2.6", + "doctrine/persistence": "^1.3||^2.0", + "phpstan/phpstan": "^1.4", + "phpstan/phpstan-deprecation-rules": "^1", + "phpstan/phpstan-phpunit": "^1", + "phpstan/phpstan-strict-rules": "^1.1", + "phpunit/phpunit": "^8.5|^9.5", + "vimeo/psalm": "^4.22" + }, + "type": "symfony-bundle", + "autoload": { + "psr-4": { + "Doctrine\\Bundle\\MigrationsBundle\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Doctrine Project", + "homepage": "https://www.doctrine-project.org" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony DoctrineMigrationsBundle", + "homepage": "https://www.doctrine-project.org", + "keywords": [ + "dbal", + "migrations", + "schema" + ], + "support": { + "issues": "https://github.com/doctrine/DoctrineMigrationsBundle/issues", + "source": "https://github.com/doctrine/DoctrineMigrationsBundle/tree/3.2.4" + }, + "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%2Fdoctrine-migrations-bundle", + "type": "tidelift" + } + ], + "time": "2023-06-02T08:19:26+00:00" + }, + { + "name": "doctrine/event-manager", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/event-manager.git", + "reference": "750671534e0241a7c50ea5b43f67e23eb5c96f32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/event-manager/zipball/750671534e0241a7c50ea5b43f67e23eb5c96f32", + "reference": "750671534e0241a7c50ea5b43f67e23eb5c96f32", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "conflict": { + "doctrine/common": "<2.9" + }, + "require-dev": { + "doctrine/coding-standard": "^10", + "phpstan/phpstan": "^1.8.8", + "phpunit/phpunit": "^9.5", + "vimeo/psalm": "^4.28" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "The Doctrine Event Manager is a simple PHP event system that was built to be used with the various Doctrine projects.", + "homepage": "https://www.doctrine-project.org/projects/event-manager.html", + "keywords": [ + "event", + "event dispatcher", + "event manager", + "event system", + "events" + ], + "support": { + "issues": "https://github.com/doctrine/event-manager/issues", + "source": "https://github.com/doctrine/event-manager/tree/2.0.0" + }, + "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%2Fevent-manager", + "type": "tidelift" + } + ], + "time": "2022-10-12T20:59:15+00:00" + }, + { + "name": "doctrine/inflector", + "version": "2.0.8", + "source": { + "type": "git", + "url": "https://github.com/doctrine/inflector.git", + "reference": "f9301a5b2fb1216b2b08f02ba04dc45423db6bff" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/f9301a5b2fb1216b2b08f02ba04dc45423db6bff", + "reference": "f9301a5b2fb1216b2b08f02ba04dc45423db6bff", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^11.0", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.1", + "phpstan/phpstan-strict-rules": "^1.3", + "phpunit/phpunit": "^8.5 || ^9.5", + "vimeo/psalm": "^4.25 || ^5.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Inflector\\": "lib/Doctrine/Inflector" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.", + "homepage": "https://www.doctrine-project.org/projects/inflector.html", + "keywords": [ + "inflection", + "inflector", + "lowercase", + "manipulation", + "php", + "plural", + "singular", + "strings", + "uppercase", + "words" + ], + "support": { + "issues": "https://github.com/doctrine/inflector/issues", + "source": "https://github.com/doctrine/inflector/tree/2.0.8" + }, + "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": "2023-06-16T13:40:37+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "shasum": "" + }, + "require": { + "php": "^8.1" + }, + "require-dev": { + "doctrine/coding-standard": "^11", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^1.2", + "phpstan/phpstan": "^1.9.4", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^9.5.27", + "vimeo/psalm": "^5.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "https://ocramius.github.io/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "support": { + "issues": "https://github.com/doctrine/instantiator/issues", + "source": "https://github.com/doctrine/instantiator/tree/2.0.0" + }, + "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%2Finstantiator", + "type": "tidelift" + } + ], + "time": "2022-12-30T00:23:10+00:00" + }, + { + "name": "doctrine/lexer", + "version": "2.1.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", + "reference": "39ab8fcf5a51ce4b85ca97c7a7d033eb12831124", + "shasum": "" + }, + "require": { + "doctrine/deprecations": "^1.0", + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^9 || ^10", + "phpstan/phpstan": "^1.3", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", + "psalm/plugin-phpunit": "^0.18.3", + "vimeo/psalm": "^4.11 || ^5.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Common\\Lexer\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "https://www.doctrine-project.org/projects/lexer.html", + "keywords": [ + "annotations", + "docblock", + "lexer", + "parser", + "php" + ], + "support": { + "issues": "https://github.com/doctrine/lexer/issues", + "source": "https://github.com/doctrine/lexer/tree/2.1.0" + }, + "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%2Flexer", + "type": "tidelift" + } + ], + "time": "2022-12-14T08:49:07+00:00" + }, + { + "name": "doctrine/migrations", + "version": "3.6.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/migrations.git", + "reference": "e542ad8bcd606d7a18d0875babb8a6d963c9c059" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/migrations/zipball/e542ad8bcd606d7a18d0875babb8a6d963c9c059", + "reference": "e542ad8bcd606d7a18d0875babb8a6d963c9c059", + "shasum": "" + }, + "require": { + "composer-runtime-api": "^2", + "doctrine/dbal": "^3.5.1", + "doctrine/deprecations": "^0.5.3 || ^1", + "doctrine/event-manager": "^1.2 || ^2.0", + "php": "^8.1", + "psr/log": "^1.1.3 || ^2 || ^3", + "symfony/console": "^4.4.16 || ^5.4 || ^6.0", + "symfony/stopwatch": "^4.4 || ^5.4 || ^6.0", + "symfony/var-exporter": "^6.2" + }, + "conflict": { + "doctrine/orm": "<2.12" + }, + "require-dev": { + "doctrine/coding-standard": "^9", + "doctrine/orm": "^2.13", + "doctrine/persistence": "^2 || ^3", + "doctrine/sql-formatter": "^1.0", + "ext-pdo_sqlite": "*", + "phpstan/phpstan": "^1.5", + "phpstan/phpstan-deprecation-rules": "^1", + "phpstan/phpstan-phpunit": "^1.1", + "phpstan/phpstan-strict-rules": "^1.1", + "phpstan/phpstan-symfony": "^1.1", + "phpunit/phpunit": "^9.5.24", + "symfony/cache": "^4.4 || ^5.4 || ^6.0", + "symfony/process": "^4.4 || ^5.4 || ^6.0", + "symfony/yaml": "^4.4 || ^5.4 || ^6.0" + }, + "suggest": { + "doctrine/sql-formatter": "Allows to generate formatted SQL with the diff command.", + "symfony/yaml": "Allows the use of yaml for migration configuration files." + }, + "bin": [ + "bin/doctrine-migrations" + ], + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Migrations\\": "lib/Doctrine/Migrations" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Michael Simonson", + "email": "contact@mikesimonson.com" + } + ], + "description": "PHP Doctrine Migrations project offer additional functionality on top of the database abstraction layer (DBAL) for versioning your database schema and easily deploying changes to it. It is a very easy to use and a powerful tool.", + "homepage": "https://www.doctrine-project.org/projects/migrations.html", + "keywords": [ + "database", + "dbal", + "migrations" + ], + "support": { + "issues": "https://github.com/doctrine/migrations/issues", + "source": "https://github.com/doctrine/migrations/tree/3.6.0" + }, + "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%2Fmigrations", + "type": "tidelift" + } + ], + "time": "2023-02-15T18:49:46+00:00" + }, + { + "name": "doctrine/orm", + "version": "2.15.3", + "source": { + "type": "git", + "url": "https://github.com/doctrine/orm.git", + "reference": "4c3bd208018c26498e5f682aaad45fa00ea307d5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/orm/zipball/4c3bd208018c26498e5f682aaad45fa00ea307d5", + "reference": "4c3bd208018c26498e5f682aaad45fa00ea307d5", + "shasum": "" + }, + "require": { + "composer-runtime-api": "^2", + "doctrine/cache": "^1.12.1 || ^2.1.1", + "doctrine/collections": "^1.5 || ^2.1", + "doctrine/common": "^3.0.3", + "doctrine/dbal": "^2.13.1 || ^3.2", + "doctrine/deprecations": "^0.5.3 || ^1", + "doctrine/event-manager": "^1.2 || ^2", + "doctrine/inflector": "^1.4 || ^2.0", + "doctrine/instantiator": "^1.3 || ^2", + "doctrine/lexer": "^2", + "doctrine/persistence": "^2.4 || ^3", + "ext-ctype": "*", + "php": "^7.1 || ^8.0", + "psr/cache": "^1 || ^2 || ^3", + "symfony/console": "^4.2 || ^5.0 || ^6.0", + "symfony/polyfill-php72": "^1.23", + "symfony/polyfill-php80": "^1.16" + }, + "conflict": { + "doctrine/annotations": "<1.13 || >= 3.0" + }, + "require-dev": { + "doctrine/annotations": "^1.13 || ^2", + "doctrine/coding-standard": "^9.0.2 || ^12.0", + "phpbench/phpbench": "^0.16.10 || ^1.0", + "phpstan/phpstan": "~1.4.10 || 1.10.18", + "phpunit/phpunit": "^7.5 || ^8.5 || ^9.6", + "psr/log": "^1 || ^2 || ^3", + "squizlabs/php_codesniffer": "3.7.2", + "symfony/cache": "^4.4 || ^5.4 || ^6.0", + "symfony/var-exporter": "^4.4 || ^5.4 || ^6.2", + "symfony/yaml": "^3.4 || ^4.0 || ^5.0 || ^6.0", + "vimeo/psalm": "4.30.0 || 5.12.0" + }, + "suggest": { + "ext-dom": "Provides support for XSD validation for XML mapping files", + "symfony/cache": "Provides cache support for Setup Tool with doctrine/cache 2.0", + "symfony/yaml": "If you want to use YAML Metadata Mapping Driver" + }, + "bin": [ + "bin/doctrine" + ], + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\ORM\\": "lib/Doctrine/ORM" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "Object-Relational-Mapper for PHP", + "homepage": "https://www.doctrine-project.org/projects/orm.html", + "keywords": [ + "database", + "orm" + ], + "support": { + "issues": "https://github.com/doctrine/orm/issues", + "source": "https://github.com/doctrine/orm/tree/2.15.3" + }, + "time": "2023-06-22T12:36:06+00:00" + }, + { + "name": "doctrine/persistence", + "version": "3.2.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/persistence.git", + "reference": "63fee8c33bef740db6730eb2a750cd3da6495603" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/persistence/zipball/63fee8c33bef740db6730eb2a750cd3da6495603", + "reference": "63fee8c33bef740db6730eb2a750cd3da6495603", + "shasum": "" + }, + "require": { + "doctrine/event-manager": "^1 || ^2", + "php": "^7.2 || ^8.0", + "psr/cache": "^1.0 || ^2.0 || ^3.0" + }, + "conflict": { + "doctrine/common": "<2.10" + }, + "require-dev": { + "composer/package-versions-deprecated": "^1.11", + "doctrine/coding-standard": "^11", + "doctrine/common": "^3.0", + "phpstan/phpstan": "1.9.4", + "phpstan/phpstan-phpunit": "^1", + "phpstan/phpstan-strict-rules": "^1.1", + "phpunit/phpunit": "^8.5 || ^9.5", + "symfony/cache": "^4.4 || ^5.4 || ^6.0", + "vimeo/psalm": "4.30.0 || 5.3.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\Persistence\\": "src/Persistence" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "The Doctrine Persistence project is a set of shared interfaces and functionality that the different Doctrine object mappers share.", + "homepage": "https://www.doctrine-project.org/projects/persistence.html", + "keywords": [ + "mapper", + "object", + "odm", + "orm", + "persistence" + ], + "support": { + "issues": "https://github.com/doctrine/persistence/issues", + "source": "https://github.com/doctrine/persistence/tree/3.2.0" + }, + "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%2Fpersistence", + "type": "tidelift" + } + ], + "time": "2023-05-17T18:32:04+00:00" + }, + { + "name": "doctrine/sql-formatter", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/doctrine/sql-formatter.git", + "reference": "25a06c7bf4c6b8218f47928654252863ffc890a5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/sql-formatter/zipball/25a06c7bf4c6b8218f47928654252863ffc890a5", + "reference": "25a06c7bf4c6b8218f47928654252863ffc890a5", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "bamarni/composer-bin-plugin": "^1.4" + }, + "bin": [ + "bin/sql-formatter" + ], + "type": "library", + "autoload": { + "psr-4": { + "Doctrine\\SqlFormatter\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jeremy Dorn", + "email": "jeremy@jeremydorn.com", + "homepage": "https://jeremydorn.com/" + } + ], + "description": "a PHP SQL highlighting library", + "homepage": "https://github.com/doctrine/sql-formatter/", + "keywords": [ + "highlight", + "sql" + ], + "support": { + "issues": "https://github.com/doctrine/sql-formatter/issues", + "source": "https://github.com/doctrine/sql-formatter/tree/1.1.3" + }, + "time": "2022-05-23T21:33:49+00:00" + }, { "name": "psr/cache", "version": "3.0.0", @@ -693,6 +2006,116 @@ ], "time": "2023-05-23T14:45:45+00:00" }, + { + "name": "symfony/doctrine-bridge", + "version": "v6.3.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/doctrine-bridge.git", + "reference": "594263c7d2677022a16e4f39d20070463ba03888" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/doctrine-bridge/zipball/594263c7d2677022a16e4f39d20070463ba03888", + "reference": "594263c7d2677022a16e4f39d20070463ba03888", + "shasum": "" + }, + "require": { + "doctrine/event-manager": "^1.2|^2", + "doctrine/persistence": "^2|^3", + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.0", + "symfony/service-contracts": "^2.5|^3" + }, + "conflict": { + "doctrine/annotations": "<1.13.1", + "doctrine/dbal": "<2.13.1", + "doctrine/lexer": "<1.1", + "doctrine/orm": "<2.12", + "symfony/cache": "<5.4", + "symfony/dependency-injection": "<6.2", + "symfony/form": "<5.4.21|>=6,<6.2.7", + "symfony/http-foundation": "<6.3", + "symfony/http-kernel": "<6.2", + "symfony/lock": "<6.3", + "symfony/messenger": "<5.4", + "symfony/property-info": "<5.4", + "symfony/security-bundle": "<5.4", + "symfony/security-core": "<6.0", + "symfony/validator": "<5.4.25|>=6,<6.2.12|>=6.3,<6.3.1" + }, + "require-dev": { + "doctrine/annotations": "^1.13.1|^2", + "doctrine/collections": "^1.0|^2.0", + "doctrine/data-fixtures": "^1.1", + "doctrine/dbal": "^2.13.1|^3.0", + "doctrine/orm": "^2.12", + "psr/log": "^1|^2|^3", + "symfony/cache": "^5.4|^6.0", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^6.2", + "symfony/doctrine-messenger": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/form": "^5.4.21|^6.2.7", + "symfony/http-kernel": "^6.3", + "symfony/lock": "^6.3", + "symfony/messenger": "^5.4|^6.0", + "symfony/property-access": "^5.4|^6.0", + "symfony/property-info": "^5.4|^6.0", + "symfony/proxy-manager-bridge": "^5.4|^6.0", + "symfony/security-core": "^6.0", + "symfony/stopwatch": "^5.4|^6.0", + "symfony/translation": "^5.4|^6.0", + "symfony/uid": "^5.4|^6.0", + "symfony/validator": "^5.4.25|~6.2.12|^6.3.1", + "symfony/var-dumper": "^5.4|^6.0" + }, + "type": "symfony-bridge", + "autoload": { + "psr-4": { + "Symfony\\Bridge\\Doctrine\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides integration for Doctrine with various Symfony components", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/doctrine-bridge/tree/v6.3.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": "2023-06-18T20:33:34+00:00" + }, { "name": "symfony/dotenv", "version": "v6.3.0", @@ -1189,6 +2612,103 @@ ], "time": "2023-05-27T07:38:25+00:00" }, + { + "name": "symfony/form", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/form.git", + "reference": "59e7c5afef32b9ff735e83e5fc74d63044833a2b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/form/zipball/59e7c5afef32b9ff735e83e5fc74d63044833a2b", + "reference": "59e7c5afef32b9ff735e83e5fc74d63044833a2b", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/options-resolver": "^5.4|^6.0", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-icu": "^1.21", + "symfony/polyfill-mbstring": "~1.0", + "symfony/property-access": "^5.4|^6.0", + "symfony/service-contracts": "^2.5|^3" + }, + "conflict": { + "symfony/console": "<5.4", + "symfony/dependency-injection": "<5.4", + "symfony/doctrine-bridge": "<5.4.21|>=6,<6.2.7", + "symfony/error-handler": "<5.4", + "symfony/framework-bundle": "<5.4", + "symfony/http-kernel": "<5.4", + "symfony/translation": "<5.4", + "symfony/translation-contracts": "<2.5", + "symfony/twig-bridge": "<6.3" + }, + "require-dev": { + "doctrine/collections": "^1.0|^2.0", + "symfony/config": "^5.4|^6.0", + "symfony/console": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/html-sanitizer": "^6.1", + "symfony/http-foundation": "^5.4|^6.0", + "symfony/http-kernel": "^5.4|^6.0", + "symfony/intl": "^5.4|^6.0", + "symfony/security-core": "^6.2", + "symfony/security-csrf": "^5.4|^6.0", + "symfony/translation": "^5.4|^6.0", + "symfony/uid": "^5.4|^6.0", + "symfony/validator": "^5.4|^6.0", + "symfony/var-dumper": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Form\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Allows to easily create, process and reuse HTML forms", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/form/tree/v6.3.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": "2023-05-25T13:09:35+00:00" + }, { "name": "symfony/framework-bundle", "version": "v6.3.1", @@ -1523,6 +3043,73 @@ ], "time": "2023-06-26T06:07:32+00:00" }, + { + "name": "symfony/options-resolver", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/options-resolver.git", + "reference": "a10f19f5198d589d5c33333cffe98dc9820332dd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/a10f19f5198d589d5c33333cffe98dc9820332dd", + "reference": "a10f19f5198d589d5c33333cffe98dc9820332dd", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\OptionsResolver\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides an improved replacement for the array_replace PHP function", + "homepage": "https://symfony.com", + "keywords": [ + "config", + "configuration", + "options" + ], + "support": { + "source": "https://github.com/symfony/options-resolver/tree/v6.3.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": "2023-05-12T14:21:09+00:00" + }, { "name": "symfony/polyfill-intl-grapheme", "version": "v1.27.0", @@ -1604,6 +3191,93 @@ ], "time": "2022-11-03T14:55:06+00:00" }, + { + "name": "symfony/polyfill-intl-icu", + "version": "v1.27.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-icu.git", + "reference": "a3d9148e2c363588e05abbdd4ee4f971f0a5330c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-icu/zipball/a3d9148e2c363588e05abbdd4ee4f971f0a5330c", + "reference": "a3d9148e2c363588e05abbdd4ee4f971f0a5330c", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "suggest": { + "ext-intl": "For best performance and support of other locales than \"en\"" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "1.27-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ], + "psr-4": { + "Symfony\\Polyfill\\Intl\\Icu\\": "" + }, + "classmap": [ + "Resources/stubs" + ], + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's ICU-related data and classes", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "icu", + "intl", + "polyfill", + "portable", + "shim" + ], + "support": { + "source": "https://github.com/symfony/polyfill-intl-icu/tree/v1.27.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": "2022-11-03T14:55:06+00:00" + }, { "name": "symfony/polyfill-intl-normalizer", "version": "v1.27.0", @@ -1848,6 +3522,166 @@ ], "time": "2022-11-03T14:55:06+00:00" }, + { + "name": "symfony/property-access", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/property-access.git", + "reference": "db9358571ce63f09c439c2fee6c12e5b090b69ac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/property-access/zipball/db9358571ce63f09c439c2fee6c12e5b090b69ac", + "reference": "db9358571ce63f09c439c2fee6c12e5b090b69ac", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/property-info": "^5.4|^6.0" + }, + "require-dev": { + "symfony/cache": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\PropertyAccess\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides functions to read and write from/to an object or array using a simple string notation", + "homepage": "https://symfony.com", + "keywords": [ + "access", + "array", + "extraction", + "index", + "injection", + "object", + "property", + "property-path", + "reflection" + ], + "support": { + "source": "https://github.com/symfony/property-access/tree/v6.3.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": "2023-05-19T08:06:44+00:00" + }, + { + "name": "symfony/property-info", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/property-info.git", + "reference": "7f3a03716112269741fe2a809f8f791a371d1fcd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/property-info/zipball/7f3a03716112269741fe2a809f8f791a371d1fcd", + "reference": "7f3a03716112269741fe2a809f8f791a371d1fcd", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/string": "^5.4|^6.0" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "<5.2", + "phpdocumentor/type-resolver": "<1.5.1", + "symfony/dependency-injection": "<5.4" + }, + "require-dev": { + "doctrine/annotations": "^1.10.4|^2", + "phpdocumentor/reflection-docblock": "^5.2", + "phpstan/phpdoc-parser": "^1.0", + "symfony/cache": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/serializer": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\PropertyInfo\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kévin Dunglas", + "email": "dunglas@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Extracts information about PHP class' properties using metadata of popular sources", + "homepage": "https://symfony.com", + "keywords": [ + "doctrine", + "phpdoc", + "property", + "symfony", + "type", + "validator" + ], + "support": { + "source": "https://github.com/symfony/property-info/tree/v6.3.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": "2023-05-19T08:06:44+00:00" + }, { "name": "symfony/routing", "version": "v6.3.1", @@ -2091,6 +3925,68 @@ ], "time": "2023-05-23T14:45:45+00:00" }, + { + "name": "symfony/stopwatch", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/stopwatch.git", + "reference": "fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2", + "reference": "fc47f1015ec80927ff64ba9094dfe8b9d48fe9f2", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/service-contracts": "^2.5|^3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Stopwatch\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides a way to profile code", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/stopwatch/tree/v6.3.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": "2023-02-16T10:14:28+00:00" + }, { "name": "symfony/string", "version": "v6.3.0", @@ -2177,6 +4073,373 @@ ], "time": "2023-03-21T21:06:29+00:00" }, + { + "name": "symfony/translation-contracts", + "version": "v3.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation-contracts.git", + "reference": "02c24deb352fb0d79db5486c0c79905a85e37e86" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/02c24deb352fb0d79db5486c0c79905a85e37e86", + "reference": "02c24deb352fb0d79db5486c0c79905a85e37e86", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.4-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Contracts\\Translation\\": "" + }, + "exclude-from-classmap": [ + "/Test/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Generic abstractions related to translation", + "homepage": "https://symfony.com", + "keywords": [ + "abstractions", + "contracts", + "decoupling", + "interfaces", + "interoperability", + "standards" + ], + "support": { + "source": "https://github.com/symfony/translation-contracts/tree/v3.3.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": "2023-05-30T17:17:10+00:00" + }, + { + "name": "symfony/twig-bridge", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/twig-bridge.git", + "reference": "67a33c71062d7d931fe9a8cb7be79cca986a6c09" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/twig-bridge/zipball/67a33c71062d7d931fe9a8cb7be79cca986a6c09", + "reference": "67a33c71062d7d931fe9a8cb7be79cca986a6c09", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/translation-contracts": "^2.5|^3", + "twig/twig": "^2.13|^3.0.4" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "<3.2.2", + "phpdocumentor/type-resolver": "<1.4.0", + "symfony/console": "<5.4", + "symfony/form": "<6.3", + "symfony/http-foundation": "<5.4", + "symfony/http-kernel": "<6.2", + "symfony/mime": "<6.2", + "symfony/translation": "<5.4", + "symfony/workflow": "<5.4" + }, + "require-dev": { + "doctrine/annotations": "^1.12|^2", + "egulias/email-validator": "^2.1.10|^3|^4", + "league/html-to-markdown": "^5.0", + "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", + "symfony/asset": "^5.4|^6.0", + "symfony/asset-mapper": "^6.3", + "symfony/console": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/finder": "^5.4|^6.0", + "symfony/form": "^6.3", + "symfony/html-sanitizer": "^6.1", + "symfony/http-foundation": "^5.4|^6.0", + "symfony/http-kernel": "^6.2", + "symfony/intl": "^5.4|^6.0", + "symfony/mime": "^6.2", + "symfony/polyfill-intl-icu": "~1.0", + "symfony/property-info": "^5.4|^6.0", + "symfony/routing": "^5.4|^6.0", + "symfony/security-acl": "^2.8|^3.0", + "symfony/security-core": "^5.4|^6.0", + "symfony/security-csrf": "^5.4|^6.0", + "symfony/security-http": "^5.4|^6.0", + "symfony/serializer": "^6.2", + "symfony/stopwatch": "^5.4|^6.0", + "symfony/translation": "^6.1", + "symfony/web-link": "^5.4|^6.0", + "symfony/workflow": "^5.4|^6.0", + "symfony/yaml": "^5.4|^6.0", + "twig/cssinliner-extra": "^2.12|^3", + "twig/inky-extra": "^2.12|^3", + "twig/markdown-extra": "^2.12|^3" + }, + "type": "symfony-bridge", + "autoload": { + "psr-4": { + "Symfony\\Bridge\\Twig\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides integration for Twig with various Symfony components", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/twig-bridge/tree/v6.3.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": "2023-05-29T13:12:36+00:00" + }, + { + "name": "symfony/twig-bundle", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/twig-bundle.git", + "reference": "d0cd4d1675c0582d27c2e8bb0dc27c0303d8e3ea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/twig-bundle/zipball/d0cd4d1675c0582d27c2e8bb0dc27c0303d8e3ea", + "reference": "d0cd4d1675c0582d27c2e8bb0dc27c0303d8e3ea", + "shasum": "" + }, + "require": { + "composer-runtime-api": ">=2.1", + "php": ">=8.1", + "symfony/config": "^6.1", + "symfony/dependency-injection": "^6.1", + "symfony/http-foundation": "^5.4|^6.0", + "symfony/http-kernel": "^6.2", + "symfony/twig-bridge": "^6.3", + "twig/twig": "^2.13|^3.0.4" + }, + "conflict": { + "symfony/framework-bundle": "<5.4", + "symfony/translation": "<5.4" + }, + "require-dev": { + "doctrine/annotations": "^1.10.4|^2", + "symfony/asset": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/finder": "^5.4|^6.0", + "symfony/form": "^5.4|^6.0", + "symfony/framework-bundle": "^5.4|^6.0", + "symfony/routing": "^5.4|^6.0", + "symfony/stopwatch": "^5.4|^6.0", + "symfony/translation": "^5.4|^6.0", + "symfony/web-link": "^5.4|^6.0", + "symfony/yaml": "^5.4|^6.0" + }, + "type": "symfony-bundle", + "autoload": { + "psr-4": { + "Symfony\\Bundle\\TwigBundle\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides a tight integration of Twig into the Symfony full-stack framework", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/twig-bundle/tree/v6.3.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": "2023-05-06T09:53:41+00:00" + }, + { + "name": "symfony/validator", + "version": "v6.3.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/validator.git", + "reference": "1b71f43c62ee867ab08195ba6039a1bc3e6654dc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/validator/zipball/1b71f43c62ee867ab08195ba6039a1bc3e6654dc", + "reference": "1b71f43c62ee867ab08195ba6039a1bc3e6654dc", + "shasum": "" + }, + "require": { + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-mbstring": "~1.0", + "symfony/polyfill-php83": "^1.27", + "symfony/translation-contracts": "^2.5|^3" + }, + "conflict": { + "doctrine/annotations": "<1.13", + "doctrine/lexer": "<1.1", + "symfony/dependency-injection": "<5.4", + "symfony/expression-language": "<5.4", + "symfony/http-kernel": "<5.4", + "symfony/intl": "<5.4", + "symfony/property-info": "<5.4", + "symfony/translation": "<5.4", + "symfony/yaml": "<5.4" + }, + "require-dev": { + "doctrine/annotations": "^1.13|^2", + "egulias/email-validator": "^2.1.10|^3|^4", + "symfony/cache": "^5.4|^6.0", + "symfony/config": "^5.4|^6.0", + "symfony/console": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/finder": "^5.4|^6.0", + "symfony/http-client": "^5.4|^6.0", + "symfony/http-foundation": "^5.4|^6.0", + "symfony/http-kernel": "^5.4|^6.0", + "symfony/intl": "^5.4|^6.0", + "symfony/mime": "^5.4|^6.0", + "symfony/property-access": "^5.4|^6.0", + "symfony/property-info": "^5.4|^6.0", + "symfony/translation": "^5.4|^6.0", + "symfony/yaml": "^5.4|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Validator\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Provides tools to validate values", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/validator/tree/v6.3.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": "2023-06-21T12:08:28+00:00" + }, { "name": "symfony/var-dumper", "version": "v6.3.1", @@ -2403,9 +4666,292 @@ } ], "time": "2023-04-28T13:28:14+00:00" + }, + { + "name": "twig/twig", + "version": "v3.6.1", + "source": { + "type": "git", + "url": "https://github.com/twigphp/Twig.git", + "reference": "7e7d5839d4bec168dfeef0ac66d5c5a2edbabffd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/7e7d5839d4bec168dfeef0ac66d5c5a2edbabffd", + "reference": "7e7d5839d4bec168dfeef0ac66d5c5a2edbabffd", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/polyfill-ctype": "^1.8", + "symfony/polyfill-mbstring": "^1.3" + }, + "require-dev": { + "psr/container": "^1.0|^2.0", + "symfony/phpunit-bridge": "^4.4.9|^5.0.9|^6.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Twig\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" + }, + { + "name": "Twig Team", + "role": "Contributors" + }, + { + "name": "Armin Ronacher", + "email": "armin.ronacher@active-4.com", + "role": "Project Founder" + } + ], + "description": "Twig, the flexible, fast, and secure template language for PHP", + "homepage": "https://twig.symfony.com", + "keywords": [ + "templating" + ], + "support": { + "issues": "https://github.com/twigphp/Twig/issues", + "source": "https://github.com/twigphp/Twig/tree/v3.6.1" + }, + "funding": [ + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/twig/twig", + "type": "tidelift" + } + ], + "time": "2023-06-08T12:52:13+00:00" + } + ], + "packages-dev": [ + { + "name": "nikic/php-parser", + "version": "v4.16.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "19526a33fb561ef417e822e85f08a00db4059c17" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/19526a33fb561ef417e822e85f08a00db4059c17", + "reference": "19526a33fb561ef417e822e85f08a00db4059c17", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=7.0" + }, + "require-dev": { + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" + }, + "bin": [ + "bin/php-parse" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.9-dev" + } + }, + "autoload": { + "psr-4": { + "PhpParser\\": "lib/PhpParser" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov" + } + ], + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], + "support": { + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.16.0" + }, + "time": "2023-06-25T14:52:30+00:00" + }, + { + "name": "symfony/maker-bundle", + "version": "v1.50.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/maker-bundle.git", + "reference": "a1733f849b999460c308e66f6392fb09b621fa86" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/maker-bundle/zipball/a1733f849b999460c308e66f6392fb09b621fa86", + "reference": "a1733f849b999460c308e66f6392fb09b621fa86", + "shasum": "" + }, + "require": { + "doctrine/inflector": "^2.0", + "nikic/php-parser": "^4.11", + "php": ">=8.0", + "symfony/config": "^5.4.7|^6.0", + "symfony/console": "^5.4.7|^6.0", + "symfony/dependency-injection": "^5.4.7|^6.0", + "symfony/deprecation-contracts": "^2.2|^3", + "symfony/filesystem": "^5.4.7|^6.0", + "symfony/finder": "^5.4.3|^6.0", + "symfony/framework-bundle": "^5.4.7|^6.0", + "symfony/http-kernel": "^5.4.7|^6.0", + "symfony/process": "^5.4.7|^6.0" + }, + "conflict": { + "doctrine/doctrine-bundle": "<2.4", + "doctrine/orm": "<2.10", + "symfony/doctrine-bridge": "<5.4" + }, + "require-dev": { + "composer/semver": "^3.0", + "doctrine/doctrine-bundle": "^2.4", + "doctrine/orm": "^2.10.0", + "symfony/http-client": "^5.4.7|^6.0", + "symfony/phpunit-bridge": "^5.4.17|^6.0", + "symfony/polyfill-php80": "^1.16.0", + "symfony/security-core": "^5.4.7|^6.0", + "symfony/yaml": "^5.4.3|^6.0", + "twig/twig": "^2.0|^3.0" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-main": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Bundle\\MakerBundle\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.", + "homepage": "https://symfony.com/doc/current/bundles/SymfonyMakerBundle/index.html", + "keywords": [ + "code generator", + "dev", + "generator", + "scaffold", + "scaffolding" + ], + "support": { + "issues": "https://github.com/symfony/maker-bundle/issues", + "source": "https://github.com/symfony/maker-bundle/tree/v1.50.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": "2023-07-10T18:21:57+00:00" + }, + { + "name": "symfony/process", + "version": "v6.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "8741e3ed7fe2e91ec099e02446fb86667a0f1628" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/8741e3ed7fe2e91ec099e02446fb86667a0f1628", + "reference": "8741e3ed7fe2e91ec099e02446fb86667a0f1628", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Executes commands in sub-processes", + "homepage": "https://symfony.com", + "support": { + "source": "https://github.com/symfony/process/tree/v6.3.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": "2023-05-19T08:06:44+00:00" } ], - "packages-dev": [], "aliases": [], "minimum-stability": "stable", "stability-flags": [], diff --git a/config/bundles.php b/config/bundles.php index 49d3fb6..f8486d5 100644 --- a/config/bundles.php +++ b/config/bundles.php @@ -2,4 +2,8 @@ return [ Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true], + Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true], + Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true], + Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true], + Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true], ]; diff --git a/config/packages/doctrine.yaml b/config/packages/doctrine.yaml new file mode 100644 index 0000000..88671ee --- /dev/null +++ b/config/packages/doctrine.yaml @@ -0,0 +1,46 @@ +doctrine: + dbal: + url: '%env(resolve:DATABASE_URL)%' + + # IMPORTANT: You MUST configure your server version, + # either here or in the DATABASE_URL env var (see .env file) + #server_version: '15' + orm: + auto_generate_proxy_classes: true + enable_lazy_ghost_objects: true + report_fields_where_declared: true + validate_xml_mapping: true + naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware + auto_mapping: true + mappings: + App: + is_bundle: false + dir: '%kernel.project_dir%/src/Entity' + prefix: 'App\Entity' + alias: App + +when@test: + doctrine: + dbal: + # "TEST_TOKEN" is typically set by ParaTest + dbname_suffix: '_test%env(default::TEST_TOKEN)%' + +when@prod: + doctrine: + orm: + auto_generate_proxy_classes: false + proxy_dir: '%kernel.build_dir%/doctrine/orm/Proxies' + query_cache_driver: + type: pool + pool: doctrine.system_cache_pool + result_cache_driver: + type: pool + pool: doctrine.result_cache_pool + + framework: + cache: + pools: + doctrine.result_cache_pool: + adapter: cache.app + doctrine.system_cache_pool: + adapter: cache.system diff --git a/config/packages/doctrine_migrations.yaml b/config/packages/doctrine_migrations.yaml new file mode 100644 index 0000000..29231d9 --- /dev/null +++ b/config/packages/doctrine_migrations.yaml @@ -0,0 +1,6 @@ +doctrine_migrations: + migrations_paths: + # namespace is arbitrary but should be different from App\Migrations + # as migrations classes should NOT be autoloaded + 'DoctrineMigrations': '%kernel.project_dir%/migrations' + enable_profiler: false diff --git a/config/packages/twig.yaml b/config/packages/twig.yaml new file mode 100644 index 0000000..f9f4cc5 --- /dev/null +++ b/config/packages/twig.yaml @@ -0,0 +1,6 @@ +twig: + default_path: '%kernel.project_dir%/templates' + +when@test: + twig: + strict_variables: true diff --git a/config/packages/validator.yaml b/config/packages/validator.yaml new file mode 100644 index 0000000..0201281 --- /dev/null +++ b/config/packages/validator.yaml @@ -0,0 +1,13 @@ +framework: + validation: + email_validation_mode: html5 + + # Enables validator auto-mapping support. + # For instance, basic validation constraints will be inferred from Doctrine's metadata. + #auto_mapping: + # App\Entity\: [] + +when@test: + framework: + validation: + not_compromised_password: false diff --git a/migrations/.gitignore b/migrations/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/migrations/Version20230720115905.php b/migrations/Version20230720115905.php new file mode 100644 index 0000000..d2e8f5b --- /dev/null +++ b/migrations/Version20230720115905.php @@ -0,0 +1,34 @@ +addSql('CREATE SEQUENCE paste_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); + $this->addSql('CREATE TABLE paste (id INT NOT NULL, text TEXT NOT NULL, private BOOLEAN NOT NULL, language VARCHAR(25) NOT NULL, description TEXT NOT NULL, filename VARCHAR(128) NOT NULL, author VARCHAR(128) NOT NULL, publish_date TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, expiration_date TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, ip VARCHAR(15) NOT NULL, secret VARCHAR(40) NOT NULL, PRIMARY KEY(id))'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('CREATE SCHEMA public'); + $this->addSql('DROP SEQUENCE paste_id_seq CASCADE'); + $this->addSql('DROP TABLE paste'); + } +} diff --git a/migrations/Version20230720125632.php b/migrations/Version20230720125632.php new file mode 100644 index 0000000..c702e42 --- /dev/null +++ b/migrations/Version20230720125632.php @@ -0,0 +1,38 @@ +addSql('ALTER TABLE paste ALTER language DROP NOT NULL'); + $this->addSql('ALTER TABLE paste ALTER description DROP NOT NULL'); + $this->addSql('ALTER TABLE paste ALTER filename DROP NOT NULL'); + $this->addSql('ALTER TABLE paste ALTER expiration_date DROP NOT NULL'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('CREATE SCHEMA public'); + $this->addSql('ALTER TABLE paste ALTER language SET NOT NULL'); + $this->addSql('ALTER TABLE paste ALTER description SET NOT NULL'); + $this->addSql('ALTER TABLE paste ALTER filename SET NOT NULL'); + $this->addSql('ALTER TABLE paste ALTER expiration_date SET NOT NULL'); + } +} diff --git a/migrations/Version20230720130259.php b/migrations/Version20230720130259.php new file mode 100644 index 0000000..6c42569 --- /dev/null +++ b/migrations/Version20230720130259.php @@ -0,0 +1,32 @@ +addSql('ALTER TABLE paste ALTER secret DROP NOT NULL'); + } + + public function down(Schema $schema): void + { + // this down() migration is auto-generated, please modify it to your needs + $this->addSql('CREATE SCHEMA public'); + $this->addSql('ALTER TABLE paste ALTER secret SET NOT NULL'); + } +} diff --git a/src/Controller/PasteController.php b/src/Controller/PasteController.php new file mode 100644 index 0000000..163e159 --- /dev/null +++ b/src/Controller/PasteController.php @@ -0,0 +1,54 @@ +createForm(PasteForm::class, $paste); + + $form->handleRequest($request); + if ($form->isSubmitted() && $form->isValid()) { + $paste = $form->getData(); + $paste->setIp($request->getClientIp()); + $paste->setPublishDate(new \DateTime()); + + if ($paste->isPrivate()) { + $paste->setSecret(hash("sha1", random_bytes(25))); + } + + $entityManager->persist($paste); + $entityManager->flush(); + + return $this->redirectToRoute($request->attributes->get('_route')); + + } + + return $this->render('paste.html.twig', [ + 'form' => $form, + ]); + } + + #[Route('/{id}/{secret}')] + public function show_paste(PasteRepository $pasteRepository, Request $request, string $id, ?string $secret=NULL): Response { + $paste = $pasteRepository->findOneBy(["id" => $id, "secret" => $secret]); + $form = $this->createForm(PasteForm::class, $paste); + + return $this->render('paste.html.twig', [ + 'form' => $form, + ]); + + } +} diff --git a/src/Entity/.gitignore b/src/Entity/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/src/Entity/Paste.php b/src/Entity/Paste.php new file mode 100644 index 0000000..2262ca7 --- /dev/null +++ b/src/Entity/Paste.php @@ -0,0 +1,139 @@ +id; + } + + public function setId(int $id): void { + $this->id = $id; + } + + public function getText(): string { + return $this->text; + } + + public function setText(string $text): void { + $this->text = $text; + } + + public function getLanguage(): ?string { + return $this->language; + } + + public function setLanguage(?string $language): void { + $this->language = $language; + } + + public function getDescription(): ?string { + return $this->description; + } + + public function setDescription(?string $description): void { + $this->description = $description; + } + + public function getFilename(): ?string { + return $this->filename; + } + + public function setFilename(?string $filename): void { + $this->filename = $filename; + } + + public function getAuthor(): string { + return $this->author; + } + + public function setAuthor(string $author): void { + $this->author = $author; + } + + public function getPublishDate(): \DateTime { + return $this->publishDate; + } + + public function setPublishDate(\DateTime $date): void { + $this->publishDate = $date; + } + + public function getExpirationDate(): ?\DateTime { + return $this->expirationDate; + } + + public function setExpirationDate(?\DateTime $date): void { + $this->expirationDate = $date; + } + + public function getIp(): string { + return $this->ip; + } + + public function setIP(string $ip): void { + $this->ip = $ip; + } + + public function getSecret(): ?string { + return $this->secret; + } + + public function setSecret(?string $secret): void { + $this->secret = $secret; + } + + public function isPrivate(): bool { + return $this->private; + } + + public function setPrivate(bool $private): void { + $this->private = $private; + } +} \ No newline at end of file diff --git a/src/Form/Type/PasteForm.php b/src/Form/Type/PasteForm.php new file mode 100644 index 0000000..4fefa43 --- /dev/null +++ b/src/Form/Type/PasteForm.php @@ -0,0 +1,28 @@ +add("language", ChoiceType::class, ["choices" => ["Python" => "python", "PHP" => "php", "Plain text" => NULL]]) + ->add("description", TextType::class, ["required" => false]) + ->add("text", TextareaType::class) + ->add("author", TextType::class, ["attr" => ["maxlength" =>128]]) + ->add("filename", TextType::class, ["required" => false, "attr" => ["maxlength" =>128]]) + ->add("expirationDate", DateTimeType::class, ["required" => false, "date_widget" => "single_text", "input" => "datetime"]) + ->add("private", CheckboxType::class, ["required" => false]) + ->add("save", SubmitType::class) + ; + } +} \ No newline at end of file diff --git a/src/Repository/.gitignore b/src/Repository/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/src/Repository/PasteRepository.php b/src/Repository/PasteRepository.php new file mode 100644 index 0000000..99f64e4 --- /dev/null +++ b/src/Repository/PasteRepository.php @@ -0,0 +1,14 @@ + + + + + {% block title %}Welcome!{% endblock %} + + {% block stylesheets %} + {% endblock %} + + {% block javascripts %} + {% endblock %} + + + {% block body %}{% endblock %} + + diff --git a/templates/paste.html.twig b/templates/paste.html.twig new file mode 100644 index 0000000..0c1a4ce --- /dev/null +++ b/templates/paste.html.twig @@ -0,0 +1 @@ +{{ form(form) }} -- 2.43.5 From 9a98436eb82319f7b858b279b2d935578a2c710e Mon Sep 17 00:00:00 2001 From: mitsuha_s Date: Fri, 21 Jul 2023 16:16:16 +0300 Subject: [PATCH 03/24] unnecessary .gitignore files removed, double quotes changed to single quotes --- migrations/.gitignore | 0 src/Controller/.gitignore | 0 src/Controller/PasteController.php | 4 ++-- src/Entity/Paste.php | 8 ++++---- src/Form/Type/PasteForm.php | 16 ++++++++-------- src/Repository/.gitignore | 0 6 files changed, 14 insertions(+), 14 deletions(-) delete mode 100644 migrations/.gitignore delete mode 100644 src/Controller/.gitignore delete mode 100644 src/Repository/.gitignore diff --git a/migrations/.gitignore b/migrations/.gitignore deleted file mode 100644 index e69de29..0000000 diff --git a/src/Controller/.gitignore b/src/Controller/.gitignore deleted file mode 100644 index e69de29..0000000 diff --git a/src/Controller/PasteController.php b/src/Controller/PasteController.php index 163e159..d7ca3e7 100644 --- a/src/Controller/PasteController.php +++ b/src/Controller/PasteController.php @@ -26,7 +26,7 @@ class PasteController extends AbstractController $paste->setPublishDate(new \DateTime()); if ($paste->isPrivate()) { - $paste->setSecret(hash("sha1", random_bytes(25))); + $paste->setSecret(hash('sha1', random_bytes(25))); } $entityManager->persist($paste); @@ -43,7 +43,7 @@ class PasteController extends AbstractController #[Route('/{id}/{secret}')] public function show_paste(PasteRepository $pasteRepository, Request $request, string $id, ?string $secret=NULL): Response { - $paste = $pasteRepository->findOneBy(["id" => $id, "secret" => $secret]); + $paste = $pasteRepository->findOneBy(['id' => $id, 'secret' => $secret]); $form = $this->createForm(PasteForm::class, $paste); return $this->render('paste.html.twig', [ diff --git a/src/Entity/Paste.php b/src/Entity/Paste.php index 2262ca7..cd27422 100644 --- a/src/Entity/Paste.php +++ b/src/Entity/Paste.php @@ -14,18 +14,18 @@ class Paste #[ORM\Column(nullable: false)] private int $id; - #[ORM\Column(type: "text", nullable: false)] + #[ORM\Column(type: 'text', nullable: false)] #[Assert\NotBlank] private string $text; - #[ORM\Column(type: "boolean", nullable: false)] + #[ORM\Column(type: 'boolean', nullable: false)] #[Assert\Type(\boolean::class)] private bool $private; #[ORM\Column(length: 25, nullable: true)] private ?string $language; - #[ORM\Column(type: "text", nullable: true)] + #[ORM\Column(type: 'text', nullable: true)] private ?string $description; #[ORM\Column(length: 128, nullable: true)] @@ -33,7 +33,7 @@ class Paste #[ORM\Column(length: 128, nullable: false)] #[Assert\NotBlank] - private string $author = "anonymous"; + private string $author = 'anonymous'; #[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: false)] #[Assert\Type(\DateTime::class)] diff --git a/src/Form/Type/PasteForm.php b/src/Form/Type/PasteForm.php index 4fefa43..e0f0016 100644 --- a/src/Form/Type/PasteForm.php +++ b/src/Form/Type/PasteForm.php @@ -15,14 +15,14 @@ class PasteForm extends AbstractType { public function buildForm(FormBuilderInterface $builder, array $options): void { $builder - ->add("language", ChoiceType::class, ["choices" => ["Python" => "python", "PHP" => "php", "Plain text" => NULL]]) - ->add("description", TextType::class, ["required" => false]) - ->add("text", TextareaType::class) - ->add("author", TextType::class, ["attr" => ["maxlength" =>128]]) - ->add("filename", TextType::class, ["required" => false, "attr" => ["maxlength" =>128]]) - ->add("expirationDate", DateTimeType::class, ["required" => false, "date_widget" => "single_text", "input" => "datetime"]) - ->add("private", CheckboxType::class, ["required" => false]) - ->add("save", SubmitType::class) + ->add('language', ChoiceType::class, ['choices' => ['Python' => 'python', 'PHP' => 'php', 'Plain text' => NULL]]) + ->add('description', TextType::class, ['required' => false]) + ->add('text', TextareaType::class) + ->add('author', TextType::class, ['attr' => ['maxlength' =>128]]) + ->add('filename', TextType::class, ['required' => false, 'attr' => ['maxlength' =>128]]) + ->add('expirationDate', DateTimeType::class, ['required' => false, 'date_widget' => 'single_text', 'input' => 'datetime']) + ->add('private', CheckboxType::class, ['required' => false]) + ->add('save', SubmitType::class) ; } } \ No newline at end of file diff --git a/src/Repository/.gitignore b/src/Repository/.gitignore deleted file mode 100644 index e69de29..0000000 -- 2.43.5 From 0d7c5487f47e2268e988d8a2afbf8f22e26b4329 Mon Sep 17 00:00:00 2001 From: mitsuha_s Date: Fri, 21 Jul 2023 16:19:20 +0300 Subject: [PATCH 04/24] APP_SECRET variable in .env changed --- .env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env b/.env index e141463..3c8f023 100644 --- a/.env +++ b/.env @@ -16,7 +16,7 @@ ###> symfony/framework-bundle ### APP_ENV=dev -APP_SECRET=90c78b17302e6ff2e14213f129e3f5f4 +APP_SECRET=your_secret_please_set_on_local_env ###< symfony/framework-bundle ### ###> doctrine/doctrine-bundle ### -- 2.43.5 From 5b306cfd546d8fd2014cd76c9805328b00d066f3 Mon Sep 17 00:00:00 2001 From: mitsuha_s Date: Fri, 21 Jul 2023 16:27:04 +0300 Subject: [PATCH 05/24] migrations merged --- migrations/Version20230720115905.php | 8 ++---- migrations/Version20230720125632.php | 38 ---------------------------- migrations/Version20230720130259.php | 32 ----------------------- 3 files changed, 2 insertions(+), 76 deletions(-) delete mode 100644 migrations/Version20230720125632.php delete mode 100644 migrations/Version20230720130259.php diff --git a/migrations/Version20230720115905.php b/migrations/Version20230720115905.php index d2e8f5b..8655fcd 100644 --- a/migrations/Version20230720115905.php +++ b/migrations/Version20230720115905.php @@ -7,9 +7,7 @@ namespace DoctrineMigrations; use Doctrine\DBAL\Schema\Schema; use Doctrine\Migrations\AbstractMigration; -/** - * Auto-generated Migration: Please modify to your needs! - */ + final class Version20230720115905 extends AbstractMigration { public function getDescription(): string @@ -19,14 +17,12 @@ final class Version20230720115905 extends AbstractMigration public function up(Schema $schema): void { - // this up() migration is auto-generated, please modify it to your needs $this->addSql('CREATE SEQUENCE paste_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); - $this->addSql('CREATE TABLE paste (id INT NOT NULL, text TEXT NOT NULL, private BOOLEAN NOT NULL, language VARCHAR(25) NOT NULL, description TEXT NOT NULL, filename VARCHAR(128) NOT NULL, author VARCHAR(128) NOT NULL, publish_date TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, expiration_date TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, ip VARCHAR(15) NOT NULL, secret VARCHAR(40) NOT NULL, PRIMARY KEY(id))'); + $this->addSql('CREATE TABLE paste (id INT NOT NULL, text TEXT NOT NULL, private BOOLEAN NOT NULL, language VARCHAR(25), description TEXT, filename VARCHAR(128), author VARCHAR(128) NOT NULL, publish_date TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, expiration_date TIMESTAMP(0) WITHOUT TIME ZONE, ip VARCHAR(15) NOT NULL, secret VARCHAR(40), PRIMARY KEY(id))'); } public function down(Schema $schema): void { - // this down() migration is auto-generated, please modify it to your needs $this->addSql('CREATE SCHEMA public'); $this->addSql('DROP SEQUENCE paste_id_seq CASCADE'); $this->addSql('DROP TABLE paste'); diff --git a/migrations/Version20230720125632.php b/migrations/Version20230720125632.php deleted file mode 100644 index c702e42..0000000 --- a/migrations/Version20230720125632.php +++ /dev/null @@ -1,38 +0,0 @@ -addSql('ALTER TABLE paste ALTER language DROP NOT NULL'); - $this->addSql('ALTER TABLE paste ALTER description DROP NOT NULL'); - $this->addSql('ALTER TABLE paste ALTER filename DROP NOT NULL'); - $this->addSql('ALTER TABLE paste ALTER expiration_date DROP NOT NULL'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('CREATE SCHEMA public'); - $this->addSql('ALTER TABLE paste ALTER language SET NOT NULL'); - $this->addSql('ALTER TABLE paste ALTER description SET NOT NULL'); - $this->addSql('ALTER TABLE paste ALTER filename SET NOT NULL'); - $this->addSql('ALTER TABLE paste ALTER expiration_date SET NOT NULL'); - } -} diff --git a/migrations/Version20230720130259.php b/migrations/Version20230720130259.php deleted file mode 100644 index 6c42569..0000000 --- a/migrations/Version20230720130259.php +++ /dev/null @@ -1,32 +0,0 @@ -addSql('ALTER TABLE paste ALTER secret DROP NOT NULL'); - } - - public function down(Schema $schema): void - { - // this down() migration is auto-generated, please modify it to your needs - $this->addSql('CREATE SCHEMA public'); - $this->addSql('ALTER TABLE paste ALTER secret SET NOT NULL'); - } -} -- 2.43.5 From 78ebba425b2dbc4df83ac57a33064e8c78461b0c Mon Sep 17 00:00:00 2001 From: mitsuha_s Date: Fri, 21 Jul 2023 16:35:48 +0300 Subject: [PATCH 06/24] strict types added --- src/Controller/PasteController.php | 1 + src/Entity/.gitignore | 0 src/Entity/Paste.php | 2 ++ src/Form/Type/PasteForm.php | 2 ++ src/Repository/PasteRepository.php | 1 + 5 files changed, 6 insertions(+) delete mode 100644 src/Entity/.gitignore diff --git a/src/Controller/PasteController.php b/src/Controller/PasteController.php index d7ca3e7..9cb01bf 100644 --- a/src/Controller/PasteController.php +++ b/src/Controller/PasteController.php @@ -1,4 +1,5 @@ Date: Fri, 21 Jul 2023 17:13:05 +0300 Subject: [PATCH 07/24] save() method in PasteRepository implemented --- src/Controller/PasteController.php | 6 ++---- src/Repository/PasteRepository.php | 6 ++++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/Controller/PasteController.php b/src/Controller/PasteController.php index 9cb01bf..812c4e3 100644 --- a/src/Controller/PasteController.php +++ b/src/Controller/PasteController.php @@ -6,7 +6,6 @@ namespace App\Controller; use App\Form\Type\PasteForm; use App\Entity\Paste; use App\Repository\PasteRepository; -use Doctrine\ORM\EntityManagerInterface; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\HttpFoundation\Response; @@ -16,7 +15,7 @@ use Symfony\Component\HttpFoundation\Request; class PasteController extends AbstractController { #[Route('/')] - public function new(Request $request, EntityManagerInterface $entityManager): Response { + public function new(Request $request, PasteRepository $pasteRepository): Response { $paste = new Paste(); $form = $this->createForm(PasteForm::class, $paste); @@ -30,8 +29,7 @@ class PasteController extends AbstractController $paste->setSecret(hash('sha1', random_bytes(25))); } - $entityManager->persist($paste); - $entityManager->flush(); + $pasteRepository->save($paste); return $this->redirectToRoute($request->attributes->get('_route')); diff --git a/src/Repository/PasteRepository.php b/src/Repository/PasteRepository.php index 12a8cb9..1065282 100644 --- a/src/Repository/PasteRepository.php +++ b/src/Repository/PasteRepository.php @@ -12,4 +12,10 @@ class PasteRepository extends ServiceEntityRepository public function __construct(ManagerRegistry $registry) { parent::__construct($registry, Paste::class); } + + public function save(Paste $paste): void { + $entityManager = $this->getEntityManager(); + $entityManager->persist($paste); + $entityManager->flush(); + } } \ No newline at end of file -- 2.43.5 From ffcfa299686f0cf0ae60d6d10c9ef918f0fea36f Mon Sep 17 00:00:00 2001 From: mitsuha_s Date: Fri, 21 Jul 2023 18:00:14 +0300 Subject: [PATCH 08/24] code style changes --- src/Controller/PasteController.php | 50 +++++----- src/Entity/Paste.php | 144 +++++++++++++++++------------ src/Form/Type/PasteForm.php | 41 +++++--- src/Repository/PasteRepository.php | 24 ++--- 4 files changed, 148 insertions(+), 111 deletions(-) diff --git a/src/Controller/PasteController.php b/src/Controller/PasteController.php index 812c4e3..6ab962c 100644 --- a/src/Controller/PasteController.php +++ b/src/Controller/PasteController.php @@ -1,53 +1,53 @@ createForm(PasteForm::class, $paste); + public function new(Request $request, PasteRepository $pasteRepository): Response + { + $paste = new Paste(); + $form = $this->createForm(PasteForm::class, $paste); - $form->handleRequest($request); + $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { - $paste = $form->getData(); - $paste->setIp($request->getClientIp()); - $paste->setPublishDate(new \DateTime()); + $paste = $form->getData(); + $paste->setIp($request->getClientIp()); + $paste->setPublishDate(new \DateTime()); if ($paste->isPrivate()) { - $paste->setSecret(hash('sha1', random_bytes(25))); + $paste->setSecret(hash('sha1', random_bytes(25))); } - $pasteRepository->save($paste); + $pasteRepository->save($paste); - return $this->redirectToRoute($request->attributes->get('_route')); - + return $this->redirectToRoute($request->attributes->get('_route')); } return $this->render('paste.html.twig', [ 'form' => $form, - ]); + ]); } #[Route('/{id}/{secret}')] - public function show_paste(PasteRepository $pasteRepository, Request $request, string $id, ?string $secret=NULL): Response { + public function showPaste(PasteRepository $pasteRepository, Request $request, string $id, ?string $secret=NULL): Response + { $paste = $pasteRepository->findOneBy(['id' => $id, 'secret' => $secret]); - $form = $this->createForm(PasteForm::class, $paste); + $form = $this->createForm(PasteForm::class, $paste); return $this->render('paste.html.twig', [ 'form' => $form, - ]); - + ]); } } diff --git a/src/Entity/Paste.php b/src/Entity/Paste.php index e0b589b..d4c9c59 100644 --- a/src/Entity/Paste.php +++ b/src/Entity/Paste.php @@ -1,12 +1,12 @@ id; + public function getId(): int + { + return $this->id; } - public function setId(int $id): void { - $this->id = $id; + public function setId(int $id): void + { + $this->id = $id; } - public function getText(): string { - return $this->text; + public function getText(): string + { + return $this->text; } - public function setText(string $text): void { - $this->text = $text; + public function setText(string $text): void + { + $this->text = $text; } - public function getLanguage(): ?string { - return $this->language; + public function getLanguage(): ?string + { + return $this->language; } - public function setLanguage(?string $language): void { - $this->language = $language; + public function setLanguage(?string $language): void + { + $this->language = $language; } - public function getDescription(): ?string { - return $this->description; + public function getDescription(): ?string + { + return $this->description; } - public function setDescription(?string $description): void { - $this->description = $description; + public function setDescription(?string $description): void + { + $this->description = $description; } - public function getFilename(): ?string { - return $this->filename; + public function getFilename(): ?string + { + return $this->filename; } - public function setFilename(?string $filename): void { - $this->filename = $filename; + public function setFilename(?string $filename): void + { + $this->filename = $filename; } - public function getAuthor(): string { - return $this->author; + public function getAuthor(): string + { + return $this->author; } - public function setAuthor(string $author): void { - $this->author = $author; + public function setAuthor(string $author): void + { + $this->author = $author; } - public function getPublishDate(): \DateTime { - return $this->publishDate; + public function getPublishDate(): \DateTime + { + return $this->publishDate; } - public function setPublishDate(\DateTime $date): void { - $this->publishDate = $date; + public function setPublishDate(\DateTime $date): void + { + $this->publishDate = $date; } - public function getExpirationDate(): ?\DateTime { - return $this->expirationDate; + public function getExpirationDate(): ?\DateTime + { + return $this->expirationDate; } - public function setExpirationDate(?\DateTime $date): void { - $this->expirationDate = $date; + public function setExpirationDate(?\DateTime $date): void + { + $this->expirationDate = $date; } - public function getIp(): string { - return $this->ip; + public function getIp(): string + { + return $this->ip; } - public function setIP(string $ip): void { - $this->ip = $ip; + public function setIP(string $ip): void + { + $this->ip = $ip; } - public function getSecret(): ?string { - return $this->secret; + public function getSecret(): ?string + { + return $this->secret; } - public function setSecret(?string $secret): void { - $this->secret = $secret; + public function setSecret(?string $secret): void + { + $this->secret = $secret; } - public function isPrivate(): bool { - return $this->private; + public function isPrivate(): bool + { + return $this->private; } - public function setPrivate(bool $private): void { - $this->private = $private; + public function setPrivate(bool $private): void + { + $this->private = $private; } } \ No newline at end of file diff --git a/src/Form/Type/PasteForm.php b/src/Form/Type/PasteForm.php index 042188d..8485aef 100644 --- a/src/Form/Type/PasteForm.php +++ b/src/Form/Type/PasteForm.php @@ -1,30 +1,43 @@ add('language', ChoiceType::class, ['choices' => ['Python' => 'python', 'PHP' => 'php', 'Plain text' => NULL]]) + ->add('language', ChoiceType::class, [ + 'choices' => [ + 'Python' => 'python', + 'PHP' => 'php', + 'Plain text' => NULL, + ] + ] + ) ->add('description', TextType::class, ['required' => false]) ->add('text', TextareaType::class) ->add('author', TextType::class, ['attr' => ['maxlength' =>128]]) ->add('filename', TextType::class, ['required' => false, 'attr' => ['maxlength' =>128]]) - ->add('expirationDate', DateTimeType::class, ['required' => false, 'date_widget' => 'single_text', 'input' => 'datetime']) + ->add('expirationDate', DateTimeType::class, [ + 'required' => false, + 'date_widget' => 'single_text', + 'input' => 'datetime', + ] + ) ->add('private', CheckboxType::class, ['required' => false]) ->add('save', SubmitType::class) - ; + ; } } \ No newline at end of file diff --git a/src/Repository/PasteRepository.php b/src/Repository/PasteRepository.php index 1065282..74ee7d5 100644 --- a/src/Repository/PasteRepository.php +++ b/src/Repository/PasteRepository.php @@ -1,21 +1,23 @@ getEntityManager(); - $entityManager->persist($paste); - $entityManager->flush(); + public function save(Paste $paste): void + { + $entityManager = $this->getEntityManager(); + $entityManager->persist($paste); + $entityManager->flush(); } } \ No newline at end of file -- 2.43.5 From 1d08cfdc09c0a4fb0f53e4400900dd2050c97a61 Mon Sep 17 00:00:00 2001 From: mitsuha_s Date: Fri, 21 Jul 2023 20:47:24 +0300 Subject: [PATCH 09/24] DTO for paste data added, Paste Entity changed --- src/Controller/PasteController.php | 27 +++-- src/DTO/PasteFormData.php | 122 +++++++++++++++++++++ src/Entity/Paste.php | 169 ++++------------------------- 3 files changed, 163 insertions(+), 155 deletions(-) create mode 100644 src/DTO/PasteFormData.php diff --git a/src/Controller/PasteController.php b/src/Controller/PasteController.php index 6ab962c..495623d 100644 --- a/src/Controller/PasteController.php +++ b/src/Controller/PasteController.php @@ -3,8 +3,9 @@ declare(strict_types = 1); namespace App\Controller; -use App\Form\Type\PasteForm; +use App\DTO\PasteFormData; use App\Entity\Paste; +use App\Form\Type\PasteForm; use App\Repository\PasteRepository; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\Routing\Annotation\Route; @@ -17,19 +18,29 @@ class PasteController extends AbstractController #[Route('/')] public function new(Request $request, PasteRepository $pasteRepository): Response { - $paste = new Paste(); - $form = $this->createForm(PasteForm::class, $paste); + $pasteData = new PasteFormData(); + $form = $this->createForm(PasteForm::class, $pasteData); $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { - $paste = $form->getData(); - $paste->setIp($request->getClientIp()); - $paste->setPublishDate(new \DateTime()); + $pasteData = $form->getData(); - if ($paste->isPrivate()) { - $paste->setSecret(hash('sha1', random_bytes(25))); + $secret = null; + if ($pasteData->isPrivate()) { + $secret = hash('sha1', random_bytes(25)); } + $paste = new Paste( + $pasteData->getText(), + $pasteData->getLanguage(), + $pasteData->getDescription(), + $pasteData->getFilename(), + $pasteData->getAuthor(), + new \DateTimeImmutable(), + $pasteData->getExpirationDate(), + $request->getClientIp(), + $secret + ); $pasteRepository->save($paste); return $this->redirectToRoute($request->attributes->get('_route')); diff --git a/src/DTO/PasteFormData.php b/src/DTO/PasteFormData.php new file mode 100644 index 0000000..1eed046 --- /dev/null +++ b/src/DTO/PasteFormData.php @@ -0,0 +1,122 @@ +id; + } + + public function setId(int $id): void + { + $this->id = $id; + } + + public function getText(): string + { + return $this->text; + } + + public function setText(string $text): void + { + $this->text = $text; + } + + public function getLanguage(): ?string + { + return $this->language; + } + + public function setLanguage(?string $language): void + { + $this->language = $language; + } + + public function getDescription(): ?string + { + return $this->description; + } + + public function setDescription(?string $description): void + { + $this->description = $description; + } + + public function getFilename(): ?string + { + return $this->filename; + } + + public function setFilename(?string $filename): void + { + $this->filename = $filename; + } + + public function getAuthor(): string + { + return $this->author; + } + + public function setAuthor(string $author): void + { + $this->author = $author; + } + + public function getExpirationDate(): ?\DateTime + { + return $this->expirationDate; + } + + public function setExpirationDate(?\DateTime $date): void + { + $this->expirationDate = $date; + } + + public function getSecret(): ?string + { + return $this->secret; + } + + public function setSecret(?string $secret): void + { + $this->secret = $secret; + } + + public function isPrivate(): bool + { + return $this->private; + } + + public function setPrivate(bool $private): void + { + $this->private = $private; + } +} \ No newline at end of file diff --git a/src/Entity/Paste.php b/src/Entity/Paste.php index d4c9c59..54c36dc 100644 --- a/src/Entity/Paste.php +++ b/src/Entity/Paste.php @@ -6,158 +6,33 @@ namespace App\Entity; use App\Repository\PasteRepository; use Doctrine\DBAL\Types\Types; use Doctrine\ORM\Mapping as ORM; -use Symfony\Component\Validator\Constraints as Assert; #[ORM\Entity(repositoryClass: PasteRepository::class)] class Paste { #[ORM\Id] #[ORM\GeneratedValue] - #[ORM\Column(nullable: false)] - private int $id; + #[ORM\Column] + public readonly int $id; - #[ORM\Column(type: 'text', nullable: false)] - #[Assert\NotBlank] - private string $text; - - #[ORM\Column(type: 'boolean', nullable: false)] - #[Assert\Type(\boolean::class)] - private bool $private; - - #[ORM\Column(length: 25, nullable: true)] - private ?string $language; - - #[ORM\Column(type: 'text', nullable: true)] - private ?string $description; - - #[ORM\Column(length: 128, nullable: true)] - private ?string $filename; - - #[ORM\Column(length: 128, nullable: false)] - #[Assert\NotBlank] - private string $author = 'anonymous'; - - #[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: false)] - #[Assert\Type(\DateTime::class)] - private \DateTime $publishDate; - - #[ORM\Column(type: Types::DATETIME_MUTABLE, nullable: true)] - #[Assert\Type(\DateTime::class)] - private ?\DateTime $expirationDate; - - #[ORM\Column(length: 15, nullable: false)] - private string $ip; - - #[ORM\Column(length: 40, nullable: true)] - private ?string $secret; - - public function getId(): int - { - return $this->id; - } - - public function setId(int $id): void - { - $this->id = $id; - } - - public function getText(): string - { - return $this->text; - } - - public function setText(string $text): void - { - $this->text = $text; - } - - public function getLanguage(): ?string - { - return $this->language; - } - - public function setLanguage(?string $language): void - { - $this->language = $language; - } - - public function getDescription(): ?string - { - return $this->description; - } - - public function setDescription(?string $description): void - { - $this->description = $description; - } - - public function getFilename(): ?string - { - return $this->filename; - } - - public function setFilename(?string $filename): void - { - $this->filename = $filename; - } - - public function getAuthor(): string - { - return $this->author; - } - - public function setAuthor(string $author): void - { - $this->author = $author; - } - - public function getPublishDate(): \DateTime - { - return $this->publishDate; - } - - public function setPublishDate(\DateTime $date): void - { - $this->publishDate = $date; - } - - public function getExpirationDate(): ?\DateTime - { - return $this->expirationDate; - } - - public function setExpirationDate(?\DateTime $date): void - { - $this->expirationDate = $date; - } - - public function getIp(): string - { - return $this->ip; - } - - public function setIP(string $ip): void - { - $this->ip = $ip; - } - - public function getSecret(): ?string - { - return $this->secret; - } - - public function setSecret(?string $secret): void - { - $this->secret = $secret; - } - - public function isPrivate(): bool - { - return $this->private; - } - - public function setPrivate(bool $private): void - { - $this->private = $private; - } + public function __construct( + #[ORM\Column(type: 'text', nullable: false)] + public readonly string $text, + #[ORM\Column(length: 25, nullable: true)] + public readonly ?string $language, + #[ORM\Column(type: 'text', nullable: true)] + public readonly ?string $description, + #[ORM\Column(length: 128, nullable: true)] + public readonly ?string $filename, + #[ORM\Column(length: 128, nullable: false)] + public readonly string $author, + #[ORM\Column(type: Types::DATETIME_IMMUTABLE, nullable: false)] + public readonly \DateTimeImmutable $publishDate, + #[ORM\Column(type: Types::DATETIME_IMMUTABLE, nullable: true)] + public readonly ?\DateTimeImmutable $expirationDate, + #[ORM\Column(length: 15, nullable: false)] + public readonly string $ip, + #[ORM\Column(length: 40, nullable: true)] + public readonly ?string $secret, + ) {} } \ No newline at end of file -- 2.43.5 From 8bb77fbe6cb52d8ad2b1453b63a162d615ab1882 Mon Sep 17 00:00:00 2001 From: mitsuha_s Date: Fri, 21 Jul 2023 20:48:42 +0300 Subject: [PATCH 10/24] main migration changed --- migrations/Version20230720115905.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migrations/Version20230720115905.php b/migrations/Version20230720115905.php index 8655fcd..b8fdee1 100644 --- a/migrations/Version20230720115905.php +++ b/migrations/Version20230720115905.php @@ -18,7 +18,7 @@ final class Version20230720115905 extends AbstractMigration public function up(Schema $schema): void { $this->addSql('CREATE SEQUENCE paste_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); - $this->addSql('CREATE TABLE paste (id INT NOT NULL, text TEXT NOT NULL, private BOOLEAN NOT NULL, language VARCHAR(25), description TEXT, filename VARCHAR(128), author VARCHAR(128) NOT NULL, publish_date TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, expiration_date TIMESTAMP(0) WITHOUT TIME ZONE, ip VARCHAR(15) NOT NULL, secret VARCHAR(40), PRIMARY KEY(id))'); + $this->addSql('CREATE TABLE paste (id INT NOT NULL, text TEXT NOT NULL, language VARCHAR(25), description TEXT, filename VARCHAR(128), author VARCHAR(128) NOT NULL, publish_date TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, expiration_date TIMESTAMP(0) WITHOUT TIME ZONE, ip VARCHAR(15) NOT NULL, secret VARCHAR(40), PRIMARY KEY(id))'); } public function down(Schema $schema): void -- 2.43.5 From 21d651f3774ff40d9162c799db89968cf3b62a23 Mon Sep 17 00:00:00 2001 From: mitsuha_s Date: Fri, 21 Jul 2023 22:58:24 +0300 Subject: [PATCH 11/24] bug fix --- src/Controller/PasteController.php | 19 ++--- src/DTO/PasteFormData.php | 124 +++++------------------------ 2 files changed, 30 insertions(+), 113 deletions(-) diff --git a/src/Controller/PasteController.php b/src/Controller/PasteController.php index 495623d..368ea79 100644 --- a/src/Controller/PasteController.php +++ b/src/Controller/PasteController.php @@ -26,18 +26,18 @@ class PasteController extends AbstractController $pasteData = $form->getData(); $secret = null; - if ($pasteData->isPrivate()) { + if ($pasteData->private) { $secret = hash('sha1', random_bytes(25)); } $paste = new Paste( - $pasteData->getText(), - $pasteData->getLanguage(), - $pasteData->getDescription(), - $pasteData->getFilename(), - $pasteData->getAuthor(), + $pasteData->text, + $pasteData->language, + $pasteData->description, + $pasteData->filename, + $pasteData->author, new \DateTimeImmutable(), - $pasteData->getExpirationDate(), + $pasteData->expirationDate, $request->getClientIp(), $secret ); @@ -52,10 +52,11 @@ class PasteController extends AbstractController } #[Route('/{id}/{secret}')] - public function showPaste(PasteRepository $pasteRepository, Request $request, string $id, ?string $secret=NULL): Response + public function showPaste(PasteRepository $pasteRepository, string $id, ?string $secret=NULL): Response { $paste = $pasteRepository->findOneBy(['id' => $id, 'secret' => $secret]); - $form = $this->createForm(PasteForm::class, $paste); + $pasteData = new PasteFormData($paste); + $form = $this->createForm(PasteForm::class, $pasteData); return $this->render('paste.html.twig', [ 'form' => $form, diff --git a/src/DTO/PasteFormData.php b/src/DTO/PasteFormData.php index 1eed046..2ccc362 100644 --- a/src/DTO/PasteFormData.php +++ b/src/DTO/PasteFormData.php @@ -3,120 +3,36 @@ declare(strict_types = 1); namespace App\DTO; +use App\Entity\Paste; use Symfony\Component\Validator\Constraints as Assert; class PasteFormData { - private int $id; - #[Assert\NotBlank] - private string $text; - + public string $text; #[Assert\Type(\boolean::class)] - private bool $private; - - private ?string $language = null; - - private ?string $description = null; - - private ?string $filename = null; - + public bool $private; + public ?string $language = null; + public ?string $description = null; + public ?string $filename = null; #[Assert\NotBlank] - private string $author = 'anonymous'; - + public string $author = 'anonymous'; #[Assert\Type(\DateTimeImmutable::class)] - private ?\DateTimeImmutable $expirationDate; + public ?\DateTimeImmutable $expirationDate; - private ?string $secret; - - public function getId(): int + public function __construct(?Paste $paste=null) { - return $this->id; - } - - public function setId(int $id): void - { - $this->id = $id; - } - - public function getText(): string - { - return $this->text; - } - - public function setText(string $text): void - { - $this->text = $text; - } - - public function getLanguage(): ?string - { - return $this->language; - } - - public function setLanguage(?string $language): void - { - $this->language = $language; - } - - public function getDescription(): ?string - { - return $this->description; - } - - public function setDescription(?string $description): void - { - $this->description = $description; - } - - public function getFilename(): ?string - { - return $this->filename; - } - - public function setFilename(?string $filename): void - { - $this->filename = $filename; - } - - public function getAuthor(): string - { - return $this->author; - } - - public function setAuthor(string $author): void - { - $this->author = $author; - } - - public function getExpirationDate(): ?\DateTime - { - return $this->expirationDate; - } - - public function setExpirationDate(?\DateTime $date): void - { - $this->expirationDate = $date; - } - - public function getSecret(): ?string - { - return $this->secret; - } - - public function setSecret(?string $secret): void - { - $this->secret = $secret; - } - - public function isPrivate(): bool - { - return $this->private; - } - - public function setPrivate(bool $private): void - { - $this->private = $private; + if ($paste === null) + { + return; + } + $this->text = $paste->text; + $this->private = $paste->secret !== null; + $this->language = $paste->language; + $this->description = $paste->description; + $this->filename = $paste->filename; + $this->author = $paste->author; + $this->expirationDate = $paste->expirationDate; } } \ No newline at end of file -- 2.43.5 From 6640112c54c2ea198a4a09727742dbef86e9f4cf Mon Sep 17 00:00:00 2001 From: mitsuha_s Date: Fri, 21 Jul 2023 23:09:10 +0300 Subject: [PATCH 12/24] bug fix --- src/Form/Type/PasteForm.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Form/Type/PasteForm.php b/src/Form/Type/PasteForm.php index 8485aef..e1481ce 100644 --- a/src/Form/Type/PasteForm.php +++ b/src/Form/Type/PasteForm.php @@ -33,7 +33,7 @@ class PasteForm extends AbstractType ->add('expirationDate', DateTimeType::class, [ 'required' => false, 'date_widget' => 'single_text', - 'input' => 'datetime', + 'input' => 'datetime_immutable', ] ) ->add('private', CheckboxType::class, ['required' => false]) -- 2.43.5 From f2072b9b10dacc3612269665333973607b180b97 Mon Sep 17 00:00:00 2001 From: mitsuha_s Date: Sat, 22 Jul 2023 16:16:04 +0300 Subject: [PATCH 13/24] getDescription method removed from migration class --- migrations/Version20230720115905.php | 5 ----- 1 file changed, 5 deletions(-) diff --git a/migrations/Version20230720115905.php b/migrations/Version20230720115905.php index b8fdee1..cceeb1d 100644 --- a/migrations/Version20230720115905.php +++ b/migrations/Version20230720115905.php @@ -10,11 +10,6 @@ use Doctrine\Migrations\AbstractMigration; final class Version20230720115905 extends AbstractMigration { - public function getDescription(): string - { - return ''; - } - public function up(Schema $schema): void { $this->addSql('CREATE SEQUENCE paste_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); -- 2.43.5 From c164ed446be9738cddf71f148b7a20c23f096883 Mon Sep 17 00:00:00 2001 From: mitsuha_s Date: Sat, 22 Jul 2023 17:07:06 +0300 Subject: [PATCH 14/24] static method fromFormData added to Paste class --- src/Controller/PasteController.php | 18 ++---------------- src/DTO/PasteFormData.php | 1 + src/Entity/Paste.php | 21 ++++++++++++++++++--- 3 files changed, 21 insertions(+), 19 deletions(-) diff --git a/src/Controller/PasteController.php b/src/Controller/PasteController.php index 368ea79..5b37231 100644 --- a/src/Controller/PasteController.php +++ b/src/Controller/PasteController.php @@ -24,23 +24,9 @@ class PasteController extends AbstractController $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { $pasteData = $form->getData(); + $pasteData->ip = $request->getClientIp(); - $secret = null; - if ($pasteData->private) { - $secret = hash('sha1', random_bytes(25)); - } - - $paste = new Paste( - $pasteData->text, - $pasteData->language, - $pasteData->description, - $pasteData->filename, - $pasteData->author, - new \DateTimeImmutable(), - $pasteData->expirationDate, - $request->getClientIp(), - $secret - ); + $paste = Paste::fromFormData($pasteData); $pasteRepository->save($paste); return $this->redirectToRoute($request->attributes->get('_route')); diff --git a/src/DTO/PasteFormData.php b/src/DTO/PasteFormData.php index 2ccc362..52e0a99 100644 --- a/src/DTO/PasteFormData.php +++ b/src/DTO/PasteFormData.php @@ -20,6 +20,7 @@ class PasteFormData public string $author = 'anonymous'; #[Assert\Type(\DateTimeImmutable::class)] public ?\DateTimeImmutable $expirationDate; + public string $ip; public function __construct(?Paste $paste=null) { diff --git a/src/Entity/Paste.php b/src/Entity/Paste.php index 54c36dc..2e3d3e6 100644 --- a/src/Entity/Paste.php +++ b/src/Entity/Paste.php @@ -2,7 +2,7 @@ declare(strict_types = 1); namespace App\Entity; - +use App\DTO\PasteFormData; use App\Repository\PasteRepository; use Doctrine\DBAL\Types\Types; use Doctrine\ORM\Mapping as ORM; @@ -15,7 +15,7 @@ class Paste #[ORM\Column] public readonly int $id; - public function __construct( + private function __construct( #[ORM\Column(type: 'text', nullable: false)] public readonly string $text, #[ORM\Column(length: 25, nullable: true)] @@ -35,4 +35,19 @@ class Paste #[ORM\Column(length: 40, nullable: true)] public readonly ?string $secret, ) {} -} \ No newline at end of file + + public static function fromFormData(PasteFormData $pasteFormData): Paste + { + return new self( + $pasteFormData->text, + $pasteFormData->language, + $pasteFormData->description, + $pasteFormData->filename, + $pasteFormData->author, + new \DateTimeImmutable(), + $pasteFormData->expirationDate, + $pasteFormData->ip, + $pasteFormData->private ? \hash('sha1', \random_bytes(25)) : null, + ); + } +} -- 2.43.5 From ddfbba344a6aebaf7420e48058cadc8273d94a4b Mon Sep 17 00:00:00 2001 From: mitsuha_s Date: Sat, 22 Jul 2023 17:29:24 +0300 Subject: [PATCH 15/24] DBAL types added to all Paste class properties --- src/Entity/Paste.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/Entity/Paste.php b/src/Entity/Paste.php index 2e3d3e6..f797c5f 100644 --- a/src/Entity/Paste.php +++ b/src/Entity/Paste.php @@ -4,7 +4,6 @@ declare(strict_types = 1); namespace App\Entity; use App\DTO\PasteFormData; use App\Repository\PasteRepository; -use Doctrine\DBAL\Types\Types; use Doctrine\ORM\Mapping as ORM; #[ORM\Entity(repositoryClass: PasteRepository::class)] @@ -18,21 +17,21 @@ class Paste private function __construct( #[ORM\Column(type: 'text', nullable: false)] public readonly string $text, - #[ORM\Column(length: 25, nullable: true)] + #[ORM\Column(type: 'string', length: 25, nullable: true)] public readonly ?string $language, #[ORM\Column(type: 'text', nullable: true)] public readonly ?string $description, - #[ORM\Column(length: 128, nullable: true)] + #[ORM\Column(type: 'string', length: 128, nullable: true)] public readonly ?string $filename, - #[ORM\Column(length: 128, nullable: false)] + #[ORM\Column(type: 'string', length: 128, nullable: false)] public readonly string $author, - #[ORM\Column(type: Types::DATETIME_IMMUTABLE, nullable: false)] + #[ORM\Column(type: 'datetime_immutable', nullable: false)] public readonly \DateTimeImmutable $publishDate, - #[ORM\Column(type: Types::DATETIME_IMMUTABLE, nullable: true)] + #[ORM\Column(type: 'datetime_immutable', nullable: true)] public readonly ?\DateTimeImmutable $expirationDate, - #[ORM\Column(length: 15, nullable: false)] + #[ORM\Column(type: 'string', length: 15, nullable: false)] public readonly string $ip, - #[ORM\Column(length: 40, nullable: true)] + #[ORM\Column(type: 'string', length: 40, nullable: true)] public readonly ?string $secret, ) {} -- 2.43.5 From 8bceb975505dbf60813456d6302b6e36084738e0 Mon Sep 17 00:00:00 2001 From: mitsuha_s Date: Sat, 22 Jul 2023 17:42:30 +0300 Subject: [PATCH 16/24] save method in PasteRepository changed --- src/Controller/PasteController.php | 2 +- src/Repository/PasteRepository.php | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Controller/PasteController.php b/src/Controller/PasteController.php index 5b37231..67fad63 100644 --- a/src/Controller/PasteController.php +++ b/src/Controller/PasteController.php @@ -27,7 +27,7 @@ class PasteController extends AbstractController $pasteData->ip = $request->getClientIp(); $paste = Paste::fromFormData($pasteData); - $pasteRepository->save($paste); + $pasteRepository->save($paste, true); return $this->redirectToRoute($request->attributes->get('_route')); } diff --git a/src/Repository/PasteRepository.php b/src/Repository/PasteRepository.php index 74ee7d5..0817611 100644 --- a/src/Repository/PasteRepository.php +++ b/src/Repository/PasteRepository.php @@ -14,10 +14,13 @@ class PasteRepository extends ServiceEntityRepository parent::__construct($registry, Paste::class); } - public function save(Paste $paste): void + public function save(Paste $paste, bool $flush=false): void { $entityManager = $this->getEntityManager(); $entityManager->persist($paste); - $entityManager->flush(); + + if ($flush) { + $entityManager->flush(); + } } } \ No newline at end of file -- 2.43.5 From d68ec5a333d64ff1b0f9766ec89715de4e7506a5 Mon Sep 17 00:00:00 2001 From: mitsuha_s Date: Sun, 23 Jul 2023 13:33:06 +0300 Subject: [PATCH 17/24] validation type removed from PasteFromData --- src/DTO/PasteFormData.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/DTO/PasteFormData.php b/src/DTO/PasteFormData.php index 52e0a99..3e77db3 100644 --- a/src/DTO/PasteFormData.php +++ b/src/DTO/PasteFormData.php @@ -11,14 +11,12 @@ class PasteFormData { #[Assert\NotBlank] public string $text; - #[Assert\Type(\boolean::class)] public bool $private; public ?string $language = null; public ?string $description = null; public ?string $filename = null; #[Assert\NotBlank] public string $author = 'anonymous'; - #[Assert\Type(\DateTimeImmutable::class)] public ?\DateTimeImmutable $expirationDate; public string $ip; -- 2.43.5 From 48172fb9c146185ebb21b248f9c9d85f335bf342 Mon Sep 17 00:00:00 2001 From: mitsuha_s Date: Sun, 23 Jul 2023 13:33:52 +0300 Subject: [PATCH 18/24] code style changes --- src/Repository/PasteRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Repository/PasteRepository.php b/src/Repository/PasteRepository.php index 0817611..ccde9b1 100644 --- a/src/Repository/PasteRepository.php +++ b/src/Repository/PasteRepository.php @@ -14,7 +14,7 @@ class PasteRepository extends ServiceEntityRepository parent::__construct($registry, Paste::class); } - public function save(Paste $paste, bool $flush=false): void + public function save(Paste $paste, bool $flush = false): void { $entityManager = $this->getEntityManager(); $entityManager->persist($paste); -- 2.43.5 From 6a2f15d1d6ed9eb7f8b31321e691accf6bc49bd5 Mon Sep 17 00:00:00 2001 From: mitsuha_s Date: Sun, 23 Jul 2023 13:51:02 +0300 Subject: [PATCH 19/24] Paste->formFormData method changed to Paste->forFormDataAndIp --- src/Controller/PasteController.php | 3 +-- src/DTO/PasteFormData.php | 1 - src/Entity/Paste.php | 4 ++-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Controller/PasteController.php b/src/Controller/PasteController.php index 67fad63..f707eb4 100644 --- a/src/Controller/PasteController.php +++ b/src/Controller/PasteController.php @@ -24,9 +24,8 @@ class PasteController extends AbstractController $form->handleRequest($request); if ($form->isSubmitted() && $form->isValid()) { $pasteData = $form->getData(); - $pasteData->ip = $request->getClientIp(); - $paste = Paste::fromFormData($pasteData); + $paste = Paste::fromFormDataAndIp($pasteData, $request->getClientIp()); $pasteRepository->save($paste, true); return $this->redirectToRoute($request->attributes->get('_route')); diff --git a/src/DTO/PasteFormData.php b/src/DTO/PasteFormData.php index 3e77db3..075b62a 100644 --- a/src/DTO/PasteFormData.php +++ b/src/DTO/PasteFormData.php @@ -18,7 +18,6 @@ class PasteFormData #[Assert\NotBlank] public string $author = 'anonymous'; public ?\DateTimeImmutable $expirationDate; - public string $ip; public function __construct(?Paste $paste=null) { diff --git a/src/Entity/Paste.php b/src/Entity/Paste.php index f797c5f..11b91ce 100644 --- a/src/Entity/Paste.php +++ b/src/Entity/Paste.php @@ -35,7 +35,7 @@ class Paste public readonly ?string $secret, ) {} - public static function fromFormData(PasteFormData $pasteFormData): Paste + public static function fromFormDataAndIp(PasteFormData $pasteFormData, $ip): Paste { return new self( $pasteFormData->text, @@ -45,7 +45,7 @@ class Paste $pasteFormData->author, new \DateTimeImmutable(), $pasteFormData->expirationDate, - $pasteFormData->ip, + $ip, $pasteFormData->private ? \hash('sha1', \random_bytes(25)) : null, ); } -- 2.43.5 From ea7ddcde6555cf9264bdc88396e237f736d03b88 Mon Sep 17 00:00:00 2001 From: mitsuha_s Date: Sun, 23 Jul 2023 14:39:22 +0300 Subject: [PATCH 20/24] set nullable: true for author property --- migrations/Version20230720115905.php | 2 +- src/Controller/PasteController.php | 2 +- src/DTO/PasteFormData.php | 7 +++---- src/Entity/Paste.php | 4 ++-- src/Form/Type/PasteForm.php | 2 +- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/migrations/Version20230720115905.php b/migrations/Version20230720115905.php index cceeb1d..88821f2 100644 --- a/migrations/Version20230720115905.php +++ b/migrations/Version20230720115905.php @@ -13,7 +13,7 @@ final class Version20230720115905 extends AbstractMigration public function up(Schema $schema): void { $this->addSql('CREATE SEQUENCE paste_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); - $this->addSql('CREATE TABLE paste (id INT NOT NULL, text TEXT NOT NULL, language VARCHAR(25), description TEXT, filename VARCHAR(128), author VARCHAR(128) NOT NULL, publish_date TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, expiration_date TIMESTAMP(0) WITHOUT TIME ZONE, ip VARCHAR(15) NOT NULL, secret VARCHAR(40), PRIMARY KEY(id))'); + $this->addSql('CREATE TABLE paste (id INT NOT NULL, text TEXT NOT NULL, language VARCHAR(25), description TEXT, filename VARCHAR(128), author VARCHAR(128), publish_date TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, expiration_date TIMESTAMP(0) WITHOUT TIME ZONE, ip VARCHAR(15) NOT NULL, secret VARCHAR(40), PRIMARY KEY(id))'); } public function down(Schema $schema): void diff --git a/src/Controller/PasteController.php b/src/Controller/PasteController.php index f707eb4..6f411f6 100644 --- a/src/Controller/PasteController.php +++ b/src/Controller/PasteController.php @@ -37,7 +37,7 @@ class PasteController extends AbstractController } #[Route('/{id}/{secret}')] - public function showPaste(PasteRepository $pasteRepository, string $id, ?string $secret=NULL): Response + public function showPaste(PasteRepository $pasteRepository, string $id, ?string $secret = NULL): Response { $paste = $pasteRepository->findOneBy(['id' => $id, 'secret' => $secret]); $pasteData = new PasteFormData($paste); diff --git a/src/DTO/PasteFormData.php b/src/DTO/PasteFormData.php index 075b62a..f37ddba 100644 --- a/src/DTO/PasteFormData.php +++ b/src/DTO/PasteFormData.php @@ -15,11 +15,10 @@ class PasteFormData public ?string $language = null; public ?string $description = null; public ?string $filename = null; - #[Assert\NotBlank] - public string $author = 'anonymous'; + public ?string $author = null; public ?\DateTimeImmutable $expirationDate; - public function __construct(?Paste $paste=null) + public function __construct(?Paste $paste = null) { if ($paste === null) { @@ -30,7 +29,7 @@ class PasteFormData $this->language = $paste->language; $this->description = $paste->description; $this->filename = $paste->filename; - $this->author = $paste->author; + $this->author = $paste->author !== null ? $paste->author : 'anonymous'; $this->expirationDate = $paste->expirationDate; } } \ No newline at end of file diff --git a/src/Entity/Paste.php b/src/Entity/Paste.php index 11b91ce..9d4a42c 100644 --- a/src/Entity/Paste.php +++ b/src/Entity/Paste.php @@ -23,8 +23,8 @@ class Paste public readonly ?string $description, #[ORM\Column(type: 'string', length: 128, nullable: true)] public readonly ?string $filename, - #[ORM\Column(type: 'string', length: 128, nullable: false)] - public readonly string $author, + #[ORM\Column(type: 'string', length: 128, nullable: true)] + public readonly ?string $author, #[ORM\Column(type: 'datetime_immutable', nullable: false)] public readonly \DateTimeImmutable $publishDate, #[ORM\Column(type: 'datetime_immutable', nullable: true)] diff --git a/src/Form/Type/PasteForm.php b/src/Form/Type/PasteForm.php index e1481ce..d90dcce 100644 --- a/src/Form/Type/PasteForm.php +++ b/src/Form/Type/PasteForm.php @@ -28,7 +28,7 @@ class PasteForm extends AbstractType ) ->add('description', TextType::class, ['required' => false]) ->add('text', TextareaType::class) - ->add('author', TextType::class, ['attr' => ['maxlength' =>128]]) + ->add('author', TextType::class, ['attr' => ['maxlength' => 128], 'required' => false]) ->add('filename', TextType::class, ['required' => false, 'attr' => ['maxlength' =>128]]) ->add('expirationDate', DateTimeType::class, [ 'required' => false, -- 2.43.5 From 1e02e96ebaac04473094ad73079aa42a2489cf6c Mon Sep 17 00:00:00 2001 From: mitsuha_s Date: Sun, 23 Jul 2023 14:43:24 +0300 Subject: [PATCH 21/24] PasteFormData->fromPaste private method added --- src/DTO/PasteFormData.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/DTO/PasteFormData.php b/src/DTO/PasteFormData.php index f37ddba..d51d25b 100644 --- a/src/DTO/PasteFormData.php +++ b/src/DTO/PasteFormData.php @@ -20,10 +20,15 @@ class PasteFormData public function __construct(?Paste $paste = null) { - if ($paste === null) - { + if ($paste === null) { return; } + + $this->fromPaste($paste); + } + + private function fromPaste(Paste $paste) + { $this->text = $paste->text; $this->private = $paste->secret !== null; $this->language = $paste->language; -- 2.43.5 From ce545176c09dabe1e11b1a2bf465b1266231bf7a Mon Sep 17 00:00:00 2001 From: mitsuha_s Date: Sun, 23 Jul 2023 14:50:14 +0300 Subject: [PATCH 22/24] ipv6 support added --- migrations/Version20230720115905.php | 2 +- src/Entity/Paste.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/migrations/Version20230720115905.php b/migrations/Version20230720115905.php index 88821f2..d401f30 100644 --- a/migrations/Version20230720115905.php +++ b/migrations/Version20230720115905.php @@ -13,7 +13,7 @@ final class Version20230720115905 extends AbstractMigration public function up(Schema $schema): void { $this->addSql('CREATE SEQUENCE paste_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); - $this->addSql('CREATE TABLE paste (id INT NOT NULL, text TEXT NOT NULL, language VARCHAR(25), description TEXT, filename VARCHAR(128), author VARCHAR(128), publish_date TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, expiration_date TIMESTAMP(0) WITHOUT TIME ZONE, ip VARCHAR(15) NOT NULL, secret VARCHAR(40), PRIMARY KEY(id))'); + $this->addSql('CREATE TABLE paste (id INT NOT NULL, text TEXT NOT NULL, language VARCHAR(25), description TEXT, filename VARCHAR(128), author VARCHAR(128), publish_date TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, expiration_date TIMESTAMP(0) WITHOUT TIME ZONE, ip VARCHAR(39) NOT NULL, secret VARCHAR(40), PRIMARY KEY(id))'); } public function down(Schema $schema): void diff --git a/src/Entity/Paste.php b/src/Entity/Paste.php index 9d4a42c..25489ff 100644 --- a/src/Entity/Paste.php +++ b/src/Entity/Paste.php @@ -29,7 +29,7 @@ class Paste public readonly \DateTimeImmutable $publishDate, #[ORM\Column(type: 'datetime_immutable', nullable: true)] public readonly ?\DateTimeImmutable $expirationDate, - #[ORM\Column(type: 'string', length: 15, nullable: false)] + #[ORM\Column(type: 'string', length: 39, nullable: false)] public readonly string $ip, #[ORM\Column(type: 'string', length: 40, nullable: true)] public readonly ?string $secret, -- 2.43.5 From a442fe31f9711eb99950997d2d464ff8f85f8a86 Mon Sep 17 00:00:00 2001 From: mitsuha_s Date: Sun, 23 Jul 2023 15:23:30 +0300 Subject: [PATCH 23/24] redirect to paste page added --- src/Controller/PasteController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Controller/PasteController.php b/src/Controller/PasteController.php index 6f411f6..057f0d2 100644 --- a/src/Controller/PasteController.php +++ b/src/Controller/PasteController.php @@ -15,7 +15,7 @@ use Symfony\Component\HttpFoundation\Request; class PasteController extends AbstractController { - #[Route('/')] + #[Route('/', name: 'homepage')] public function new(Request $request, PasteRepository $pasteRepository): Response { $pasteData = new PasteFormData(); @@ -28,7 +28,7 @@ class PasteController extends AbstractController $paste = Paste::fromFormDataAndIp($pasteData, $request->getClientIp()); $pasteRepository->save($paste, true); - return $this->redirectToRoute($request->attributes->get('_route')); + return $this->redirectToRoute('showpaste', ['id' => $paste->id, 'secret' => $paste->secret]); } return $this->render('paste.html.twig', [ @@ -36,7 +36,7 @@ class PasteController extends AbstractController ]); } - #[Route('/{id}/{secret}')] + #[Route('/{id}/{secret}', name: 'showpaste')] public function showPaste(PasteRepository $pasteRepository, string $id, ?string $secret = NULL): Response { $paste = $pasteRepository->findOneBy(['id' => $id, 'secret' => $secret]); -- 2.43.5 From 918872fde10f1b5ec4f15e5fe4e9585c185f6d2e Mon Sep 17 00:00:00 2001 From: mitsuha_s Date: Sun, 6 Aug 2023 12:50:37 +0300 Subject: [PATCH 24/24] code highlighting added --- composer.json | 1 + composer.lock | 80 +++++++++++++++++++++++++++++- public/css/ocean.css | 74 +++++++++++++++++++++++++++ src/Controller/PasteController.php | 6 ++- src/Entity/CodeHighlighter.php | 26 ++++++++++ templates/base.html.twig | 9 ++-- templates/paste.html.twig | 7 ++- templates/show_paste.html.twig | 24 +++++++++ 8 files changed, 218 insertions(+), 9 deletions(-) create mode 100644 public/css/ocean.css create mode 100644 src/Entity/CodeHighlighter.php create mode 100644 templates/show_paste.html.twig diff --git a/composer.json b/composer.json index 288abba..13fa1dd 100644 --- a/composer.json +++ b/composer.json @@ -10,6 +10,7 @@ "doctrine/doctrine-bundle": "^2.10", "doctrine/doctrine-migrations-bundle": "^3.2", "doctrine/orm": "^2.15", + "scrivo/highlight.php": "v9.18.1.10", "symfony/console": "6.3.*", "symfony/dotenv": "6.3.*", "symfony/flex": "^2", diff --git a/composer.lock b/composer.lock index e63a245..7efc02b 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f716d81393aa0f266916ea52e0fa0b53", + "content-hash": "de2f472bb7e2d9dbd3c6363258ac286e", "packages": [ { "name": "doctrine/cache", @@ -1521,6 +1521,84 @@ }, "time": "2021-07-14T16:46:02+00:00" }, + { + "name": "scrivo/highlight.php", + "version": "v9.18.1.10", + "source": { + "type": "git", + "url": "https://github.com/scrivo/highlight.php.git", + "reference": "850f4b44697a2552e892ffe71490ba2733c2fc6e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/scrivo/highlight.php/zipball/850f4b44697a2552e892ffe71490ba2733c2fc6e", + "reference": "850f4b44697a2552e892ffe71490ba2733c2fc6e", + "shasum": "" + }, + "require": { + "ext-json": "*", + "php": ">=5.4" + }, + "require-dev": { + "phpunit/phpunit": "^4.8|^5.7", + "sabberworm/php-css-parser": "^8.3", + "symfony/finder": "^2.8|^3.4|^5.4", + "symfony/var-dumper": "^2.8|^3.4|^5.4" + }, + "suggest": { + "ext-mbstring": "Allows highlighting code with unicode characters and supports language with unicode keywords" + }, + "type": "library", + "autoload": { + "files": [ + "HighlightUtilities/functions.php" + ], + "psr-0": { + "Highlight\\": "", + "HighlightUtilities\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Geert Bergman", + "homepage": "http://www.scrivo.org/", + "role": "Project Author" + }, + { + "name": "Vladimir Jimenez", + "homepage": "https://allejo.io", + "role": "Maintainer" + }, + { + "name": "Martin Folkers", + "homepage": "https://twobrain.io", + "role": "Contributor" + } + ], + "description": "Server side syntax highlighter that supports 185 languages. It's a PHP port of highlight.js", + "keywords": [ + "code", + "highlight", + "highlight.js", + "highlight.php", + "syntax" + ], + "support": { + "issues": "https://github.com/scrivo/highlight.php/issues", + "source": "https://github.com/scrivo/highlight.php" + }, + "funding": [ + { + "url": "https://github.com/allejo", + "type": "github" + } + ], + "time": "2022-12-17T21:53:22+00:00" + }, { "name": "symfony/cache", "version": "v6.3.1", diff --git a/public/css/ocean.css b/public/css/ocean.css new file mode 100644 index 0000000..8f7d4ee --- /dev/null +++ b/public/css/ocean.css @@ -0,0 +1,74 @@ +/* Ocean Dark Theme */ +/* https://github.com/gavsiu */ +/* Original theme - https://github.com/chriskempson/base16 */ + +/* Ocean Comment */ +.hljs-comment, +.hljs-quote { + color: #65737e; +} + +/* Ocean Red */ +.hljs-variable, +.hljs-template-variable, +.hljs-tag, +.hljs-name, +.hljs-selector-id, +.hljs-selector-class, +.hljs-regexp, +.hljs-deletion { + color: #bf616a; +} + +/* Ocean Orange */ +.hljs-number, +.hljs-built_in, +.hljs-builtin-name, +.hljs-literal, +.hljs-type, +.hljs-params, +.hljs-meta, +.hljs-link { + color: #d08770; +} + +/* Ocean Yellow */ +.hljs-attribute { + color: #ebcb8b; +} + +/* Ocean Green */ +.hljs-string, +.hljs-symbol, +.hljs-bullet, +.hljs-addition { + color: #a3be8c; +} + +/* Ocean Blue */ +.hljs-title, +.hljs-section { + color: #8fa1b3; +} + +/* Ocean Purple */ +.hljs-keyword, +.hljs-selector-tag { + color: #b48ead; +} + +.hljs { + display: block; + overflow-x: auto; + background: #2b303b; + color: #c0c5ce; + padding: 0.5em; +} + +.hljs-emphasis { + font-style: italic; +} + +.hljs-strong { + font-weight: bold; +} \ No newline at end of file diff --git a/src/Controller/PasteController.php b/src/Controller/PasteController.php index 057f0d2..eec1a2e 100644 --- a/src/Controller/PasteController.php +++ b/src/Controller/PasteController.php @@ -4,6 +4,7 @@ declare(strict_types = 1); namespace App\Controller; use App\DTO\PasteFormData; +use App\Entity\CodeHighlighter; use App\Entity\Paste; use App\Form\Type\PasteForm; use App\Repository\PasteRepository; @@ -43,8 +44,9 @@ class PasteController extends AbstractController $pasteData = new PasteFormData($paste); $form = $this->createForm(PasteForm::class, $pasteData); - return $this->render('paste.html.twig', [ + return $this->render('show_paste.html.twig', [ 'form' => $form, - ]); + 'highlighted_text' => CodeHighlighter::highlight($pasteData->language, $pasteData->text) + ]); } } diff --git a/src/Entity/CodeHighlighter.php b/src/Entity/CodeHighlighter.php new file mode 100644 index 0000000..50e0486 --- /dev/null +++ b/src/Entity/CodeHighlighter.php @@ -0,0 +1,26 @@ +highlight($language, $code); + $highlighted_text = "
language}\">".$highlighted->value.'
'; + } + catch (\DomainException $e) { + // This is thrown if the specified language does not exist + $highlighted_text = '
'.htmlentities($code).'
'; + } + + return $highlighted_text; + } +} \ No newline at end of file diff --git a/templates/base.html.twig b/templates/base.html.twig index 67598ac..4553093 100644 --- a/templates/base.html.twig +++ b/templates/base.html.twig @@ -2,15 +2,14 @@ - {% block title %}Welcome!{% endblock %} + {% block title %}Copypaste{% endblock %} + {% block stylesheets %} {% endblock %} - - {% block javascripts %} - {% endblock %} - {% block body %}{% endblock %} + {% block content %}{% endblock %} + diff --git a/templates/paste.html.twig b/templates/paste.html.twig index 0c1a4ce..f8bddfe 100644 --- a/templates/paste.html.twig +++ b/templates/paste.html.twig @@ -1 +1,6 @@ -{{ form(form) }} +{% extends "base.html.twig" %} + +{% block content %} + {{ form(form) }} +{% endblock %} + diff --git a/templates/show_paste.html.twig b/templates/show_paste.html.twig new file mode 100644 index 0000000..f14fcfb --- /dev/null +++ b/templates/show_paste.html.twig @@ -0,0 +1,24 @@ +{% extends "base.html.twig" %} + +{% block stylesheets %} + +{% endblock %} + +{% block content %} + +
+
+ {{ highlighted_text|raw }} +
+
+ {% include 'paste.html.twig' %} +
+
+{% endblock %} \ No newline at end of file -- 2.43.5