├── .editorconfig ├── .gitignore ├── .travis.yml ├── LICENSE.md ├── README.md ├── _config.yml ├── composer.json ├── composer.lock ├── phpunit.xml ├── src └── Prettus │ └── Validator │ ├── AbstractValidator.php │ ├── Contracts │ └── ValidatorInterface.php │ ├── Exceptions │ └── ValidatorException.php │ └── LaravelValidator.php └── tests └── .gitkeep /.editorconfig: -------------------------------------------------------------------------------- 1 | # This file is for unifying the coding style for different editors and IDEs 2 | # editorconfig.org 3 | 4 | root = true 5 | 6 | [*] 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | end_of_line = lf 11 | 12 | [**.less] 13 | indent_style = tab 14 | indent_size = 2 15 | 16 | [**.{css,scss}] 17 | indent_style = tab 18 | indent_size = 2 19 | 20 | [**.php] 21 | indent_style = space 22 | indent_size = 4 23 | 24 | [**.html] 25 | indent_style = tab 26 | indent_size = 2 27 | 28 | [**.js] 29 | indent_style = space 30 | indent_size = 2 31 | 32 | [**.yml] 33 | indent_style = space 34 | indent_size = 2 35 | insert_final_newline = false 36 | 37 | [**.md] 38 | indent_size = 4 39 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | composer.phar 3 | .DS_Store 4 | ### Composer template 5 | vendor/ 6 | 7 | # Commit your application's lock file http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file 8 | # You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file 9 | # composer.lock 10 | 11 | 12 | ### JetBrains template 13 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm 14 | 15 | *.iml 16 | 17 | ## Directory-based project format: 18 | .idea/ 19 | # if you remove the above rule, at least ignore the following: 20 | 21 | # User-specific stuff: 22 | # .idea/workspace.xml 23 | # .idea/tasks.xml 24 | # .idea/dictionaries 25 | 26 | # Sensitive or high-churn files: 27 | # .idea/dataSources.ids 28 | # .idea/dataSources.xml 29 | # .idea/sqlDataSources.xml 30 | # .idea/dynamic.xml 31 | # .idea/uiDesigner.xml 32 | 33 | # Gradle: 34 | # .idea/gradle.xml 35 | # .idea/libraries 36 | 37 | # Mongo Explorer plugin: 38 | # .idea/mongoSettings.xml 39 | 40 | ## File-based project format: 41 | *.ipr 42 | *.iws 43 | 44 | ## Plugin-specific files: 45 | 46 | # IntelliJ 47 | out/ 48 | 49 | # mpeltonen/sbt-idea plugin 50 | .idea_modules/ 51 | 52 | # JIRA plugin 53 | atlassian-ide-plugin.xml 54 | 55 | # Crashlytics plugin (for Android Studio and IntelliJ) 56 | com_crashlytics_export_strings.xml 57 | crashlytics.properties 58 | crashlytics-build.properties 59 | 60 | 61 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | 3 | php: 4 | - 5.4 5 | - 5.5 6 | - 5.6 7 | - hhvm 8 | 9 | before_script: 10 | - travis_retry composer self-update 11 | - travis_retry composer install --prefer-source --no-interaction --dev 12 | 13 | script: phpunit 14 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Anderson Andrade 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Laravel Validation Service 2 | 3 | [![Total Downloads](https://poser.pugx.org/prettus/laravel-validation/downloads.svg)](https://packagist.org/packages/prettus/laravel-validation) 4 | [![Latest Stable Version](https://poser.pugx.org/prettus/laravel-validation/v/stable.svg)](https://packagist.org/packages/prettus/laravel-validation) 5 | [![Latest Unstable Version](https://poser.pugx.org/prettus/laravel-validation/v/unstable.svg)](https://packagist.org/packages/prettus/laravel-validation) 6 | [![License](https://poser.pugx.org/prettus/laravel-validation/license.svg)](https://packagist.org/packages/prettus/laravel-validation) 7 | 8 | ## Installation 9 | 10 | Add "prettus/laravel-repository": "1.1.*" to composer.json 11 | 12 | ```json 13 | "prettus/laravel-validation": "1.1.*" 14 | ``` 15 | 16 | ### Create a validator 17 | 18 | The Validator contains rules for adding, editing. 19 | 20 | ```php 21 | Prettus\Validator\Contracts\ValidatorInterface::RULE_CREATE 22 | Prettus\Validator\Contracts\ValidatorInterface::RULE_UPDATE 23 | ``` 24 | 25 | In the example below, we define some rules for both creation and edition 26 | 27 | ```php 28 | use \Prettus\Validator\LaravelValidator; 29 | 30 | class PostValidator extends LaravelValidator { 31 | 32 | protected $rules = [ 33 | 'title' => 'required', 34 | 'text' => 'min:3', 35 | 'author'=> 'required' 36 | ]; 37 | 38 | } 39 | 40 | ``` 41 | 42 | To define specific rules, proceed as shown below: 43 | 44 | ```php 45 | 46 | use \Prettus\Validator\LaravelValidator; 47 | 48 | class PostValidator extends LaravelValidator { 49 | 50 | protected $rules = [ 51 | ValidatorInterface::RULE_CREATE => [ 52 | 'title' => 'required', 53 | 'text' => 'min:3', 54 | 'author'=> 'required' 55 | ], 56 | ValidatorInterface::RULE_UPDATE => [ 57 | 'title' => 'required' 58 | ] 59 | ]; 60 | 61 | } 62 | 63 | ``` 64 | 65 | ### Custom Error Messages 66 | 67 | You may use custom error messages for validation instead of the defaults 68 | 69 | ```php 70 | 71 | protected $messages = [ 72 | 'required' => 'The :attribute field is required.', 73 | ]; 74 | 75 | ``` 76 | 77 | Or, you may wish to specify a custom error messages only for a specific field. 78 | 79 | ```php 80 | 81 | protected $messages = [ 82 | 'email.required' => 'We need to know your e-mail address!', 83 | ]; 84 | 85 | ``` 86 | 87 | ### Custom Attributes 88 | 89 | You too may use custom name attributes 90 | 91 | ```php 92 | 93 | protected $attributes = [ 94 | 'email' => 'E-mail', 95 | 'obs' => 'Observation', 96 | ]; 97 | 98 | ``` 99 | 100 | ### Using the Validator 101 | 102 | ```php 103 | 104 | use \Prettus\Validator\Exceptions\ValidatorException; 105 | 106 | class PostsController extends BaseController { 107 | 108 | /** 109 | * @var PostRepository 110 | */ 111 | protected $repository; 112 | 113 | /** 114 | * @var PostValidator 115 | */ 116 | protected $validator; 117 | 118 | public function __construct(PostRepository $repository, PostValidator $validator){ 119 | $this->repository = $repository; 120 | $this->validator = $validator; 121 | } 122 | 123 | public function store() 124 | { 125 | 126 | try { 127 | 128 | $this->validator->with( Input::all() )->passesOrFail(); 129 | 130 | // OR $this->validator->with( Input::all() )->passesOrFail( ValidatorInterface::RULE_CREATE ); 131 | 132 | $post = $this->repository->create( Input::all() ); 133 | 134 | return Response::json([ 135 | 'message'=>'Post created', 136 | 'data' =>$post->toArray() 137 | ]); 138 | 139 | } catch (ValidatorException $e) { 140 | 141 | return Response::json([ 142 | 'error' =>true, 143 | 'message' =>$e->getMessage() 144 | ]); 145 | 146 | } 147 | } 148 | 149 | public function update($id) 150 | { 151 | 152 | try{ 153 | 154 | $this->validator->with( Input::all() )->passesOrFail( ValidatorInterface::RULE_UPDATE ); 155 | 156 | $post = $this->repository->update( Input::all(), $id ); 157 | 158 | return Response::json([ 159 | 'message'=>'Post created', 160 | 'data' =>$post->toArray() 161 | ]); 162 | 163 | }catch (ValidatorException $e){ 164 | 165 | return Response::json([ 166 | 'error' =>true, 167 | 'message' =>$e->getMessage() 168 | ]); 169 | 170 | } 171 | 172 | } 173 | } 174 | ``` 175 | 176 | # Author 177 | 178 | Anderson Andrade - 179 | 180 | ## Credits 181 | 182 | http://culttt.com/2014/01/13/advanced-validation-service-laravel-4/ 183 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "prettus/laravel-validation", 3 | "description": "Laravel Validation Service", 4 | "keywords": [ 5 | "laravel", 6 | "validation", 7 | "service" 8 | ], 9 | "authors": [ 10 | { 11 | "name": "Anderson Andrade", 12 | "homepage": "http://andersonandra.de", 13 | "email": "contato@andersonandra.de", 14 | "role": "Developer" 15 | } 16 | ], 17 | "homepage": "http://andersao.github.io/laravel-validation", 18 | "support": { 19 | "email": "contato@andersonandra.de", 20 | "issues": "https://github.com/andersao/laravel-validation/issues", 21 | "wiki": "https://github.com/andersao/laravel-validation", 22 | "source": "https://github.com/andersao/laravel-validation", 23 | "docs": "http://andersao.github.io/laravel-validation" 24 | }, 25 | "require": { 26 | "php": ">=5.4.0", 27 | "illuminate/support": "~5.4|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0", 28 | "illuminate/validation": "~5.4|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0|^12.0" 29 | }, 30 | "autoload": { 31 | "psr-4": { 32 | "Prettus\\Validator\\": "src/Prettus/Validator/" 33 | } 34 | }, 35 | "minimum-stability": "stable" 36 | } 37 | -------------------------------------------------------------------------------- /composer.lock: -------------------------------------------------------------------------------- 1 | { 2 | "_readme": [ 3 | "This file locks the dependencies of your project to a known state", 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", 5 | "This file is @generated automatically" 6 | ], 7 | "content-hash": "a6f9c2b81af477a489c75fbbb4702129", 8 | "packages": [ 9 | { 10 | "name": "doctrine/inflector", 11 | "version": "2.0.4", 12 | "source": { 13 | "type": "git", 14 | "url": "https://github.com/doctrine/inflector.git", 15 | "reference": "8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89" 16 | }, 17 | "dist": { 18 | "type": "zip", 19 | "url": "https://api.github.com/repos/doctrine/inflector/zipball/8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89", 20 | "reference": "8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89", 21 | "shasum": "" 22 | }, 23 | "require": { 24 | "php": "^7.2 || ^8.0" 25 | }, 26 | "require-dev": { 27 | "doctrine/coding-standard": "^8.2", 28 | "phpstan/phpstan": "^0.12", 29 | "phpstan/phpstan-phpunit": "^0.12", 30 | "phpstan/phpstan-strict-rules": "^0.12", 31 | "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", 32 | "vimeo/psalm": "^4.10" 33 | }, 34 | "type": "library", 35 | "autoload": { 36 | "psr-4": { 37 | "Doctrine\\Inflector\\": "lib/Doctrine/Inflector" 38 | } 39 | }, 40 | "notification-url": "https://packagist.org/downloads/", 41 | "license": [ 42 | "MIT" 43 | ], 44 | "authors": [ 45 | { 46 | "name": "Guilherme Blanco", 47 | "email": "guilhermeblanco@gmail.com" 48 | }, 49 | { 50 | "name": "Roman Borschel", 51 | "email": "roman@code-factory.org" 52 | }, 53 | { 54 | "name": "Benjamin Eberlei", 55 | "email": "kontakt@beberlei.de" 56 | }, 57 | { 58 | "name": "Jonathan Wage", 59 | "email": "jonwage@gmail.com" 60 | }, 61 | { 62 | "name": "Johannes Schmitt", 63 | "email": "schmittjoh@gmail.com" 64 | } 65 | ], 66 | "description": "PHP Doctrine Inflector is a small library that can perform string manipulations with regard to upper/lowercase and singular/plural forms of words.", 67 | "homepage": "https://www.doctrine-project.org/projects/inflector.html", 68 | "keywords": [ 69 | "inflection", 70 | "inflector", 71 | "lowercase", 72 | "manipulation", 73 | "php", 74 | "plural", 75 | "singular", 76 | "strings", 77 | "uppercase", 78 | "words" 79 | ], 80 | "support": { 81 | "issues": "https://github.com/doctrine/inflector/issues", 82 | "source": "https://github.com/doctrine/inflector/tree/2.0.4" 83 | }, 84 | "funding": [ 85 | { 86 | "url": "https://www.doctrine-project.org/sponsorship.html", 87 | "type": "custom" 88 | }, 89 | { 90 | "url": "https://www.patreon.com/phpdoctrine", 91 | "type": "patreon" 92 | }, 93 | { 94 | "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finflector", 95 | "type": "tidelift" 96 | } 97 | ], 98 | "time": "2021-10-22T20:16:43+00:00" 99 | }, 100 | { 101 | "name": "doctrine/lexer", 102 | "version": "1.2.2", 103 | "source": { 104 | "type": "git", 105 | "url": "https://github.com/doctrine/lexer.git", 106 | "reference": "9c50f840f257bbb941e6f4a0e94ccf5db5c3f76c" 107 | }, 108 | "dist": { 109 | "type": "zip", 110 | "url": "https://api.github.com/repos/doctrine/lexer/zipball/9c50f840f257bbb941e6f4a0e94ccf5db5c3f76c", 111 | "reference": "9c50f840f257bbb941e6f4a0e94ccf5db5c3f76c", 112 | "shasum": "" 113 | }, 114 | "require": { 115 | "php": "^7.1 || ^8.0" 116 | }, 117 | "require-dev": { 118 | "doctrine/coding-standard": "^9.0", 119 | "phpstan/phpstan": "1.3", 120 | "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", 121 | "vimeo/psalm": "^4.11" 122 | }, 123 | "type": "library", 124 | "autoload": { 125 | "psr-4": { 126 | "Doctrine\\Common\\Lexer\\": "lib/Doctrine/Common/Lexer" 127 | } 128 | }, 129 | "notification-url": "https://packagist.org/downloads/", 130 | "license": [ 131 | "MIT" 132 | ], 133 | "authors": [ 134 | { 135 | "name": "Guilherme Blanco", 136 | "email": "guilhermeblanco@gmail.com" 137 | }, 138 | { 139 | "name": "Roman Borschel", 140 | "email": "roman@code-factory.org" 141 | }, 142 | { 143 | "name": "Johannes Schmitt", 144 | "email": "schmittjoh@gmail.com" 145 | } 146 | ], 147 | "description": "PHP Doctrine Lexer parser library that can be used in Top-Down, Recursive Descent Parsers.", 148 | "homepage": "https://www.doctrine-project.org/projects/lexer.html", 149 | "keywords": [ 150 | "annotations", 151 | "docblock", 152 | "lexer", 153 | "parser", 154 | "php" 155 | ], 156 | "support": { 157 | "issues": "https://github.com/doctrine/lexer/issues", 158 | "source": "https://github.com/doctrine/lexer/tree/1.2.2" 159 | }, 160 | "funding": [ 161 | { 162 | "url": "https://www.doctrine-project.org/sponsorship.html", 163 | "type": "custom" 164 | }, 165 | { 166 | "url": "https://www.patreon.com/phpdoctrine", 167 | "type": "patreon" 168 | }, 169 | { 170 | "url": "https://tidelift.com/funding/github/packagist/doctrine%2Flexer", 171 | "type": "tidelift" 172 | } 173 | ], 174 | "time": "2022-01-12T08:27:12+00:00" 175 | }, 176 | { 177 | "name": "egulias/email-validator", 178 | "version": "3.1.2", 179 | "source": { 180 | "type": "git", 181 | "url": "https://github.com/egulias/EmailValidator.git", 182 | "reference": "ee0db30118f661fb166bcffbf5d82032df484697" 183 | }, 184 | "dist": { 185 | "type": "zip", 186 | "url": "https://api.github.com/repos/egulias/EmailValidator/zipball/ee0db30118f661fb166bcffbf5d82032df484697", 187 | "reference": "ee0db30118f661fb166bcffbf5d82032df484697", 188 | "shasum": "" 189 | }, 190 | "require": { 191 | "doctrine/lexer": "^1.2", 192 | "php": ">=7.2", 193 | "symfony/polyfill-intl-idn": "^1.15" 194 | }, 195 | "require-dev": { 196 | "php-coveralls/php-coveralls": "^2.2", 197 | "phpunit/phpunit": "^8.5.8|^9.3.3", 198 | "vimeo/psalm": "^4" 199 | }, 200 | "suggest": { 201 | "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" 202 | }, 203 | "type": "library", 204 | "extra": { 205 | "branch-alias": { 206 | "dev-master": "3.0.x-dev" 207 | } 208 | }, 209 | "autoload": { 210 | "psr-4": { 211 | "Egulias\\EmailValidator\\": "src" 212 | } 213 | }, 214 | "notification-url": "https://packagist.org/downloads/", 215 | "license": [ 216 | "MIT" 217 | ], 218 | "authors": [ 219 | { 220 | "name": "Eduardo Gulias Davis" 221 | } 222 | ], 223 | "description": "A library for validating emails against several RFCs", 224 | "homepage": "https://github.com/egulias/EmailValidator", 225 | "keywords": [ 226 | "email", 227 | "emailvalidation", 228 | "emailvalidator", 229 | "validation", 230 | "validator" 231 | ], 232 | "support": { 233 | "issues": "https://github.com/egulias/EmailValidator/issues", 234 | "source": "https://github.com/egulias/EmailValidator/tree/3.1.2" 235 | }, 236 | "funding": [ 237 | { 238 | "url": "https://github.com/egulias", 239 | "type": "github" 240 | } 241 | ], 242 | "time": "2021-10-11T09:18:27+00:00" 243 | }, 244 | { 245 | "name": "illuminate/collections", 246 | "version": "v9.0.2", 247 | "source": { 248 | "type": "git", 249 | "url": "https://github.com/illuminate/collections.git", 250 | "reference": "707ab36191228b1a4cf322985796ff7aab5578c1" 251 | }, 252 | "dist": { 253 | "type": "zip", 254 | "url": "https://api.github.com/repos/illuminate/collections/zipball/707ab36191228b1a4cf322985796ff7aab5578c1", 255 | "reference": "707ab36191228b1a4cf322985796ff7aab5578c1", 256 | "shasum": "" 257 | }, 258 | "require": { 259 | "illuminate/conditionable": "^9.0", 260 | "illuminate/contracts": "^9.0", 261 | "illuminate/macroable": "^9.0", 262 | "php": "^8.0.2" 263 | }, 264 | "suggest": { 265 | "symfony/var-dumper": "Required to use the dump method (^6.0)." 266 | }, 267 | "type": "library", 268 | "extra": { 269 | "branch-alias": { 270 | "dev-master": "9.x-dev" 271 | } 272 | }, 273 | "autoload": { 274 | "files": [ 275 | "helpers.php" 276 | ], 277 | "psr-4": { 278 | "Illuminate\\Support\\": "" 279 | } 280 | }, 281 | "notification-url": "https://packagist.org/downloads/", 282 | "license": [ 283 | "MIT" 284 | ], 285 | "authors": [ 286 | { 287 | "name": "Taylor Otwell", 288 | "email": "taylor@laravel.com" 289 | } 290 | ], 291 | "description": "The Illuminate Collections package.", 292 | "homepage": "https://laravel.com", 293 | "support": { 294 | "issues": "https://github.com/laravel/framework/issues", 295 | "source": "https://github.com/laravel/framework" 296 | }, 297 | "time": "2022-02-09T21:49:11+00:00" 298 | }, 299 | { 300 | "name": "illuminate/conditionable", 301 | "version": "v9.0.2", 302 | "source": { 303 | "type": "git", 304 | "url": "https://github.com/illuminate/conditionable.git", 305 | "reference": "4f7e3d67ceda9a6188757501748982ea9ed5f69a" 306 | }, 307 | "dist": { 308 | "type": "zip", 309 | "url": "https://api.github.com/repos/illuminate/conditionable/zipball/4f7e3d67ceda9a6188757501748982ea9ed5f69a", 310 | "reference": "4f7e3d67ceda9a6188757501748982ea9ed5f69a", 311 | "shasum": "" 312 | }, 313 | "require": { 314 | "php": "^8.0.2" 315 | }, 316 | "type": "library", 317 | "extra": { 318 | "branch-alias": { 319 | "dev-master": "9.x-dev" 320 | } 321 | }, 322 | "autoload": { 323 | "psr-4": { 324 | "Illuminate\\Support\\": "" 325 | } 326 | }, 327 | "notification-url": "https://packagist.org/downloads/", 328 | "license": [ 329 | "MIT" 330 | ], 331 | "authors": [ 332 | { 333 | "name": "Taylor Otwell", 334 | "email": "taylor@laravel.com" 335 | } 336 | ], 337 | "description": "The Illuminate Conditionable package.", 338 | "homepage": "https://laravel.com", 339 | "support": { 340 | "issues": "https://github.com/laravel/framework/issues", 341 | "source": "https://github.com/laravel/framework" 342 | }, 343 | "time": "2022-02-09T14:26:32+00:00" 344 | }, 345 | { 346 | "name": "illuminate/container", 347 | "version": "v9.0.2", 348 | "source": { 349 | "type": "git", 350 | "url": "https://github.com/illuminate/container.git", 351 | "reference": "b249d566e8f93b9255d84f4c06a8cc7db24c900c" 352 | }, 353 | "dist": { 354 | "type": "zip", 355 | "url": "https://api.github.com/repos/illuminate/container/zipball/b249d566e8f93b9255d84f4c06a8cc7db24c900c", 356 | "reference": "b249d566e8f93b9255d84f4c06a8cc7db24c900c", 357 | "shasum": "" 358 | }, 359 | "require": { 360 | "illuminate/contracts": "^9.0", 361 | "php": "^8.0.2", 362 | "psr/container": "^1.1.1|^2.0.1" 363 | }, 364 | "provide": { 365 | "psr/container-implementation": "1.1|2.0" 366 | }, 367 | "type": "library", 368 | "extra": { 369 | "branch-alias": { 370 | "dev-master": "9.x-dev" 371 | } 372 | }, 373 | "autoload": { 374 | "psr-4": { 375 | "Illuminate\\Container\\": "" 376 | } 377 | }, 378 | "notification-url": "https://packagist.org/downloads/", 379 | "license": [ 380 | "MIT" 381 | ], 382 | "authors": [ 383 | { 384 | "name": "Taylor Otwell", 385 | "email": "taylor@laravel.com" 386 | } 387 | ], 388 | "description": "The Illuminate Container package.", 389 | "homepage": "https://laravel.com", 390 | "support": { 391 | "issues": "https://github.com/laravel/framework/issues", 392 | "source": "https://github.com/laravel/framework" 393 | }, 394 | "time": "2022-02-05T18:02:43+00:00" 395 | }, 396 | { 397 | "name": "illuminate/contracts", 398 | "version": "v9.0.2", 399 | "source": { 400 | "type": "git", 401 | "url": "https://github.com/illuminate/contracts.git", 402 | "reference": "a6e356b03c62e96561072e569bdb3e15fe118d3f" 403 | }, 404 | "dist": { 405 | "type": "zip", 406 | "url": "https://api.github.com/repos/illuminate/contracts/zipball/a6e356b03c62e96561072e569bdb3e15fe118d3f", 407 | "reference": "a6e356b03c62e96561072e569bdb3e15fe118d3f", 408 | "shasum": "" 409 | }, 410 | "require": { 411 | "php": "^8.0.2", 412 | "psr/container": "^1.1.1|^2.0.1", 413 | "psr/simple-cache": "^1.0|^2.0|^3.0" 414 | }, 415 | "type": "library", 416 | "extra": { 417 | "branch-alias": { 418 | "dev-master": "9.x-dev" 419 | } 420 | }, 421 | "autoload": { 422 | "psr-4": { 423 | "Illuminate\\Contracts\\": "" 424 | } 425 | }, 426 | "notification-url": "https://packagist.org/downloads/", 427 | "license": [ 428 | "MIT" 429 | ], 430 | "authors": [ 431 | { 432 | "name": "Taylor Otwell", 433 | "email": "taylor@laravel.com" 434 | } 435 | ], 436 | "description": "The Illuminate Contracts package.", 437 | "homepage": "https://laravel.com", 438 | "support": { 439 | "issues": "https://github.com/laravel/framework/issues", 440 | "source": "https://github.com/laravel/framework" 441 | }, 442 | "time": "2022-02-01T14:44:21+00:00" 443 | }, 444 | { 445 | "name": "illuminate/filesystem", 446 | "version": "v9.0.2", 447 | "source": { 448 | "type": "git", 449 | "url": "https://github.com/illuminate/filesystem.git", 450 | "reference": "2c74846fcd65df0fd5c2355b67bacfb94689fa32" 451 | }, 452 | "dist": { 453 | "type": "zip", 454 | "url": "https://api.github.com/repos/illuminate/filesystem/zipball/2c74846fcd65df0fd5c2355b67bacfb94689fa32", 455 | "reference": "2c74846fcd65df0fd5c2355b67bacfb94689fa32", 456 | "shasum": "" 457 | }, 458 | "require": { 459 | "illuminate/collections": "^9.0", 460 | "illuminate/contracts": "^9.0", 461 | "illuminate/macroable": "^9.0", 462 | "illuminate/support": "^9.0", 463 | "php": "^8.0.2", 464 | "symfony/finder": "^6.0" 465 | }, 466 | "suggest": { 467 | "ext-ftp": "Required to use the Flysystem FTP driver.", 468 | "illuminate/http": "Required for handling uploaded files (^7.0).", 469 | "league/flysystem": "Required to use the Flysystem local driver (^3.0).", 470 | "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^3.0).", 471 | "league/flysystem-ftp": "Required to use the Flysystem FTP driver (^3.0).", 472 | "league/flysystem-sftp-v3": "Required to use the Flysystem SFTP driver (^3.0).", 473 | "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", 474 | "symfony/filesystem": "Required to enable support for relative symbolic links (^6.0).", 475 | "symfony/mime": "Required to enable support for guessing extensions (^6.0)." 476 | }, 477 | "type": "library", 478 | "extra": { 479 | "branch-alias": { 480 | "dev-master": "9.x-dev" 481 | } 482 | }, 483 | "autoload": { 484 | "psr-4": { 485 | "Illuminate\\Filesystem\\": "" 486 | } 487 | }, 488 | "notification-url": "https://packagist.org/downloads/", 489 | "license": [ 490 | "MIT" 491 | ], 492 | "authors": [ 493 | { 494 | "name": "Taylor Otwell", 495 | "email": "taylor@laravel.com" 496 | } 497 | ], 498 | "description": "The Illuminate Filesystem package.", 499 | "homepage": "https://laravel.com", 500 | "support": { 501 | "issues": "https://github.com/laravel/framework/issues", 502 | "source": "https://github.com/laravel/framework" 503 | }, 504 | "time": "2022-02-05T18:03:05+00:00" 505 | }, 506 | { 507 | "name": "illuminate/macroable", 508 | "version": "v9.0.2", 509 | "source": { 510 | "type": "git", 511 | "url": "https://github.com/illuminate/macroable.git", 512 | "reference": "25a2c6dac2b7541ecbadef952702e84ae15f5354" 513 | }, 514 | "dist": { 515 | "type": "zip", 516 | "url": "https://api.github.com/repos/illuminate/macroable/zipball/25a2c6dac2b7541ecbadef952702e84ae15f5354", 517 | "reference": "25a2c6dac2b7541ecbadef952702e84ae15f5354", 518 | "shasum": "" 519 | }, 520 | "require": { 521 | "php": "^8.0.2" 522 | }, 523 | "type": "library", 524 | "extra": { 525 | "branch-alias": { 526 | "dev-master": "9.x-dev" 527 | } 528 | }, 529 | "autoload": { 530 | "psr-4": { 531 | "Illuminate\\Support\\": "" 532 | } 533 | }, 534 | "notification-url": "https://packagist.org/downloads/", 535 | "license": [ 536 | "MIT" 537 | ], 538 | "authors": [ 539 | { 540 | "name": "Taylor Otwell", 541 | "email": "taylor@laravel.com" 542 | } 543 | ], 544 | "description": "The Illuminate Macroable package.", 545 | "homepage": "https://laravel.com", 546 | "support": { 547 | "issues": "https://github.com/laravel/framework/issues", 548 | "source": "https://github.com/laravel/framework" 549 | }, 550 | "time": "2022-02-01T14:44:21+00:00" 551 | }, 552 | { 553 | "name": "illuminate/support", 554 | "version": "v9.0.2", 555 | "source": { 556 | "type": "git", 557 | "url": "https://github.com/illuminate/support.git", 558 | "reference": "7fe407a1cf5e300546bbbd5284cc9a752a659366" 559 | }, 560 | "dist": { 561 | "type": "zip", 562 | "url": "https://api.github.com/repos/illuminate/support/zipball/7fe407a1cf5e300546bbbd5284cc9a752a659366", 563 | "reference": "7fe407a1cf5e300546bbbd5284cc9a752a659366", 564 | "shasum": "" 565 | }, 566 | "require": { 567 | "doctrine/inflector": "^2.0", 568 | "ext-json": "*", 569 | "ext-mbstring": "*", 570 | "illuminate/collections": "^9.0", 571 | "illuminate/conditionable": "^9.0", 572 | "illuminate/contracts": "^9.0", 573 | "illuminate/macroable": "^9.0", 574 | "nesbot/carbon": "^2.53.1", 575 | "php": "^8.0.2", 576 | "voku/portable-ascii": "^2.0" 577 | }, 578 | "conflict": { 579 | "tightenco/collect": "<5.5.33" 580 | }, 581 | "suggest": { 582 | "illuminate/filesystem": "Required to use the composer class (^9.0).", 583 | "league/commonmark": "Required to use Str::markdown() and Stringable::markdown() (^2.0.2).", 584 | "ramsey/uuid": "Required to use Str::uuid() (^4.2.2).", 585 | "symfony/process": "Required to use the composer class (^6.0).", 586 | "symfony/var-dumper": "Required to use the dd function (^6.0).", 587 | "vlucas/phpdotenv": "Required to use the Env class and env helper (^5.4.1)." 588 | }, 589 | "type": "library", 590 | "extra": { 591 | "branch-alias": { 592 | "dev-master": "9.x-dev" 593 | } 594 | }, 595 | "autoload": { 596 | "files": [ 597 | "helpers.php" 598 | ], 599 | "psr-4": { 600 | "Illuminate\\Support\\": "" 601 | } 602 | }, 603 | "notification-url": "https://packagist.org/downloads/", 604 | "license": [ 605 | "MIT" 606 | ], 607 | "authors": [ 608 | { 609 | "name": "Taylor Otwell", 610 | "email": "taylor@laravel.com" 611 | } 612 | ], 613 | "description": "The Illuminate Support package.", 614 | "homepage": "https://laravel.com", 615 | "support": { 616 | "issues": "https://github.com/laravel/framework/issues", 617 | "source": "https://github.com/laravel/framework" 618 | }, 619 | "time": "2022-02-08T14:51:36+00:00" 620 | }, 621 | { 622 | "name": "illuminate/translation", 623 | "version": "v9.0.2", 624 | "source": { 625 | "type": "git", 626 | "url": "https://github.com/illuminate/translation.git", 627 | "reference": "8bdac1ceea6be67e8f1c93ad68ac4abe1f91df3f" 628 | }, 629 | "dist": { 630 | "type": "zip", 631 | "url": "https://api.github.com/repos/illuminate/translation/zipball/8bdac1ceea6be67e8f1c93ad68ac4abe1f91df3f", 632 | "reference": "8bdac1ceea6be67e8f1c93ad68ac4abe1f91df3f", 633 | "shasum": "" 634 | }, 635 | "require": { 636 | "ext-json": "*", 637 | "illuminate/collections": "^9.0", 638 | "illuminate/contracts": "^9.0", 639 | "illuminate/filesystem": "^9.0", 640 | "illuminate/macroable": "^9.0", 641 | "illuminate/support": "^9.0", 642 | "php": "^8.0.2" 643 | }, 644 | "type": "library", 645 | "extra": { 646 | "branch-alias": { 647 | "dev-master": "9.x-dev" 648 | } 649 | }, 650 | "autoload": { 651 | "psr-4": { 652 | "Illuminate\\Translation\\": "" 653 | } 654 | }, 655 | "notification-url": "https://packagist.org/downloads/", 656 | "license": [ 657 | "MIT" 658 | ], 659 | "authors": [ 660 | { 661 | "name": "Taylor Otwell", 662 | "email": "taylor@laravel.com" 663 | } 664 | ], 665 | "description": "The Illuminate Translation package.", 666 | "homepage": "https://laravel.com", 667 | "support": { 668 | "issues": "https://github.com/laravel/framework/issues", 669 | "source": "https://github.com/laravel/framework" 670 | }, 671 | "time": "2022-02-01T14:44:21+00:00" 672 | }, 673 | { 674 | "name": "illuminate/validation", 675 | "version": "v9.0.2", 676 | "source": { 677 | "type": "git", 678 | "url": "https://github.com/illuminate/validation.git", 679 | "reference": "81c77a578871775a7ec23fa639666bcca6a6e7e5" 680 | }, 681 | "dist": { 682 | "type": "zip", 683 | "url": "https://api.github.com/repos/illuminate/validation/zipball/81c77a578871775a7ec23fa639666bcca6a6e7e5", 684 | "reference": "81c77a578871775a7ec23fa639666bcca6a6e7e5", 685 | "shasum": "" 686 | }, 687 | "require": { 688 | "egulias/email-validator": "^3.1", 689 | "ext-json": "*", 690 | "illuminate/collections": "^9.0", 691 | "illuminate/container": "^9.0", 692 | "illuminate/contracts": "^9.0", 693 | "illuminate/macroable": "^9.0", 694 | "illuminate/support": "^9.0", 695 | "illuminate/translation": "^9.0", 696 | "php": "^8.0.2", 697 | "symfony/http-foundation": "^6.0", 698 | "symfony/mime": "^6.0" 699 | }, 700 | "suggest": { 701 | "ext-bcmath": "Required to use the multiple_of validation rule.", 702 | "illuminate/database": "Required to use the database presence verifier (^9.0)." 703 | }, 704 | "type": "library", 705 | "extra": { 706 | "branch-alias": { 707 | "dev-master": "9.x-dev" 708 | } 709 | }, 710 | "autoload": { 711 | "psr-4": { 712 | "Illuminate\\Validation\\": "" 713 | } 714 | }, 715 | "notification-url": "https://packagist.org/downloads/", 716 | "license": [ 717 | "MIT" 718 | ], 719 | "authors": [ 720 | { 721 | "name": "Taylor Otwell", 722 | "email": "taylor@laravel.com" 723 | } 724 | ], 725 | "description": "The Illuminate Validation package.", 726 | "homepage": "https://laravel.com", 727 | "support": { 728 | "issues": "https://github.com/laravel/framework/issues", 729 | "source": "https://github.com/laravel/framework" 730 | }, 731 | "time": "2022-02-10T14:48:35+00:00" 732 | }, 733 | { 734 | "name": "nesbot/carbon", 735 | "version": "2.56.0", 736 | "source": { 737 | "type": "git", 738 | "url": "https://github.com/briannesbitt/Carbon.git", 739 | "reference": "626ec8cbb724cd3c3400c3ed8f730545b744e3f4" 740 | }, 741 | "dist": { 742 | "type": "zip", 743 | "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/626ec8cbb724cd3c3400c3ed8f730545b744e3f4", 744 | "reference": "626ec8cbb724cd3c3400c3ed8f730545b744e3f4", 745 | "shasum": "" 746 | }, 747 | "require": { 748 | "ext-json": "*", 749 | "php": "^7.1.8 || ^8.0", 750 | "symfony/polyfill-mbstring": "^1.0", 751 | "symfony/polyfill-php80": "^1.16", 752 | "symfony/translation": "^3.4 || ^4.0 || ^5.0 || ^6.0" 753 | }, 754 | "require-dev": { 755 | "doctrine/dbal": "^2.0 || ^3.0", 756 | "doctrine/orm": "^2.7", 757 | "friendsofphp/php-cs-fixer": "^3.0", 758 | "kylekatarnls/multi-tester": "^2.0", 759 | "phpmd/phpmd": "^2.9", 760 | "phpstan/extension-installer": "^1.0", 761 | "phpstan/phpstan": "^0.12.54 || ^1.0", 762 | "phpunit/phpunit": "^7.5.20 || ^8.5.14", 763 | "squizlabs/php_codesniffer": "^3.4" 764 | }, 765 | "bin": [ 766 | "bin/carbon" 767 | ], 768 | "type": "library", 769 | "extra": { 770 | "branch-alias": { 771 | "dev-3.x": "3.x-dev", 772 | "dev-master": "2.x-dev" 773 | }, 774 | "laravel": { 775 | "providers": [ 776 | "Carbon\\Laravel\\ServiceProvider" 777 | ] 778 | }, 779 | "phpstan": { 780 | "includes": [ 781 | "extension.neon" 782 | ] 783 | } 784 | }, 785 | "autoload": { 786 | "psr-4": { 787 | "Carbon\\": "src/Carbon/" 788 | } 789 | }, 790 | "notification-url": "https://packagist.org/downloads/", 791 | "license": [ 792 | "MIT" 793 | ], 794 | "authors": [ 795 | { 796 | "name": "Brian Nesbitt", 797 | "email": "brian@nesbot.com", 798 | "homepage": "https://markido.com" 799 | }, 800 | { 801 | "name": "kylekatarnls", 802 | "homepage": "https://github.com/kylekatarnls" 803 | } 804 | ], 805 | "description": "An API extension for DateTime that supports 281 different languages.", 806 | "homepage": "https://carbon.nesbot.com", 807 | "keywords": [ 808 | "date", 809 | "datetime", 810 | "time" 811 | ], 812 | "support": { 813 | "docs": "https://carbon.nesbot.com/docs", 814 | "issues": "https://github.com/briannesbitt/Carbon/issues", 815 | "source": "https://github.com/briannesbitt/Carbon" 816 | }, 817 | "funding": [ 818 | { 819 | "url": "https://opencollective.com/Carbon", 820 | "type": "open_collective" 821 | }, 822 | { 823 | "url": "https://tidelift.com/funding/github/packagist/nesbot/carbon", 824 | "type": "tidelift" 825 | } 826 | ], 827 | "time": "2022-01-21T17:08:38+00:00" 828 | }, 829 | { 830 | "name": "psr/container", 831 | "version": "2.0.2", 832 | "source": { 833 | "type": "git", 834 | "url": "https://github.com/php-fig/container.git", 835 | "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" 836 | }, 837 | "dist": { 838 | "type": "zip", 839 | "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", 840 | "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", 841 | "shasum": "" 842 | }, 843 | "require": { 844 | "php": ">=7.4.0" 845 | }, 846 | "type": "library", 847 | "extra": { 848 | "branch-alias": { 849 | "dev-master": "2.0.x-dev" 850 | } 851 | }, 852 | "autoload": { 853 | "psr-4": { 854 | "Psr\\Container\\": "src/" 855 | } 856 | }, 857 | "notification-url": "https://packagist.org/downloads/", 858 | "license": [ 859 | "MIT" 860 | ], 861 | "authors": [ 862 | { 863 | "name": "PHP-FIG", 864 | "homepage": "https://www.php-fig.org/" 865 | } 866 | ], 867 | "description": "Common Container Interface (PHP FIG PSR-11)", 868 | "homepage": "https://github.com/php-fig/container", 869 | "keywords": [ 870 | "PSR-11", 871 | "container", 872 | "container-interface", 873 | "container-interop", 874 | "psr" 875 | ], 876 | "support": { 877 | "issues": "https://github.com/php-fig/container/issues", 878 | "source": "https://github.com/php-fig/container/tree/2.0.2" 879 | }, 880 | "time": "2021-11-05T16:47:00+00:00" 881 | }, 882 | { 883 | "name": "psr/simple-cache", 884 | "version": "3.0.0", 885 | "source": { 886 | "type": "git", 887 | "url": "https://github.com/php-fig/simple-cache.git", 888 | "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865" 889 | }, 890 | "dist": { 891 | "type": "zip", 892 | "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/764e0b3939f5ca87cb904f570ef9be2d78a07865", 893 | "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865", 894 | "shasum": "" 895 | }, 896 | "require": { 897 | "php": ">=8.0.0" 898 | }, 899 | "type": "library", 900 | "extra": { 901 | "branch-alias": { 902 | "dev-master": "3.0.x-dev" 903 | } 904 | }, 905 | "autoload": { 906 | "psr-4": { 907 | "Psr\\SimpleCache\\": "src/" 908 | } 909 | }, 910 | "notification-url": "https://packagist.org/downloads/", 911 | "license": [ 912 | "MIT" 913 | ], 914 | "authors": [ 915 | { 916 | "name": "PHP-FIG", 917 | "homepage": "https://www.php-fig.org/" 918 | } 919 | ], 920 | "description": "Common interfaces for simple caching", 921 | "keywords": [ 922 | "cache", 923 | "caching", 924 | "psr", 925 | "psr-16", 926 | "simple-cache" 927 | ], 928 | "support": { 929 | "source": "https://github.com/php-fig/simple-cache/tree/3.0.0" 930 | }, 931 | "time": "2021-10-29T13:26:27+00:00" 932 | }, 933 | { 934 | "name": "symfony/deprecation-contracts", 935 | "version": "v3.0.0", 936 | "source": { 937 | "type": "git", 938 | "url": "https://github.com/symfony/deprecation-contracts.git", 939 | "reference": "c726b64c1ccfe2896cb7df2e1331c357ad1c8ced" 940 | }, 941 | "dist": { 942 | "type": "zip", 943 | "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/c726b64c1ccfe2896cb7df2e1331c357ad1c8ced", 944 | "reference": "c726b64c1ccfe2896cb7df2e1331c357ad1c8ced", 945 | "shasum": "" 946 | }, 947 | "require": { 948 | "php": ">=8.0.2" 949 | }, 950 | "type": "library", 951 | "extra": { 952 | "branch-alias": { 953 | "dev-main": "3.0-dev" 954 | }, 955 | "thanks": { 956 | "name": "symfony/contracts", 957 | "url": "https://github.com/symfony/contracts" 958 | } 959 | }, 960 | "autoload": { 961 | "files": [ 962 | "function.php" 963 | ] 964 | }, 965 | "notification-url": "https://packagist.org/downloads/", 966 | "license": [ 967 | "MIT" 968 | ], 969 | "authors": [ 970 | { 971 | "name": "Nicolas Grekas", 972 | "email": "p@tchwork.com" 973 | }, 974 | { 975 | "name": "Symfony Community", 976 | "homepage": "https://symfony.com/contributors" 977 | } 978 | ], 979 | "description": "A generic function and convention to trigger deprecation notices", 980 | "homepage": "https://symfony.com", 981 | "support": { 982 | "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.0" 983 | }, 984 | "funding": [ 985 | { 986 | "url": "https://symfony.com/sponsor", 987 | "type": "custom" 988 | }, 989 | { 990 | "url": "https://github.com/fabpot", 991 | "type": "github" 992 | }, 993 | { 994 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 995 | "type": "tidelift" 996 | } 997 | ], 998 | "time": "2021-11-01T23:48:49+00:00" 999 | }, 1000 | { 1001 | "name": "symfony/finder", 1002 | "version": "v6.0.3", 1003 | "source": { 1004 | "type": "git", 1005 | "url": "https://github.com/symfony/finder.git", 1006 | "reference": "8661b74dbabc23223f38c9b99d3f8ade71170430" 1007 | }, 1008 | "dist": { 1009 | "type": "zip", 1010 | "url": "https://api.github.com/repos/symfony/finder/zipball/8661b74dbabc23223f38c9b99d3f8ade71170430", 1011 | "reference": "8661b74dbabc23223f38c9b99d3f8ade71170430", 1012 | "shasum": "" 1013 | }, 1014 | "require": { 1015 | "php": ">=8.0.2" 1016 | }, 1017 | "type": "library", 1018 | "autoload": { 1019 | "psr-4": { 1020 | "Symfony\\Component\\Finder\\": "" 1021 | }, 1022 | "exclude-from-classmap": [ 1023 | "/Tests/" 1024 | ] 1025 | }, 1026 | "notification-url": "https://packagist.org/downloads/", 1027 | "license": [ 1028 | "MIT" 1029 | ], 1030 | "authors": [ 1031 | { 1032 | "name": "Fabien Potencier", 1033 | "email": "fabien@symfony.com" 1034 | }, 1035 | { 1036 | "name": "Symfony Community", 1037 | "homepage": "https://symfony.com/contributors" 1038 | } 1039 | ], 1040 | "description": "Finds files and directories via an intuitive fluent interface", 1041 | "homepage": "https://symfony.com", 1042 | "support": { 1043 | "source": "https://github.com/symfony/finder/tree/v6.0.3" 1044 | }, 1045 | "funding": [ 1046 | { 1047 | "url": "https://symfony.com/sponsor", 1048 | "type": "custom" 1049 | }, 1050 | { 1051 | "url": "https://github.com/fabpot", 1052 | "type": "github" 1053 | }, 1054 | { 1055 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 1056 | "type": "tidelift" 1057 | } 1058 | ], 1059 | "time": "2022-01-26T17:23:29+00:00" 1060 | }, 1061 | { 1062 | "name": "symfony/http-foundation", 1063 | "version": "v6.0.3", 1064 | "source": { 1065 | "type": "git", 1066 | "url": "https://github.com/symfony/http-foundation.git", 1067 | "reference": "ad157299ced81a637fade1efcadd688d6deba5c1" 1068 | }, 1069 | "dist": { 1070 | "type": "zip", 1071 | "url": "https://api.github.com/repos/symfony/http-foundation/zipball/ad157299ced81a637fade1efcadd688d6deba5c1", 1072 | "reference": "ad157299ced81a637fade1efcadd688d6deba5c1", 1073 | "shasum": "" 1074 | }, 1075 | "require": { 1076 | "php": ">=8.0.2", 1077 | "symfony/deprecation-contracts": "^2.1|^3", 1078 | "symfony/polyfill-mbstring": "~1.1" 1079 | }, 1080 | "require-dev": { 1081 | "predis/predis": "~1.0", 1082 | "symfony/cache": "^5.4|^6.0", 1083 | "symfony/expression-language": "^5.4|^6.0", 1084 | "symfony/mime": "^5.4|^6.0" 1085 | }, 1086 | "suggest": { 1087 | "symfony/mime": "To use the file extension guesser" 1088 | }, 1089 | "type": "library", 1090 | "autoload": { 1091 | "psr-4": { 1092 | "Symfony\\Component\\HttpFoundation\\": "" 1093 | }, 1094 | "exclude-from-classmap": [ 1095 | "/Tests/" 1096 | ] 1097 | }, 1098 | "notification-url": "https://packagist.org/downloads/", 1099 | "license": [ 1100 | "MIT" 1101 | ], 1102 | "authors": [ 1103 | { 1104 | "name": "Fabien Potencier", 1105 | "email": "fabien@symfony.com" 1106 | }, 1107 | { 1108 | "name": "Symfony Community", 1109 | "homepage": "https://symfony.com/contributors" 1110 | } 1111 | ], 1112 | "description": "Defines an object-oriented layer for the HTTP specification", 1113 | "homepage": "https://symfony.com", 1114 | "support": { 1115 | "source": "https://github.com/symfony/http-foundation/tree/v6.0.3" 1116 | }, 1117 | "funding": [ 1118 | { 1119 | "url": "https://symfony.com/sponsor", 1120 | "type": "custom" 1121 | }, 1122 | { 1123 | "url": "https://github.com/fabpot", 1124 | "type": "github" 1125 | }, 1126 | { 1127 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 1128 | "type": "tidelift" 1129 | } 1130 | ], 1131 | "time": "2022-01-02T09:55:41+00:00" 1132 | }, 1133 | { 1134 | "name": "symfony/mime", 1135 | "version": "v6.0.3", 1136 | "source": { 1137 | "type": "git", 1138 | "url": "https://github.com/symfony/mime.git", 1139 | "reference": "2cd9601efd040e56f43360daa68f3c6b0534923a" 1140 | }, 1141 | "dist": { 1142 | "type": "zip", 1143 | "url": "https://api.github.com/repos/symfony/mime/zipball/2cd9601efd040e56f43360daa68f3c6b0534923a", 1144 | "reference": "2cd9601efd040e56f43360daa68f3c6b0534923a", 1145 | "shasum": "" 1146 | }, 1147 | "require": { 1148 | "php": ">=8.0.2", 1149 | "symfony/polyfill-intl-idn": "^1.10", 1150 | "symfony/polyfill-mbstring": "^1.0" 1151 | }, 1152 | "conflict": { 1153 | "egulias/email-validator": "~3.0.0", 1154 | "phpdocumentor/reflection-docblock": "<3.2.2", 1155 | "phpdocumentor/type-resolver": "<1.4.0", 1156 | "symfony/mailer": "<5.4" 1157 | }, 1158 | "require-dev": { 1159 | "egulias/email-validator": "^2.1.10|^3.1", 1160 | "phpdocumentor/reflection-docblock": "^3.0|^4.0|^5.0", 1161 | "symfony/dependency-injection": "^5.4|^6.0", 1162 | "symfony/property-access": "^5.4|^6.0", 1163 | "symfony/property-info": "^5.4|^6.0", 1164 | "symfony/serializer": "^5.4|^6.0" 1165 | }, 1166 | "type": "library", 1167 | "autoload": { 1168 | "psr-4": { 1169 | "Symfony\\Component\\Mime\\": "" 1170 | }, 1171 | "exclude-from-classmap": [ 1172 | "/Tests/" 1173 | ] 1174 | }, 1175 | "notification-url": "https://packagist.org/downloads/", 1176 | "license": [ 1177 | "MIT" 1178 | ], 1179 | "authors": [ 1180 | { 1181 | "name": "Fabien Potencier", 1182 | "email": "fabien@symfony.com" 1183 | }, 1184 | { 1185 | "name": "Symfony Community", 1186 | "homepage": "https://symfony.com/contributors" 1187 | } 1188 | ], 1189 | "description": "Allows manipulating MIME messages", 1190 | "homepage": "https://symfony.com", 1191 | "keywords": [ 1192 | "mime", 1193 | "mime-type" 1194 | ], 1195 | "support": { 1196 | "source": "https://github.com/symfony/mime/tree/v6.0.3" 1197 | }, 1198 | "funding": [ 1199 | { 1200 | "url": "https://symfony.com/sponsor", 1201 | "type": "custom" 1202 | }, 1203 | { 1204 | "url": "https://github.com/fabpot", 1205 | "type": "github" 1206 | }, 1207 | { 1208 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 1209 | "type": "tidelift" 1210 | } 1211 | ], 1212 | "time": "2022-01-02T09:55:41+00:00" 1213 | }, 1214 | { 1215 | "name": "symfony/polyfill-intl-idn", 1216 | "version": "v1.24.0", 1217 | "source": { 1218 | "type": "git", 1219 | "url": "https://github.com/symfony/polyfill-intl-idn.git", 1220 | "reference": "749045c69efb97c70d25d7463abba812e91f3a44" 1221 | }, 1222 | "dist": { 1223 | "type": "zip", 1224 | "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/749045c69efb97c70d25d7463abba812e91f3a44", 1225 | "reference": "749045c69efb97c70d25d7463abba812e91f3a44", 1226 | "shasum": "" 1227 | }, 1228 | "require": { 1229 | "php": ">=7.1", 1230 | "symfony/polyfill-intl-normalizer": "^1.10", 1231 | "symfony/polyfill-php72": "^1.10" 1232 | }, 1233 | "suggest": { 1234 | "ext-intl": "For best performance" 1235 | }, 1236 | "type": "library", 1237 | "extra": { 1238 | "branch-alias": { 1239 | "dev-main": "1.23-dev" 1240 | }, 1241 | "thanks": { 1242 | "name": "symfony/polyfill", 1243 | "url": "https://github.com/symfony/polyfill" 1244 | } 1245 | }, 1246 | "autoload": { 1247 | "files": [ 1248 | "bootstrap.php" 1249 | ], 1250 | "psr-4": { 1251 | "Symfony\\Polyfill\\Intl\\Idn\\": "" 1252 | } 1253 | }, 1254 | "notification-url": "https://packagist.org/downloads/", 1255 | "license": [ 1256 | "MIT" 1257 | ], 1258 | "authors": [ 1259 | { 1260 | "name": "Laurent Bassin", 1261 | "email": "laurent@bassin.info" 1262 | }, 1263 | { 1264 | "name": "Trevor Rowbotham", 1265 | "email": "trevor.rowbotham@pm.me" 1266 | }, 1267 | { 1268 | "name": "Symfony Community", 1269 | "homepage": "https://symfony.com/contributors" 1270 | } 1271 | ], 1272 | "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", 1273 | "homepage": "https://symfony.com", 1274 | "keywords": [ 1275 | "compatibility", 1276 | "idn", 1277 | "intl", 1278 | "polyfill", 1279 | "portable", 1280 | "shim" 1281 | ], 1282 | "support": { 1283 | "source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.24.0" 1284 | }, 1285 | "funding": [ 1286 | { 1287 | "url": "https://symfony.com/sponsor", 1288 | "type": "custom" 1289 | }, 1290 | { 1291 | "url": "https://github.com/fabpot", 1292 | "type": "github" 1293 | }, 1294 | { 1295 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 1296 | "type": "tidelift" 1297 | } 1298 | ], 1299 | "time": "2021-09-14T14:02:44+00:00" 1300 | }, 1301 | { 1302 | "name": "symfony/polyfill-intl-normalizer", 1303 | "version": "v1.24.0", 1304 | "source": { 1305 | "type": "git", 1306 | "url": "https://github.com/symfony/polyfill-intl-normalizer.git", 1307 | "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8" 1308 | }, 1309 | "dist": { 1310 | "type": "zip", 1311 | "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", 1312 | "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", 1313 | "shasum": "" 1314 | }, 1315 | "require": { 1316 | "php": ">=7.1" 1317 | }, 1318 | "suggest": { 1319 | "ext-intl": "For best performance" 1320 | }, 1321 | "type": "library", 1322 | "extra": { 1323 | "branch-alias": { 1324 | "dev-main": "1.23-dev" 1325 | }, 1326 | "thanks": { 1327 | "name": "symfony/polyfill", 1328 | "url": "https://github.com/symfony/polyfill" 1329 | } 1330 | }, 1331 | "autoload": { 1332 | "files": [ 1333 | "bootstrap.php" 1334 | ], 1335 | "psr-4": { 1336 | "Symfony\\Polyfill\\Intl\\Normalizer\\": "" 1337 | }, 1338 | "classmap": [ 1339 | "Resources/stubs" 1340 | ] 1341 | }, 1342 | "notification-url": "https://packagist.org/downloads/", 1343 | "license": [ 1344 | "MIT" 1345 | ], 1346 | "authors": [ 1347 | { 1348 | "name": "Nicolas Grekas", 1349 | "email": "p@tchwork.com" 1350 | }, 1351 | { 1352 | "name": "Symfony Community", 1353 | "homepage": "https://symfony.com/contributors" 1354 | } 1355 | ], 1356 | "description": "Symfony polyfill for intl's Normalizer class and related functions", 1357 | "homepage": "https://symfony.com", 1358 | "keywords": [ 1359 | "compatibility", 1360 | "intl", 1361 | "normalizer", 1362 | "polyfill", 1363 | "portable", 1364 | "shim" 1365 | ], 1366 | "support": { 1367 | "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.24.0" 1368 | }, 1369 | "funding": [ 1370 | { 1371 | "url": "https://symfony.com/sponsor", 1372 | "type": "custom" 1373 | }, 1374 | { 1375 | "url": "https://github.com/fabpot", 1376 | "type": "github" 1377 | }, 1378 | { 1379 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 1380 | "type": "tidelift" 1381 | } 1382 | ], 1383 | "time": "2021-02-19T12:13:01+00:00" 1384 | }, 1385 | { 1386 | "name": "symfony/polyfill-mbstring", 1387 | "version": "v1.24.0", 1388 | "source": { 1389 | "type": "git", 1390 | "url": "https://github.com/symfony/polyfill-mbstring.git", 1391 | "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825" 1392 | }, 1393 | "dist": { 1394 | "type": "zip", 1395 | "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/0abb51d2f102e00a4eefcf46ba7fec406d245825", 1396 | "reference": "0abb51d2f102e00a4eefcf46ba7fec406d245825", 1397 | "shasum": "" 1398 | }, 1399 | "require": { 1400 | "php": ">=7.1" 1401 | }, 1402 | "provide": { 1403 | "ext-mbstring": "*" 1404 | }, 1405 | "suggest": { 1406 | "ext-mbstring": "For best performance" 1407 | }, 1408 | "type": "library", 1409 | "extra": { 1410 | "branch-alias": { 1411 | "dev-main": "1.23-dev" 1412 | }, 1413 | "thanks": { 1414 | "name": "symfony/polyfill", 1415 | "url": "https://github.com/symfony/polyfill" 1416 | } 1417 | }, 1418 | "autoload": { 1419 | "psr-4": { 1420 | "Symfony\\Polyfill\\Mbstring\\": "" 1421 | }, 1422 | "files": [ 1423 | "bootstrap.php" 1424 | ] 1425 | }, 1426 | "notification-url": "https://packagist.org/downloads/", 1427 | "license": [ 1428 | "MIT" 1429 | ], 1430 | "authors": [ 1431 | { 1432 | "name": "Nicolas Grekas", 1433 | "email": "p@tchwork.com" 1434 | }, 1435 | { 1436 | "name": "Symfony Community", 1437 | "homepage": "https://symfony.com/contributors" 1438 | } 1439 | ], 1440 | "description": "Symfony polyfill for the Mbstring extension", 1441 | "homepage": "https://symfony.com", 1442 | "keywords": [ 1443 | "compatibility", 1444 | "mbstring", 1445 | "polyfill", 1446 | "portable", 1447 | "shim" 1448 | ], 1449 | "support": { 1450 | "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.24.0" 1451 | }, 1452 | "funding": [ 1453 | { 1454 | "url": "https://symfony.com/sponsor", 1455 | "type": "custom" 1456 | }, 1457 | { 1458 | "url": "https://github.com/fabpot", 1459 | "type": "github" 1460 | }, 1461 | { 1462 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 1463 | "type": "tidelift" 1464 | } 1465 | ], 1466 | "time": "2021-11-30T18:21:41+00:00" 1467 | }, 1468 | { 1469 | "name": "symfony/polyfill-php72", 1470 | "version": "v1.24.0", 1471 | "source": { 1472 | "type": "git", 1473 | "url": "https://github.com/symfony/polyfill-php72.git", 1474 | "reference": "9a142215a36a3888e30d0a9eeea9766764e96976" 1475 | }, 1476 | "dist": { 1477 | "type": "zip", 1478 | "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9a142215a36a3888e30d0a9eeea9766764e96976", 1479 | "reference": "9a142215a36a3888e30d0a9eeea9766764e96976", 1480 | "shasum": "" 1481 | }, 1482 | "require": { 1483 | "php": ">=7.1" 1484 | }, 1485 | "type": "library", 1486 | "extra": { 1487 | "branch-alias": { 1488 | "dev-main": "1.23-dev" 1489 | }, 1490 | "thanks": { 1491 | "name": "symfony/polyfill", 1492 | "url": "https://github.com/symfony/polyfill" 1493 | } 1494 | }, 1495 | "autoload": { 1496 | "files": [ 1497 | "bootstrap.php" 1498 | ], 1499 | "psr-4": { 1500 | "Symfony\\Polyfill\\Php72\\": "" 1501 | } 1502 | }, 1503 | "notification-url": "https://packagist.org/downloads/", 1504 | "license": [ 1505 | "MIT" 1506 | ], 1507 | "authors": [ 1508 | { 1509 | "name": "Nicolas Grekas", 1510 | "email": "p@tchwork.com" 1511 | }, 1512 | { 1513 | "name": "Symfony Community", 1514 | "homepage": "https://symfony.com/contributors" 1515 | } 1516 | ], 1517 | "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", 1518 | "homepage": "https://symfony.com", 1519 | "keywords": [ 1520 | "compatibility", 1521 | "polyfill", 1522 | "portable", 1523 | "shim" 1524 | ], 1525 | "support": { 1526 | "source": "https://github.com/symfony/polyfill-php72/tree/v1.24.0" 1527 | }, 1528 | "funding": [ 1529 | { 1530 | "url": "https://symfony.com/sponsor", 1531 | "type": "custom" 1532 | }, 1533 | { 1534 | "url": "https://github.com/fabpot", 1535 | "type": "github" 1536 | }, 1537 | { 1538 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 1539 | "type": "tidelift" 1540 | } 1541 | ], 1542 | "time": "2021-05-27T09:17:38+00:00" 1543 | }, 1544 | { 1545 | "name": "symfony/polyfill-php80", 1546 | "version": "v1.24.0", 1547 | "source": { 1548 | "type": "git", 1549 | "url": "https://github.com/symfony/polyfill-php80.git", 1550 | "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9" 1551 | }, 1552 | "dist": { 1553 | "type": "zip", 1554 | "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/57b712b08eddb97c762a8caa32c84e037892d2e9", 1555 | "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9", 1556 | "shasum": "" 1557 | }, 1558 | "require": { 1559 | "php": ">=7.1" 1560 | }, 1561 | "type": "library", 1562 | "extra": { 1563 | "branch-alias": { 1564 | "dev-main": "1.23-dev" 1565 | }, 1566 | "thanks": { 1567 | "name": "symfony/polyfill", 1568 | "url": "https://github.com/symfony/polyfill" 1569 | } 1570 | }, 1571 | "autoload": { 1572 | "files": [ 1573 | "bootstrap.php" 1574 | ], 1575 | "psr-4": { 1576 | "Symfony\\Polyfill\\Php80\\": "" 1577 | }, 1578 | "classmap": [ 1579 | "Resources/stubs" 1580 | ] 1581 | }, 1582 | "notification-url": "https://packagist.org/downloads/", 1583 | "license": [ 1584 | "MIT" 1585 | ], 1586 | "authors": [ 1587 | { 1588 | "name": "Ion Bazan", 1589 | "email": "ion.bazan@gmail.com" 1590 | }, 1591 | { 1592 | "name": "Nicolas Grekas", 1593 | "email": "p@tchwork.com" 1594 | }, 1595 | { 1596 | "name": "Symfony Community", 1597 | "homepage": "https://symfony.com/contributors" 1598 | } 1599 | ], 1600 | "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", 1601 | "homepage": "https://symfony.com", 1602 | "keywords": [ 1603 | "compatibility", 1604 | "polyfill", 1605 | "portable", 1606 | "shim" 1607 | ], 1608 | "support": { 1609 | "source": "https://github.com/symfony/polyfill-php80/tree/v1.24.0" 1610 | }, 1611 | "funding": [ 1612 | { 1613 | "url": "https://symfony.com/sponsor", 1614 | "type": "custom" 1615 | }, 1616 | { 1617 | "url": "https://github.com/fabpot", 1618 | "type": "github" 1619 | }, 1620 | { 1621 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 1622 | "type": "tidelift" 1623 | } 1624 | ], 1625 | "time": "2021-09-13T13:58:33+00:00" 1626 | }, 1627 | { 1628 | "name": "symfony/translation", 1629 | "version": "v6.0.3", 1630 | "source": { 1631 | "type": "git", 1632 | "url": "https://github.com/symfony/translation.git", 1633 | "reference": "71bb15335798f8c4da110911bcf2d2fead7a430d" 1634 | }, 1635 | "dist": { 1636 | "type": "zip", 1637 | "url": "https://api.github.com/repos/symfony/translation/zipball/71bb15335798f8c4da110911bcf2d2fead7a430d", 1638 | "reference": "71bb15335798f8c4da110911bcf2d2fead7a430d", 1639 | "shasum": "" 1640 | }, 1641 | "require": { 1642 | "php": ">=8.0.2", 1643 | "symfony/polyfill-mbstring": "~1.0", 1644 | "symfony/translation-contracts": "^2.3|^3.0" 1645 | }, 1646 | "conflict": { 1647 | "symfony/config": "<5.4", 1648 | "symfony/console": "<5.4", 1649 | "symfony/dependency-injection": "<5.4", 1650 | "symfony/http-kernel": "<5.4", 1651 | "symfony/twig-bundle": "<5.4", 1652 | "symfony/yaml": "<5.4" 1653 | }, 1654 | "provide": { 1655 | "symfony/translation-implementation": "2.3|3.0" 1656 | }, 1657 | "require-dev": { 1658 | "psr/log": "^1|^2|^3", 1659 | "symfony/config": "^5.4|^6.0", 1660 | "symfony/console": "^5.4|^6.0", 1661 | "symfony/dependency-injection": "^5.4|^6.0", 1662 | "symfony/finder": "^5.4|^6.0", 1663 | "symfony/http-client-contracts": "^1.1|^2.0|^3.0", 1664 | "symfony/http-kernel": "^5.4|^6.0", 1665 | "symfony/intl": "^5.4|^6.0", 1666 | "symfony/polyfill-intl-icu": "^1.21", 1667 | "symfony/service-contracts": "^1.1.2|^2|^3", 1668 | "symfony/yaml": "^5.4|^6.0" 1669 | }, 1670 | "suggest": { 1671 | "psr/log-implementation": "To use logging capability in translator", 1672 | "symfony/config": "", 1673 | "symfony/yaml": "" 1674 | }, 1675 | "type": "library", 1676 | "autoload": { 1677 | "files": [ 1678 | "Resources/functions.php" 1679 | ], 1680 | "psr-4": { 1681 | "Symfony\\Component\\Translation\\": "" 1682 | }, 1683 | "exclude-from-classmap": [ 1684 | "/Tests/" 1685 | ] 1686 | }, 1687 | "notification-url": "https://packagist.org/downloads/", 1688 | "license": [ 1689 | "MIT" 1690 | ], 1691 | "authors": [ 1692 | { 1693 | "name": "Fabien Potencier", 1694 | "email": "fabien@symfony.com" 1695 | }, 1696 | { 1697 | "name": "Symfony Community", 1698 | "homepage": "https://symfony.com/contributors" 1699 | } 1700 | ], 1701 | "description": "Provides tools to internationalize your application", 1702 | "homepage": "https://symfony.com", 1703 | "support": { 1704 | "source": "https://github.com/symfony/translation/tree/v6.0.3" 1705 | }, 1706 | "funding": [ 1707 | { 1708 | "url": "https://symfony.com/sponsor", 1709 | "type": "custom" 1710 | }, 1711 | { 1712 | "url": "https://github.com/fabpot", 1713 | "type": "github" 1714 | }, 1715 | { 1716 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 1717 | "type": "tidelift" 1718 | } 1719 | ], 1720 | "time": "2022-01-07T00:29:03+00:00" 1721 | }, 1722 | { 1723 | "name": "symfony/translation-contracts", 1724 | "version": "v3.0.0", 1725 | "source": { 1726 | "type": "git", 1727 | "url": "https://github.com/symfony/translation-contracts.git", 1728 | "reference": "1b6ea5a7442af5a12dba3dbd6d71034b5b234e77" 1729 | }, 1730 | "dist": { 1731 | "type": "zip", 1732 | "url": "https://api.github.com/repos/symfony/translation-contracts/zipball/1b6ea5a7442af5a12dba3dbd6d71034b5b234e77", 1733 | "reference": "1b6ea5a7442af5a12dba3dbd6d71034b5b234e77", 1734 | "shasum": "" 1735 | }, 1736 | "require": { 1737 | "php": ">=8.0.2" 1738 | }, 1739 | "suggest": { 1740 | "symfony/translation-implementation": "" 1741 | }, 1742 | "type": "library", 1743 | "extra": { 1744 | "branch-alias": { 1745 | "dev-main": "3.0-dev" 1746 | }, 1747 | "thanks": { 1748 | "name": "symfony/contracts", 1749 | "url": "https://github.com/symfony/contracts" 1750 | } 1751 | }, 1752 | "autoload": { 1753 | "psr-4": { 1754 | "Symfony\\Contracts\\Translation\\": "" 1755 | } 1756 | }, 1757 | "notification-url": "https://packagist.org/downloads/", 1758 | "license": [ 1759 | "MIT" 1760 | ], 1761 | "authors": [ 1762 | { 1763 | "name": "Nicolas Grekas", 1764 | "email": "p@tchwork.com" 1765 | }, 1766 | { 1767 | "name": "Symfony Community", 1768 | "homepage": "https://symfony.com/contributors" 1769 | } 1770 | ], 1771 | "description": "Generic abstractions related to translation", 1772 | "homepage": "https://symfony.com", 1773 | "keywords": [ 1774 | "abstractions", 1775 | "contracts", 1776 | "decoupling", 1777 | "interfaces", 1778 | "interoperability", 1779 | "standards" 1780 | ], 1781 | "support": { 1782 | "source": "https://github.com/symfony/translation-contracts/tree/v3.0.0" 1783 | }, 1784 | "funding": [ 1785 | { 1786 | "url": "https://symfony.com/sponsor", 1787 | "type": "custom" 1788 | }, 1789 | { 1790 | "url": "https://github.com/fabpot", 1791 | "type": "github" 1792 | }, 1793 | { 1794 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 1795 | "type": "tidelift" 1796 | } 1797 | ], 1798 | "time": "2021-09-07T12:43:40+00:00" 1799 | }, 1800 | { 1801 | "name": "voku/portable-ascii", 1802 | "version": "2.0.0", 1803 | "source": { 1804 | "type": "git", 1805 | "url": "https://github.com/voku/portable-ascii.git", 1806 | "reference": "9bd89e83cecdf8c37b64909454249eaed98b2c89" 1807 | }, 1808 | "dist": { 1809 | "type": "zip", 1810 | "url": "https://api.github.com/repos/voku/portable-ascii/zipball/9bd89e83cecdf8c37b64909454249eaed98b2c89", 1811 | "reference": "9bd89e83cecdf8c37b64909454249eaed98b2c89", 1812 | "shasum": "" 1813 | }, 1814 | "require": { 1815 | "php": ">=7.0.0" 1816 | }, 1817 | "require-dev": { 1818 | "phpunit/phpunit": "~6.0 || ~7.0 || ~9.0" 1819 | }, 1820 | "suggest": { 1821 | "ext-intl": "Use Intl for transliterator_transliterate() support" 1822 | }, 1823 | "type": "library", 1824 | "autoload": { 1825 | "psr-4": { 1826 | "voku\\": "src/voku/" 1827 | } 1828 | }, 1829 | "notification-url": "https://packagist.org/downloads/", 1830 | "license": [ 1831 | "MIT" 1832 | ], 1833 | "authors": [ 1834 | { 1835 | "name": "Lars Moelleken", 1836 | "homepage": "http://www.moelleken.org/" 1837 | } 1838 | ], 1839 | "description": "Portable ASCII library - performance optimized (ascii) string functions for php.", 1840 | "homepage": "https://github.com/voku/portable-ascii", 1841 | "keywords": [ 1842 | "ascii", 1843 | "clean", 1844 | "php" 1845 | ], 1846 | "support": { 1847 | "issues": "https://github.com/voku/portable-ascii/issues", 1848 | "source": "https://github.com/voku/portable-ascii/tree/2.0.0" 1849 | }, 1850 | "funding": [ 1851 | { 1852 | "url": "https://www.paypal.me/moelleken", 1853 | "type": "custom" 1854 | }, 1855 | { 1856 | "url": "https://github.com/voku", 1857 | "type": "github" 1858 | }, 1859 | { 1860 | "url": "https://opencollective.com/portable-ascii", 1861 | "type": "open_collective" 1862 | }, 1863 | { 1864 | "url": "https://www.patreon.com/voku", 1865 | "type": "patreon" 1866 | }, 1867 | { 1868 | "url": "https://tidelift.com/funding/github/packagist/voku/portable-ascii", 1869 | "type": "tidelift" 1870 | } 1871 | ], 1872 | "time": "2022-01-24T18:59:03+00:00" 1873 | } 1874 | ], 1875 | "packages-dev": [], 1876 | "aliases": [], 1877 | "minimum-stability": "stable", 1878 | "stability-flags": [], 1879 | "prefer-stable": false, 1880 | "prefer-lowest": false, 1881 | "platform": { 1882 | "php": ">=5.4.0" 1883 | }, 1884 | "platform-dev": [], 1885 | "plugin-api-version": "2.2.0" 1886 | } 1887 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 15 | ./tests/ 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/Prettus/Validator/AbstractValidator.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | abstract class AbstractValidator implements ValidatorInterface 13 | { 14 | /** 15 | * @var int 16 | */ 17 | protected $id = null; 18 | 19 | /** 20 | * Validator 21 | * 22 | * @var object 23 | */ 24 | protected $validator; 25 | 26 | /** 27 | * Data to be validated 28 | * 29 | * @var array 30 | */ 31 | protected $data = array(); 32 | 33 | /** 34 | * Validation Rules 35 | * 36 | * @var array 37 | */ 38 | protected $rules = array(); 39 | 40 | /** 41 | * Validation Custom Messages 42 | * 43 | * @var array 44 | */ 45 | protected $messages = array(); 46 | 47 | /** 48 | * Validation Custom Attributes 49 | * 50 | * @var array 51 | */ 52 | protected $attributes = array(); 53 | 54 | /** 55 | * Validation errors 56 | * 57 | * @var MessageBag 58 | */ 59 | protected $errors = array(); 60 | 61 | 62 | /** 63 | * Set Id 64 | * 65 | * @param $id 66 | * @return $this 67 | */ 68 | public function setId($id) 69 | { 70 | $this->id = $id; 71 | return $this; 72 | } 73 | 74 | /** 75 | * Set data to validate 76 | * 77 | * @param array $data 78 | * @return $this 79 | */ 80 | public function with(array $data) 81 | { 82 | $this->data = $data; 83 | 84 | return $this; 85 | } 86 | 87 | /** 88 | * Return errors 89 | * 90 | * @return array 91 | */ 92 | public function errors() 93 | { 94 | return $this->errorsBag()->all(); 95 | } 96 | 97 | /** 98 | * Errors 99 | * 100 | * @return MessageBag 101 | */ 102 | public function errorsBag() 103 | { 104 | return $this->errors; 105 | } 106 | 107 | /** 108 | * Pass the data and the rules to the validator 109 | * 110 | * @param string $action 111 | * @return boolean 112 | */ 113 | abstract public function passes($action = null); 114 | 115 | /** 116 | * Pass the data and the rules to the validator or throws ValidatorException 117 | * 118 | * @throws ValidatorException 119 | * @param string $action 120 | * @return boolean 121 | */ 122 | public function passesOrFail($action = null) 123 | { 124 | if (!$this->passes($action)) { 125 | throw new ValidatorException($this->errorsBag()); 126 | } 127 | 128 | return true; 129 | } 130 | 131 | /** 132 | * Get rule for validation by action ValidatorInterface::RULE_CREATE or ValidatorInterface::RULE_UPDATE 133 | * 134 | * Default rule: ValidatorInterface::RULE_CREATE 135 | * 136 | * @param null $action 137 | * @return array 138 | */ 139 | public function getRules($action = null) 140 | { 141 | $rules = $this->rules; 142 | 143 | if (isset($this->rules[$action])) { 144 | $rules = $this->rules[$action]; 145 | } 146 | 147 | return $this->parserValidationRules($rules, $this->id); 148 | } 149 | 150 | /** 151 | * Set Rules for Validation 152 | * 153 | * @param array $rules 154 | * @return $this 155 | */ 156 | public function setRules(array $rules) 157 | { 158 | $this->rules = $rules; 159 | return $this; 160 | } 161 | 162 | /** 163 | * Get Custom error messages for validation 164 | * 165 | * @return array 166 | */ 167 | public function getMessages() 168 | { 169 | return $this->messages; 170 | } 171 | 172 | /** 173 | * Set Custom error messages for Validation 174 | * 175 | * @param array $messages 176 | * @return $this 177 | */ 178 | public function setMessages(array $messages) 179 | { 180 | $this->messages = $messages; 181 | return $this; 182 | } 183 | 184 | /** 185 | * Get Custom error attributes for validation 186 | * 187 | * @return array 188 | */ 189 | public function getAttributes() 190 | { 191 | return $this->attributes; 192 | } 193 | 194 | /** 195 | * Set Custom error attributes for Validation 196 | * 197 | * @param array $attributes 198 | * @return $this 199 | */ 200 | public function setAttributes(array $attributes) 201 | { 202 | $this->attributes = $attributes; 203 | return $this; 204 | } 205 | 206 | /** 207 | * Parser Validation Rules 208 | * 209 | * @param $rules 210 | * @param null $id 211 | * @return array 212 | */ 213 | protected function parserValidationRules($rules, $id = null) 214 | { 215 | if (null === $id) { 216 | return $rules; 217 | } 218 | 219 | array_walk($rules, function (&$rules, $field) use ($id) { 220 | if (!is_array($rules)) { 221 | $rules = explode("|", $rules); 222 | } 223 | 224 | foreach ($rules as $ruleIdx => $rule) { 225 | // get name and parameters 226 | @list($name, $params) = array_pad(explode(":", $rule), 2, null); 227 | 228 | // only do someting for the unique rule 229 | if (strtolower($name) != "unique") { 230 | continue; // continue in foreach loop, nothing left to do here 231 | } 232 | 233 | $p = array_map("trim", explode(",", $params)); 234 | 235 | // set field name to rules key ($field) (laravel convention) 236 | if (!isset($p[1])) { 237 | $p[1] = $field; 238 | } 239 | 240 | // set 3rd parameter to id given to getValidationRules() 241 | $p[2] = $id; 242 | 243 | $params = implode(",", $p); 244 | $rules[$ruleIdx] = $name.":".$params; 245 | } 246 | }); 247 | 248 | return $rules; 249 | } 250 | } 251 | -------------------------------------------------------------------------------- /src/Prettus/Validator/Contracts/ValidatorInterface.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | interface ValidatorInterface 12 | { 13 | const RULE_CREATE = 'create'; 14 | const RULE_UPDATE = 'update'; 15 | 16 | /** 17 | * Set Id 18 | * 19 | * @param $id 20 | * @return $this 21 | */ 22 | public function setId($id); 23 | 24 | /** 25 | * With 26 | * 27 | * @param array 28 | * @return $this 29 | */ 30 | public function with(array $input); 31 | 32 | /** 33 | * Pass the data and the rules to the validator 34 | * 35 | * @param string $action 36 | * @return boolean 37 | */ 38 | public function passes($action = null); 39 | 40 | /** 41 | * Pass the data and the rules to the validator or throws ValidatorException 42 | * 43 | * @throws ValidatorException 44 | * @param string $action 45 | * @return boolean 46 | */ 47 | public function passesOrFail($action = null); 48 | 49 | /** 50 | * Errors 51 | * 52 | * @return array 53 | */ 54 | public function errors(); 55 | 56 | /** 57 | * Errors 58 | * 59 | * @return MessageBag 60 | */ 61 | public function errorsBag(); 62 | 63 | /** 64 | * Set Rules for Validation 65 | * 66 | * @param array $rules 67 | * @return $this 68 | */ 69 | public function setRules(array $rules); 70 | 71 | /** 72 | * Get rule for validation by action ValidatorInterface::RULE_CREATE or ValidatorInterface::RULE_UPDATE 73 | * 74 | * Default rule: ValidatorInterface::RULE_CREATE 75 | * 76 | * @param $action 77 | * @return array 78 | */ 79 | public function getRules($action = null); 80 | } 81 | -------------------------------------------------------------------------------- /src/Prettus/Validator/Exceptions/ValidatorException.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class ValidatorException extends \Exception implements Jsonable, Arrayable 13 | { 14 | /** 15 | * @var MessageBag 16 | */ 17 | protected $messageBag; 18 | 19 | /** 20 | * @param MessageBag $messageBag 21 | */ 22 | public function __construct(MessageBag $messageBag) 23 | { 24 | $this->messageBag = $messageBag; 25 | } 26 | 27 | /** 28 | * @return MessageBag 29 | */ 30 | public function getMessageBag() 31 | { 32 | return $this->messageBag; 33 | } 34 | 35 | /** 36 | * Get the instance as an array. 37 | * 38 | * @return array 39 | */ 40 | public function toArray() 41 | { 42 | return [ 43 | 'error'=>'validation_exception', 44 | 'error_description'=>$this->getMessageBag() 45 | ]; 46 | } 47 | 48 | /** 49 | * Convert the object to its JSON representation. 50 | * 51 | * @param int $options 52 | * @return string 53 | */ 54 | public function toJson($options = 0) 55 | { 56 | return json_encode($this->toArray(), $options); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/Prettus/Validator/LaravelValidator.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | class LaravelValidator extends AbstractValidator 11 | { 12 | /** 13 | * Validator 14 | * 15 | * @var \Illuminate\Validation\Factory 16 | */ 17 | protected $validator; 18 | 19 | /** 20 | * Construct 21 | * 22 | * @param \Illuminate\Contracts\Validation\Factory $validator 23 | */ 24 | public function __construct(Factory $validator) 25 | { 26 | $this->validator = $validator; 27 | } 28 | 29 | /** 30 | * Pass the data and the rules to the validator 31 | * 32 | * @param string $action 33 | * @return bool 34 | */ 35 | public function passes($action = null) 36 | { 37 | $rules = $this->getRules($action); 38 | $messages = $this->getMessages(); 39 | $attributes = $this->getAttributes(); 40 | $validator = $this->validator->make($this->data, $rules, $messages, $attributes); 41 | 42 | if ($validator->fails()) { 43 | $this->errors = $validator->messages(); 44 | return false; 45 | } 46 | 47 | return true; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /tests/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andersao/laravel-validator/fc6ecaaedb482767592eba2a4178792437c86bda/tests/.gitkeep --------------------------------------------------------------------------------