├── .editorconfig ├── .gitignore ├── .travis.yml ├── CHANGELOG.md ├── CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE.md ├── README.md ├── composer.json ├── composer.lock ├── phpunit.xml ├── resources ├── config │ └── img-attacher.php └── database │ └── migrations │ └── 2016_01_12_000000_create_attacher_images_table.php ├── src ├── AttacherManager.php ├── Contracts │ ├── AttacherImageContract.php │ ├── FileManagerContract.php │ ├── FilePathManagerContract.php │ └── ImageProcessorContract.php ├── Managers │ ├── AbstractFilePathManager.php │ ├── FileManager.php │ └── FilePathManager.php ├── Models │ ├── AbstractAttacherImage.php │ └── AttacherImage.php ├── Processors │ ├── AbstractImageProcessor.php │ └── ImageProcessor.php ├── Providers │ └── ImgAttacherServiceProvider.php └── Traits │ └── HasImage.php └── tests ├── AbstractTestCase.php ├── Functionality ├── FilePathManagerTest.php └── HasImageTraitTest.php ├── Usage ├── AttacherManagerTest.php └── PackageTest.php └── stubs ├── database ├── migrations │ ├── 2014_10_12_000000_create_users_table.php │ ├── 2014_10_12_100000_create_password_resets_table.php │ └── 2016_01_12_000000_create_attacher_images_table.php └── seeds │ └── UsersTableSeeder.php ├── files ├── laravel.png └── php.png └── models └── User.php /.editorconfig: -------------------------------------------------------------------------------- 1 | ; This file is for unifying the coding style for different editors and IDEs. 2 | ; More information at http://editorconfig.org 3 | 4 | root = true 5 | 6 | [*] 7 | charset = utf-8 8 | indent_size = 4 9 | indent_style = space 10 | end_of_line = lf 11 | insert_final_newline = true 12 | trim_trailing_whitespace = true 13 | 14 | [*.md] 15 | trim_trailing_whitespace = false 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | vendor 2 | .idea -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | 3 | php: 4 | - 5.5 5 | - 5.6 6 | - 7.0 7 | 8 | before_script: 9 | - travis_retry composer self-update 10 | - travis_retry composer install --prefer-source --no-interaction --dev 11 | 12 | script: phpunit 13 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All Notable changes to `Image Attacher` will be documented in this file 4 | 5 | ## NEXT - YYYY-MM-DD 6 | 7 | ### Added 8 | - Nothing 9 | 10 | ### Deprecated 11 | - Nothing 12 | 13 | ### Fixed 14 | - Nothing 15 | 16 | ### Removed 17 | - Nothing 18 | 19 | ### Security 20 | - Nothing 21 | -------------------------------------------------------------------------------- /CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Code of Conduct 2 | 3 | As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities. 4 | 5 | We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality. 6 | 7 | Examples of unacceptable behavior by participants include: 8 | 9 | * The use of sexualized language or imagery 10 | * Personal attacks 11 | * Trolling or insulting/derogatory comments 12 | * Public or private harassment 13 | * Publishing other's private information, such as physical or electronic addresses, without explicit permission 14 | * Other unethical or unprofessional conduct. 15 | 16 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team. 17 | 18 | This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community in a direct capacity. Personal views, beliefs and values of individuals do not necessarily reflect those of the organisation or affiliated individuals and organisations. 19 | 20 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers. 21 | 22 | This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) 23 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | Contributions are **welcome** and will be fully **credited**. 4 | 5 | We accept contributions via Pull Requests on [Github](https://github.com/CbCaio/Image-Attacher). 6 | 7 | 8 | ## Pull Requests 9 | 10 | - **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date. 11 | 12 | - **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option. 13 | 14 | - **Create feature branches** - Don't ask us to pull from your master branch. 15 | 16 | - **One pull request per feature** - If you want to do more than one thing, send multiple pull requests. 17 | 18 | - **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting. 19 | 20 | **Happy coding**! 21 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | # The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Caio Ceccon Bolognani 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 13 | > all 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 21 | > THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Image Attacher 2 | [![License](https://poser.pugx.org/cbcaio/image-attacher/license)](LICENSE.md) 3 | [![Quality Score][ico-code-quality]][link-code-quality] 4 | [![Build Status][ico-travis]][link-travis] 5 | [![Latest Stable Version](https://poser.pugx.org/cbcaio/image-attacher/v/stable)](link-packagist) 6 | 7 | [![Total Downloads](https://poser.pugx.org/cbcaio/image-attacher/downloads)](link-packagist) 8 | [![Monthly Downloads](https://poser.pugx.org/cbcaio/image-attacher/d/monthly)](link-packagist) 9 | [![Daily Downloads](https://poser.pugx.org/cbcaio/image-attacher/d/daily)](link-packagist) 10 | 11 | This package uses polymorphic relationships to easily attach images to models. Basically you just need to use one of 12 | the package's traits in your model and you are good to go(see Usage). What happens in the background is that the 13 | models are linked to the images by a MorphOne relationship and every time you persist a image 14 | into the associated table the file is written automatically using the selected driver (using [Flysystem]), or updated if 15 | needed. 16 | 17 | ## Install 18 | 19 | ### 1 - Via Composer 20 | 21 | To get started with Image Attacher, add it to your `composer.json` file as a dependency: 22 | 23 | ``` bash 24 | $ composer require cbcaio/image-attacher 25 | ``` 26 | 27 | ### 2 - Provider 28 | 29 | After installing the Image Attacher, register the `CbCaio\ImgAttacher\Providers\ImgAttacherServiceProvider` 30 | in your configuration file (`config/app.php`): 31 | 32 | 'providers' => [ 33 | // Other service providers... 34 | 35 | CbCaio\ImgAttacher\Providers\ImgAttacherServiceProvider::class, 36 | ], 37 | 38 | ### 3 - Configuration 39 | 40 | In order to publish the configuration files run the following command 41 | 42 | ``` bash 43 | $ php artisan vendor:publish 44 | ``` 45 | 46 | This command will create 3 new files: 47 | 48 | 1. `config/img-attacher.php` : this file holds the Image Attacher configurations. 49 | - `path_to_save`: defines where images will be saved, relatively to the driver and local specified in the 50 | `flysystem.php`. This path will be parsed before being used. The :`attribute` references information about the 51 | `attacherImage` model while the :`owner_class` and :`owner_id` are relative to the owner class of 52 | the relationship. These are needed to organize folders and also to certify that the right image will be 53 | deleted. 54 | 55 | IMPORTANT: This path should be exclusively used by the package, do not put other files in the same folder 56 | otherwise they can be deleted by mistake. 57 | 58 | - `processing_styles` and `processing_style_routines`: the 'routine' represents a sequence of 'styles' and its needed 59 | methods. Each 'style' saves a copy of the original image with the modifications specified in its method. They can 60 | be used to save different versions of your original image automatically when you add an image to a model (the 61 | model can can have different 'versions'/'styles' of same image with only one relationship). 62 | - For example, the following code will save the original image and also a 'thumbnail 63 | version' of the same image in their respective parsed `path_to_save` with :`style` substituted by 64 | `original_style` and `thumbnail`: 65 | 66 | ``` 67 | $model->addImage(uploaded_file,'default_routine'); 68 | .... 69 | 'default_routine' => 70 | [ 71 | 'original_style' => function ($image) { 72 | return $image; 73 | }, 74 | 'thumbnail' => function ($image) { 75 | $image->resize(null, 500, function ($constraint) { 76 | $constraint->aspectRatio(); 77 | $constraint->upsize(); 78 | }); 79 | return $image; 80 | }, 81 | ] 82 | ``` 83 | 2. `database/migrations/2016_01_12_000000_create_attacher_images_table` : this is a migration file to create 84 | the table which will hold the reference to your models in the MorthOne relationship and the information about the 85 | images. 86 | 87 | 3. `config/flysystem.php` : this file is relative to the [Flysystem]. How and where your files will be written is 88 | defined here. It is important to say that this package is only tested using the 'local' driver. 89 | 90 | ## Usage 91 | 92 | To start attaching images to your models you just need to use one of the available traits (currently only `hasImage`) in 93 | the model. 94 | 95 | class RandomModel extends Model 96 | { 97 | use hasImage; 98 | } 99 | 100 | ### 1 - Basic of using the hasImage trait 101 | 102 | ##### Adding an image to the model from an uploaded file. 103 | 104 | ```php 105 | $upload = Input::file('image'); 106 | $model->addImage($upload); 107 | // Directly from $request 108 | $model->addImage($request->file('image')); 109 | // With parameters 110 | $model->addImage($request->file('image', 'processing_style_routine','newfilename.jpg')); 111 | ``` 112 | 113 | ##### Retrieving an image from the model. 114 | 115 | ```php 116 | $image = $user->getImage(); 117 | // Path is relative 118 | $image->getPath('original_style); 119 | $image->getPath('thumbnail); 120 | 121 | // Url includes full path 122 | $image->getUrl('original_style); 123 | $image->getUrl('thumbnail); 124 | ``` 125 | ##### Adding another image 126 | ```php 127 | // The same as adding, the package will identify if the model already has an image, delete the previous 128 | images and update the relationship. 129 | $upload = Input::file('image2'); 130 | $model->addImage($upload); 131 | ``` 132 | 133 | ##### Deleting image and all the its styles 134 | ```php 135 | $model->deleteImage(); 136 | ``` 137 | 138 | ## Change log 139 | 140 | Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently. 141 | 142 | ## Contributing 143 | 144 | Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details. 145 | 146 | ## Security 147 | 148 | If you discover any security related issues, please email :author_email instead of using the issue tracker. 149 | 150 | ## Credits 151 | 152 | - [CbCaio][link-author] 153 | - [vinicius73][link-vinicius] 154 | - [All Contributors][link-contributors] 155 | 156 | ## License 157 | 158 | The MIT License (MIT). Please see [License File](LICENSE.md) for more information. 159 | 160 | [ico-travis]: https://travis-ci.org/CbCaio/Image-Attacher.svg?branch=master 161 | [ico-code-quality]: https://scrutinizer-ci.com/g/CbCaio/Image-Attacher/badges/quality-score.png?b=master 162 | 163 | [link-packagist]: https://packagist.org/packages/CbCaio/Image-Attacher 164 | [link-travis]: https://travis-ci.org/CbCaio/Image-Attacher 165 | [link-code-quality]: https://scrutinizer-ci.com/g/CbCaio/Image-Attacher 166 | [link-downloads]: https://packagist.org/packages/CbCaio/Image-Attacher 167 | [link-author]: https://github.com/CbCaio 168 | [link-contributors]: ../../contributors 169 | [Flysystem]: https://github.com/GrahamCampbell/Laravel-Flysystem 170 | [link-vinicius]: https://github.com/vinicius73 171 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cbcaio/image-attacher", 3 | "description": "Add uploaded images to models in an easy-to-use and fast approach. Process and save modified versions of images, like avatar, thumbnail, different sizes, you decide. Write images using flysystem.", 4 | "keywords": [ 5 | "laravel","image","eloquent","attacher","flysystem","image-attacher","upload","thumbnail","avatar" 6 | ], 7 | "license": "MIT", 8 | "authors": [ 9 | { 10 | "name": "Caio C. Bolognani", 11 | "email": "caio.bolognani@gmail.com" 12 | } 13 | ], 14 | "require": { 15 | "illuminate/support": "~5", 16 | "illuminate/database": "~5", 17 | "graham-campbell/flysystem": "~3.3", 18 | "intervention/image": "~2.3" 19 | }, 20 | "require-dev": { 21 | "phpunit/phpunit" : "4.*", 22 | "orchestra/testbench": "~3.1" 23 | }, 24 | "autoload": { 25 | "psr-4": { 26 | "CbCaio\\ImgAttacher\\": "src/" 27 | } 28 | }, 29 | "autoload-dev": { 30 | "psr-4": { 31 | "CbCaio\\ImgAttacher\\Testing\\": "tests/" 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /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#composer-lock-the-lock-file", 5 | "This file is @generated automatically" 6 | ], 7 | "hash": "88706d2e0f998c642fb942836ac1ad13", 8 | "content-hash": "c48994632a359d3b125ac7270b99e96f", 9 | "packages": [ 10 | { 11 | "name": "classpreloader/classpreloader", 12 | "version": "3.0.0", 13 | "source": { 14 | "type": "git", 15 | "url": "https://github.com/ClassPreloader/ClassPreloader.git", 16 | "reference": "9b10b913c2bdf90c3d2e0d726b454fb7f77c552a" 17 | }, 18 | "dist": { 19 | "type": "zip", 20 | "url": "https://api.github.com/repos/ClassPreloader/ClassPreloader/zipball/9b10b913c2bdf90c3d2e0d726b454fb7f77c552a", 21 | "reference": "9b10b913c2bdf90c3d2e0d726b454fb7f77c552a", 22 | "shasum": "" 23 | }, 24 | "require": { 25 | "nikic/php-parser": "^1.0|^2.0", 26 | "php": ">=5.5.9" 27 | }, 28 | "require-dev": { 29 | "phpunit/phpunit": "^4.8|^5.0" 30 | }, 31 | "type": "library", 32 | "extra": { 33 | "branch-alias": { 34 | "dev-master": "3.0-dev" 35 | } 36 | }, 37 | "autoload": { 38 | "psr-4": { 39 | "ClassPreloader\\": "src/" 40 | } 41 | }, 42 | "notification-url": "https://packagist.org/downloads/", 43 | "license": [ 44 | "MIT" 45 | ], 46 | "authors": [ 47 | { 48 | "name": "Michael Dowling", 49 | "email": "mtdowling@gmail.com" 50 | }, 51 | { 52 | "name": "Graham Campbell", 53 | "email": "graham@alt-three.com" 54 | } 55 | ], 56 | "description": "Helps class loading performance by generating a single PHP file containing all of the autoloaded files for a specific use case", 57 | "keywords": [ 58 | "autoload", 59 | "class", 60 | "preload" 61 | ], 62 | "time": "2015-11-09 22:51:51" 63 | }, 64 | { 65 | "name": "dnoegel/php-xdg-base-dir", 66 | "version": "0.1", 67 | "source": { 68 | "type": "git", 69 | "url": "https://github.com/dnoegel/php-xdg-base-dir.git", 70 | "reference": "265b8593498b997dc2d31e75b89f053b5cc9621a" 71 | }, 72 | "dist": { 73 | "type": "zip", 74 | "url": "https://api.github.com/repos/dnoegel/php-xdg-base-dir/zipball/265b8593498b997dc2d31e75b89f053b5cc9621a", 75 | "reference": "265b8593498b997dc2d31e75b89f053b5cc9621a", 76 | "shasum": "" 77 | }, 78 | "require": { 79 | "php": ">=5.3.2" 80 | }, 81 | "require-dev": { 82 | "phpunit/phpunit": "@stable" 83 | }, 84 | "type": "project", 85 | "autoload": { 86 | "psr-4": { 87 | "XdgBaseDir\\": "src/" 88 | } 89 | }, 90 | "notification-url": "https://packagist.org/downloads/", 91 | "license": [ 92 | "MIT" 93 | ], 94 | "description": "implementation of xdg base directory specification for php", 95 | "time": "2014-10-24 07:27:01" 96 | }, 97 | { 98 | "name": "doctrine/inflector", 99 | "version": "v1.1.0", 100 | "source": { 101 | "type": "git", 102 | "url": "https://github.com/doctrine/inflector.git", 103 | "reference": "90b2128806bfde671b6952ab8bea493942c1fdae" 104 | }, 105 | "dist": { 106 | "type": "zip", 107 | "url": "https://api.github.com/repos/doctrine/inflector/zipball/90b2128806bfde671b6952ab8bea493942c1fdae", 108 | "reference": "90b2128806bfde671b6952ab8bea493942c1fdae", 109 | "shasum": "" 110 | }, 111 | "require": { 112 | "php": ">=5.3.2" 113 | }, 114 | "require-dev": { 115 | "phpunit/phpunit": "4.*" 116 | }, 117 | "type": "library", 118 | "extra": { 119 | "branch-alias": { 120 | "dev-master": "1.1.x-dev" 121 | } 122 | }, 123 | "autoload": { 124 | "psr-0": { 125 | "Doctrine\\Common\\Inflector\\": "lib/" 126 | } 127 | }, 128 | "notification-url": "https://packagist.org/downloads/", 129 | "license": [ 130 | "MIT" 131 | ], 132 | "authors": [ 133 | { 134 | "name": "Roman Borschel", 135 | "email": "roman@code-factory.org" 136 | }, 137 | { 138 | "name": "Benjamin Eberlei", 139 | "email": "kontakt@beberlei.de" 140 | }, 141 | { 142 | "name": "Guilherme Blanco", 143 | "email": "guilhermeblanco@gmail.com" 144 | }, 145 | { 146 | "name": "Jonathan Wage", 147 | "email": "jonwage@gmail.com" 148 | }, 149 | { 150 | "name": "Johannes Schmitt", 151 | "email": "schmittjoh@gmail.com" 152 | } 153 | ], 154 | "description": "Common String Manipulations with regard to casing and singular/plural rules.", 155 | "homepage": "http://www.doctrine-project.org", 156 | "keywords": [ 157 | "inflection", 158 | "pluralize", 159 | "singularize", 160 | "string" 161 | ], 162 | "time": "2015-11-06 14:35:42" 163 | }, 164 | { 165 | "name": "graham-campbell/flysystem", 166 | "version": "v3.3.0", 167 | "source": { 168 | "type": "git", 169 | "url": "https://github.com/GrahamCampbell/Laravel-Flysystem.git", 170 | "reference": "b36a2b2a5a136347235ab003cdd21f5d1f0147e3" 171 | }, 172 | "dist": { 173 | "type": "zip", 174 | "url": "https://api.github.com/repos/GrahamCampbell/Laravel-Flysystem/zipball/b36a2b2a5a136347235ab003cdd21f5d1f0147e3", 175 | "reference": "b36a2b2a5a136347235ab003cdd21f5d1f0147e3", 176 | "shasum": "" 177 | }, 178 | "require": { 179 | "graham-campbell/manager": "^2.3", 180 | "illuminate/cache": "5.1.*|5.2.*", 181 | "illuminate/contracts": "5.1.*|5.2.*", 182 | "illuminate/support": "5.1.*|5.2.*", 183 | "league/flysystem": "^1.0", 184 | "php": ">=5.5.9" 185 | }, 186 | "require-dev": { 187 | "graham-campbell/testbench": "^3.1", 188 | "league/flysystem-aws-s3-v3": "^1.0", 189 | "league/flysystem-azure": "^1.0", 190 | "league/flysystem-cached-adapter": "^1.0", 191 | "league/flysystem-copy": "^1.0", 192 | "league/flysystem-dropbox": "^1.0", 193 | "league/flysystem-eventable-filesystem": "^1.0", 194 | "league/flysystem-gridfs": "^1.0", 195 | "league/flysystem-rackspace": "^1.0", 196 | "league/flysystem-sftp": "^1.0", 197 | "league/flysystem-webdav": "^1.0", 198 | "league/flysystem-ziparchive": "^1.0", 199 | "mockery/mockery": "^0.9.4", 200 | "phpunit/phpunit": "^4.8|^5.0" 201 | }, 202 | "suggest": { 203 | "league/flysystem-aws-s3-v3": "AwsS3 adapter support.", 204 | "league/flysystem-azure": "Azure adapter support.", 205 | "league/flysystem-cached-adapter": "Adapter caching support.", 206 | "league/flysystem-copy": "Copy adapter support.", 207 | "league/flysystem-dropbox": "Dropbox adapter support.", 208 | "league/flysystem-eventable-filesystem": "Eventable filesystem support.", 209 | "league/flysystem-gridfs": "GridFS adapter support.", 210 | "league/flysystem-rackspace": "Rackspace adapter support.", 211 | "league/flysystem-replicate-adapter": "Replicate adapter support.", 212 | "league/flysystem-sftp": "Sftp adapter support.", 213 | "league/flysystem-webdav": "WebDav adapter support.", 214 | "league/flysystem-ziparchive": "ZipArchive adapter support." 215 | }, 216 | "type": "library", 217 | "extra": { 218 | "branch-alias": { 219 | "dev-master": "3.3-dev" 220 | } 221 | }, 222 | "autoload": { 223 | "psr-4": { 224 | "GrahamCampbell\\Flysystem\\": "src/" 225 | } 226 | }, 227 | "notification-url": "https://packagist.org/downloads/", 228 | "license": [ 229 | "MIT" 230 | ], 231 | "authors": [ 232 | { 233 | "name": "Graham Campbell", 234 | "email": "graham@alt-three.com" 235 | } 236 | ], 237 | "description": "Flysystem Is A Flysystem Bridge For Laravel 5", 238 | "keywords": [ 239 | "Flysystem", 240 | "Graham Campbell", 241 | "GrahamCampbell", 242 | "Laravel Flysystem", 243 | "Laravel-Flysystem", 244 | "aws", 245 | "dropbox", 246 | "files", 247 | "framework", 248 | "laravel", 249 | "s3" 250 | ], 251 | "time": "2015-11-14 11:54:30" 252 | }, 253 | { 254 | "name": "graham-campbell/manager", 255 | "version": "v2.3.0", 256 | "source": { 257 | "type": "git", 258 | "url": "https://github.com/GrahamCampbell/Laravel-Manager.git", 259 | "reference": "fd643e56c99cc80cd8019be1bbaeb4f4f66ebb8e" 260 | }, 261 | "dist": { 262 | "type": "zip", 263 | "url": "https://api.github.com/repos/GrahamCampbell/Laravel-Manager/zipball/fd643e56c99cc80cd8019be1bbaeb4f4f66ebb8e", 264 | "reference": "fd643e56c99cc80cd8019be1bbaeb4f4f66ebb8e", 265 | "shasum": "" 266 | }, 267 | "require": { 268 | "illuminate/contracts": "5.1.*|5.2.*", 269 | "illuminate/support": "5.1.*|5.2.*", 270 | "php": ">=5.5.9" 271 | }, 272 | "require-dev": { 273 | "graham-campbell/testbench-core": "^1.1", 274 | "mockery/mockery": "^0.9.4", 275 | "phpunit/phpunit": "^4.8|^5.0" 276 | }, 277 | "type": "library", 278 | "extra": { 279 | "branch-alias": { 280 | "dev-master": "2.3-dev" 281 | } 282 | }, 283 | "autoload": { 284 | "psr-4": { 285 | "GrahamCampbell\\Manager\\": "src/" 286 | } 287 | }, 288 | "notification-url": "https://packagist.org/downloads/", 289 | "license": [ 290 | "MIT" 291 | ], 292 | "authors": [ 293 | { 294 | "name": "Graham Campbell", 295 | "email": "graham@alt-three.com" 296 | } 297 | ], 298 | "description": "Manager Provides Some Manager Functionality For Laravel 5", 299 | "keywords": [ 300 | "Graham Campbell", 301 | "GrahamCampbell", 302 | "Laravel Manager", 303 | "Laravel-Manager", 304 | "connector", 305 | "framework", 306 | "interface", 307 | "laravel", 308 | "manager" 309 | ], 310 | "time": "2015-11-14 11:41:39" 311 | }, 312 | { 313 | "name": "guzzlehttp/psr7", 314 | "version": "1.2.1", 315 | "source": { 316 | "type": "git", 317 | "url": "https://github.com/guzzle/psr7.git", 318 | "reference": "4d0bdbe1206df7440219ce14c972aa57cc5e4982" 319 | }, 320 | "dist": { 321 | "type": "zip", 322 | "url": "https://api.github.com/repos/guzzle/psr7/zipball/4d0bdbe1206df7440219ce14c972aa57cc5e4982", 323 | "reference": "4d0bdbe1206df7440219ce14c972aa57cc5e4982", 324 | "shasum": "" 325 | }, 326 | "require": { 327 | "php": ">=5.4.0", 328 | "psr/http-message": "~1.0" 329 | }, 330 | "provide": { 331 | "psr/http-message-implementation": "1.0" 332 | }, 333 | "require-dev": { 334 | "phpunit/phpunit": "~4.0" 335 | }, 336 | "type": "library", 337 | "extra": { 338 | "branch-alias": { 339 | "dev-master": "1.0-dev" 340 | } 341 | }, 342 | "autoload": { 343 | "psr-4": { 344 | "GuzzleHttp\\Psr7\\": "src/" 345 | }, 346 | "files": [ 347 | "src/functions_include.php" 348 | ] 349 | }, 350 | "notification-url": "https://packagist.org/downloads/", 351 | "license": [ 352 | "MIT" 353 | ], 354 | "authors": [ 355 | { 356 | "name": "Michael Dowling", 357 | "email": "mtdowling@gmail.com", 358 | "homepage": "https://github.com/mtdowling" 359 | } 360 | ], 361 | "description": "PSR-7 message implementation", 362 | "keywords": [ 363 | "http", 364 | "message", 365 | "stream", 366 | "uri" 367 | ], 368 | "time": "2015-11-03 01:34:55" 369 | }, 370 | { 371 | "name": "intervention/image", 372 | "version": "2.3.5", 373 | "source": { 374 | "type": "git", 375 | "url": "https://github.com/Intervention/image.git", 376 | "reference": "9f29360b8ab94585cb9e80cf9045abd5b85feb89" 377 | }, 378 | "dist": { 379 | "type": "zip", 380 | "url": "https://api.github.com/repos/Intervention/image/zipball/9f29360b8ab94585cb9e80cf9045abd5b85feb89", 381 | "reference": "9f29360b8ab94585cb9e80cf9045abd5b85feb89", 382 | "shasum": "" 383 | }, 384 | "require": { 385 | "ext-fileinfo": "*", 386 | "guzzlehttp/psr7": "~1.1", 387 | "php": ">=5.4.0" 388 | }, 389 | "require-dev": { 390 | "mockery/mockery": "~0.9.2", 391 | "phpunit/phpunit": "3.*" 392 | }, 393 | "suggest": { 394 | "ext-gd": "to use GD library based image processing.", 395 | "ext-imagick": "to use Imagick based image processing.", 396 | "intervention/imagecache": "Caching extension for the Intervention Image library" 397 | }, 398 | "type": "library", 399 | "extra": { 400 | "branch-alias": { 401 | "dev-master": "2.3-dev" 402 | } 403 | }, 404 | "autoload": { 405 | "psr-4": { 406 | "Intervention\\Image\\": "src/Intervention/Image" 407 | } 408 | }, 409 | "notification-url": "https://packagist.org/downloads/", 410 | "license": [ 411 | "MIT" 412 | ], 413 | "authors": [ 414 | { 415 | "name": "Oliver Vogel", 416 | "email": "oliver@olivervogel.net", 417 | "homepage": "http://olivervogel.net/" 418 | } 419 | ], 420 | "description": "Image handling and manipulation library with support for Laravel integration", 421 | "homepage": "http://image.intervention.io/", 422 | "keywords": [ 423 | "gd", 424 | "image", 425 | "imagick", 426 | "laravel", 427 | "thumbnail", 428 | "watermark" 429 | ], 430 | "time": "2016-01-02 19:15:13" 431 | }, 432 | { 433 | "name": "jakub-onderka/php-console-color", 434 | "version": "0.1", 435 | "source": { 436 | "type": "git", 437 | "url": "https://github.com/JakubOnderka/PHP-Console-Color.git", 438 | "reference": "e0b393dacf7703fc36a4efc3df1435485197e6c1" 439 | }, 440 | "dist": { 441 | "type": "zip", 442 | "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Color/zipball/e0b393dacf7703fc36a4efc3df1435485197e6c1", 443 | "reference": "e0b393dacf7703fc36a4efc3df1435485197e6c1", 444 | "shasum": "" 445 | }, 446 | "require": { 447 | "php": ">=5.3.2" 448 | }, 449 | "require-dev": { 450 | "jakub-onderka/php-code-style": "1.0", 451 | "jakub-onderka/php-parallel-lint": "0.*", 452 | "jakub-onderka/php-var-dump-check": "0.*", 453 | "phpunit/phpunit": "3.7.*", 454 | "squizlabs/php_codesniffer": "1.*" 455 | }, 456 | "type": "library", 457 | "autoload": { 458 | "psr-0": { 459 | "JakubOnderka\\PhpConsoleColor": "src/" 460 | } 461 | }, 462 | "notification-url": "https://packagist.org/downloads/", 463 | "license": [ 464 | "BSD-2-Clause" 465 | ], 466 | "authors": [ 467 | { 468 | "name": "Jakub Onderka", 469 | "email": "jakub.onderka@gmail.com", 470 | "homepage": "http://www.acci.cz" 471 | } 472 | ], 473 | "time": "2014-04-08 15:00:19" 474 | }, 475 | { 476 | "name": "jakub-onderka/php-console-highlighter", 477 | "version": "v0.3.2", 478 | "source": { 479 | "type": "git", 480 | "url": "https://github.com/JakubOnderka/PHP-Console-Highlighter.git", 481 | "reference": "7daa75df45242c8d5b75a22c00a201e7954e4fb5" 482 | }, 483 | "dist": { 484 | "type": "zip", 485 | "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Highlighter/zipball/7daa75df45242c8d5b75a22c00a201e7954e4fb5", 486 | "reference": "7daa75df45242c8d5b75a22c00a201e7954e4fb5", 487 | "shasum": "" 488 | }, 489 | "require": { 490 | "jakub-onderka/php-console-color": "~0.1", 491 | "php": ">=5.3.0" 492 | }, 493 | "require-dev": { 494 | "jakub-onderka/php-code-style": "~1.0", 495 | "jakub-onderka/php-parallel-lint": "~0.5", 496 | "jakub-onderka/php-var-dump-check": "~0.1", 497 | "phpunit/phpunit": "~4.0", 498 | "squizlabs/php_codesniffer": "~1.5" 499 | }, 500 | "type": "library", 501 | "autoload": { 502 | "psr-0": { 503 | "JakubOnderka\\PhpConsoleHighlighter": "src/" 504 | } 505 | }, 506 | "notification-url": "https://packagist.org/downloads/", 507 | "license": [ 508 | "MIT" 509 | ], 510 | "authors": [ 511 | { 512 | "name": "Jakub Onderka", 513 | "email": "acci@acci.cz", 514 | "homepage": "http://www.acci.cz/" 515 | } 516 | ], 517 | "time": "2015-04-20 18:58:01" 518 | }, 519 | { 520 | "name": "jeremeamia/SuperClosure", 521 | "version": "2.2.0", 522 | "source": { 523 | "type": "git", 524 | "url": "https://github.com/jeremeamia/super_closure.git", 525 | "reference": "29a88be2a4846d27c1613aed0c9071dfad7b5938" 526 | }, 527 | "dist": { 528 | "type": "zip", 529 | "url": "https://api.github.com/repos/jeremeamia/super_closure/zipball/29a88be2a4846d27c1613aed0c9071dfad7b5938", 530 | "reference": "29a88be2a4846d27c1613aed0c9071dfad7b5938", 531 | "shasum": "" 532 | }, 533 | "require": { 534 | "nikic/php-parser": "^1.2|^2.0", 535 | "php": ">=5.4", 536 | "symfony/polyfill-php56": "^1.0" 537 | }, 538 | "require-dev": { 539 | "phpunit/phpunit": "^4.0|^5.0" 540 | }, 541 | "type": "library", 542 | "extra": { 543 | "branch-alias": { 544 | "dev-master": "2.2-dev" 545 | } 546 | }, 547 | "autoload": { 548 | "psr-4": { 549 | "SuperClosure\\": "src/" 550 | } 551 | }, 552 | "notification-url": "https://packagist.org/downloads/", 553 | "license": [ 554 | "MIT" 555 | ], 556 | "authors": [ 557 | { 558 | "name": "Jeremy Lindblom", 559 | "email": "jeremeamia@gmail.com", 560 | "homepage": "https://github.com/jeremeamia", 561 | "role": "Developer" 562 | } 563 | ], 564 | "description": "Serialize Closure objects, including their context and binding", 565 | "homepage": "https://github.com/jeremeamia/super_closure", 566 | "keywords": [ 567 | "closure", 568 | "function", 569 | "lambda", 570 | "parser", 571 | "serializable", 572 | "serialize", 573 | "tokenizer" 574 | ], 575 | "time": "2015-12-05 17:17:57" 576 | }, 577 | { 578 | "name": "laravel/framework", 579 | "version": "v5.2.10", 580 | "source": { 581 | "type": "git", 582 | "url": "https://github.com/laravel/framework.git", 583 | "reference": "93dc5b0089eef468157fd7200e575c3861ec59a5" 584 | }, 585 | "dist": { 586 | "type": "zip", 587 | "url": "https://api.github.com/repos/laravel/framework/zipball/93dc5b0089eef468157fd7200e575c3861ec59a5", 588 | "reference": "93dc5b0089eef468157fd7200e575c3861ec59a5", 589 | "shasum": "" 590 | }, 591 | "require": { 592 | "classpreloader/classpreloader": "~3.0", 593 | "doctrine/inflector": "~1.0", 594 | "ext-mbstring": "*", 595 | "ext-openssl": "*", 596 | "jeremeamia/superclosure": "~2.2", 597 | "league/flysystem": "~1.0", 598 | "monolog/monolog": "~1.11", 599 | "mtdowling/cron-expression": "~1.0", 600 | "nesbot/carbon": "~1.20", 601 | "paragonie/random_compat": "~1.1", 602 | "php": ">=5.5.9", 603 | "psy/psysh": "0.6.*", 604 | "swiftmailer/swiftmailer": "~5.1", 605 | "symfony/console": "2.8.*|3.0.*", 606 | "symfony/debug": "2.8.*|3.0.*", 607 | "symfony/finder": "2.8.*|3.0.*", 608 | "symfony/http-foundation": "2.8.*|3.0.*", 609 | "symfony/http-kernel": "2.8.*|3.0.*", 610 | "symfony/polyfill-php56": "~1.0", 611 | "symfony/process": "2.8.*|3.0.*", 612 | "symfony/routing": "2.8.*|3.0.*", 613 | "symfony/translation": "2.8.*|3.0.*", 614 | "symfony/var-dumper": "2.8.*|3.0.*", 615 | "vlucas/phpdotenv": "~2.2" 616 | }, 617 | "replace": { 618 | "illuminate/auth": "self.version", 619 | "illuminate/broadcasting": "self.version", 620 | "illuminate/bus": "self.version", 621 | "illuminate/cache": "self.version", 622 | "illuminate/config": "self.version", 623 | "illuminate/console": "self.version", 624 | "illuminate/container": "self.version", 625 | "illuminate/contracts": "self.version", 626 | "illuminate/cookie": "self.version", 627 | "illuminate/database": "self.version", 628 | "illuminate/encryption": "self.version", 629 | "illuminate/events": "self.version", 630 | "illuminate/exception": "self.version", 631 | "illuminate/filesystem": "self.version", 632 | "illuminate/hashing": "self.version", 633 | "illuminate/http": "self.version", 634 | "illuminate/log": "self.version", 635 | "illuminate/mail": "self.version", 636 | "illuminate/pagination": "self.version", 637 | "illuminate/pipeline": "self.version", 638 | "illuminate/queue": "self.version", 639 | "illuminate/redis": "self.version", 640 | "illuminate/routing": "self.version", 641 | "illuminate/session": "self.version", 642 | "illuminate/support": "self.version", 643 | "illuminate/translation": "self.version", 644 | "illuminate/validation": "self.version", 645 | "illuminate/view": "self.version" 646 | }, 647 | "require-dev": { 648 | "aws/aws-sdk-php": "~3.0", 649 | "mockery/mockery": "~0.9.2", 650 | "pda/pheanstalk": "~3.0", 651 | "phpunit/phpunit": "~4.1", 652 | "predis/predis": "~1.0", 653 | "symfony/css-selector": "2.8.*|3.0.*", 654 | "symfony/dom-crawler": "2.8.*|3.0.*" 655 | }, 656 | "suggest": { 657 | "aws/aws-sdk-php": "Required to use the SQS queue driver and SES mail driver (~3.0).", 658 | "doctrine/dbal": "Required to rename columns and drop SQLite columns (~2.4).", 659 | "fzaninotto/faker": "Required to use the eloquent factory builder (~1.4).", 660 | "guzzlehttp/guzzle": "Required to use the Mailgun and Mandrill mail drivers and the ping methods on schedules (~5.3|~6.0).", 661 | "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (~1.0).", 662 | "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (~1.0).", 663 | "pda/pheanstalk": "Required to use the beanstalk queue driver (~3.0).", 664 | "predis/predis": "Required to use the redis cache and queue drivers (~1.0).", 665 | "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (~2.0).", 666 | "symfony/css-selector": "Required to use some of the crawler integration testing tools (2.8.*|3.0.*).", 667 | "symfony/dom-crawler": "Required to use most of the crawler integration testing tools (2.8.*|3.0.*)." 668 | }, 669 | "type": "library", 670 | "extra": { 671 | "branch-alias": { 672 | "dev-master": "5.2-dev" 673 | } 674 | }, 675 | "autoload": { 676 | "classmap": [ 677 | "src/Illuminate/Queue/IlluminateQueueClosure.php" 678 | ], 679 | "files": [ 680 | "src/Illuminate/Foundation/helpers.php", 681 | "src/Illuminate/Support/helpers.php" 682 | ], 683 | "psr-4": { 684 | "Illuminate\\": "src/Illuminate/" 685 | } 686 | }, 687 | "notification-url": "https://packagist.org/downloads/", 688 | "license": [ 689 | "MIT" 690 | ], 691 | "authors": [ 692 | { 693 | "name": "Taylor Otwell", 694 | "email": "taylorotwell@gmail.com" 695 | } 696 | ], 697 | "description": "The Laravel Framework.", 698 | "homepage": "http://laravel.com", 699 | "keywords": [ 700 | "framework", 701 | "laravel" 702 | ], 703 | "time": "2016-01-13 20:29:10" 704 | }, 705 | { 706 | "name": "league/flysystem", 707 | "version": "1.0.16", 708 | "source": { 709 | "type": "git", 710 | "url": "https://github.com/thephpleague/flysystem.git", 711 | "reference": "183e1a610664baf6dcd6fceda415baf43cbdc031" 712 | }, 713 | "dist": { 714 | "type": "zip", 715 | "url": "https://api.github.com/repos/thephpleague/flysystem/zipball/183e1a610664baf6dcd6fceda415baf43cbdc031", 716 | "reference": "183e1a610664baf6dcd6fceda415baf43cbdc031", 717 | "shasum": "" 718 | }, 719 | "require": { 720 | "php": ">=5.4.0" 721 | }, 722 | "conflict": { 723 | "league/flysystem-sftp": "<1.0.6" 724 | }, 725 | "require-dev": { 726 | "ext-fileinfo": "*", 727 | "mockery/mockery": "~0.9", 728 | "phpspec/phpspec": "^2.2", 729 | "phpspec/prophecy-phpunit": "~1.0", 730 | "phpunit/phpunit": "~4.8" 731 | }, 732 | "suggest": { 733 | "ext-fileinfo": "Required for MimeType", 734 | "league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2", 735 | "league/flysystem-aws-s3-v3": "Allows you to use S3 storage with AWS SDK v3", 736 | "league/flysystem-azure": "Allows you to use Windows Azure Blob storage", 737 | "league/flysystem-cached-adapter": "Flysystem adapter decorator for metadata caching", 738 | "league/flysystem-copy": "Allows you to use Copy.com storage", 739 | "league/flysystem-dropbox": "Allows you to use Dropbox storage", 740 | "league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem", 741 | "league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files", 742 | "league/flysystem-sftp": "Allows you to use SFTP server storage via phpseclib", 743 | "league/flysystem-webdav": "Allows you to use WebDAV storage", 744 | "league/flysystem-ziparchive": "Allows you to use ZipArchive adapter" 745 | }, 746 | "type": "library", 747 | "extra": { 748 | "branch-alias": { 749 | "dev-master": "1.1-dev" 750 | } 751 | }, 752 | "autoload": { 753 | "psr-4": { 754 | "League\\Flysystem\\": "src/" 755 | } 756 | }, 757 | "notification-url": "https://packagist.org/downloads/", 758 | "license": [ 759 | "MIT" 760 | ], 761 | "authors": [ 762 | { 763 | "name": "Frank de Jonge", 764 | "email": "info@frenky.net" 765 | } 766 | ], 767 | "description": "Filesystem abstraction: Many filesystems, one API.", 768 | "keywords": [ 769 | "Cloud Files", 770 | "WebDAV", 771 | "abstraction", 772 | "aws", 773 | "cloud", 774 | "copy.com", 775 | "dropbox", 776 | "file systems", 777 | "files", 778 | "filesystem", 779 | "filesystems", 780 | "ftp", 781 | "rackspace", 782 | "remote", 783 | "s3", 784 | "sftp", 785 | "storage" 786 | ], 787 | "time": "2015-12-19 20:16:43" 788 | }, 789 | { 790 | "name": "monolog/monolog", 791 | "version": "1.17.2", 792 | "source": { 793 | "type": "git", 794 | "url": "https://github.com/Seldaek/monolog.git", 795 | "reference": "bee7f0dc9c3e0b69a6039697533dca1e845c8c24" 796 | }, 797 | "dist": { 798 | "type": "zip", 799 | "url": "https://api.github.com/repos/Seldaek/monolog/zipball/bee7f0dc9c3e0b69a6039697533dca1e845c8c24", 800 | "reference": "bee7f0dc9c3e0b69a6039697533dca1e845c8c24", 801 | "shasum": "" 802 | }, 803 | "require": { 804 | "php": ">=5.3.0", 805 | "psr/log": "~1.0" 806 | }, 807 | "provide": { 808 | "psr/log-implementation": "1.0.0" 809 | }, 810 | "require-dev": { 811 | "aws/aws-sdk-php": "^2.4.9", 812 | "doctrine/couchdb": "~1.0@dev", 813 | "graylog2/gelf-php": "~1.0", 814 | "jakub-onderka/php-parallel-lint": "0.9", 815 | "php-console/php-console": "^3.1.3", 816 | "phpunit/phpunit": "~4.5", 817 | "phpunit/phpunit-mock-objects": "2.3.0", 818 | "raven/raven": "^0.13", 819 | "ruflin/elastica": ">=0.90 <3.0", 820 | "swiftmailer/swiftmailer": "~5.3", 821 | "videlalvaro/php-amqplib": "~2.4" 822 | }, 823 | "suggest": { 824 | "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", 825 | "doctrine/couchdb": "Allow sending log messages to a CouchDB server", 826 | "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", 827 | "ext-mongo": "Allow sending log messages to a MongoDB server", 828 | "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", 829 | "php-console/php-console": "Allow sending log messages to Google Chrome", 830 | "raven/raven": "Allow sending log messages to a Sentry server", 831 | "rollbar/rollbar": "Allow sending log messages to Rollbar", 832 | "ruflin/elastica": "Allow sending log messages to an Elastic Search server", 833 | "videlalvaro/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib" 834 | }, 835 | "type": "library", 836 | "extra": { 837 | "branch-alias": { 838 | "dev-master": "1.16.x-dev" 839 | } 840 | }, 841 | "autoload": { 842 | "psr-4": { 843 | "Monolog\\": "src/Monolog" 844 | } 845 | }, 846 | "notification-url": "https://packagist.org/downloads/", 847 | "license": [ 848 | "MIT" 849 | ], 850 | "authors": [ 851 | { 852 | "name": "Jordi Boggiano", 853 | "email": "j.boggiano@seld.be", 854 | "homepage": "http://seld.be" 855 | } 856 | ], 857 | "description": "Sends your logs to files, sockets, inboxes, databases and various web services", 858 | "homepage": "http://github.com/Seldaek/monolog", 859 | "keywords": [ 860 | "log", 861 | "logging", 862 | "psr-3" 863 | ], 864 | "time": "2015-10-14 12:51:02" 865 | }, 866 | { 867 | "name": "mtdowling/cron-expression", 868 | "version": "v1.0.4", 869 | "source": { 870 | "type": "git", 871 | "url": "https://github.com/mtdowling/cron-expression.git", 872 | "reference": "fd92e883195e5dfa77720b1868cf084b08be4412" 873 | }, 874 | "dist": { 875 | "type": "zip", 876 | "url": "https://api.github.com/repos/mtdowling/cron-expression/zipball/fd92e883195e5dfa77720b1868cf084b08be4412", 877 | "reference": "fd92e883195e5dfa77720b1868cf084b08be4412", 878 | "shasum": "" 879 | }, 880 | "require": { 881 | "php": ">=5.3.2" 882 | }, 883 | "require-dev": { 884 | "phpunit/phpunit": "4.*" 885 | }, 886 | "type": "library", 887 | "autoload": { 888 | "psr-0": { 889 | "Cron": "src/" 890 | } 891 | }, 892 | "notification-url": "https://packagist.org/downloads/", 893 | "license": [ 894 | "MIT" 895 | ], 896 | "authors": [ 897 | { 898 | "name": "Michael Dowling", 899 | "email": "mtdowling@gmail.com", 900 | "homepage": "https://github.com/mtdowling" 901 | } 902 | ], 903 | "description": "CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due", 904 | "keywords": [ 905 | "cron", 906 | "schedule" 907 | ], 908 | "time": "2015-01-11 23:07:46" 909 | }, 910 | { 911 | "name": "nesbot/carbon", 912 | "version": "1.21.0", 913 | "source": { 914 | "type": "git", 915 | "url": "https://github.com/briannesbitt/Carbon.git", 916 | "reference": "7b08ec6f75791e130012f206e3f7b0e76e18e3d7" 917 | }, 918 | "dist": { 919 | "type": "zip", 920 | "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/7b08ec6f75791e130012f206e3f7b0e76e18e3d7", 921 | "reference": "7b08ec6f75791e130012f206e3f7b0e76e18e3d7", 922 | "shasum": "" 923 | }, 924 | "require": { 925 | "php": ">=5.3.0", 926 | "symfony/translation": "~2.6|~3.0" 927 | }, 928 | "require-dev": { 929 | "phpunit/phpunit": "~4.0|~5.0" 930 | }, 931 | "type": "library", 932 | "autoload": { 933 | "psr-4": { 934 | "Carbon\\": "src/Carbon/" 935 | } 936 | }, 937 | "notification-url": "https://packagist.org/downloads/", 938 | "license": [ 939 | "MIT" 940 | ], 941 | "authors": [ 942 | { 943 | "name": "Brian Nesbitt", 944 | "email": "brian@nesbot.com", 945 | "homepage": "http://nesbot.com" 946 | } 947 | ], 948 | "description": "A simple API extension for DateTime.", 949 | "homepage": "http://carbon.nesbot.com", 950 | "keywords": [ 951 | "date", 952 | "datetime", 953 | "time" 954 | ], 955 | "time": "2015-11-04 20:07:17" 956 | }, 957 | { 958 | "name": "nikic/php-parser", 959 | "version": "v2.0.0", 960 | "source": { 961 | "type": "git", 962 | "url": "https://github.com/nikic/PHP-Parser.git", 963 | "reference": "c542e5d86a9775abd1021618eb2430278bfc1e01" 964 | }, 965 | "dist": { 966 | "type": "zip", 967 | "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/c542e5d86a9775abd1021618eb2430278bfc1e01", 968 | "reference": "c542e5d86a9775abd1021618eb2430278bfc1e01", 969 | "shasum": "" 970 | }, 971 | "require": { 972 | "ext-tokenizer": "*", 973 | "php": ">=5.4" 974 | }, 975 | "require-dev": { 976 | "phpunit/phpunit": "~4.0" 977 | }, 978 | "bin": [ 979 | "bin/php-parse" 980 | ], 981 | "type": "library", 982 | "extra": { 983 | "branch-alias": { 984 | "dev-master": "2.0-dev" 985 | } 986 | }, 987 | "autoload": { 988 | "psr-4": { 989 | "PhpParser\\": "lib/PhpParser" 990 | } 991 | }, 992 | "notification-url": "https://packagist.org/downloads/", 993 | "license": [ 994 | "BSD-3-Clause" 995 | ], 996 | "authors": [ 997 | { 998 | "name": "Nikita Popov" 999 | } 1000 | ], 1001 | "description": "A PHP parser written in PHP", 1002 | "keywords": [ 1003 | "parser", 1004 | "php" 1005 | ], 1006 | "time": "2015-12-04 15:28:43" 1007 | }, 1008 | { 1009 | "name": "paragonie/random_compat", 1010 | "version": "1.1.5", 1011 | "source": { 1012 | "type": "git", 1013 | "url": "https://github.com/paragonie/random_compat.git", 1014 | "reference": "dd8998b7c846f6909f4e7a5f67fabebfc412a4f7" 1015 | }, 1016 | "dist": { 1017 | "type": "zip", 1018 | "url": "https://api.github.com/repos/paragonie/random_compat/zipball/dd8998b7c846f6909f4e7a5f67fabebfc412a4f7", 1019 | "reference": "dd8998b7c846f6909f4e7a5f67fabebfc412a4f7", 1020 | "shasum": "" 1021 | }, 1022 | "require": { 1023 | "php": ">=5.2.0" 1024 | }, 1025 | "require-dev": { 1026 | "phpunit/phpunit": "4.*|5.*" 1027 | }, 1028 | "suggest": { 1029 | "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." 1030 | }, 1031 | "type": "library", 1032 | "autoload": { 1033 | "files": [ 1034 | "lib/random.php" 1035 | ] 1036 | }, 1037 | "notification-url": "https://packagist.org/downloads/", 1038 | "license": [ 1039 | "MIT" 1040 | ], 1041 | "authors": [ 1042 | { 1043 | "name": "Paragon Initiative Enterprises", 1044 | "email": "security@paragonie.com", 1045 | "homepage": "https://paragonie.com" 1046 | } 1047 | ], 1048 | "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", 1049 | "keywords": [ 1050 | "csprng", 1051 | "pseudorandom", 1052 | "random" 1053 | ], 1054 | "time": "2016-01-06 13:31:20" 1055 | }, 1056 | { 1057 | "name": "psr/http-message", 1058 | "version": "1.0", 1059 | "source": { 1060 | "type": "git", 1061 | "url": "https://github.com/php-fig/http-message.git", 1062 | "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298" 1063 | }, 1064 | "dist": { 1065 | "type": "zip", 1066 | "url": "https://api.github.com/repos/php-fig/http-message/zipball/85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", 1067 | "reference": "85d63699f0dbedb190bbd4b0d2b9dc707ea4c298", 1068 | "shasum": "" 1069 | }, 1070 | "require": { 1071 | "php": ">=5.3.0" 1072 | }, 1073 | "type": "library", 1074 | "extra": { 1075 | "branch-alias": { 1076 | "dev-master": "1.0.x-dev" 1077 | } 1078 | }, 1079 | "autoload": { 1080 | "psr-4": { 1081 | "Psr\\Http\\Message\\": "src/" 1082 | } 1083 | }, 1084 | "notification-url": "https://packagist.org/downloads/", 1085 | "license": [ 1086 | "MIT" 1087 | ], 1088 | "authors": [ 1089 | { 1090 | "name": "PHP-FIG", 1091 | "homepage": "http://www.php-fig.org/" 1092 | } 1093 | ], 1094 | "description": "Common interface for HTTP messages", 1095 | "keywords": [ 1096 | "http", 1097 | "http-message", 1098 | "psr", 1099 | "psr-7", 1100 | "request", 1101 | "response" 1102 | ], 1103 | "time": "2015-05-04 20:22:00" 1104 | }, 1105 | { 1106 | "name": "psr/log", 1107 | "version": "1.0.0", 1108 | "source": { 1109 | "type": "git", 1110 | "url": "https://github.com/php-fig/log.git", 1111 | "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b" 1112 | }, 1113 | "dist": { 1114 | "type": "zip", 1115 | "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", 1116 | "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b", 1117 | "shasum": "" 1118 | }, 1119 | "type": "library", 1120 | "autoload": { 1121 | "psr-0": { 1122 | "Psr\\Log\\": "" 1123 | } 1124 | }, 1125 | "notification-url": "https://packagist.org/downloads/", 1126 | "license": [ 1127 | "MIT" 1128 | ], 1129 | "authors": [ 1130 | { 1131 | "name": "PHP-FIG", 1132 | "homepage": "http://www.php-fig.org/" 1133 | } 1134 | ], 1135 | "description": "Common interface for logging libraries", 1136 | "keywords": [ 1137 | "log", 1138 | "psr", 1139 | "psr-3" 1140 | ], 1141 | "time": "2012-12-21 11:40:51" 1142 | }, 1143 | { 1144 | "name": "psy/psysh", 1145 | "version": "v0.6.1", 1146 | "source": { 1147 | "type": "git", 1148 | "url": "https://github.com/bobthecow/psysh.git", 1149 | "reference": "0f04df0b23663799a8941fae13cd8e6299bde3ed" 1150 | }, 1151 | "dist": { 1152 | "type": "zip", 1153 | "url": "https://api.github.com/repos/bobthecow/psysh/zipball/0f04df0b23663799a8941fae13cd8e6299bde3ed", 1154 | "reference": "0f04df0b23663799a8941fae13cd8e6299bde3ed", 1155 | "shasum": "" 1156 | }, 1157 | "require": { 1158 | "dnoegel/php-xdg-base-dir": "0.1", 1159 | "jakub-onderka/php-console-highlighter": "0.3.*", 1160 | "nikic/php-parser": "^1.2.1|~2.0", 1161 | "php": ">=5.3.9", 1162 | "symfony/console": "~2.3.10|^2.4.2|~3.0", 1163 | "symfony/var-dumper": "~2.7|~3.0" 1164 | }, 1165 | "require-dev": { 1166 | "fabpot/php-cs-fixer": "~1.5", 1167 | "phpunit/phpunit": "~3.7|~4.0|~5.0", 1168 | "squizlabs/php_codesniffer": "~2.0", 1169 | "symfony/finder": "~2.1|~3.0" 1170 | }, 1171 | "suggest": { 1172 | "ext-pcntl": "Enabling the PCNTL extension makes PsySH a lot happier :)", 1173 | "ext-pdo-sqlite": "The doc command requires SQLite to work.", 1174 | "ext-posix": "If you have PCNTL, you'll want the POSIX extension as well.", 1175 | "ext-readline": "Enables support for arrow-key history navigation, and showing and manipulating command history." 1176 | }, 1177 | "bin": [ 1178 | "bin/psysh" 1179 | ], 1180 | "type": "library", 1181 | "extra": { 1182 | "branch-alias": { 1183 | "dev-develop": "0.7.x-dev" 1184 | } 1185 | }, 1186 | "autoload": { 1187 | "files": [ 1188 | "src/Psy/functions.php" 1189 | ], 1190 | "psr-4": { 1191 | "Psy\\": "src/Psy/" 1192 | } 1193 | }, 1194 | "notification-url": "https://packagist.org/downloads/", 1195 | "license": [ 1196 | "MIT" 1197 | ], 1198 | "authors": [ 1199 | { 1200 | "name": "Justin Hileman", 1201 | "email": "justin@justinhileman.info", 1202 | "homepage": "http://justinhileman.com" 1203 | } 1204 | ], 1205 | "description": "An interactive shell for modern PHP.", 1206 | "homepage": "http://psysh.org", 1207 | "keywords": [ 1208 | "REPL", 1209 | "console", 1210 | "interactive", 1211 | "shell" 1212 | ], 1213 | "time": "2015-11-12 16:18:56" 1214 | }, 1215 | { 1216 | "name": "swiftmailer/swiftmailer", 1217 | "version": "v5.4.1", 1218 | "source": { 1219 | "type": "git", 1220 | "url": "https://github.com/swiftmailer/swiftmailer.git", 1221 | "reference": "0697e6aa65c83edf97bb0f23d8763f94e3f11421" 1222 | }, 1223 | "dist": { 1224 | "type": "zip", 1225 | "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/0697e6aa65c83edf97bb0f23d8763f94e3f11421", 1226 | "reference": "0697e6aa65c83edf97bb0f23d8763f94e3f11421", 1227 | "shasum": "" 1228 | }, 1229 | "require": { 1230 | "php": ">=5.3.3" 1231 | }, 1232 | "require-dev": { 1233 | "mockery/mockery": "~0.9.1,<0.9.4" 1234 | }, 1235 | "type": "library", 1236 | "extra": { 1237 | "branch-alias": { 1238 | "dev-master": "5.4-dev" 1239 | } 1240 | }, 1241 | "autoload": { 1242 | "files": [ 1243 | "lib/swift_required.php" 1244 | ] 1245 | }, 1246 | "notification-url": "https://packagist.org/downloads/", 1247 | "license": [ 1248 | "MIT" 1249 | ], 1250 | "authors": [ 1251 | { 1252 | "name": "Chris Corbyn" 1253 | }, 1254 | { 1255 | "name": "Fabien Potencier", 1256 | "email": "fabien@symfony.com" 1257 | } 1258 | ], 1259 | "description": "Swiftmailer, free feature-rich PHP mailer", 1260 | "homepage": "http://swiftmailer.org", 1261 | "keywords": [ 1262 | "email", 1263 | "mail", 1264 | "mailer" 1265 | ], 1266 | "time": "2015-06-06 14:19:39" 1267 | }, 1268 | { 1269 | "name": "symfony/console", 1270 | "version": "v3.0.1", 1271 | "source": { 1272 | "type": "git", 1273 | "url": "https://github.com/symfony/console.git", 1274 | "reference": "ebcdc507829df915f4ca23067bd59ee4ef61f6c3" 1275 | }, 1276 | "dist": { 1277 | "type": "zip", 1278 | "url": "https://api.github.com/repos/symfony/console/zipball/ebcdc507829df915f4ca23067bd59ee4ef61f6c3", 1279 | "reference": "ebcdc507829df915f4ca23067bd59ee4ef61f6c3", 1280 | "shasum": "" 1281 | }, 1282 | "require": { 1283 | "php": ">=5.5.9", 1284 | "symfony/polyfill-mbstring": "~1.0" 1285 | }, 1286 | "require-dev": { 1287 | "psr/log": "~1.0", 1288 | "symfony/event-dispatcher": "~2.8|~3.0", 1289 | "symfony/process": "~2.8|~3.0" 1290 | }, 1291 | "suggest": { 1292 | "psr/log": "For using the console logger", 1293 | "symfony/event-dispatcher": "", 1294 | "symfony/process": "" 1295 | }, 1296 | "type": "library", 1297 | "extra": { 1298 | "branch-alias": { 1299 | "dev-master": "3.0-dev" 1300 | } 1301 | }, 1302 | "autoload": { 1303 | "psr-4": { 1304 | "Symfony\\Component\\Console\\": "" 1305 | }, 1306 | "exclude-from-classmap": [ 1307 | "/Tests/" 1308 | ] 1309 | }, 1310 | "notification-url": "https://packagist.org/downloads/", 1311 | "license": [ 1312 | "MIT" 1313 | ], 1314 | "authors": [ 1315 | { 1316 | "name": "Fabien Potencier", 1317 | "email": "fabien@symfony.com" 1318 | }, 1319 | { 1320 | "name": "Symfony Community", 1321 | "homepage": "https://symfony.com/contributors" 1322 | } 1323 | ], 1324 | "description": "Symfony Console Component", 1325 | "homepage": "https://symfony.com", 1326 | "time": "2015-12-22 10:39:06" 1327 | }, 1328 | { 1329 | "name": "symfony/debug", 1330 | "version": "v3.0.1", 1331 | "source": { 1332 | "type": "git", 1333 | "url": "https://github.com/symfony/debug.git", 1334 | "reference": "73612266ac709769effdbfc0762e5b07cfd2ac2a" 1335 | }, 1336 | "dist": { 1337 | "type": "zip", 1338 | "url": "https://api.github.com/repos/symfony/debug/zipball/73612266ac709769effdbfc0762e5b07cfd2ac2a", 1339 | "reference": "73612266ac709769effdbfc0762e5b07cfd2ac2a", 1340 | "shasum": "" 1341 | }, 1342 | "require": { 1343 | "php": ">=5.5.9", 1344 | "psr/log": "~1.0" 1345 | }, 1346 | "conflict": { 1347 | "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" 1348 | }, 1349 | "require-dev": { 1350 | "symfony/class-loader": "~2.8|~3.0", 1351 | "symfony/http-kernel": "~2.8|~3.0" 1352 | }, 1353 | "type": "library", 1354 | "extra": { 1355 | "branch-alias": { 1356 | "dev-master": "3.0-dev" 1357 | } 1358 | }, 1359 | "autoload": { 1360 | "psr-4": { 1361 | "Symfony\\Component\\Debug\\": "" 1362 | }, 1363 | "exclude-from-classmap": [ 1364 | "/Tests/" 1365 | ] 1366 | }, 1367 | "notification-url": "https://packagist.org/downloads/", 1368 | "license": [ 1369 | "MIT" 1370 | ], 1371 | "authors": [ 1372 | { 1373 | "name": "Fabien Potencier", 1374 | "email": "fabien@symfony.com" 1375 | }, 1376 | { 1377 | "name": "Symfony Community", 1378 | "homepage": "https://symfony.com/contributors" 1379 | } 1380 | ], 1381 | "description": "Symfony Debug Component", 1382 | "homepage": "https://symfony.com", 1383 | "time": "2015-12-26 13:39:53" 1384 | }, 1385 | { 1386 | "name": "symfony/event-dispatcher", 1387 | "version": "v3.0.1", 1388 | "source": { 1389 | "type": "git", 1390 | "url": "https://github.com/symfony/event-dispatcher.git", 1391 | "reference": "d36355e026905fa5229e1ed7b4e9eda2e67adfcf" 1392 | }, 1393 | "dist": { 1394 | "type": "zip", 1395 | "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/d36355e026905fa5229e1ed7b4e9eda2e67adfcf", 1396 | "reference": "d36355e026905fa5229e1ed7b4e9eda2e67adfcf", 1397 | "shasum": "" 1398 | }, 1399 | "require": { 1400 | "php": ">=5.5.9" 1401 | }, 1402 | "require-dev": { 1403 | "psr/log": "~1.0", 1404 | "symfony/config": "~2.8|~3.0", 1405 | "symfony/dependency-injection": "~2.8|~3.0", 1406 | "symfony/expression-language": "~2.8|~3.0", 1407 | "symfony/stopwatch": "~2.8|~3.0" 1408 | }, 1409 | "suggest": { 1410 | "symfony/dependency-injection": "", 1411 | "symfony/http-kernel": "" 1412 | }, 1413 | "type": "library", 1414 | "extra": { 1415 | "branch-alias": { 1416 | "dev-master": "3.0-dev" 1417 | } 1418 | }, 1419 | "autoload": { 1420 | "psr-4": { 1421 | "Symfony\\Component\\EventDispatcher\\": "" 1422 | }, 1423 | "exclude-from-classmap": [ 1424 | "/Tests/" 1425 | ] 1426 | }, 1427 | "notification-url": "https://packagist.org/downloads/", 1428 | "license": [ 1429 | "MIT" 1430 | ], 1431 | "authors": [ 1432 | { 1433 | "name": "Fabien Potencier", 1434 | "email": "fabien@symfony.com" 1435 | }, 1436 | { 1437 | "name": "Symfony Community", 1438 | "homepage": "https://symfony.com/contributors" 1439 | } 1440 | ], 1441 | "description": "Symfony EventDispatcher Component", 1442 | "homepage": "https://symfony.com", 1443 | "time": "2015-10-30 23:35:59" 1444 | }, 1445 | { 1446 | "name": "symfony/finder", 1447 | "version": "v3.0.1", 1448 | "source": { 1449 | "type": "git", 1450 | "url": "https://github.com/symfony/finder.git", 1451 | "reference": "8617895eb798b6bdb338321ce19453dc113e5675" 1452 | }, 1453 | "dist": { 1454 | "type": "zip", 1455 | "url": "https://api.github.com/repos/symfony/finder/zipball/8617895eb798b6bdb338321ce19453dc113e5675", 1456 | "reference": "8617895eb798b6bdb338321ce19453dc113e5675", 1457 | "shasum": "" 1458 | }, 1459 | "require": { 1460 | "php": ">=5.5.9" 1461 | }, 1462 | "type": "library", 1463 | "extra": { 1464 | "branch-alias": { 1465 | "dev-master": "3.0-dev" 1466 | } 1467 | }, 1468 | "autoload": { 1469 | "psr-4": { 1470 | "Symfony\\Component\\Finder\\": "" 1471 | }, 1472 | "exclude-from-classmap": [ 1473 | "/Tests/" 1474 | ] 1475 | }, 1476 | "notification-url": "https://packagist.org/downloads/", 1477 | "license": [ 1478 | "MIT" 1479 | ], 1480 | "authors": [ 1481 | { 1482 | "name": "Fabien Potencier", 1483 | "email": "fabien@symfony.com" 1484 | }, 1485 | { 1486 | "name": "Symfony Community", 1487 | "homepage": "https://symfony.com/contributors" 1488 | } 1489 | ], 1490 | "description": "Symfony Finder Component", 1491 | "homepage": "https://symfony.com", 1492 | "time": "2015-12-05 11:13:14" 1493 | }, 1494 | { 1495 | "name": "symfony/http-foundation", 1496 | "version": "v3.0.1", 1497 | "source": { 1498 | "type": "git", 1499 | "url": "https://github.com/symfony/http-foundation.git", 1500 | "reference": "939c8c28a5b1e4ab7317bc30c1f9aa881c4b06b5" 1501 | }, 1502 | "dist": { 1503 | "type": "zip", 1504 | "url": "https://api.github.com/repos/symfony/http-foundation/zipball/939c8c28a5b1e4ab7317bc30c1f9aa881c4b06b5", 1505 | "reference": "939c8c28a5b1e4ab7317bc30c1f9aa881c4b06b5", 1506 | "shasum": "" 1507 | }, 1508 | "require": { 1509 | "php": ">=5.5.9" 1510 | }, 1511 | "require-dev": { 1512 | "symfony/expression-language": "~2.8|~3.0" 1513 | }, 1514 | "type": "library", 1515 | "extra": { 1516 | "branch-alias": { 1517 | "dev-master": "3.0-dev" 1518 | } 1519 | }, 1520 | "autoload": { 1521 | "psr-4": { 1522 | "Symfony\\Component\\HttpFoundation\\": "" 1523 | }, 1524 | "exclude-from-classmap": [ 1525 | "/Tests/" 1526 | ] 1527 | }, 1528 | "notification-url": "https://packagist.org/downloads/", 1529 | "license": [ 1530 | "MIT" 1531 | ], 1532 | "authors": [ 1533 | { 1534 | "name": "Fabien Potencier", 1535 | "email": "fabien@symfony.com" 1536 | }, 1537 | { 1538 | "name": "Symfony Community", 1539 | "homepage": "https://symfony.com/contributors" 1540 | } 1541 | ], 1542 | "description": "Symfony HttpFoundation Component", 1543 | "homepage": "https://symfony.com", 1544 | "time": "2015-12-18 15:43:53" 1545 | }, 1546 | { 1547 | "name": "symfony/http-kernel", 1548 | "version": "v3.0.1", 1549 | "source": { 1550 | "type": "git", 1551 | "url": "https://github.com/symfony/http-kernel.git", 1552 | "reference": "f7933e9f19e26e7baba7ec04735b466fedd3a6db" 1553 | }, 1554 | "dist": { 1555 | "type": "zip", 1556 | "url": "https://api.github.com/repos/symfony/http-kernel/zipball/f7933e9f19e26e7baba7ec04735b466fedd3a6db", 1557 | "reference": "f7933e9f19e26e7baba7ec04735b466fedd3a6db", 1558 | "shasum": "" 1559 | }, 1560 | "require": { 1561 | "php": ">=5.5.9", 1562 | "psr/log": "~1.0", 1563 | "symfony/debug": "~2.8|~3.0", 1564 | "symfony/event-dispatcher": "~2.8|~3.0", 1565 | "symfony/http-foundation": "~2.8|~3.0" 1566 | }, 1567 | "conflict": { 1568 | "symfony/config": "<2.8" 1569 | }, 1570 | "require-dev": { 1571 | "symfony/browser-kit": "~2.8|~3.0", 1572 | "symfony/class-loader": "~2.8|~3.0", 1573 | "symfony/config": "~2.8|~3.0", 1574 | "symfony/console": "~2.8|~3.0", 1575 | "symfony/css-selector": "~2.8|~3.0", 1576 | "symfony/dependency-injection": "~2.8|~3.0", 1577 | "symfony/dom-crawler": "~2.8|~3.0", 1578 | "symfony/expression-language": "~2.8|~3.0", 1579 | "symfony/finder": "~2.8|~3.0", 1580 | "symfony/process": "~2.8|~3.0", 1581 | "symfony/routing": "~2.8|~3.0", 1582 | "symfony/stopwatch": "~2.8|~3.0", 1583 | "symfony/templating": "~2.8|~3.0", 1584 | "symfony/translation": "~2.8|~3.0", 1585 | "symfony/var-dumper": "~2.8|~3.0" 1586 | }, 1587 | "suggest": { 1588 | "symfony/browser-kit": "", 1589 | "symfony/class-loader": "", 1590 | "symfony/config": "", 1591 | "symfony/console": "", 1592 | "symfony/dependency-injection": "", 1593 | "symfony/finder": "", 1594 | "symfony/var-dumper": "" 1595 | }, 1596 | "type": "library", 1597 | "extra": { 1598 | "branch-alias": { 1599 | "dev-master": "3.0-dev" 1600 | } 1601 | }, 1602 | "autoload": { 1603 | "psr-4": { 1604 | "Symfony\\Component\\HttpKernel\\": "" 1605 | }, 1606 | "exclude-from-classmap": [ 1607 | "/Tests/" 1608 | ] 1609 | }, 1610 | "notification-url": "https://packagist.org/downloads/", 1611 | "license": [ 1612 | "MIT" 1613 | ], 1614 | "authors": [ 1615 | { 1616 | "name": "Fabien Potencier", 1617 | "email": "fabien@symfony.com" 1618 | }, 1619 | { 1620 | "name": "Symfony Community", 1621 | "homepage": "https://symfony.com/contributors" 1622 | } 1623 | ], 1624 | "description": "Symfony HttpKernel Component", 1625 | "homepage": "https://symfony.com", 1626 | "time": "2015-12-26 16:46:13" 1627 | }, 1628 | { 1629 | "name": "symfony/polyfill-mbstring", 1630 | "version": "v1.0.1", 1631 | "source": { 1632 | "type": "git", 1633 | "url": "https://github.com/symfony/polyfill-mbstring.git", 1634 | "reference": "49ff736bd5d41f45240cec77b44967d76e0c3d25" 1635 | }, 1636 | "dist": { 1637 | "type": "zip", 1638 | "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/49ff736bd5d41f45240cec77b44967d76e0c3d25", 1639 | "reference": "49ff736bd5d41f45240cec77b44967d76e0c3d25", 1640 | "shasum": "" 1641 | }, 1642 | "require": { 1643 | "php": ">=5.3.3" 1644 | }, 1645 | "suggest": { 1646 | "ext-mbstring": "For best performance" 1647 | }, 1648 | "type": "library", 1649 | "extra": { 1650 | "branch-alias": { 1651 | "dev-master": "1.0-dev" 1652 | } 1653 | }, 1654 | "autoload": { 1655 | "psr-4": { 1656 | "Symfony\\Polyfill\\Mbstring\\": "" 1657 | }, 1658 | "files": [ 1659 | "bootstrap.php" 1660 | ] 1661 | }, 1662 | "notification-url": "https://packagist.org/downloads/", 1663 | "license": [ 1664 | "MIT" 1665 | ], 1666 | "authors": [ 1667 | { 1668 | "name": "Nicolas Grekas", 1669 | "email": "p@tchwork.com" 1670 | }, 1671 | { 1672 | "name": "Symfony Community", 1673 | "homepage": "https://symfony.com/contributors" 1674 | } 1675 | ], 1676 | "description": "Symfony polyfill for the Mbstring extension", 1677 | "homepage": "https://symfony.com", 1678 | "keywords": [ 1679 | "compatibility", 1680 | "mbstring", 1681 | "polyfill", 1682 | "portable", 1683 | "shim" 1684 | ], 1685 | "time": "2015-11-20 09:19:13" 1686 | }, 1687 | { 1688 | "name": "symfony/polyfill-php56", 1689 | "version": "v1.0.1", 1690 | "source": { 1691 | "type": "git", 1692 | "url": "https://github.com/symfony/polyfill-php56.git", 1693 | "reference": "e2e77609a9e2328eb370fbb0e0d8b2000ebb488f" 1694 | }, 1695 | "dist": { 1696 | "type": "zip", 1697 | "url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/e2e77609a9e2328eb370fbb0e0d8b2000ebb488f", 1698 | "reference": "e2e77609a9e2328eb370fbb0e0d8b2000ebb488f", 1699 | "shasum": "" 1700 | }, 1701 | "require": { 1702 | "php": ">=5.3.3", 1703 | "symfony/polyfill-util": "~1.0" 1704 | }, 1705 | "type": "library", 1706 | "extra": { 1707 | "branch-alias": { 1708 | "dev-master": "1.0-dev" 1709 | } 1710 | }, 1711 | "autoload": { 1712 | "psr-4": { 1713 | "Symfony\\Polyfill\\Php56\\": "" 1714 | }, 1715 | "files": [ 1716 | "bootstrap.php" 1717 | ] 1718 | }, 1719 | "notification-url": "https://packagist.org/downloads/", 1720 | "license": [ 1721 | "MIT" 1722 | ], 1723 | "authors": [ 1724 | { 1725 | "name": "Nicolas Grekas", 1726 | "email": "p@tchwork.com" 1727 | }, 1728 | { 1729 | "name": "Symfony Community", 1730 | "homepage": "https://symfony.com/contributors" 1731 | } 1732 | ], 1733 | "description": "Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions", 1734 | "homepage": "https://symfony.com", 1735 | "keywords": [ 1736 | "compatibility", 1737 | "polyfill", 1738 | "portable", 1739 | "shim" 1740 | ], 1741 | "time": "2015-12-18 15:10:25" 1742 | }, 1743 | { 1744 | "name": "symfony/polyfill-util", 1745 | "version": "v1.0.1", 1746 | "source": { 1747 | "type": "git", 1748 | "url": "https://github.com/symfony/polyfill-util.git", 1749 | "reference": "4271c55cbc0a77b2641f861b978123e46b3da969" 1750 | }, 1751 | "dist": { 1752 | "type": "zip", 1753 | "url": "https://api.github.com/repos/symfony/polyfill-util/zipball/4271c55cbc0a77b2641f861b978123e46b3da969", 1754 | "reference": "4271c55cbc0a77b2641f861b978123e46b3da969", 1755 | "shasum": "" 1756 | }, 1757 | "require": { 1758 | "php": ">=5.3.3" 1759 | }, 1760 | "type": "library", 1761 | "extra": { 1762 | "branch-alias": { 1763 | "dev-master": "1.0-dev" 1764 | } 1765 | }, 1766 | "autoload": { 1767 | "psr-4": { 1768 | "Symfony\\Polyfill\\Util\\": "" 1769 | } 1770 | }, 1771 | "notification-url": "https://packagist.org/downloads/", 1772 | "license": [ 1773 | "MIT" 1774 | ], 1775 | "authors": [ 1776 | { 1777 | "name": "Nicolas Grekas", 1778 | "email": "p@tchwork.com" 1779 | }, 1780 | { 1781 | "name": "Symfony Community", 1782 | "homepage": "https://symfony.com/contributors" 1783 | } 1784 | ], 1785 | "description": "Symfony utilities for portability of PHP codes", 1786 | "homepage": "https://symfony.com", 1787 | "keywords": [ 1788 | "compat", 1789 | "compatibility", 1790 | "polyfill", 1791 | "shim" 1792 | ], 1793 | "time": "2015-11-04 20:28:58" 1794 | }, 1795 | { 1796 | "name": "symfony/process", 1797 | "version": "v3.0.1", 1798 | "source": { 1799 | "type": "git", 1800 | "url": "https://github.com/symfony/process.git", 1801 | "reference": "f4794f1d00f0746621be3020ffbd8c5e0b217ee3" 1802 | }, 1803 | "dist": { 1804 | "type": "zip", 1805 | "url": "https://api.github.com/repos/symfony/process/zipball/f4794f1d00f0746621be3020ffbd8c5e0b217ee3", 1806 | "reference": "f4794f1d00f0746621be3020ffbd8c5e0b217ee3", 1807 | "shasum": "" 1808 | }, 1809 | "require": { 1810 | "php": ">=5.5.9" 1811 | }, 1812 | "type": "library", 1813 | "extra": { 1814 | "branch-alias": { 1815 | "dev-master": "3.0-dev" 1816 | } 1817 | }, 1818 | "autoload": { 1819 | "psr-4": { 1820 | "Symfony\\Component\\Process\\": "" 1821 | }, 1822 | "exclude-from-classmap": [ 1823 | "/Tests/" 1824 | ] 1825 | }, 1826 | "notification-url": "https://packagist.org/downloads/", 1827 | "license": [ 1828 | "MIT" 1829 | ], 1830 | "authors": [ 1831 | { 1832 | "name": "Fabien Potencier", 1833 | "email": "fabien@symfony.com" 1834 | }, 1835 | { 1836 | "name": "Symfony Community", 1837 | "homepage": "https://symfony.com/contributors" 1838 | } 1839 | ], 1840 | "description": "Symfony Process Component", 1841 | "homepage": "https://symfony.com", 1842 | "time": "2015-12-23 11:04:02" 1843 | }, 1844 | { 1845 | "name": "symfony/routing", 1846 | "version": "v3.0.1", 1847 | "source": { 1848 | "type": "git", 1849 | "url": "https://github.com/symfony/routing.git", 1850 | "reference": "3b1bac52f42cb0f54df1a2dbabd55a1d214e2a59" 1851 | }, 1852 | "dist": { 1853 | "type": "zip", 1854 | "url": "https://api.github.com/repos/symfony/routing/zipball/3b1bac52f42cb0f54df1a2dbabd55a1d214e2a59", 1855 | "reference": "3b1bac52f42cb0f54df1a2dbabd55a1d214e2a59", 1856 | "shasum": "" 1857 | }, 1858 | "require": { 1859 | "php": ">=5.5.9" 1860 | }, 1861 | "conflict": { 1862 | "symfony/config": "<2.8" 1863 | }, 1864 | "require-dev": { 1865 | "doctrine/annotations": "~1.0", 1866 | "doctrine/common": "~2.2", 1867 | "psr/log": "~1.0", 1868 | "symfony/config": "~2.8|~3.0", 1869 | "symfony/expression-language": "~2.8|~3.0", 1870 | "symfony/http-foundation": "~2.8|~3.0", 1871 | "symfony/yaml": "~2.8|~3.0" 1872 | }, 1873 | "suggest": { 1874 | "doctrine/annotations": "For using the annotation loader", 1875 | "symfony/config": "For using the all-in-one router or any loader", 1876 | "symfony/dependency-injection": "For loading routes from a service", 1877 | "symfony/expression-language": "For using expression matching", 1878 | "symfony/yaml": "For using the YAML loader" 1879 | }, 1880 | "type": "library", 1881 | "extra": { 1882 | "branch-alias": { 1883 | "dev-master": "3.0-dev" 1884 | } 1885 | }, 1886 | "autoload": { 1887 | "psr-4": { 1888 | "Symfony\\Component\\Routing\\": "" 1889 | }, 1890 | "exclude-from-classmap": [ 1891 | "/Tests/" 1892 | ] 1893 | }, 1894 | "notification-url": "https://packagist.org/downloads/", 1895 | "license": [ 1896 | "MIT" 1897 | ], 1898 | "authors": [ 1899 | { 1900 | "name": "Fabien Potencier", 1901 | "email": "fabien@symfony.com" 1902 | }, 1903 | { 1904 | "name": "Symfony Community", 1905 | "homepage": "https://symfony.com/contributors" 1906 | } 1907 | ], 1908 | "description": "Symfony Routing Component", 1909 | "homepage": "https://symfony.com", 1910 | "keywords": [ 1911 | "router", 1912 | "routing", 1913 | "uri", 1914 | "url" 1915 | ], 1916 | "time": "2015-12-23 08:00:11" 1917 | }, 1918 | { 1919 | "name": "symfony/translation", 1920 | "version": "v3.0.1", 1921 | "source": { 1922 | "type": "git", 1923 | "url": "https://github.com/symfony/translation.git", 1924 | "reference": "dff0867826a7068d673801b7522f8e2634016ef9" 1925 | }, 1926 | "dist": { 1927 | "type": "zip", 1928 | "url": "https://api.github.com/repos/symfony/translation/zipball/dff0867826a7068d673801b7522f8e2634016ef9", 1929 | "reference": "dff0867826a7068d673801b7522f8e2634016ef9", 1930 | "shasum": "" 1931 | }, 1932 | "require": { 1933 | "php": ">=5.5.9", 1934 | "symfony/polyfill-mbstring": "~1.0" 1935 | }, 1936 | "conflict": { 1937 | "symfony/config": "<2.8" 1938 | }, 1939 | "require-dev": { 1940 | "psr/log": "~1.0", 1941 | "symfony/config": "~2.8|~3.0", 1942 | "symfony/intl": "~2.8|~3.0", 1943 | "symfony/yaml": "~2.8|~3.0" 1944 | }, 1945 | "suggest": { 1946 | "psr/log": "To use logging capability in translator", 1947 | "symfony/config": "", 1948 | "symfony/yaml": "" 1949 | }, 1950 | "type": "library", 1951 | "extra": { 1952 | "branch-alias": { 1953 | "dev-master": "3.0-dev" 1954 | } 1955 | }, 1956 | "autoload": { 1957 | "psr-4": { 1958 | "Symfony\\Component\\Translation\\": "" 1959 | }, 1960 | "exclude-from-classmap": [ 1961 | "/Tests/" 1962 | ] 1963 | }, 1964 | "notification-url": "https://packagist.org/downloads/", 1965 | "license": [ 1966 | "MIT" 1967 | ], 1968 | "authors": [ 1969 | { 1970 | "name": "Fabien Potencier", 1971 | "email": "fabien@symfony.com" 1972 | }, 1973 | { 1974 | "name": "Symfony Community", 1975 | "homepage": "https://symfony.com/contributors" 1976 | } 1977 | ], 1978 | "description": "Symfony Translation Component", 1979 | "homepage": "https://symfony.com", 1980 | "time": "2015-12-05 17:45:07" 1981 | }, 1982 | { 1983 | "name": "symfony/var-dumper", 1984 | "version": "v3.0.1", 1985 | "source": { 1986 | "type": "git", 1987 | "url": "https://github.com/symfony/var-dumper.git", 1988 | "reference": "87db8700deb12ba2b65e858f656a1f885530bcb0" 1989 | }, 1990 | "dist": { 1991 | "type": "zip", 1992 | "url": "https://api.github.com/repos/symfony/var-dumper/zipball/87db8700deb12ba2b65e858f656a1f885530bcb0", 1993 | "reference": "87db8700deb12ba2b65e858f656a1f885530bcb0", 1994 | "shasum": "" 1995 | }, 1996 | "require": { 1997 | "php": ">=5.5.9", 1998 | "symfony/polyfill-mbstring": "~1.0" 1999 | }, 2000 | "require-dev": { 2001 | "twig/twig": "~1.20|~2.0" 2002 | }, 2003 | "suggest": { 2004 | "ext-symfony_debug": "" 2005 | }, 2006 | "type": "library", 2007 | "extra": { 2008 | "branch-alias": { 2009 | "dev-master": "3.0-dev" 2010 | } 2011 | }, 2012 | "autoload": { 2013 | "files": [ 2014 | "Resources/functions/dump.php" 2015 | ], 2016 | "psr-4": { 2017 | "Symfony\\Component\\VarDumper\\": "" 2018 | }, 2019 | "exclude-from-classmap": [ 2020 | "/Tests/" 2021 | ] 2022 | }, 2023 | "notification-url": "https://packagist.org/downloads/", 2024 | "license": [ 2025 | "MIT" 2026 | ], 2027 | "authors": [ 2028 | { 2029 | "name": "Nicolas Grekas", 2030 | "email": "p@tchwork.com" 2031 | }, 2032 | { 2033 | "name": "Symfony Community", 2034 | "homepage": "https://symfony.com/contributors" 2035 | } 2036 | ], 2037 | "description": "Symfony mechanism for exploring and dumping PHP variables", 2038 | "homepage": "https://symfony.com", 2039 | "keywords": [ 2040 | "debug", 2041 | "dump" 2042 | ], 2043 | "time": "2015-12-05 11:13:14" 2044 | }, 2045 | { 2046 | "name": "vlucas/phpdotenv", 2047 | "version": "v2.2.0", 2048 | "source": { 2049 | "type": "git", 2050 | "url": "https://github.com/vlucas/phpdotenv.git", 2051 | "reference": "9caf304153dc2288e4970caec6f1f3b3bc205412" 2052 | }, 2053 | "dist": { 2054 | "type": "zip", 2055 | "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/9caf304153dc2288e4970caec6f1f3b3bc205412", 2056 | "reference": "9caf304153dc2288e4970caec6f1f3b3bc205412", 2057 | "shasum": "" 2058 | }, 2059 | "require": { 2060 | "php": ">=5.3.9" 2061 | }, 2062 | "require-dev": { 2063 | "phpunit/phpunit": "^4.8|^5.0" 2064 | }, 2065 | "type": "library", 2066 | "extra": { 2067 | "branch-alias": { 2068 | "dev-master": "2.2-dev" 2069 | } 2070 | }, 2071 | "autoload": { 2072 | "psr-4": { 2073 | "Dotenv\\": "src/" 2074 | } 2075 | }, 2076 | "notification-url": "https://packagist.org/downloads/", 2077 | "license": [ 2078 | "BSD" 2079 | ], 2080 | "authors": [ 2081 | { 2082 | "name": "Vance Lucas", 2083 | "email": "vance@vancelucas.com", 2084 | "homepage": "http://www.vancelucas.com" 2085 | } 2086 | ], 2087 | "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", 2088 | "homepage": "http://github.com/vlucas/phpdotenv", 2089 | "keywords": [ 2090 | "dotenv", 2091 | "env", 2092 | "environment" 2093 | ], 2094 | "time": "2015-12-29 15:10:30" 2095 | } 2096 | ], 2097 | "packages-dev": [ 2098 | { 2099 | "name": "doctrine/instantiator", 2100 | "version": "1.0.5", 2101 | "source": { 2102 | "type": "git", 2103 | "url": "https://github.com/doctrine/instantiator.git", 2104 | "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" 2105 | }, 2106 | "dist": { 2107 | "type": "zip", 2108 | "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", 2109 | "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", 2110 | "shasum": "" 2111 | }, 2112 | "require": { 2113 | "php": ">=5.3,<8.0-DEV" 2114 | }, 2115 | "require-dev": { 2116 | "athletic/athletic": "~0.1.8", 2117 | "ext-pdo": "*", 2118 | "ext-phar": "*", 2119 | "phpunit/phpunit": "~4.0", 2120 | "squizlabs/php_codesniffer": "~2.0" 2121 | }, 2122 | "type": "library", 2123 | "extra": { 2124 | "branch-alias": { 2125 | "dev-master": "1.0.x-dev" 2126 | } 2127 | }, 2128 | "autoload": { 2129 | "psr-4": { 2130 | "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" 2131 | } 2132 | }, 2133 | "notification-url": "https://packagist.org/downloads/", 2134 | "license": [ 2135 | "MIT" 2136 | ], 2137 | "authors": [ 2138 | { 2139 | "name": "Marco Pivetta", 2140 | "email": "ocramius@gmail.com", 2141 | "homepage": "http://ocramius.github.com/" 2142 | } 2143 | ], 2144 | "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", 2145 | "homepage": "https://github.com/doctrine/instantiator", 2146 | "keywords": [ 2147 | "constructor", 2148 | "instantiate" 2149 | ], 2150 | "time": "2015-06-14 21:17:01" 2151 | }, 2152 | { 2153 | "name": "fzaninotto/faker", 2154 | "version": "v1.5.0", 2155 | "source": { 2156 | "type": "git", 2157 | "url": "https://github.com/fzaninotto/Faker.git", 2158 | "reference": "d0190b156bcca848d401fb80f31f504f37141c8d" 2159 | }, 2160 | "dist": { 2161 | "type": "zip", 2162 | "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/d0190b156bcca848d401fb80f31f504f37141c8d", 2163 | "reference": "d0190b156bcca848d401fb80f31f504f37141c8d", 2164 | "shasum": "" 2165 | }, 2166 | "require": { 2167 | "php": ">=5.3.3" 2168 | }, 2169 | "require-dev": { 2170 | "phpunit/phpunit": "~4.0", 2171 | "squizlabs/php_codesniffer": "~1.5" 2172 | }, 2173 | "suggest": { 2174 | "ext-intl": "*" 2175 | }, 2176 | "type": "library", 2177 | "extra": { 2178 | "branch-alias": { 2179 | "dev-master": "1.5.x-dev" 2180 | } 2181 | }, 2182 | "autoload": { 2183 | "psr-4": { 2184 | "Faker\\": "src/Faker/" 2185 | } 2186 | }, 2187 | "notification-url": "https://packagist.org/downloads/", 2188 | "license": [ 2189 | "MIT" 2190 | ], 2191 | "authors": [ 2192 | { 2193 | "name": "François Zaninotto" 2194 | } 2195 | ], 2196 | "description": "Faker is a PHP library that generates fake data for you.", 2197 | "keywords": [ 2198 | "data", 2199 | "faker", 2200 | "fixtures" 2201 | ], 2202 | "time": "2015-05-29 06:29:14" 2203 | }, 2204 | { 2205 | "name": "orchestra/database", 2206 | "version": "v3.2.0", 2207 | "source": { 2208 | "type": "git", 2209 | "url": "https://github.com/orchestral/database.git", 2210 | "reference": "364737cfcc0d2f61878622d2bf5406859772cc83" 2211 | }, 2212 | "dist": { 2213 | "type": "zip", 2214 | "url": "https://api.github.com/repos/orchestral/database/zipball/364737cfcc0d2f61878622d2bf5406859772cc83", 2215 | "reference": "364737cfcc0d2f61878622d2bf5406859772cc83", 2216 | "shasum": "" 2217 | }, 2218 | "require": { 2219 | "illuminate/contracts": "~5.2.0", 2220 | "illuminate/database": "~5.2.0", 2221 | "php": ">=5.5.0" 2222 | }, 2223 | "type": "library", 2224 | "extra": { 2225 | "branch-alias": { 2226 | "dev-master": "3.3-dev" 2227 | } 2228 | }, 2229 | "autoload": { 2230 | "psr-4": { 2231 | "Orchestra\\Database\\": "" 2232 | } 2233 | }, 2234 | "notification-url": "https://packagist.org/downloads/", 2235 | "license": [ 2236 | "MIT" 2237 | ], 2238 | "authors": [ 2239 | { 2240 | "name": "Mior Muhammad Zaki", 2241 | "email": "crynobone@gmail.com", 2242 | "homepage": "https://github.com/crynobone" 2243 | }, 2244 | { 2245 | "name": "Taylor Otwell", 2246 | "email": "taylorotwell@gmail.com", 2247 | "homepage": "https://github.com/taylorotwell" 2248 | } 2249 | ], 2250 | "description": "Database Component for Orchestra Platform", 2251 | "keywords": [ 2252 | "database", 2253 | "orchestra-platform", 2254 | "orchestral" 2255 | ], 2256 | "time": "2015-12-15 02:29:13" 2257 | }, 2258 | { 2259 | "name": "orchestra/testbench", 2260 | "version": "v3.2.0", 2261 | "source": { 2262 | "type": "git", 2263 | "url": "https://github.com/orchestral/testbench.git", 2264 | "reference": "2d609a27dac57f86c45de70363db018ad3c5e910" 2265 | }, 2266 | "dist": { 2267 | "type": "zip", 2268 | "url": "https://api.github.com/repos/orchestral/testbench/zipball/2d609a27dac57f86c45de70363db018ad3c5e910", 2269 | "reference": "2d609a27dac57f86c45de70363db018ad3c5e910", 2270 | "shasum": "" 2271 | }, 2272 | "require": { 2273 | "fzaninotto/faker": "~1.4", 2274 | "laravel/framework": "~5.2.0", 2275 | "orchestra/database": "~3.2.0", 2276 | "php": ">=5.5.0", 2277 | "symfony/css-selector": "2.8.*|3.0.*", 2278 | "symfony/dom-crawler": "2.8.*|3.0.*" 2279 | }, 2280 | "require-dev": { 2281 | "mockery/mockery": "0.9.*", 2282 | "phpunit/phpunit": "~4.0|~5.0" 2283 | }, 2284 | "suggest": { 2285 | "phpunit/phpunit": "Allow to use PHPUnit for testing your Laravel Application/Package (~4.0|~5.0)." 2286 | }, 2287 | "type": "library", 2288 | "extra": { 2289 | "branch-alias": { 2290 | "dev-master": "3.3-dev" 2291 | } 2292 | }, 2293 | "autoload": { 2294 | "psr-4": { 2295 | "Orchestra\\Testbench\\": "src/" 2296 | } 2297 | }, 2298 | "notification-url": "https://packagist.org/downloads/", 2299 | "license": [ 2300 | "MIT" 2301 | ], 2302 | "authors": [ 2303 | { 2304 | "name": "Mior Muhammad Zaki", 2305 | "email": "crynobone@gmail.com", 2306 | "homepage": "https://github.com/crynobone" 2307 | } 2308 | ], 2309 | "description": "Laravel Package Unit Testing Helper", 2310 | "homepage": "http://orchestraplatform.com/docs/latest/components/testbench/", 2311 | "keywords": [ 2312 | "BDD", 2313 | "TDD", 2314 | "laravel", 2315 | "orchestra-platform", 2316 | "orchestral", 2317 | "testing" 2318 | ], 2319 | "time": "2015-12-21 23:36:20" 2320 | }, 2321 | { 2322 | "name": "phpdocumentor/reflection-docblock", 2323 | "version": "2.0.4", 2324 | "source": { 2325 | "type": "git", 2326 | "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", 2327 | "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8" 2328 | }, 2329 | "dist": { 2330 | "type": "zip", 2331 | "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8", 2332 | "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8", 2333 | "shasum": "" 2334 | }, 2335 | "require": { 2336 | "php": ">=5.3.3" 2337 | }, 2338 | "require-dev": { 2339 | "phpunit/phpunit": "~4.0" 2340 | }, 2341 | "suggest": { 2342 | "dflydev/markdown": "~1.0", 2343 | "erusev/parsedown": "~1.0" 2344 | }, 2345 | "type": "library", 2346 | "extra": { 2347 | "branch-alias": { 2348 | "dev-master": "2.0.x-dev" 2349 | } 2350 | }, 2351 | "autoload": { 2352 | "psr-0": { 2353 | "phpDocumentor": [ 2354 | "src/" 2355 | ] 2356 | } 2357 | }, 2358 | "notification-url": "https://packagist.org/downloads/", 2359 | "license": [ 2360 | "MIT" 2361 | ], 2362 | "authors": [ 2363 | { 2364 | "name": "Mike van Riel", 2365 | "email": "mike.vanriel@naenius.com" 2366 | } 2367 | ], 2368 | "time": "2015-02-03 12:10:50" 2369 | }, 2370 | { 2371 | "name": "phpspec/prophecy", 2372 | "version": "v1.5.0", 2373 | "source": { 2374 | "type": "git", 2375 | "url": "https://github.com/phpspec/prophecy.git", 2376 | "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7" 2377 | }, 2378 | "dist": { 2379 | "type": "zip", 2380 | "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4745ded9307786b730d7a60df5cb5a6c43cf95f7", 2381 | "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7", 2382 | "shasum": "" 2383 | }, 2384 | "require": { 2385 | "doctrine/instantiator": "^1.0.2", 2386 | "phpdocumentor/reflection-docblock": "~2.0", 2387 | "sebastian/comparator": "~1.1" 2388 | }, 2389 | "require-dev": { 2390 | "phpspec/phpspec": "~2.0" 2391 | }, 2392 | "type": "library", 2393 | "extra": { 2394 | "branch-alias": { 2395 | "dev-master": "1.4.x-dev" 2396 | } 2397 | }, 2398 | "autoload": { 2399 | "psr-0": { 2400 | "Prophecy\\": "src/" 2401 | } 2402 | }, 2403 | "notification-url": "https://packagist.org/downloads/", 2404 | "license": [ 2405 | "MIT" 2406 | ], 2407 | "authors": [ 2408 | { 2409 | "name": "Konstantin Kudryashov", 2410 | "email": "ever.zet@gmail.com", 2411 | "homepage": "http://everzet.com" 2412 | }, 2413 | { 2414 | "name": "Marcello Duarte", 2415 | "email": "marcello.duarte@gmail.com" 2416 | } 2417 | ], 2418 | "description": "Highly opinionated mocking framework for PHP 5.3+", 2419 | "homepage": "https://github.com/phpspec/prophecy", 2420 | "keywords": [ 2421 | "Double", 2422 | "Dummy", 2423 | "fake", 2424 | "mock", 2425 | "spy", 2426 | "stub" 2427 | ], 2428 | "time": "2015-08-13 10:07:40" 2429 | }, 2430 | { 2431 | "name": "phpunit/php-code-coverage", 2432 | "version": "2.2.4", 2433 | "source": { 2434 | "type": "git", 2435 | "url": "https://github.com/sebastianbergmann/php-code-coverage.git", 2436 | "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" 2437 | }, 2438 | "dist": { 2439 | "type": "zip", 2440 | "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", 2441 | "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", 2442 | "shasum": "" 2443 | }, 2444 | "require": { 2445 | "php": ">=5.3.3", 2446 | "phpunit/php-file-iterator": "~1.3", 2447 | "phpunit/php-text-template": "~1.2", 2448 | "phpunit/php-token-stream": "~1.3", 2449 | "sebastian/environment": "^1.3.2", 2450 | "sebastian/version": "~1.0" 2451 | }, 2452 | "require-dev": { 2453 | "ext-xdebug": ">=2.1.4", 2454 | "phpunit/phpunit": "~4" 2455 | }, 2456 | "suggest": { 2457 | "ext-dom": "*", 2458 | "ext-xdebug": ">=2.2.1", 2459 | "ext-xmlwriter": "*" 2460 | }, 2461 | "type": "library", 2462 | "extra": { 2463 | "branch-alias": { 2464 | "dev-master": "2.2.x-dev" 2465 | } 2466 | }, 2467 | "autoload": { 2468 | "classmap": [ 2469 | "src/" 2470 | ] 2471 | }, 2472 | "notification-url": "https://packagist.org/downloads/", 2473 | "license": [ 2474 | "BSD-3-Clause" 2475 | ], 2476 | "authors": [ 2477 | { 2478 | "name": "Sebastian Bergmann", 2479 | "email": "sb@sebastian-bergmann.de", 2480 | "role": "lead" 2481 | } 2482 | ], 2483 | "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", 2484 | "homepage": "https://github.com/sebastianbergmann/php-code-coverage", 2485 | "keywords": [ 2486 | "coverage", 2487 | "testing", 2488 | "xunit" 2489 | ], 2490 | "time": "2015-10-06 15:47:00" 2491 | }, 2492 | { 2493 | "name": "phpunit/php-file-iterator", 2494 | "version": "1.4.1", 2495 | "source": { 2496 | "type": "git", 2497 | "url": "https://github.com/sebastianbergmann/php-file-iterator.git", 2498 | "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0" 2499 | }, 2500 | "dist": { 2501 | "type": "zip", 2502 | "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6150bf2c35d3fc379e50c7602b75caceaa39dbf0", 2503 | "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0", 2504 | "shasum": "" 2505 | }, 2506 | "require": { 2507 | "php": ">=5.3.3" 2508 | }, 2509 | "type": "library", 2510 | "extra": { 2511 | "branch-alias": { 2512 | "dev-master": "1.4.x-dev" 2513 | } 2514 | }, 2515 | "autoload": { 2516 | "classmap": [ 2517 | "src/" 2518 | ] 2519 | }, 2520 | "notification-url": "https://packagist.org/downloads/", 2521 | "license": [ 2522 | "BSD-3-Clause" 2523 | ], 2524 | "authors": [ 2525 | { 2526 | "name": "Sebastian Bergmann", 2527 | "email": "sb@sebastian-bergmann.de", 2528 | "role": "lead" 2529 | } 2530 | ], 2531 | "description": "FilterIterator implementation that filters files based on a list of suffixes.", 2532 | "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", 2533 | "keywords": [ 2534 | "filesystem", 2535 | "iterator" 2536 | ], 2537 | "time": "2015-06-21 13:08:43" 2538 | }, 2539 | { 2540 | "name": "phpunit/php-text-template", 2541 | "version": "1.2.1", 2542 | "source": { 2543 | "type": "git", 2544 | "url": "https://github.com/sebastianbergmann/php-text-template.git", 2545 | "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" 2546 | }, 2547 | "dist": { 2548 | "type": "zip", 2549 | "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", 2550 | "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", 2551 | "shasum": "" 2552 | }, 2553 | "require": { 2554 | "php": ">=5.3.3" 2555 | }, 2556 | "type": "library", 2557 | "autoload": { 2558 | "classmap": [ 2559 | "src/" 2560 | ] 2561 | }, 2562 | "notification-url": "https://packagist.org/downloads/", 2563 | "license": [ 2564 | "BSD-3-Clause" 2565 | ], 2566 | "authors": [ 2567 | { 2568 | "name": "Sebastian Bergmann", 2569 | "email": "sebastian@phpunit.de", 2570 | "role": "lead" 2571 | } 2572 | ], 2573 | "description": "Simple template engine.", 2574 | "homepage": "https://github.com/sebastianbergmann/php-text-template/", 2575 | "keywords": [ 2576 | "template" 2577 | ], 2578 | "time": "2015-06-21 13:50:34" 2579 | }, 2580 | { 2581 | "name": "phpunit/php-timer", 2582 | "version": "1.0.7", 2583 | "source": { 2584 | "type": "git", 2585 | "url": "https://github.com/sebastianbergmann/php-timer.git", 2586 | "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b" 2587 | }, 2588 | "dist": { 2589 | "type": "zip", 2590 | "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3e82f4e9fc92665fafd9157568e4dcb01d014e5b", 2591 | "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b", 2592 | "shasum": "" 2593 | }, 2594 | "require": { 2595 | "php": ">=5.3.3" 2596 | }, 2597 | "type": "library", 2598 | "autoload": { 2599 | "classmap": [ 2600 | "src/" 2601 | ] 2602 | }, 2603 | "notification-url": "https://packagist.org/downloads/", 2604 | "license": [ 2605 | "BSD-3-Clause" 2606 | ], 2607 | "authors": [ 2608 | { 2609 | "name": "Sebastian Bergmann", 2610 | "email": "sb@sebastian-bergmann.de", 2611 | "role": "lead" 2612 | } 2613 | ], 2614 | "description": "Utility class for timing", 2615 | "homepage": "https://github.com/sebastianbergmann/php-timer/", 2616 | "keywords": [ 2617 | "timer" 2618 | ], 2619 | "time": "2015-06-21 08:01:12" 2620 | }, 2621 | { 2622 | "name": "phpunit/php-token-stream", 2623 | "version": "1.4.8", 2624 | "source": { 2625 | "type": "git", 2626 | "url": "https://github.com/sebastianbergmann/php-token-stream.git", 2627 | "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da" 2628 | }, 2629 | "dist": { 2630 | "type": "zip", 2631 | "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", 2632 | "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", 2633 | "shasum": "" 2634 | }, 2635 | "require": { 2636 | "ext-tokenizer": "*", 2637 | "php": ">=5.3.3" 2638 | }, 2639 | "require-dev": { 2640 | "phpunit/phpunit": "~4.2" 2641 | }, 2642 | "type": "library", 2643 | "extra": { 2644 | "branch-alias": { 2645 | "dev-master": "1.4-dev" 2646 | } 2647 | }, 2648 | "autoload": { 2649 | "classmap": [ 2650 | "src/" 2651 | ] 2652 | }, 2653 | "notification-url": "https://packagist.org/downloads/", 2654 | "license": [ 2655 | "BSD-3-Clause" 2656 | ], 2657 | "authors": [ 2658 | { 2659 | "name": "Sebastian Bergmann", 2660 | "email": "sebastian@phpunit.de" 2661 | } 2662 | ], 2663 | "description": "Wrapper around PHP's tokenizer extension.", 2664 | "homepage": "https://github.com/sebastianbergmann/php-token-stream/", 2665 | "keywords": [ 2666 | "tokenizer" 2667 | ], 2668 | "time": "2015-09-15 10:49:45" 2669 | }, 2670 | { 2671 | "name": "phpunit/phpunit", 2672 | "version": "4.8.21", 2673 | "source": { 2674 | "type": "git", 2675 | "url": "https://github.com/sebastianbergmann/phpunit.git", 2676 | "reference": "ea76b17bced0500a28098626b84eda12dbcf119c" 2677 | }, 2678 | "dist": { 2679 | "type": "zip", 2680 | "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ea76b17bced0500a28098626b84eda12dbcf119c", 2681 | "reference": "ea76b17bced0500a28098626b84eda12dbcf119c", 2682 | "shasum": "" 2683 | }, 2684 | "require": { 2685 | "ext-dom": "*", 2686 | "ext-json": "*", 2687 | "ext-pcre": "*", 2688 | "ext-reflection": "*", 2689 | "ext-spl": "*", 2690 | "php": ">=5.3.3", 2691 | "phpspec/prophecy": "^1.3.1", 2692 | "phpunit/php-code-coverage": "~2.1", 2693 | "phpunit/php-file-iterator": "~1.4", 2694 | "phpunit/php-text-template": "~1.2", 2695 | "phpunit/php-timer": ">=1.0.6", 2696 | "phpunit/phpunit-mock-objects": "~2.3", 2697 | "sebastian/comparator": "~1.1", 2698 | "sebastian/diff": "~1.2", 2699 | "sebastian/environment": "~1.3", 2700 | "sebastian/exporter": "~1.2", 2701 | "sebastian/global-state": "~1.0", 2702 | "sebastian/version": "~1.0", 2703 | "symfony/yaml": "~2.1|~3.0" 2704 | }, 2705 | "suggest": { 2706 | "phpunit/php-invoker": "~1.1" 2707 | }, 2708 | "bin": [ 2709 | "phpunit" 2710 | ], 2711 | "type": "library", 2712 | "extra": { 2713 | "branch-alias": { 2714 | "dev-master": "4.8.x-dev" 2715 | } 2716 | }, 2717 | "autoload": { 2718 | "classmap": [ 2719 | "src/" 2720 | ] 2721 | }, 2722 | "notification-url": "https://packagist.org/downloads/", 2723 | "license": [ 2724 | "BSD-3-Clause" 2725 | ], 2726 | "authors": [ 2727 | { 2728 | "name": "Sebastian Bergmann", 2729 | "email": "sebastian@phpunit.de", 2730 | "role": "lead" 2731 | } 2732 | ], 2733 | "description": "The PHP Unit Testing framework.", 2734 | "homepage": "https://phpunit.de/", 2735 | "keywords": [ 2736 | "phpunit", 2737 | "testing", 2738 | "xunit" 2739 | ], 2740 | "time": "2015-12-12 07:45:58" 2741 | }, 2742 | { 2743 | "name": "phpunit/phpunit-mock-objects", 2744 | "version": "2.3.8", 2745 | "source": { 2746 | "type": "git", 2747 | "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", 2748 | "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" 2749 | }, 2750 | "dist": { 2751 | "type": "zip", 2752 | "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", 2753 | "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", 2754 | "shasum": "" 2755 | }, 2756 | "require": { 2757 | "doctrine/instantiator": "^1.0.2", 2758 | "php": ">=5.3.3", 2759 | "phpunit/php-text-template": "~1.2", 2760 | "sebastian/exporter": "~1.2" 2761 | }, 2762 | "require-dev": { 2763 | "phpunit/phpunit": "~4.4" 2764 | }, 2765 | "suggest": { 2766 | "ext-soap": "*" 2767 | }, 2768 | "type": "library", 2769 | "extra": { 2770 | "branch-alias": { 2771 | "dev-master": "2.3.x-dev" 2772 | } 2773 | }, 2774 | "autoload": { 2775 | "classmap": [ 2776 | "src/" 2777 | ] 2778 | }, 2779 | "notification-url": "https://packagist.org/downloads/", 2780 | "license": [ 2781 | "BSD-3-Clause" 2782 | ], 2783 | "authors": [ 2784 | { 2785 | "name": "Sebastian Bergmann", 2786 | "email": "sb@sebastian-bergmann.de", 2787 | "role": "lead" 2788 | } 2789 | ], 2790 | "description": "Mock Object library for PHPUnit", 2791 | "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", 2792 | "keywords": [ 2793 | "mock", 2794 | "xunit" 2795 | ], 2796 | "time": "2015-10-02 06:51:40" 2797 | }, 2798 | { 2799 | "name": "sebastian/comparator", 2800 | "version": "1.2.0", 2801 | "source": { 2802 | "type": "git", 2803 | "url": "https://github.com/sebastianbergmann/comparator.git", 2804 | "reference": "937efb279bd37a375bcadf584dec0726f84dbf22" 2805 | }, 2806 | "dist": { 2807 | "type": "zip", 2808 | "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22", 2809 | "reference": "937efb279bd37a375bcadf584dec0726f84dbf22", 2810 | "shasum": "" 2811 | }, 2812 | "require": { 2813 | "php": ">=5.3.3", 2814 | "sebastian/diff": "~1.2", 2815 | "sebastian/exporter": "~1.2" 2816 | }, 2817 | "require-dev": { 2818 | "phpunit/phpunit": "~4.4" 2819 | }, 2820 | "type": "library", 2821 | "extra": { 2822 | "branch-alias": { 2823 | "dev-master": "1.2.x-dev" 2824 | } 2825 | }, 2826 | "autoload": { 2827 | "classmap": [ 2828 | "src/" 2829 | ] 2830 | }, 2831 | "notification-url": "https://packagist.org/downloads/", 2832 | "license": [ 2833 | "BSD-3-Clause" 2834 | ], 2835 | "authors": [ 2836 | { 2837 | "name": "Jeff Welch", 2838 | "email": "whatthejeff@gmail.com" 2839 | }, 2840 | { 2841 | "name": "Volker Dusch", 2842 | "email": "github@wallbash.com" 2843 | }, 2844 | { 2845 | "name": "Bernhard Schussek", 2846 | "email": "bschussek@2bepublished.at" 2847 | }, 2848 | { 2849 | "name": "Sebastian Bergmann", 2850 | "email": "sebastian@phpunit.de" 2851 | } 2852 | ], 2853 | "description": "Provides the functionality to compare PHP values for equality", 2854 | "homepage": "http://www.github.com/sebastianbergmann/comparator", 2855 | "keywords": [ 2856 | "comparator", 2857 | "compare", 2858 | "equality" 2859 | ], 2860 | "time": "2015-07-26 15:48:44" 2861 | }, 2862 | { 2863 | "name": "sebastian/diff", 2864 | "version": "1.4.1", 2865 | "source": { 2866 | "type": "git", 2867 | "url": "https://github.com/sebastianbergmann/diff.git", 2868 | "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" 2869 | }, 2870 | "dist": { 2871 | "type": "zip", 2872 | "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", 2873 | "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", 2874 | "shasum": "" 2875 | }, 2876 | "require": { 2877 | "php": ">=5.3.3" 2878 | }, 2879 | "require-dev": { 2880 | "phpunit/phpunit": "~4.8" 2881 | }, 2882 | "type": "library", 2883 | "extra": { 2884 | "branch-alias": { 2885 | "dev-master": "1.4-dev" 2886 | } 2887 | }, 2888 | "autoload": { 2889 | "classmap": [ 2890 | "src/" 2891 | ] 2892 | }, 2893 | "notification-url": "https://packagist.org/downloads/", 2894 | "license": [ 2895 | "BSD-3-Clause" 2896 | ], 2897 | "authors": [ 2898 | { 2899 | "name": "Kore Nordmann", 2900 | "email": "mail@kore-nordmann.de" 2901 | }, 2902 | { 2903 | "name": "Sebastian Bergmann", 2904 | "email": "sebastian@phpunit.de" 2905 | } 2906 | ], 2907 | "description": "Diff implementation", 2908 | "homepage": "https://github.com/sebastianbergmann/diff", 2909 | "keywords": [ 2910 | "diff" 2911 | ], 2912 | "time": "2015-12-08 07:14:41" 2913 | }, 2914 | { 2915 | "name": "sebastian/environment", 2916 | "version": "1.3.3", 2917 | "source": { 2918 | "type": "git", 2919 | "url": "https://github.com/sebastianbergmann/environment.git", 2920 | "reference": "6e7133793a8e5a5714a551a8324337374be209df" 2921 | }, 2922 | "dist": { 2923 | "type": "zip", 2924 | "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6e7133793a8e5a5714a551a8324337374be209df", 2925 | "reference": "6e7133793a8e5a5714a551a8324337374be209df", 2926 | "shasum": "" 2927 | }, 2928 | "require": { 2929 | "php": ">=5.3.3" 2930 | }, 2931 | "require-dev": { 2932 | "phpunit/phpunit": "~4.4" 2933 | }, 2934 | "type": "library", 2935 | "extra": { 2936 | "branch-alias": { 2937 | "dev-master": "1.3.x-dev" 2938 | } 2939 | }, 2940 | "autoload": { 2941 | "classmap": [ 2942 | "src/" 2943 | ] 2944 | }, 2945 | "notification-url": "https://packagist.org/downloads/", 2946 | "license": [ 2947 | "BSD-3-Clause" 2948 | ], 2949 | "authors": [ 2950 | { 2951 | "name": "Sebastian Bergmann", 2952 | "email": "sebastian@phpunit.de" 2953 | } 2954 | ], 2955 | "description": "Provides functionality to handle HHVM/PHP environments", 2956 | "homepage": "http://www.github.com/sebastianbergmann/environment", 2957 | "keywords": [ 2958 | "Xdebug", 2959 | "environment", 2960 | "hhvm" 2961 | ], 2962 | "time": "2015-12-02 08:37:27" 2963 | }, 2964 | { 2965 | "name": "sebastian/exporter", 2966 | "version": "1.2.1", 2967 | "source": { 2968 | "type": "git", 2969 | "url": "https://github.com/sebastianbergmann/exporter.git", 2970 | "reference": "7ae5513327cb536431847bcc0c10edba2701064e" 2971 | }, 2972 | "dist": { 2973 | "type": "zip", 2974 | "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/7ae5513327cb536431847bcc0c10edba2701064e", 2975 | "reference": "7ae5513327cb536431847bcc0c10edba2701064e", 2976 | "shasum": "" 2977 | }, 2978 | "require": { 2979 | "php": ">=5.3.3", 2980 | "sebastian/recursion-context": "~1.0" 2981 | }, 2982 | "require-dev": { 2983 | "phpunit/phpunit": "~4.4" 2984 | }, 2985 | "type": "library", 2986 | "extra": { 2987 | "branch-alias": { 2988 | "dev-master": "1.2.x-dev" 2989 | } 2990 | }, 2991 | "autoload": { 2992 | "classmap": [ 2993 | "src/" 2994 | ] 2995 | }, 2996 | "notification-url": "https://packagist.org/downloads/", 2997 | "license": [ 2998 | "BSD-3-Clause" 2999 | ], 3000 | "authors": [ 3001 | { 3002 | "name": "Jeff Welch", 3003 | "email": "whatthejeff@gmail.com" 3004 | }, 3005 | { 3006 | "name": "Volker Dusch", 3007 | "email": "github@wallbash.com" 3008 | }, 3009 | { 3010 | "name": "Bernhard Schussek", 3011 | "email": "bschussek@2bepublished.at" 3012 | }, 3013 | { 3014 | "name": "Sebastian Bergmann", 3015 | "email": "sebastian@phpunit.de" 3016 | }, 3017 | { 3018 | "name": "Adam Harvey", 3019 | "email": "aharvey@php.net" 3020 | } 3021 | ], 3022 | "description": "Provides the functionality to export PHP variables for visualization", 3023 | "homepage": "http://www.github.com/sebastianbergmann/exporter", 3024 | "keywords": [ 3025 | "export", 3026 | "exporter" 3027 | ], 3028 | "time": "2015-06-21 07:55:53" 3029 | }, 3030 | { 3031 | "name": "sebastian/global-state", 3032 | "version": "1.1.1", 3033 | "source": { 3034 | "type": "git", 3035 | "url": "https://github.com/sebastianbergmann/global-state.git", 3036 | "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" 3037 | }, 3038 | "dist": { 3039 | "type": "zip", 3040 | "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", 3041 | "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", 3042 | "shasum": "" 3043 | }, 3044 | "require": { 3045 | "php": ">=5.3.3" 3046 | }, 3047 | "require-dev": { 3048 | "phpunit/phpunit": "~4.2" 3049 | }, 3050 | "suggest": { 3051 | "ext-uopz": "*" 3052 | }, 3053 | "type": "library", 3054 | "extra": { 3055 | "branch-alias": { 3056 | "dev-master": "1.0-dev" 3057 | } 3058 | }, 3059 | "autoload": { 3060 | "classmap": [ 3061 | "src/" 3062 | ] 3063 | }, 3064 | "notification-url": "https://packagist.org/downloads/", 3065 | "license": [ 3066 | "BSD-3-Clause" 3067 | ], 3068 | "authors": [ 3069 | { 3070 | "name": "Sebastian Bergmann", 3071 | "email": "sebastian@phpunit.de" 3072 | } 3073 | ], 3074 | "description": "Snapshotting of global state", 3075 | "homepage": "http://www.github.com/sebastianbergmann/global-state", 3076 | "keywords": [ 3077 | "global state" 3078 | ], 3079 | "time": "2015-10-12 03:26:01" 3080 | }, 3081 | { 3082 | "name": "sebastian/recursion-context", 3083 | "version": "1.0.2", 3084 | "source": { 3085 | "type": "git", 3086 | "url": "https://github.com/sebastianbergmann/recursion-context.git", 3087 | "reference": "913401df809e99e4f47b27cdd781f4a258d58791" 3088 | }, 3089 | "dist": { 3090 | "type": "zip", 3091 | "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791", 3092 | "reference": "913401df809e99e4f47b27cdd781f4a258d58791", 3093 | "shasum": "" 3094 | }, 3095 | "require": { 3096 | "php": ">=5.3.3" 3097 | }, 3098 | "require-dev": { 3099 | "phpunit/phpunit": "~4.4" 3100 | }, 3101 | "type": "library", 3102 | "extra": { 3103 | "branch-alias": { 3104 | "dev-master": "1.0.x-dev" 3105 | } 3106 | }, 3107 | "autoload": { 3108 | "classmap": [ 3109 | "src/" 3110 | ] 3111 | }, 3112 | "notification-url": "https://packagist.org/downloads/", 3113 | "license": [ 3114 | "BSD-3-Clause" 3115 | ], 3116 | "authors": [ 3117 | { 3118 | "name": "Jeff Welch", 3119 | "email": "whatthejeff@gmail.com" 3120 | }, 3121 | { 3122 | "name": "Sebastian Bergmann", 3123 | "email": "sebastian@phpunit.de" 3124 | }, 3125 | { 3126 | "name": "Adam Harvey", 3127 | "email": "aharvey@php.net" 3128 | } 3129 | ], 3130 | "description": "Provides functionality to recursively process PHP variables", 3131 | "homepage": "http://www.github.com/sebastianbergmann/recursion-context", 3132 | "time": "2015-11-11 19:50:13" 3133 | }, 3134 | { 3135 | "name": "sebastian/version", 3136 | "version": "1.0.6", 3137 | "source": { 3138 | "type": "git", 3139 | "url": "https://github.com/sebastianbergmann/version.git", 3140 | "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" 3141 | }, 3142 | "dist": { 3143 | "type": "zip", 3144 | "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", 3145 | "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", 3146 | "shasum": "" 3147 | }, 3148 | "type": "library", 3149 | "autoload": { 3150 | "classmap": [ 3151 | "src/" 3152 | ] 3153 | }, 3154 | "notification-url": "https://packagist.org/downloads/", 3155 | "license": [ 3156 | "BSD-3-Clause" 3157 | ], 3158 | "authors": [ 3159 | { 3160 | "name": "Sebastian Bergmann", 3161 | "email": "sebastian@phpunit.de", 3162 | "role": "lead" 3163 | } 3164 | ], 3165 | "description": "Library that helps with managing the version number of Git-hosted PHP projects", 3166 | "homepage": "https://github.com/sebastianbergmann/version", 3167 | "time": "2015-06-21 13:59:46" 3168 | }, 3169 | { 3170 | "name": "symfony/css-selector", 3171 | "version": "v3.0.1", 3172 | "source": { 3173 | "type": "git", 3174 | "url": "https://github.com/symfony/css-selector.git", 3175 | "reference": "4613311fd46e146f506403ce2f8a0c71d402d2a3" 3176 | }, 3177 | "dist": { 3178 | "type": "zip", 3179 | "url": "https://api.github.com/repos/symfony/css-selector/zipball/4613311fd46e146f506403ce2f8a0c71d402d2a3", 3180 | "reference": "4613311fd46e146f506403ce2f8a0c71d402d2a3", 3181 | "shasum": "" 3182 | }, 3183 | "require": { 3184 | "php": ">=5.5.9" 3185 | }, 3186 | "type": "library", 3187 | "extra": { 3188 | "branch-alias": { 3189 | "dev-master": "3.0-dev" 3190 | } 3191 | }, 3192 | "autoload": { 3193 | "psr-4": { 3194 | "Symfony\\Component\\CssSelector\\": "" 3195 | }, 3196 | "exclude-from-classmap": [ 3197 | "/Tests/" 3198 | ] 3199 | }, 3200 | "notification-url": "https://packagist.org/downloads/", 3201 | "license": [ 3202 | "MIT" 3203 | ], 3204 | "authors": [ 3205 | { 3206 | "name": "Jean-François Simon", 3207 | "email": "jeanfrancois.simon@sensiolabs.com" 3208 | }, 3209 | { 3210 | "name": "Fabien Potencier", 3211 | "email": "fabien@symfony.com" 3212 | }, 3213 | { 3214 | "name": "Symfony Community", 3215 | "homepage": "https://symfony.com/contributors" 3216 | } 3217 | ], 3218 | "description": "Symfony CssSelector Component", 3219 | "homepage": "https://symfony.com", 3220 | "time": "2015-12-05 17:45:07" 3221 | }, 3222 | { 3223 | "name": "symfony/dom-crawler", 3224 | "version": "v3.0.1", 3225 | "source": { 3226 | "type": "git", 3227 | "url": "https://github.com/symfony/dom-crawler.git", 3228 | "reference": "7c622b0c9fb8bdb146d6dfa86c5f91dcbfdbc11d" 3229 | }, 3230 | "dist": { 3231 | "type": "zip", 3232 | "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/7c622b0c9fb8bdb146d6dfa86c5f91dcbfdbc11d", 3233 | "reference": "7c622b0c9fb8bdb146d6dfa86c5f91dcbfdbc11d", 3234 | "shasum": "" 3235 | }, 3236 | "require": { 3237 | "php": ">=5.5.9", 3238 | "symfony/polyfill-mbstring": "~1.0" 3239 | }, 3240 | "require-dev": { 3241 | "symfony/css-selector": "~2.8|~3.0" 3242 | }, 3243 | "suggest": { 3244 | "symfony/css-selector": "" 3245 | }, 3246 | "type": "library", 3247 | "extra": { 3248 | "branch-alias": { 3249 | "dev-master": "3.0-dev" 3250 | } 3251 | }, 3252 | "autoload": { 3253 | "psr-4": { 3254 | "Symfony\\Component\\DomCrawler\\": "" 3255 | }, 3256 | "exclude-from-classmap": [ 3257 | "/Tests/" 3258 | ] 3259 | }, 3260 | "notification-url": "https://packagist.org/downloads/", 3261 | "license": [ 3262 | "MIT" 3263 | ], 3264 | "authors": [ 3265 | { 3266 | "name": "Fabien Potencier", 3267 | "email": "fabien@symfony.com" 3268 | }, 3269 | { 3270 | "name": "Symfony Community", 3271 | "homepage": "https://symfony.com/contributors" 3272 | } 3273 | ], 3274 | "description": "Symfony DomCrawler Component", 3275 | "homepage": "https://symfony.com", 3276 | "time": "2015-12-26 13:42:31" 3277 | }, 3278 | { 3279 | "name": "symfony/yaml", 3280 | "version": "v3.0.1", 3281 | "source": { 3282 | "type": "git", 3283 | "url": "https://github.com/symfony/yaml.git", 3284 | "reference": "3df409958a646dad2bc5046c3fb671ee24a1a691" 3285 | }, 3286 | "dist": { 3287 | "type": "zip", 3288 | "url": "https://api.github.com/repos/symfony/yaml/zipball/3df409958a646dad2bc5046c3fb671ee24a1a691", 3289 | "reference": "3df409958a646dad2bc5046c3fb671ee24a1a691", 3290 | "shasum": "" 3291 | }, 3292 | "require": { 3293 | "php": ">=5.5.9" 3294 | }, 3295 | "type": "library", 3296 | "extra": { 3297 | "branch-alias": { 3298 | "dev-master": "3.0-dev" 3299 | } 3300 | }, 3301 | "autoload": { 3302 | "psr-4": { 3303 | "Symfony\\Component\\Yaml\\": "" 3304 | }, 3305 | "exclude-from-classmap": [ 3306 | "/Tests/" 3307 | ] 3308 | }, 3309 | "notification-url": "https://packagist.org/downloads/", 3310 | "license": [ 3311 | "MIT" 3312 | ], 3313 | "authors": [ 3314 | { 3315 | "name": "Fabien Potencier", 3316 | "email": "fabien@symfony.com" 3317 | }, 3318 | { 3319 | "name": "Symfony Community", 3320 | "homepage": "https://symfony.com/contributors" 3321 | } 3322 | ], 3323 | "description": "Symfony Yaml Component", 3324 | "homepage": "https://symfony.com", 3325 | "time": "2015-12-26 13:39:53" 3326 | } 3327 | ], 3328 | "aliases": [], 3329 | "minimum-stability": "stable", 3330 | "stability-flags": [], 3331 | "prefer-stable": false, 3332 | "prefer-lowest": false, 3333 | "platform": [], 3334 | "platform-dev": [] 3335 | } 3336 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 14 | 15 | 16 | ./tests/ 17 | 18 | 19 | -------------------------------------------------------------------------------- /resources/config/img-attacher.php: -------------------------------------------------------------------------------- 1 | 'CbCaio\ImgAttacher\Models\AttacherImage', 17 | 'base_url' => 'files', 18 | 'path_to_save' => '/uploads/images/:owner_class/:owner_id/:style/:filename', 19 | 20 | 'processing_styles_routines' => [ 21 | 'default_routine' => 22 | [ 23 | 'original_style' => function ($image) { 24 | return $image; 25 | }, 26 | 'original_style2' => function ($image) { 27 | return $image; 28 | }, 29 | ], 30 | 'default_routine2' => 31 | [ 32 | 'original_style3' => function ($image) { 33 | return $image; 34 | }, 35 | 'original_style4' => function ($image) { 36 | return $image; 37 | }, 38 | ], 39 | ] 40 | ]; 41 | -------------------------------------------------------------------------------- /resources/database/migrations/2016_01_12_000000_create_attacher_images_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 19 | $table->unsignedInteger('owner_id')->index(); 20 | $table->string('owner_type')->index(); 21 | $table->string('file_extension'); 22 | $table->string("file_name")->nullable(); 23 | $table->smallInteger("file_size", FALSE, TRUE)->nullable(); 24 | $table->string("mime_type")->nullable(); 25 | $table->timestamps(); 26 | }); 27 | 28 | } 29 | 30 | /** 31 | * Reverse the migrations. 32 | * 33 | * @return void 34 | */ 35 | public function down() 36 | { 37 | Schema::drop('attacher_images'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/AttacherManager.php: -------------------------------------------------------------------------------- 1 | processing_styles_routine = app('config')->get('img-attacher')['processing_styles_routines']; 19 | } 20 | 21 | /** 22 | * @return bool 23 | */ 24 | public function writeImage(AttacherImageContract $attacherImage) 25 | { 26 | $imageProcessor = $this->getImageProcessor(); 27 | 28 | $images_to_save = $imageProcessor->applyStyles($attacherImage, $this->getProcessingStylesRoutines()); 29 | 30 | if (is_null($images_to_save)) 31 | { 32 | return FALSE; 33 | } 34 | 35 | $needToUpdate = $attacherImage->hasDifferentFileName(); 36 | 37 | if ($needToUpdate) 38 | { 39 | $this->getFileManager()->updateMany($images_to_save, $attacherImage); 40 | } else 41 | { 42 | $this->getFileManager()->saveMany($images_to_save, $attacherImage); 43 | } 44 | 45 | return TRUE; 46 | } 47 | 48 | /** 49 | * @param AttacherImageContract $attacherImage 50 | * @return bool 51 | */ 52 | public function deleteImages(AttacherImageContract $attacherImage, $style = NULL) 53 | { 54 | $path = $attacherImage->getDeletePath($style); 55 | 56 | return $this->getFileManager()->delete($path); 57 | } 58 | 59 | /** 60 | * @return FileManager 61 | */ 62 | public function getFileManager() 63 | { 64 | return app('img-attacher.FileManager'); 65 | } 66 | 67 | /** 68 | * @return ImageProcessor 69 | */ 70 | public function getImageProcessor() 71 | { 72 | return app('img-attacher.ImageProcessor'); 73 | } 74 | 75 | /** 76 | * @return FilePathManager 77 | */ 78 | public function getFilePathManager() 79 | { 80 | return app('img-attacher.FilePathManager'); 81 | } 82 | 83 | /** 84 | * @return array 85 | */ 86 | public function getProcessingStylesRoutines() 87 | { 88 | return $this->processing_styles_routine; 89 | } 90 | 91 | /** 92 | * @return string 93 | */ 94 | public function getBaseUrl() 95 | { 96 | return $this->getFilePathManager()->getBaseUrl(); 97 | } 98 | 99 | /** 100 | * @return string 101 | */ 102 | public function getPathToSave() 103 | { 104 | return $this->getFilePathManager()->getPath(); 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /src/Contracts/AttacherImageContract.php: -------------------------------------------------------------------------------- 1 | 'id', 22 | ':filename' => 'file_name' 23 | ]; 24 | 25 | /** 26 | * @param string $path 27 | * @param string $base_url 28 | * @param array $processing_styles_routines 29 | */ 30 | public function __construct($path, $base_url, $processing_styles_routines) 31 | { 32 | $this->path = $path; 33 | $this->base_url = $base_url; 34 | $this->processing_styles_routines = $processing_styles_routines; 35 | } 36 | 37 | /** 38 | * @param AttacherImageContract $attacherImage 39 | * @param string $style 40 | * @return mixed|string 41 | */ 42 | public function parsePath(AttacherImageContract $attacherImage, $style) 43 | { 44 | $string = $this->parseStyle($style, $this->getPath()); 45 | $string = $this->parseOwnerClass($attacherImage, $string); 46 | $string = $this->parseAttributes($attacherImage, $string); 47 | 48 | return $string; 49 | } 50 | 51 | /** 52 | * @param AttacherImageContract $attacherImage 53 | * @param string $string 54 | * @return mixed 55 | */ 56 | public function parseOwnerClass(AttacherImageContract $attacherImage, $string) 57 | { 58 | if (!empty($attacherImage->getOwnerType())) 59 | { 60 | $owner_class_name = last(preg_split('/\\\\/', $attacherImage->getOwnerType())); 61 | $string = preg_replace('/:owner_class\b/', $owner_class_name, $string); 62 | } else 63 | { 64 | return $string; 65 | } 66 | 67 | $model_owner = $attacherImage->owner()->getResults(); 68 | 69 | if ($model_owner instanceof Model) 70 | { 71 | $string = preg_replace('/:owner_id\b/', $model_owner->id, $string); 72 | } 73 | 74 | return $string; 75 | } 76 | 77 | /** 78 | * @param AttacherImageContract $attacherImage 79 | * @param string $string 80 | * @return mixed 81 | */ 82 | public function parseAttributes(AttacherImageContract $attacherImage, $string) 83 | { 84 | foreach ($this->getArguments() as $key => $value) 85 | { 86 | if (strpos($string, $key) !== FALSE) 87 | { 88 | $string = preg_replace("/$key" . '\b/', $attacherImage->getAttribute($value), $string); 89 | } 90 | } 91 | 92 | return $string; 93 | } 94 | 95 | /** 96 | * @param string $style 97 | * @param string $string 98 | * @return string 99 | */ 100 | public function parseStyle($style, $string) 101 | { 102 | foreach ($this->getProcessingStylesRoutines() as $processing_styles_routine => $styles_array) 103 | { 104 | if (array_has($styles_array, $style)) 105 | { 106 | $string = preg_replace('/:style\b/', $style, $string); 107 | } 108 | } 109 | 110 | return $string; 111 | } 112 | 113 | /** 114 | * @param AttacherImageContract $attacherImage 115 | * @param string|null $style 116 | * @return string 117 | */ 118 | public function parseDeletePath(AttacherImageContract $attacherImage, $style = NULL) 119 | { 120 | is_null($style) 121 | ? preg_match('/.*:owner_class\/:owner_id\b/', $this->getPath(), $delete_path) 122 | : preg_match('/.*:owner_class\/:owner_id\/:style\b/', $this->getPath(), $delete_path); 123 | 124 | 125 | $delete_path = $this->parseStyle($style, $delete_path[0]); 126 | $delete_path = $this->parseOwnerClass($attacherImage, $delete_path); 127 | $delete_path = $this->parseAttributes($attacherImage, $delete_path); 128 | 129 | return $delete_path; 130 | } 131 | 132 | /** 133 | * @param AttacherImageContract $attacherImage 134 | * @param null $style 135 | * @return \Illuminate\Contracts\Routing\UrlGenerator|string 136 | */ 137 | public function parseUrl(AttacherImageContract $attacherImage, $style = NULL) 138 | { 139 | $url = $this->getBaseUrl() . $this->parsePath($attacherImage, $style); 140 | $url = preg_replace('~(^|[^:])//+~', '\\1/', $url); 141 | 142 | return url($url); 143 | } 144 | 145 | /** 146 | * @param AttacherImageContract $attacherImage 147 | * @return string|null 148 | */ 149 | public function parsePreviousPath(AttacherImageContract $attacherImage) 150 | { 151 | return $attacherImage->hasDifferentFileName() 152 | ? $this->parseDeletePath($attacherImage, NULL) 153 | : NULL; 154 | } 155 | 156 | /** @return array */ 157 | public function getArguments() 158 | { 159 | return $this->arguments; 160 | } 161 | 162 | /** 163 | * @param array $string 164 | * @return $this 165 | */ 166 | public function setArguments($string) 167 | { 168 | $this->arguments = $string; 169 | 170 | return $this; 171 | } 172 | 173 | /** @return string */ 174 | public function getBaseUrl() 175 | { 176 | return $this->base_url; 177 | } 178 | 179 | /** @return array */ 180 | public function getProcessingStylesRoutines() 181 | { 182 | return $this->processing_styles_routines; 183 | } 184 | 185 | /** @return string */ 186 | public function getPath() 187 | { 188 | return $this->path; 189 | } 190 | 191 | } -------------------------------------------------------------------------------- /src/Managers/FileManager.php: -------------------------------------------------------------------------------- 1 | flysystem = $flysystemManager; 20 | } 21 | 22 | /** 23 | * @param Image $image 24 | * @param string $path 25 | * @return bool 26 | */ 27 | public function save(Image $image, $path) 28 | { 29 | return $this->flysystem->put($path, $image->encode()); 30 | } 31 | 32 | /** 33 | * @param Collection $images 34 | * @param AttacherImageContract $attacherImage 35 | * @return bool 36 | */ 37 | public function saveMany(Collection $images, AttacherImageContract $attacherImage) 38 | { 39 | foreach ($images as $style_name => $image) 40 | { 41 | $this->save($image, $attacherImage->getPath($style_name)); 42 | } 43 | 44 | return TRUE; 45 | } 46 | 47 | /** 48 | * @param Image $image 49 | * @param string $path 50 | * @param string $oldPath 51 | * @return bool 52 | */ 53 | public function update(Image $image, $path, $oldPath) 54 | { 55 | return $this->delete($oldPath) ? $this->flysystem->put($path, $image->encode()) : FALSE; 56 | } 57 | 58 | /** 59 | * @param Collection $images 60 | * @param AttacherImageContract $attacherImage 61 | * @return bool 62 | */ 63 | public function updateMany(Collection $images, AttacherImageContract $attacherImage) 64 | { 65 | return $this->delete($attacherImage->getPreviousPath()) 66 | ? $this->saveMany($images, $attacherImage) 67 | : FALSE; 68 | } 69 | 70 | /** 71 | * @param string $path 72 | * @return bool 73 | */ 74 | public function delete($path) 75 | { 76 | $folders_list = $this->flysystem->listContents($path, FALSE); 77 | 78 | if (empty($folders_list)) 79 | { 80 | return FALSE; 81 | } else 82 | { 83 | foreach ($this->flysystem->listContents($path, FALSE) as $folder) 84 | { 85 | if ($folder['type'] == 'dir') 86 | { 87 | $this->flysystem->deleteDir($folder['path']); 88 | } else 89 | { 90 | $this->flysystem->delete($folder['path']); 91 | } 92 | } 93 | 94 | return TRUE; 95 | } 96 | } 97 | 98 | /** 99 | * @param string $path 100 | * @return bool 101 | */ 102 | public function pathExists($path) 103 | { 104 | return $this->flysystem->has($path); 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /src/Managers/FilePathManager.php: -------------------------------------------------------------------------------- 1 | setUploadedFile($file); 33 | 34 | is_null($filename) 35 | ? $this->setFileNameAttribute($file->getClientOriginalName()) 36 | : $this->setFileNameAttribute($filename); 37 | 38 | 39 | $this->setFileExtensionAttribute($file->getClientOriginalExtension()); 40 | $this->setMimeTypeAttribute($file->getClientMimeType()); 41 | $this->setFileSizeAttribute($file->getSize()); 42 | 43 | if ($this->filenameIsDifferentFromOriginal()) 44 | { 45 | $this->setDifferentFilename(); 46 | } 47 | 48 | return $this; 49 | } 50 | 51 | /** 52 | * @return mixed owner model 53 | */ 54 | public function owner() 55 | { 56 | return $this->morphTo(); 57 | } 58 | 59 | /** 60 | * @return string 61 | */ 62 | public function getOwnerType() 63 | { 64 | return array_has($this->attributes, 'owner_type') 65 | ? $this->attributes['owner_type'] 66 | : NULL; 67 | } 68 | 69 | /** 70 | * Return the base_url followed by the path to the image related to the $processing_style after processing 71 | * 72 | * @param string|null $processing_style 73 | * @return string 74 | */ 75 | public function getUrl($processing_style) 76 | { 77 | return app('img-attacher.FilePathManager')->parseUrl($this, $processing_style); 78 | } 79 | 80 | /** 81 | * Return the the path to the image related to the $processing_style after processing 82 | * 83 | * @param string|null $processing_style 84 | * @return string 85 | */ 86 | public function getPath($processing_style) 87 | { 88 | return app('img-attacher.FilePathManager')->parsePath($this, $processing_style); 89 | } 90 | 91 | /** 92 | * @param null|string $processing_style 93 | * @return string 94 | */ 95 | public function getDeletePath($processing_style = NULL) 96 | { 97 | return app('img-attacher.FilePathManager')->parseDeletePath($this, $processing_style); 98 | } 99 | 100 | /** 101 | * @return string 102 | */ 103 | public function getPreviousPath() 104 | { 105 | return app('img-attacher.FilePathManager')->parsePreviousPath($this); 106 | } 107 | 108 | /** 109 | * @return string 110 | */ 111 | public function getDifferentFilename() 112 | { 113 | return $this->different_filename; 114 | } 115 | 116 | /** 117 | * @return $this 118 | */ 119 | public function setDifferentFilename() 120 | { 121 | $this->different_filename = $this->original['file_name']; 122 | 123 | return $this; 124 | } 125 | 126 | /** 127 | * @return bool 128 | */ 129 | public function hasDifferentFileName() 130 | { 131 | return empty($this->different_filename) ? FALSE : TRUE; 132 | } 133 | 134 | /** 135 | * @return bool | null 136 | */ 137 | public function filenameIsDifferentFromOriginal() 138 | { 139 | if (empty($this->original)) 140 | { 141 | return NULL; 142 | } 143 | 144 | return ($this->attributes['file_name'] != $this->original['file_name']) ? TRUE : FALSE; 145 | } 146 | 147 | /** 148 | * @return string 149 | */ 150 | public function getProcessingStyleRoutine() 151 | { 152 | return $this->processing_style_routine; 153 | } 154 | 155 | /** 156 | * @param $name 157 | * @return $this 158 | */ 159 | public function setProcessingStyleRoutine($name = NULL) 160 | { 161 | $this->processing_style_routine = isset($name) ? $name : 'default_routine'; 162 | 163 | return $this; 164 | } 165 | 166 | /** 167 | * @return UploadedFile 168 | */ 169 | public function getUploadedFile() 170 | { 171 | return $this->uploaded_file; 172 | } 173 | 174 | /** 175 | * @return UploadedFile 176 | */ 177 | public function setUploadedFile(UploadedFile $file) 178 | { 179 | $this->uploaded_file = $file; 180 | 181 | return $this; 182 | } 183 | 184 | /** 185 | * @return string 186 | */ 187 | public function getFileNameAttribute() 188 | { 189 | return array_has($this->attributes, 'file_name') 190 | ? $this->attributes['file_name'] 191 | : NULL; 192 | } 193 | 194 | /** 195 | * @param string $name 196 | * @return $this 197 | */ 198 | public function setFileNameAttribute($name) 199 | { 200 | $file_name = str_slug(pathinfo($name, PATHINFO_FILENAME)) . '.' . pathinfo($name, PATHINFO_EXTENSION); 201 | 202 | $this->attributes['file_name'] = $file_name; 203 | 204 | return $this; 205 | } 206 | 207 | /** 208 | * @return string 209 | */ 210 | public function getFileExtensionAttribute() 211 | { 212 | return array_has($this->attributes, 'file_extension') 213 | ? $this->attributes['file_extension'] 214 | : NULL; 215 | } 216 | 217 | /** 218 | * @param string $extension 219 | * @return $this 220 | */ 221 | public function setFileExtensionAttribute($extension) 222 | { 223 | $this->attributes['file_extension'] = $extension; 224 | 225 | return $this; 226 | } 227 | 228 | /** 229 | * @return string 230 | */ 231 | public function getFileSizeAttribute() 232 | { 233 | return array_has($this->attributes, 'file_size') 234 | ? $this->attributes['file_size'] 235 | : NULL; 236 | } 237 | 238 | /** 239 | * @param string $size 240 | * @return $this 241 | */ 242 | public function setFileSizeAttribute($size) 243 | { 244 | $this->attributes['file_size'] = $size; 245 | 246 | return $this; 247 | } 248 | 249 | /** 250 | * @return string 251 | */ 252 | public function getMimeTypeAttribute() 253 | { 254 | return array_has($this->attributes, 'mime_type') 255 | ? $this->attributes['mime_type'] 256 | : NULL; 257 | } 258 | 259 | /** 260 | * @param string $type 261 | * @return $this 262 | */ 263 | public function setMimeTypeAttribute($type) 264 | { 265 | $this->attributes['mime_type'] = $type; 266 | 267 | return $this; 268 | } 269 | 270 | } -------------------------------------------------------------------------------- /src/Models/AttacherImage.php: -------------------------------------------------------------------------------- 1 | imageManager = $imageManager; 23 | } 24 | 25 | /** 26 | * Creates an Intervention\Image from UploadedFile 27 | * 28 | * @return Image 29 | */ 30 | public function createImageFromAttacherImage(AttacherImageContract $attacherImage) 31 | { 32 | return $this->imageManager->make($attacherImage->getUploadedFile()); 33 | } 34 | 35 | /** 36 | * @param AttacherImageContract $attacherImage 37 | * @param array $processing_styles 38 | * @return Collection|null 39 | */ 40 | public function applyStyles(AttacherImageContract $attacherImage, $processing_styles) 41 | { 42 | $style_routine = $this->getProcessingStyleRoutine($attacherImage, $processing_styles); 43 | $styles_to_be_applied = empty($style_routine) ? head($processing_styles) : $style_routine; 44 | 45 | if (empty($styles_to_be_applied)) 46 | { 47 | return null; 48 | } 49 | 50 | $collection_of_images = new Collection; 51 | 52 | foreach ($styles_to_be_applied as $style_name => $method) 53 | { 54 | $image = $this->applyStyle($attacherImage, $method); 55 | $collection_of_images->put($style_name,$image); 56 | } 57 | 58 | return $collection_of_images; 59 | } 60 | 61 | /** 62 | * @param AttacherImageContract $attacherImage 63 | * @param callable $style 64 | * @return Image 65 | */ 66 | public function applyStyle(AttacherImageContract $attacherImage, Callable $style) 67 | { 68 | $image = $this->createImageFromAttacherImage($attacherImage); 69 | 70 | $processed = $style($image); 71 | 72 | return (is_null($processed)) ? $image : $processed; 73 | } 74 | 75 | /** 76 | * @param AttacherImageContract $attacherImage 77 | * @param array $processing_styles 78 | * @return array 79 | */ 80 | public function getProcessingStyleRoutine(AttacherImageContract $attacherImage, array $processing_styles) 81 | { 82 | return array_get($processing_styles, $attacherImage->getProcessingStyleRoutine(), []); 83 | } 84 | 85 | } -------------------------------------------------------------------------------- /src/Processors/ImageProcessor.php: -------------------------------------------------------------------------------- 1 | format('Y_m_d') . '_000000_'; 26 | $migration_file_name = '2016_01_12_000000_create_attacher_images_table.php'; 27 | 28 | $this->publishes( 29 | [ 30 | __DIR__ . '/../../resources/config/img-attacher.php' 31 | => config_path('img-attacher.php'), 32 | __DIR__ . '/../../resources/database/migrations/' . $migration_file_name 33 | => database_path('migrations/'. $migration_file_name), 34 | ] 35 | ); 36 | 37 | $this->mergeConfigFrom( 38 | __DIR__ . '/../../resources/config/img-attacher.php', 'img-attacher' 39 | ); 40 | 41 | $this->registerEvents(); 42 | } 43 | 44 | /** 45 | * Register any package services. 46 | * 47 | * @return void 48 | */ 49 | public function register() 50 | { 51 | $this->registerBindings(); 52 | $this->registerDependencies(); 53 | $this->registerAttacherManager(); 54 | $this->registerFilePathManager(); 55 | $this->registerFileManager(); 56 | $this->registerImageProcessor(); 57 | } 58 | 59 | private function registerEvents() 60 | { 61 | AttacherImage::saving(function ($model) { 62 | if ( ! app('img-attacher')->writeImage($model)) { 63 | return false; 64 | } 65 | return true; 66 | }); 67 | 68 | AttacherImage::deleting(function ($model) { 69 | if ( ! app('img-attacher')->deleteImages($model)) { 70 | return false; 71 | } 72 | return true; 73 | }); 74 | 75 | } 76 | 77 | private function registerAttacherManager() 78 | { 79 | $this->app->singleton('img-attacher', 'CbCaio\ImgAttacher\AttacherManager'); 80 | } 81 | 82 | 83 | private function registerBindings() 84 | { 85 | $this->app->bind('CbCaio\ImgAttacher\Contracts\AttacherImageContract', 86 | 'CbCaio\ImgAttacher\Models\AttacherImage'); 87 | $this->app->bind('CbCaio\ImgAttacher\Contracts\FilePathManagerContract', 88 | 'CbCaio\ImgAttacher\Managers\FilePathManager'); 89 | $this->app->bind('CbCaio\ImgAttacher\Contracts\FileManagerContract', 90 | 'CbCaio\ImgAttacher\Managers\FileManager'); 91 | } 92 | 93 | private function registerFileManager() 94 | { 95 | $this->app->singleton('img-attacher.FileManager', 'CbCaio\ImgAttacher\Managers\FileManager'); 96 | } 97 | 98 | private function registerFilePathManager() 99 | { 100 | $this->app->singleton('img-attacher.FilePathManager', function () 101 | { 102 | $config = config('img-attacher'); 103 | 104 | return new FilePathManager($config['path_to_save'],$config['base_url'], $config['processing_styles_routines']); 105 | }); 106 | } 107 | 108 | private function registerImageProcessor() 109 | { 110 | $this->app->singleton('img-attacher.ImageProcessor','CbCaio\ImgAttacher\Processors\ImageProcessor' ); 111 | } 112 | 113 | private function registerDependencies() 114 | { 115 | $this->app->register(\GrahamCampbell\Flysystem\FlysystemServiceProvider::class); 116 | $this->app->register(\Intervention\Image\ImageServiceProvider::class); 117 | } 118 | 119 | } -------------------------------------------------------------------------------- /src/Traits/HasImage.php: -------------------------------------------------------------------------------- 1 | morphOne(config('img-attacher.model'), 'owner'); 15 | } 16 | 17 | /** 18 | * @param UploadedFile $imageFile 19 | * @param string $processing_style_routine 20 | * @param string $filename 21 | * @return \Illuminate\Database\Eloquent\Model 22 | */ 23 | public function addImage(UploadedFile $imageFile, $processing_style_routine = NULL, $filename = NULL) 24 | { 25 | $this->hasImage() 26 | ? $attacherImage = $this->getImage() 27 | : $attacherImage = $this->createAttacherImageModel(); 28 | 29 | $attacherImage->setAttributesFromFile($imageFile, $filename); 30 | $attacherImage->setProcessingStyleRoutine($processing_style_routine); 31 | 32 | return $this->image()->save($attacherImage); 33 | } 34 | 35 | /** 36 | * @return bool 37 | */ 38 | public function deleteImage() 39 | { 40 | if ($this->hasImage()) 41 | { 42 | $this->getImage()->delete(); 43 | 44 | return TRUE; 45 | } else 46 | { 47 | return FALSE; 48 | } 49 | } 50 | 51 | /** 52 | * @return AttacherImage 53 | */ 54 | public function getImage() 55 | { 56 | $image = $this->image()->getResults(); 57 | 58 | return empty($image) ? NULL : $image; 59 | } 60 | 61 | /** 62 | * @return bool 63 | */ 64 | public function hasImage() 65 | { 66 | return !is_null($this->getImage()); 67 | } 68 | 69 | /** 70 | * @return AttacherImage 71 | */ 72 | protected function createAttacherImageModel() 73 | { 74 | return $this->image()->getRelated()->newInstance(); 75 | } 76 | } -------------------------------------------------------------------------------- /tests/AbstractTestCase.php: -------------------------------------------------------------------------------- 1 | set('database.default', 'testbench'); 26 | 27 | $app['config']->set('database.connections.testbench', [ 28 | 'driver' => 'sqlite', 29 | 'database' => ':memory:', 30 | 'prefix' => '', 31 | ]); 32 | 33 | $app['config']->set('auth.model', 'CbCaio\ImgAttacher\Testing\User'); 34 | } 35 | 36 | /** 37 | * Performs migrations. 38 | * @param string|array $path string or array of paths to find migrations. 39 | */ 40 | public function migrate($path = null) 41 | { 42 | $paths = is_array($path) ? $path : [$path]; 43 | 44 | foreach ($paths as $path) { 45 | $code = $this->artisan( 46 | 'migrate', 47 | ['--realpath' => $path] 48 | ); 49 | 50 | $this->assertEquals( 51 | 0, 52 | $code, 53 | sprintf( 54 | 'Something went wrong when migrating %s.', 55 | str_replace(realpath($this->srcPath('..')), '', realpath($path)) 56 | ) 57 | ); 58 | } 59 | } 60 | 61 | /** 62 | * Seed database. 63 | * @param string|array $seeder String or Array of classes to seed. 64 | */ 65 | public function seed($seeder = 'UsersTableSeeder') 66 | { 67 | $seeders = is_array($seeder) ? $seeder : [$seeder]; 68 | 69 | foreach ($seeders as $seeder) { 70 | $code = $this->artisan( 71 | 'db:seed', 72 | ['--class' => str_contains($seeder, '\\') ? $seeder : 'CbCaio\ImgAttacher\Testing\\'.$seeder] 73 | ); 74 | 75 | $this->assertEquals(0, $code, sprintf('Something went wrong when seeding %s.', $seeder)); 76 | } 77 | } 78 | 79 | /** 80 | * Assert if the instance or classname uses a trait. 81 | * @param string $trait Name of the trait (namespaced) 82 | * @param mixed $instance Instance or name of the class 83 | */ 84 | public function assertUsingTrait($trait, $instance) 85 | { 86 | $this->assertTrue( 87 | in_array($trait, class_uses_recursive($instance)), 88 | sprintf( 89 | 'Fail to assert the class %s uses trait %s.', 90 | is_string($instance) ? $instance : get_class($instance), 91 | $trait 92 | ) 93 | ); 94 | } 95 | 96 | /** 97 | * Get source package path. 98 | * 99 | * @param string $path 100 | * 101 | * @return string 102 | */ 103 | public function srcPath($path = null) 104 | { 105 | return __DIR__.'/../src'.$this->parseSubPath($path); 106 | } 107 | 108 | /** 109 | * Get the resources path. 110 | * 111 | * @param string $path 112 | * 113 | * @return string 114 | */ 115 | public function resourcePath($path = null) 116 | { 117 | return $this->srcPath('/../resources').$this->parseSubPath($path); 118 | } 119 | 120 | /** 121 | * Stubs path. 122 | * 123 | * @param string $path 124 | * 125 | * @return string 126 | */ 127 | public function stubsPath($path = null) 128 | { 129 | return __DIR__.'/stubs'.$this->parseSubPath($path); 130 | } 131 | 132 | /** 133 | * @param string $path 134 | * @return string 135 | */ 136 | public function filesPath($path = null) 137 | { 138 | return __DIR__.'/stubs/files'.$this->parseSubPath($path); 139 | } 140 | 141 | /** 142 | * Get package providers. 143 | * @param \Illuminate\Foundation\Application $app 144 | * @return array 145 | */ 146 | protected function getPackageProviders($app) 147 | { 148 | if (in_array($this->getName(), $this->skipProvidersFor)) { 149 | return []; 150 | } 151 | 152 | return $this->providers; 153 | } 154 | 155 | /** 156 | * Trim slashes of path and return prefixed by DIRECTORY_SEPARATOR. 157 | * @param string $path 158 | * @return string 159 | */ 160 | protected function parseSubPath($path) 161 | { 162 | return $path ? DIRECTORY_SEPARATOR.trim($path, DIRECTORY_SEPARATOR) : ''; 163 | } 164 | } -------------------------------------------------------------------------------- /tests/Functionality/FilePathManagerTest.php: -------------------------------------------------------------------------------- 1 | migrate([ 36 | $this->stubsPath('database/migrations'), 37 | $this->resourcePath('migrations'), 38 | ]); 39 | 40 | $this->seed([ 41 | 'UserTableSeeder' 42 | ]); 43 | 44 | $this->uploaded_file = new UploadedFile($this->filesPath('laravel.png'), 'laravel.png', 'image/png'); 45 | $this->uploaded_file_2 = new UploadedFile($this->filesPath('php.png'), 'php.png', 'image/png'); 46 | $this->model = \CbCaio\ImgAttacher\Testing\User::query('id', '=', 1)->first(); 47 | $this->filepathmanager = app('img-attacher.FilePathManager'); 48 | } 49 | 50 | /** @test */ 51 | public function constructor_is_correclty_created_with_configs_from_file() 52 | { 53 | $config = config('img-attacher'); 54 | $path_to_save_default = $config['path_to_save']; 55 | $base_url = $config['base_url']; 56 | $processing_styles_routine = $config['processing_styles_routines']; 57 | 58 | $this->assertEquals($path_to_save_default, $this->filepathmanager->getPath()); 59 | $this->assertEquals($base_url, $this->filepathmanager->getBaseUrl()); 60 | $this->assertEquals($processing_styles_routine, $this->filepathmanager->getProcessingStylesRoutines()); 61 | } 62 | 63 | /** @test */ 64 | public function parse_path_with_valid_style_specified() 65 | { 66 | $this->model->addImage($this->uploaded_file); 67 | $image = $this->model->getImage(); 68 | 69 | $expected_path = '/uploads/images/User/1/original_style/laravel.png'; 70 | $this->assertEquals($expected_path, $this->filepathmanager->parsePath($image, 'original_style')); 71 | } 72 | 73 | /** @test */ 74 | public function parse_path_with_valid_style_specified_and_file_name_specified() 75 | { 76 | $this->model->addImage($this->uploaded_file, NULL, 'file.png'); 77 | $image = $this->model->getImage(); 78 | 79 | $expected_path = '/uploads/images/User/1/original_style/file.png'; 80 | $this->assertEquals($expected_path, $this->filepathmanager->parsePath($image, 'original_style')); 81 | $expected_path = '/uploads/images/User/1/original_style2/file.png'; 82 | $this->assertEquals($expected_path, $this->filepathmanager->parsePath($image, 'original_style2')); 83 | $expected_path = '/uploads/images/User/1/original_style3/file.png'; 84 | $this->assertEquals($expected_path, $this->filepathmanager->parsePath($image, 'original_style3')); 85 | $expected_path = '/uploads/images/User/1/:style/file.png'; 86 | $this->assertEquals($expected_path, $this->filepathmanager->parsePath($image, 'or1igin1al_style3')); 87 | } 88 | 89 | /** @test */ 90 | public function parse_path_with_invalid_style_specified() 91 | { 92 | $this->model->addImage($this->uploaded_file); 93 | $image = $this->model->getImage(); 94 | 95 | $expected_path = '/uploads/images/User/1/:style/laravel.png'; 96 | $this->assertEquals($expected_path, $this->filepathmanager->parsePath($image, '2original_style3')); 97 | 98 | $expected_path = '/uploads/images/User/1/:style/laravel.png'; 99 | $this->assertEquals($expected_path, $this->filepathmanager->parsePath($image, 'foo-bar')); 100 | } 101 | 102 | /** @test */ 103 | public function parse_path_with_valid_style_specified_and_different_than_default() 104 | { 105 | $this->model->addImage($this->uploaded_file, 'default_routine2'); 106 | $image = $this->model->getImage(); 107 | 108 | $expected_path = '/uploads/images/User/1/original_style3/laravel.png'; 109 | $this->assertEquals($expected_path, $this->filepathmanager->parsePath($image, 'original_style3')); 110 | 111 | $expected_path = '/uploads/images/User/1/original_style4/laravel.png'; 112 | $this->assertEquals($expected_path, $this->filepathmanager->parsePath($image, 'original_style4')); 113 | 114 | $expected_path = '/uploads/images/User/1/original_style/laravel.png'; 115 | $this->assertEquals($expected_path, $this->filepathmanager->parsePath($image, 'original_style')); 116 | } 117 | 118 | /** @test */ 119 | public function parse_previous_path_returns_expected_path() 120 | { 121 | $this->model->addImage($this->uploaded_file); 122 | $image = $this->model->getImage(); 123 | 124 | // expect null because there is no previously saved image 125 | $this->assertNull($this->filepathmanager->parsePreviousPath($image)); 126 | 127 | $image->setAttributesFromFile($this->uploaded_file_2); 128 | $this->assertEquals('/uploads/images/User/1', $this->filepathmanager->parsePreviousPath($image)); 129 | } 130 | 131 | /** @test */ 132 | public function parse_delete_path_returns_correct_path() 133 | { 134 | $this->model->addImage($this->uploaded_file); 135 | $image = $this->model->getImage(); 136 | 137 | $this->assertEquals('/uploads/images/User/1', $this->filepathmanager->parseDeletePath($image)); 138 | 139 | // the same with different routine specified 140 | $this->model->addImage($this->uploaded_file, 'default_routine2', 'foo.png'); 141 | $image = $this->model->getImage(); 142 | 143 | $this->assertEquals('/uploads/images/User/1', $this->filepathmanager->parseDeletePath($image)); 144 | } 145 | 146 | /** @test */ 147 | public function parse_delete_path_returns_correct_path_to_style() 148 | { 149 | $this->model->addImage($this->uploaded_file); 150 | $image = $this->model->getImage(); 151 | 152 | // with valid style equals the default 153 | $this->assertEquals('/uploads/images/User/1/original_style', 154 | $this->filepathmanager->parseDeletePath($image, 'original_style')); 155 | 156 | $this->assertEquals('/uploads/images/User/1/original_style2', 157 | $this->filepathmanager->parseDeletePath($image, 'original_style2')); 158 | 159 | $this->assertEquals('/uploads/images/User/1/original_style3', 160 | $this->filepathmanager->parseDeletePath($image, 'original_style3')); 161 | 162 | // with invalid style 163 | $this->assertEquals('/uploads/images/User/1/:style', 164 | $this->filepathmanager->parseDeletePath($image, 'foo_bar')); 165 | 166 | // the same with different routine specified 167 | $this->model->addImage($this->uploaded_file, 'default_routine2', 'foo.png'); 168 | $image = $this->model->getImage(); 169 | 170 | // with valid style 171 | $this->assertEquals('/uploads/images/User/1/original_style', 172 | $this->filepathmanager->parseDeletePath($image, 'original_style')); 173 | 174 | $this->assertEquals('/uploads/images/User/1/original_style2', 175 | $this->filepathmanager->parseDeletePath($image, 'original_style2')); 176 | 177 | $this->assertEquals('/uploads/images/User/1/original_style3', 178 | $this->filepathmanager->parseDeletePath($image, 'original_style3')); 179 | 180 | // with invalid style 181 | $this->assertEquals('/uploads/images/User/1/:style', 182 | $this->filepathmanager->parseDeletePath($image, 'foo_bar')); 183 | } 184 | 185 | /** @test */ 186 | public function parse_url_returns_correct_path_to_file() 187 | { 188 | $this->model->addImage($this->uploaded_file); 189 | $image = $this->model->getImage(); 190 | 191 | // default 192 | $this->assertEquals('http://localhost/files/uploads/images/User/1/original_style/laravel.png', 193 | $this->filepathmanager->parseUrl($image, 'original_style')); 194 | 195 | // with valid style equals the default 196 | $this->assertEquals('http://localhost/files/uploads/images/User/1/original_style/laravel.png', 197 | $this->filepathmanager->parseUrl($image, 'original_style')); 198 | // with invalid style 199 | $this->assertEquals('http://localhost/files/uploads/images/User/1/:style/laravel.png', 200 | $this->filepathmanager->parseUrl($image, 'foo_bar')); 201 | 202 | // with valid style different than default 203 | $this->assertEquals('http://localhost/files/uploads/images/User/1/original_style2/laravel.png', 204 | $this->filepathmanager->parseUrl($image, 'original_style2')); 205 | 206 | 207 | $this->model->addImage($this->uploaded_file, NULL, 'foo.png'); 208 | $image = $this->model->getImage(); 209 | 210 | $this->assertEquals('foo.png', $image->getFileNameAttribute()); 211 | 212 | // the same with defined filename 213 | 214 | // default 215 | $this->assertEquals('http://localhost/files/uploads/images/User/1/original_style/foo.png', 216 | $this->filepathmanager->parseUrl($image, 'original_style')); 217 | 218 | // with valid style equals the default 219 | $this->assertEquals('http://localhost/files/uploads/images/User/1/original_style/foo.png', 220 | $this->filepathmanager->parseUrl($image, 'original_style')); 221 | // with invalid style 222 | $this->assertEquals('http://localhost/files/uploads/images/User/1/:style/foo.png', 223 | $this->filepathmanager->parseUrl($image, 'foo_bar')); 224 | 225 | // with valid style different than default 226 | $this->assertEquals('http://localhost/files/uploads/images/User/1/original_style2/foo.png', 227 | $this->filepathmanager->parseUrl($image, 'original_style2')); 228 | } 229 | 230 | /** @test */ 231 | public function parse_attributes_set_attributes_defined_in_arguments_array() 232 | { 233 | $this->filepathmanager->setArguments( 234 | [ 235 | ':id' => 'id', 236 | ':filename' => 'file_name', 237 | ':file_extension' => 'file_extension', 238 | ':file_size' => 'file_size', 239 | ':created' => 'created_at', 240 | ':updated' => 'updated_at' 241 | ] 242 | ); 243 | 244 | $this->model->addImage($this->uploaded_file); 245 | $image = $this->model->getImage(); 246 | 247 | $this->assertEquals("foo/bar/1/bar-again/laravel.png", 248 | $this->filepathmanager->parseAttributes($image, 'foo/bar/:id/bar-again/:filename')); 249 | 250 | $this->assertEquals("png/154178/foo-bar/laravel.png", 251 | $this->filepathmanager->parseAttributes($image, 252 | ':file_extension/:file_size/foo-bar/:filename')); 253 | } 254 | 255 | /** @test */ 256 | public function parse_style_can_set_style_parameter_from_string() 257 | { 258 | // existing style 259 | $this->assertEquals("/foo/bar/original_style2/foobar", $this->filepathmanager->parseStyle( 260 | 'original_style2', 261 | '/foo/bar/:style/foobar') 262 | ); 263 | $this->assertEquals("/foo/bar/original_style/", 264 | $this->filepathmanager->parseStyle('original_style', '/foo/bar/:style/')); 265 | $this->assertNotEquals("/foo/bar/original_style", $this->filepathmanager->parseStyle('original_style', 266 | '/foo/bar/:style/')); 267 | 268 | // invalid style 269 | $this->assertEquals("/foo/bar/:style/foobar", 270 | $this->filepathmanager->parseStyle('foo-bar', '/foo/bar/:style/foobar')); 271 | $this->assertEquals("/foo/bar/:style", $this->filepathmanager->parseStyle('test', '/foo/bar/:style')); 272 | } 273 | 274 | /** @test */ 275 | public function parse_class_can_set_parameters_based_on_owner_model() 276 | { 277 | $this->model->addImage($this->uploaded_file); 278 | $image = $this->model->getImage(); 279 | 280 | $this->assertEquals('/User/1/hadouken', 281 | $this->filepathmanager->parseOwnerClass($image,'/:owner_class/:owner_id/hadouken')); 282 | $this->assertEquals('/1/User/hadouken', 283 | $this->filepathmanager->parseOwnerClass($image,'/:owner_id/:owner_class/hadouken')); 284 | $this->assertEquals('User/1/hadouken', 285 | $this->filepathmanager->parseOwnerClass($image, ':owner_class/:owner_id/hadouken')); 286 | $this->assertEquals('1/User/hadouken', 287 | $this->filepathmanager->parseOwnerClass($image, ':owner_id/:owner_class/hadouken')); 288 | $this->assertEquals('/hadouken/User/1', 289 | $this->filepathmanager->parseOwnerClass($image, '/hadouken/:owner_class/:owner_id')); 290 | $this->assertEquals('/hadouken/1/User', 291 | $this->filepathmanager->parseOwnerClass($image, '/hadouken/:owner_id/:owner_class')); 292 | $this->assertEquals('/hadouken/User/1', 293 | $this->filepathmanager->parseOwnerClass($image, '/hadouken/:owner_class/:owner_id')); 294 | $this->assertEquals('/hadouken/1/User', 295 | $this->filepathmanager->parseOwnerClass($image, '/hadouken/:owner_id/:owner_class')); 296 | } 297 | 298 | } 299 | -------------------------------------------------------------------------------- /tests/Functionality/HasImageTraitTest.php: -------------------------------------------------------------------------------- 1 | migrate([ 31 | $this->stubsPath('database/migrations'), 32 | $this->resourcePath('migrations'), 33 | ]); 34 | 35 | $this->seed([ 36 | 'UserTableSeeder' 37 | ]); 38 | 39 | $this->uploaded_file = new UploadedFile($this->filesPath('laravel.png'), 'laravel.png', 'image/png'); 40 | $this->model = \CbCaio\ImgAttacher\Testing\User::query('id', '=', 1)->first(); 41 | } 42 | 43 | /** @test */ 44 | public function can_retrieve_image_morph_one_relationship() 45 | { 46 | $this->assertTrue($this->model->image() instanceof MorphOne); 47 | } 48 | 49 | /** @test */ 50 | public function can_add_image() 51 | { 52 | $this->model->addImage($this->uploaded_file); 53 | $this->assertTrue($this->model->hasImage()); 54 | $this->model->deleteImage(); 55 | } 56 | 57 | /** @test */ 58 | public function add_image_returns_attacher_image_if_image_added_successfully() 59 | { 60 | $this->model->addImage($this->uploaded_file); 61 | $this->assertTrue($this->model->getImage() instanceof AttacherImage); 62 | $this->model->deleteImage(); 63 | } 64 | 65 | /** @test */ 66 | public function can_delete_image() 67 | { 68 | $this->model->addImage($this->uploaded_file); 69 | $this->model->deleteImage(); 70 | $this->assertFalse($this->model->hasImage()); 71 | } 72 | 73 | /** @test */ 74 | public function delete_image_returns_true_if_image_deleted_successfully() 75 | { 76 | $this->model->addImage($this->uploaded_file); 77 | $this->assertTrue($this->model->deleteImage()); 78 | } 79 | 80 | /** @test */ 81 | public function trying_to_delete_inexistent_image_returns_false() 82 | { 83 | $this->assertFalse($this->model->deleteImage()); 84 | } 85 | 86 | /** @test */ 87 | public function can_verify_if_has_image() 88 | { 89 | $this->assertFalse($this->model->hasImage()); 90 | $this->model->addImage($this->uploaded_file); 91 | $this->assertTrue($this->model->hasImage()); 92 | $this->model->deleteImage(); 93 | } 94 | 95 | /** @test */ 96 | public function related_instance_is_instance_of_attacher_image() 97 | { 98 | $this->assertTrue($this->model->image()->getRelated()->newInstance() instanceof AttacherImage); 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /tests/Usage/AttacherManagerTest.php: -------------------------------------------------------------------------------- 1 | getFileManager(); 17 | 18 | $this->assertTrue($return instanceof FileManager); 19 | } 20 | 21 | /** @test */ 22 | public function can_retrieve_file_path_manager() 23 | { 24 | $return = app('img-attacher')->getFilePathManager(); 25 | 26 | $this->assertTrue($return instanceof FilePathManager); 27 | } 28 | 29 | /** @test */ 30 | public function can_retrieve_image_processor() 31 | { 32 | $return = app('img-attacher')->getImageProcessor(); 33 | 34 | $this->assertTrue($return instanceof ImageProcessor); 35 | } 36 | 37 | /** @test */ 38 | public function can_retrieve_processing_styles_from_config_file() 39 | { 40 | $string = app('img-attacher')->getProcessingStylesRoutines(); 41 | 42 | $this->assertEquals($string, app('config')->get('img-attacher')['processing_styles_routines']); 43 | } 44 | 45 | /** @test */ 46 | public function can_retrieve_base_url_from_config_file() 47 | { 48 | $string = app('img-attacher')->getBaseUrl(); 49 | 50 | $this->assertEquals($string, app('config')->get('img-attacher')['base_url']); 51 | } 52 | 53 | /** @test */ 54 | public function can_retrieve_path_to_save_from_config_file() 55 | { 56 | $string = app('img-attacher')->getPathToSave(); 57 | 58 | $this->assertEquals($string, app('config')->get('img-attacher')['path_to_save']); 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /tests/Usage/PackageTest.php: -------------------------------------------------------------------------------- 1 | migrate([ 34 | $this->stubsPath('database/migrations'), 35 | $this->resourcePath('migrations'), 36 | ]); 37 | 38 | $this->seed([ 39 | 'UserTableSeeder' 40 | ]); 41 | 42 | $this->uploaded_file = new UploadedFile($this->filesPath('laravel.png'), 'laravel.png', 'image/png'); 43 | $this->uploaded_file_2 = new UploadedFile($this->filesPath('php.png'), 'php.png', 'image/png'); 44 | $this->model = \CbCaio\ImgAttacher\Testing\User::query('id', '=', 1)->first(); 45 | $this->filemanager = app('img-attacher.FileManager'); 46 | } 47 | 48 | /** 49 | * Asserting if the User model has traits. 50 | */ 51 | public function testUserShouldHasPermissionsTrait() 52 | { 53 | $this->assertUsingTrait( 54 | 'CbCaio\ImgAttacher\Traits\HasImage', 55 | 'CbCaio\ImgAttacher\Testing\User' 56 | ); 57 | } 58 | 59 | 60 | /** @test */ 61 | public function a_model_can_add_a_relationship_from_uploaded_image() 62 | { 63 | $this->model->addImage($this->uploaded_file); 64 | $this->assertTrue($this->model->hasImage()); 65 | $this->assertTrue($this->model->getImage() instanceof AttacherImage); 66 | 67 | $this->model->deleteImage(); 68 | } 69 | 70 | /** @test */ 71 | public function a_model_can_delete_its_image_relationship() 72 | { 73 | $this->model->addImage($this->uploaded_file); 74 | $this->assertTrue($this->model->deleteImage()); 75 | $this->assertFalse($this->model->hasImage()); 76 | } 77 | 78 | /** @test */ 79 | public function models_can_override_existing_image() 80 | { 81 | $this->model->addImage($this->uploaded_file); 82 | $image = $this->model->getImage(); 83 | $this->assertEquals($image->getFileNameAttribute(), 'laravel.png'); 84 | 85 | $this->model->addImage($this->uploaded_file_2); 86 | $image = $this->model->getImage(); 87 | $this->assertEquals($image->getFileNameAttribute(), 'php.png'); 88 | 89 | $this->model->deleteImage(); 90 | } 91 | 92 | /** @test */ 93 | public function all_styles_are_being_processed() 94 | { 95 | $this->model->addImage($this->uploaded_file); 96 | $image = $this->model->getImage(); 97 | 98 | $this->assertEquals("/uploads/images/User/1/original_style/laravel.png", $image->getPath('original_style')); 99 | $this->assertEquals("/uploads/images/User/1/original_style2/laravel.png", $image->getPath('original_style2')); 100 | 101 | $this->model->deleteImage(); 102 | 103 | $this->model->addImage($this->uploaded_file, 'default_routine2'); 104 | 105 | $image = $this->model->getImage(); 106 | 107 | $this->assertNotEquals("/uploads/images/User/1/original_style/laravel.png", 108 | $image->getPath('original_style2')); 109 | 110 | $this->assertEquals("/uploads/images/User/1/:style/laravel.png", 111 | $image->getPath('original_style222')); 112 | $this->assertEquals("/uploads/images/User/1/original_style3/laravel.png", 113 | $image->getPath('original_style3')); 114 | $this->assertEquals("/uploads/images/User/1/original_style4/laravel.png", 115 | $image->getPath('original_style4')); 116 | 117 | $this->model->deleteImage(); 118 | } 119 | 120 | 121 | /** @test */ 122 | public function image_file_is_created_when_relationship_is_added() 123 | { 124 | $this->model->addImage($this->uploaded_file); 125 | $image = $this->model->getImage(); 126 | 127 | $wasWritten = $this->filemanager->pathExists($image->getPath('original_style')); 128 | $this->assertTrue($wasWritten); 129 | 130 | $wasWritten = $this->filemanager->pathExists($image->getPath('original_style2')); 131 | $this->assertTrue($wasWritten); 132 | 133 | $this->model->deleteImage(); 134 | } 135 | 136 | public function image_file_overides_old_files_when_relationship_is_added_again() 137 | { 138 | $this->model->addImage($this->uploaded_file); 139 | $image = $this->model->getImage(); 140 | 141 | $firstFilePath = $image->getPath('original_style'); 142 | $wasWrittenFirstTime = $this->filemanager->pathExists($firstFilePath); 143 | $this->assertTrue($wasWrittenFirstTime); 144 | 145 | $firstFilePathOtherStyle = $image->getPath('original_style2'); 146 | $wasWrittenFirstTimeOtherStyle = $this->filemanager->pathExists($firstFilePathOtherStyle); 147 | $this->assertTrue($wasWrittenFirstTimeOtherStyle); 148 | 149 | $this->model->addImage($this->uploaded_file_2); 150 | $image = $this->model->getImage(); 151 | 152 | $secondFilePath = $image->getPath('original_style'); 153 | $secondFilePathOtherStyle = $image->getPath('original_style2'); 154 | 155 | $wasWrittenSecondTime = $this->filemanager->pathExists($secondFilePath); 156 | 157 | $wasWrittenSecondTimeOtherStyle = $this->filemanager->pathExists($secondFilePathOtherStyle); 158 | $this->assertNotEquals($firstFilePath, $image->getPath('original_style')); 159 | $this->assertNotEquals($firstFilePathOtherStyle, $image->getPath('original_style2')); 160 | 161 | $this->assertTrue($wasWrittenSecondTime); 162 | $this->assertTrue($wasWrittenSecondTimeOtherStyle); 163 | 164 | $this->model->deleteImage(); 165 | } 166 | } 167 | -------------------------------------------------------------------------------- /tests/stubs/database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('name'); 19 | $table->string('email')->unique(); 20 | $table->string('password', 60); 21 | $table->rememberToken(); 22 | $table->timestamps(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | Schema::drop('users'); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /tests/stubs/database/migrations/2014_10_12_100000_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index(); 18 | $table->string('token')->index(); 19 | $table->timestamp('created_at'); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::drop('password_resets'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /tests/stubs/database/migrations/2016_01_12_000000_create_attacher_images_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 19 | $table->unsignedInteger('owner_id')->index(); 20 | $table->string('owner_type')->index(); 21 | $table->string('file_extension'); 22 | $table->string("file_name")->nullable(); 23 | $table->smallInteger("file_size", FALSE, TRUE)->nullable(); 24 | $table->string("mime_type")->nullable(); 25 | $table->timestamps(); 26 | }); 27 | 28 | } 29 | 30 | /** 31 | * Reverse the migrations. 32 | * 33 | * @return void 34 | */ 35 | public function down() 36 | { 37 | Schema::drop('attacher_images'); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /tests/stubs/database/seeds/UsersTableSeeder.php: -------------------------------------------------------------------------------- 1 | 'user_1', 13 | 'email' => 'user_1@localhost.com', 14 | 'password' => bcrypt('123456'), 15 | ]); 16 | User::create([ 17 | 'name' => 'user_2', 18 | 'email' => 'user_2@localhost.com', 19 | 'password' => bcrypt('123456'), 20 | ]); 21 | } 22 | } -------------------------------------------------------------------------------- /tests/stubs/files/laravel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cbcaio/Image-Attacher/5cdc824f411a6558791b6f2e6c0d73cf2fb387b6/tests/stubs/files/laravel.png -------------------------------------------------------------------------------- /tests/stubs/files/php.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cbcaio/Image-Attacher/5cdc824f411a6558791b6f2e6c0d73cf2fb387b6/tests/stubs/files/php.png -------------------------------------------------------------------------------- /tests/stubs/models/User.php: -------------------------------------------------------------------------------- 1 |