├── .travis.yml ├── .editorconfig ├── phpunit.xml ├── LICENSE ├── composer.json ├── phpcs.xml.dist ├── .gitignore ├── CONTRIBUTING.md ├── README.md ├── CHANGELOG.md ├── inc └── Enqueue.php └── composer.lock /.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | php: 3 | - '7.3' 4 | before_script: 5 | - pecl install pcov 6 | - npm i -g codecov 7 | - composer install 8 | - ./vendor/bin/pcov clobber 9 | script: 10 | - composer run-script lint 11 | - composer run-script test 12 | - codecov 13 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # This file is for unifying the coding style for different editors and IDEs 2 | # editorconfig.org 3 | 4 | # WordPress Coding Standards 5 | # http://make.wordpress.org/core/handbook/coding-standards/ 6 | 7 | root = true 8 | 9 | [*] 10 | charset = utf-8 11 | end_of_line = lf 12 | insert_final_newline = true 13 | trim_trailing_whitespace = true 14 | indent_style = tab 15 | 16 | [{.jshintrc,*.json,*.yml}] 17 | indent_style = space 18 | indent_size = 2 19 | 20 | [{*.txt,wp-config-sample.php}] 21 | end_of_line = lf 22 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 15 | 16 | ./tests 17 | 18 | 19 | 20 | 21 | 22 | 23 | ./inc 24 | 25 | 26 | 27 | 28 | 33 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Swashata Ghosh 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "wpackio/enqueue", 3 | "description": "API to enqueue assets generated by @wpackio/scripts into your WordPress plugin or theme.", 4 | "type": "library", 5 | "license": "MIT", 6 | "authors": [ 7 | { 8 | "name": "Swashata Ghosh", 9 | "email": "swashata4u@gmail.com" 10 | } 11 | ], 12 | "require": { 13 | "php": ">=5.6" 14 | }, 15 | "require-dev": { 16 | "wp-coding-standards/wpcs": "^2.2", 17 | "phpcompatibility/phpcompatibility-wp": "^2.1.0", 18 | "dealerdirect/phpcodesniffer-composer-installer": "^0.5", 19 | "spatie/phpunit-snapshot-assertions": "^1.3.1", 20 | "phpunit/phpunit": "^7.3.0", 21 | "brain/monkey": "^2.2.0", 22 | "giacocorsiglia/wordpress-stubs": "^4.9.5", 23 | "pcov/clobber": "^2.0" 24 | }, 25 | "autoload": { 26 | "psr-4": { 27 | "WPackio\\": "inc" 28 | } 29 | }, 30 | "scripts": { 31 | "test": "vendor/bin/phpunit --colors=always --testdox", 32 | "lint": "vendor/bin/phpcs", 33 | "changelog": "npx auto-changelog --template keepachangelog -v" 34 | }, 35 | "archive": { 36 | "exclude": [ 37 | "./tests", 38 | "./.vscode", 39 | ".editorconfig", 40 | ".travis.yml", 41 | "phpcs.xml", 42 | "phpunit.xml" 43 | ] 44 | }, 45 | "config": { 46 | "allow-plugins": { 47 | "dealerdirect/phpcodesniffer-composer-installer": true 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /phpcs.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 3 | Generally-applicable sniffs for WordPress plugins 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | */tests/phpunit/* 49 | 50 | 51 | 52 | 53 | 54 | . 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | */node_modules/* 64 | */vendor/* 65 | */bower_components/* 66 | */dist/* 67 | */includes/* 68 | */tests/* 69 | 70 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /coverage/ 2 | composer.phar 3 | /vendor/ 4 | .phpcs.xml 5 | phpcs.xml 6 | 7 | # Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control 8 | # You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file 9 | # composer.lock 10 | 11 | # General 12 | .DS_Store 13 | .AppleDouble 14 | .LSOverride 15 | 16 | # Icon must end with two \r 17 | Icon 18 | 19 | 20 | # Thumbnails 21 | ._* 22 | 23 | # Files that might appear in the root of a volume 24 | .DocumentRevisions-V100 25 | .fseventsd 26 | .Spotlight-V100 27 | .TemporaryItems 28 | .Trashes 29 | .VolumeIcon.icns 30 | .com.apple.timemachine.donotpresent 31 | 32 | # Directories potentially created on remote AFP share 33 | .AppleDB 34 | .AppleDesktop 35 | Network Trash Folder 36 | Temporary Items 37 | .apdisk 38 | 39 | # Windows thumbnail cache files 40 | Thumbs.db 41 | ehthumbs.db 42 | ehthumbs_vista.db 43 | 44 | # Dump file 45 | *.stackdump 46 | 47 | # Folder config file 48 | [Dd]esktop.ini 49 | 50 | # Recycle Bin used on file shares 51 | $RECYCLE.BIN/ 52 | 53 | # Windows Installer files 54 | *.cab 55 | *.msi 56 | *.msix 57 | *.msm 58 | *.msp 59 | 60 | # Windows shortcuts 61 | *.lnk 62 | 63 | *~ 64 | 65 | # temporary files which can be created if a process still has a handle open of a deleted file 66 | .fuse_hidden* 67 | 68 | # KDE directory preferences 69 | .directory 70 | 71 | # Linux trash folder which might appear on any partition or disk 72 | .Trash-* 73 | 74 | # .nfs files are created when an open file is removed but is still being accessed 75 | .nfs* 76 | 77 | # Logs 78 | logs 79 | *.log 80 | npm-debug.log* 81 | yarn-debug.log* 82 | yarn-error.log* 83 | 84 | # Runtime data 85 | pids 86 | *.pid 87 | *.seed 88 | *.pid.lock 89 | 90 | # Directory for instrumented libs generated by jscoverage/JSCover 91 | lib-cov 92 | 93 | # Coverage directory used by tools like istanbul 94 | coverage 95 | 96 | # nyc test coverage 97 | .nyc_output 98 | 99 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 100 | .grunt 101 | 102 | # Bower dependency directory (https://bower.io/) 103 | bower_components 104 | 105 | # node-waf configuration 106 | .lock-wscript 107 | 108 | # Compiled binary addons (https://nodejs.org/api/addons.html) 109 | build/Release 110 | 111 | # Dependency directories 112 | node_modules/ 113 | jspm_packages/ 114 | 115 | # TypeScript v1 declaration files 116 | typings/ 117 | 118 | # Optional npm cache directory 119 | .npm 120 | 121 | # Optional eslint cache 122 | .eslintcache 123 | 124 | # Optional REPL history 125 | .node_repl_history 126 | 127 | # Output of 'npm pack' 128 | *.tgz 129 | 130 | # Yarn Integrity file 131 | .yarn-integrity 132 | 133 | # dotenv environment variables file 134 | .env 135 | 136 | # parcel-bundler cache (https://parceljs.org/) 137 | .cache 138 | 139 | # next.js build output 140 | .next 141 | 142 | # nuxt.js build output 143 | .nuxt 144 | 145 | # vuepress build output 146 | .vuepress/dist 147 | 148 | # Serverless directories 149 | .serverless 150 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contribution Guide 2 | 3 | First off, thank you for considering contributing to `wpackio-enqueue`. It's people like you that make `wpackio-enqueue` such a great tool. 4 | 5 | ## How to contribute 6 | 7 | Prerequisites: 8 | 9 | - Familiarity with [pull requests](https://help.github.com/articles/using-pull-requests) and [issues](https://guides.github.com/features/issues/). 10 | - Knowledge of [PHP](https://php.net) and [WordPress API](https://developer.wordpress.org). 11 | 12 | Now let's dive in. 13 | 14 | ## Pull Request Process 15 | 16 | 1. Ensure all lints and tests are passing before creating a pull request. If you 17 | just working on it, and would like to have a review, start your PR title with `[WIP]`. 18 | 2. Make sure you add tests to any new features you are adding. We have a strict 19 | 100% coverage policy here. Codecov checks for it under every PR. 20 | 3. Update the README.md with details of changes to the interface, this includes new environment 21 | variables, exposed ports, useful file locations and container parameters. 22 | 23 | ## Release a version 24 | 25 | 1. Ensure you have `npx` installed. 26 | 2. Run `composer run-script changelog `, like `composer run-script changelog 2.0.0`. 27 | 3. Commit the changelog and tag it. 28 | 29 | # Conduct 30 | 31 | We are committed to providing a friendly, safe and welcoming environment for 32 | all, regardless of gender, sexual orientation, disability, ethnicity, religion, 33 | or similar personal characteristic. 34 | 35 | On communication, please avoid using overtly sexual nicknames or other nicknames that 36 | might detract from a friendly, safe and welcoming environment for all. 37 | 38 | Please be kind and courteous. There's no need to be mean or rude. 39 | Respect that people have differences of opinion and that every design or 40 | implementation choice carries a trade-off and numerous costs. There is seldom 41 | a right answer, merely an optimal answer given a set of values and 42 | circumstances. 43 | 44 | Please keep unstructured critique to a minimum. If you have solid ideas you 45 | want to experiment with, make a fork and see how it works. 46 | 47 | We will exclude you from interaction if you insult, demean or harass anyone. 48 | That is not welcome behaviour. We interpret the term "harassment" as 49 | including the definition in the 50 | [Citizen Code of Conduct](http://citizencodeofconduct.org/); 51 | if you have any lack of clarity about what might be included in that concept, 52 | please read their definition. In particular, we don't tolerate behavior that 53 | excludes people in socially marginalized groups. 54 | 55 | Private harassment is also unacceptable. No matter who you are, if you feel 56 | you have been or are being harassed or made uncomfortable by a community 57 | member, please contact one of the channel ops or any of the 58 | [CONTRIBUTING.md](https://github.com/jden/CONTRIBUTING.md) core team 59 | immediately. Whether you're a regular contributor or a newcomer, we care about 60 | making this community a safe place for you and we've got your back. 61 | 62 | Likewise any spamming, trolling, flaming, baiting or other attention-stealing 63 | behaviour is not welcome. 64 | 65 | # Communication 66 | 67 | Currently we do not have any dedicated channel for communication. But you can 68 | ask me directly at [twitter](https://twitter.com/swashata) or hashtag `#wpackio`. 69 | 70 | GitHub issues are the primary way for communicating about specific proposed 71 | changes to this project. 72 | 73 | In both contexts, please follow the conduct guidelines above. Language issues 74 | are often contentious and we'd like to keep discussion brief, civil and focused 75 | on what we're actually doing, not wandering off into too much imaginary stuff. 76 | 77 | # Frequently Asked Questions 78 | 79 | ## What is the brain monkey thing I see in tests? 80 | 81 | It is an awesome library found [here](https://brain-wp.github.io/BrainMonkey/). 82 | 83 | I have wriiten a little about it [here](https://swas.io/blog/wordpress-plugin-unit-test-with-brainmonkey/). 84 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # [WPACK.IO](http://wpack.io) Enqueue API 2 | 3 | [![Build Status](https://travis-ci.com/swashata/wpackio-enqueue.svg?branch=master)](https://travis-ci.com/swashata/wpackio-enqueue) [![codecov](https://codecov.io/gh/swashata/wpackio-enqueue/branch/master/graph/badge.svg)](https://codecov.io/gh/swashata/wpackio-enqueue) [![Latest Stable Version](https://poser.pugx.org/wpackio/enqueue/v/stable)](https://packagist.org/packages/wpackio/enqueue) 4 | 5 | This is the PHP companion of [`@wpackio/scripts`](https://github.com/swashata/wp-webpack-script). 6 | 7 | It gives you all the APIs you will need to properly consume assets generated from 8 | `@wpackio/scripts` from your WordPress plugins or themes. 9 | 10 | ## Detailed Documentation 11 | 12 | This README only covers the very basics and a quick start guide, without explaining 13 | the overall usage. 14 | 15 | Please visit our [official documentation](https://wpack.io) site for detailed 16 | instruction. 17 | 18 | ## Installation 19 | 20 | ### Using Composer 21 | 22 | We recommend using [composer](https://getcomposer.org/) for using this [library](https://packagist.org/packages/wpackio/enqueue). 23 | 24 | ```bash 25 | composer require wpackio/enqueue 26 | ``` 27 | 28 | Then in your plugin main file or `functions.php` file of your theme, load 29 | composer auto-loader. 30 | 31 | ```php 32 | enqueue = new \WPackio\Enqueue( 'wpackplugin', 'dist', '1.0.0', 'plugin', __FILE__ ); 88 | // Enqueue a few of our entry points 89 | add_action( 'wp_enqueue_scripts', [ $this, 'plugin_enqueue' ] ); 90 | } 91 | 92 | 93 | public function plugin_enqueue() { 94 | $this->enqueue->enqueue( 'app', 'main', [] ); 95 | $this->enqueue->enqueue( 'app', 'mobile', [] ); 96 | $this->enqueue->enqueue( 'foo', 'main', [] ); 97 | } 98 | } 99 | 100 | 101 | // Init 102 | new MyPluginInit(); 103 | ``` 104 | 105 | ## Default configuration when calling `enqueue` 106 | 107 | ```php 108 | [ 109 | 'js' => true, 110 | 'css' => true, 111 | 'js_dep' => [], 112 | 'css_dep' => [], 113 | 'in_footer' => true, 114 | 'media' => 'all', 115 | 'main_js_handle' => null, 116 | 'runtime_js_handle' => null, 117 | ]; 118 | ``` 119 | 120 | `main_js_handle` is added in 3.3 and can predictably set the handle of primary 121 | JavaScript file. Useful for translations etc. 122 | 123 | `runtime_js_handle` is added in 3.4 and can predictably set the handle of the 124 | common runtime JavaScript. This is useful to localize/translate dependent script 125 | handles in the same files entry. By calling `wp_set_script_translations` on the 126 | runtime you can collectively enqueue translate json for all the dependencies on 127 | the entries. 128 | 129 | For information on usage and API, please visit official documentation site 130 | [wpack.io](https://wpack.io). 131 | 132 | ## Avoid conflict in multiple WordPress Plugins 133 | 134 | Always require the latest version of `Wpackio\Enqueue`. The autoloader is set 135 | to load only one instance and will not conflict with existing class. 136 | 137 | However, if you want to load conflict free, kindly use [Strauss](https://github.com/BrianHenryIE/strauss). 138 | 139 | ## Actions and Filters 140 | 141 | ### Filter `wpackio_print_public_path` 142 | 143 | Accepts 3 parameters: 144 | 145 | - `$publichPathUrl` The URL that is used for the publicPath 146 | - `$appName` Application Name 147 | - `$outputPath` Output path relative to the root of this plugin/theme. 148 | 149 | 150 | Using this you can dynamically change the public path that is used for code splitting. 151 | This can be used to change the public path to a CDN. 152 | 153 | #### Example Code to replace all wpack.io public path with a cdn url 154 | 155 | ```php 156 | add_filter( 'wpackio_print_public_path', 'set_public_path_to_cdn' ); 157 | 158 | function set_public_path_to_cdn( $publichPathUrl ) { 159 | $home_url = get_home_url(); // WordPress home url 160 | $cdn_url = 'https://cdn.example.com'; // CDN url 161 | 162 | // replace wordpress home url with cdn url 163 | return str_replace($home_url, $cdn_url, $publichPathUrl); 164 | } 165 | ``` 166 | #### Example Code to the change the public path url only for a specific instance of wpack.io 167 | 168 | ```php 169 | add_filter( 'wpackio_print_public_path', 'set_public_path_to_cdn', 10, 2 ); 170 | 171 | function set_public_path_to_cdn( $publichPathUrl, $appName ) { 172 | 173 | // check for our plugin 174 | if( 'myPlugin' !== $appName ) return $publichPathUrl; 175 | 176 | $home_url = get_home_url(); // WordPress home url 177 | $cdn_url = 'https://cdn.example.com'; // CDN url 178 | 179 | // replace WordPress home url with cdn url 180 | return str_replace($home_url, $cdn_url, $publichPathUrl); 181 | } 182 | ``` -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented in this file. 4 | 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) 6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 | 8 | Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). 9 | 10 | ## [3.5.0](https://github.com/swashata/wpackio-enqueue/compare/3.4.0...3.5.0) 11 | 12 | ### Commits 13 | 14 | - feat: add filter to printPublicPath [`a40c559`](https://github.com/swashata/wpackio-enqueue/commit/a40c559081343145346573b3760e475b558a6f67) 15 | 16 | ## [3.4.0](https://github.com/swashata/wpackio-enqueue/compare/3.3.0...3.4.0) - 2021-07-31 17 | 18 | ### Commits 19 | 20 | - feat: add new config runtime_js_handle [`bd9c9bf`](https://github.com/swashata/wpackio-enqueue/commit/bd9c9bfba7508beeca7dd68d8e1c86bb71996e2f) 21 | - chore: release version 3.4.0 [`8a5604f`](https://github.com/swashata/wpackio-enqueue/commit/8a5604f5ab3bd5f000e503dda02603e15e534d47) 22 | 23 | ## [3.3.0](https://github.com/swashata/wpackio-enqueue/compare/3.2.1...3.3.0) - 2021-07-30 24 | 25 | ### Commits 26 | 27 | - feat: add new config main_js_handle [`7ab363c`](https://github.com/swashata/wpackio-enqueue/commit/7ab363c0aaeb9724939fc5e1070e85ebffd19533) 28 | - docs: add v3.3 changelog [`a3a4648`](https://github.com/swashata/wpackio-enqueue/commit/a3a4648e9744468f910ce2549b23866018a50014) 29 | 30 | ## [3.2.1](https://github.com/swashata/wpackio-enqueue/compare/3.2.0...3.2.1) - 2021-05-04 31 | 32 | ### Commits 33 | 34 | - fix: possibility of generating invalid handle name [`a139c0e`](https://github.com/swashata/wpackio-enqueue/commit/a139c0e92b587b7efdfc3eb244fce96636878058) 35 | - chore: prepare version 3.2.1 [`1d405e7`](https://github.com/swashata/wpackio-enqueue/commit/1d405e739d32947fd87514a14d8b8bb9b744eabc) 36 | 37 | ## [3.2.0](https://github.com/swashata/wpackio-enqueue/compare/3.1.0...3.2.0) - 2021-05-01 38 | 39 | ### Commits 40 | 41 | - feat: add methods to easily get all css or js handles from assets [`af7b9d3`](https://github.com/swashata/wpackio-enqueue/commit/af7b9d37f39db2ac2c70a9fcc561f1c935209987) 42 | - chore: prepare version 3.2.0 [`1adefa3`](https://github.com/swashata/wpackio-enqueue/commit/1adefa33d51187fcfcedbd4820d7edf39e3374d6) 43 | 44 | ## [3.1.0](https://github.com/swashata/wpackio-enqueue/compare/3.0.0...3.1.0) - 2021-04-29 45 | 46 | ### Commits 47 | 48 | - feat: add getPrimaryCssHandle method [`214ceeb`](https://github.com/swashata/wpackio-enqueue/commit/214ceeb81ae955e2a92df08f4db4d5ac482bcf82) 49 | - chore: release version 3.1.0 [`549ab10`](https://github.com/swashata/wpackio-enqueue/commit/549ab100aee0fcc952acec724e9c664a1ebf0194) 50 | 51 | ## [3.0.0](https://github.com/swashata/wpackio-enqueue/compare/3.0.0-beta1...3.0.0) - 2021-04-26 52 | 53 | ### Commits 54 | 55 | - chore: update changelog [`a8f470f`](https://github.com/swashata/wpackio-enqueue/commit/a8f470fef008ad7e6197c5fca1baa536eb9f5d48) 56 | 57 | ## [3.0.0-beta1](https://github.com/swashata/wpackio-enqueue/compare/2.2.1...3.0.0-beta1) - 2021-04-26 58 | 59 | ### Commits 60 | 61 | - test: fix failing tests due to implementation changes [`3113686`](https://github.com/swashata/wpackio-enqueue/commit/311368691ad4d00b255c7d0cc8e40202617290e6) 62 | - feat: add a method to get primary js handle for an enqueue [`97ebba5`](https://github.com/swashata/wpackio-enqueue/commit/97ebba575048a684eea39519bff5a2f71ca434f7) 63 | - feat: handle version 6 of @wpackio/scripts [`8c40f59`](https://github.com/swashata/wpackio-enqueue/commit/8c40f599c2561fa7d2a996fef551b9426a1f5d87) 64 | 65 | ## [2.2.1](https://github.com/swashata/wpackio-enqueue/compare/2.2.0...2.2.1) - 2021-03-07 66 | 67 | ### Commits 68 | 69 | - chore: update composer lock [`1f8b691`](https://github.com/swashata/wpackio-enqueue/commit/1f8b6914c3acb3712a95e8d43466d96277569050) 70 | - chore: prepare version 2.2.1 [`3f7b42e`](https://github.com/swashata/wpackio-enqueue/commit/3f7b42e871d17d26cd90083cfe2b0dbc5bed0f54) 71 | - Declare min. supported PHP version [`e6e891d`](https://github.com/swashata/wpackio-enqueue/commit/e6e891d272ebafd9cc5ea9be207fd06e570a7067) 72 | 73 | ## [2.2.0](https://github.com/swashata/wpackio-enqueue/compare/2.1.0...2.2.0) - 2020-06-22 74 | 75 | ### Fixed 76 | 77 | - fix: issue with static variable breaking multiple instances [`#10`](https://github.com/swashata/wpackio-enqueue/issues/10) 78 | 79 | ### Commits 80 | 81 | - chore: upgrade composer deps & use pcov [`907ca70`](https://github.com/swashata/wpackio-enqueue/commit/907ca70a8c7bc98e2b583530c967bbcd4c7c071f) 82 | - chore: prepare version 2.2.0 [`596fb1d`](https://github.com/swashata/wpackio-enqueue/commit/596fb1d6af97b96906058237165f3fe161ffa685) 83 | 84 | ## [2.1.0](https://github.com/swashata/wpackio-enqueue/compare/2.0.0...2.1.0) - 2019-12-12 85 | 86 | ### Commits 87 | 88 | - PHPCS/Composer: update PHPCS related dependencies [`509d109`](https://github.com/swashata/wpackio-enqueue/commit/509d10906a9c6c78d2be51e3165ff1de1a70424f) 89 | - chore: add changelog for v2.1.0 [`202b453`](https://github.com/swashata/wpackio-enqueue/commit/202b4535b2ada19a9f44bb6cc93d2d16251f6dc9) 90 | 91 | ## [2.0.0](https://github.com/swashata/wpackio-enqueue/compare/1.6.0...2.0.0) - 2019-10-29 92 | 93 | ### Commits 94 | 95 | - test: additional test specific for character case [`65b97a4`](https://github.com/swashata/wpackio-enqueue/commit/65b97a46471676a27302de69e1521e9f18e51e5d) 96 | - chore: prepare version 2.0.0 [`cb4e420`](https://github.com/swashata/wpackio-enqueue/commit/cb4e420a879ae4900d7336e2dcccc8dcc18aca44) 97 | - feat: sanitize key if output path contains sub-folders [`5c62afb`](https://github.com/swashata/wpackio-enqueue/commit/5c62afb1567fbf105abae2c61ad5df12d614e85e) 98 | 99 | ## [1.6.0](https://github.com/swashata/wpackio-enqueue/compare/1.5.0...1.6.0) - 2019-04-14 100 | 101 | ### Commits 102 | 103 | - chore: prepare version 1.6.0 [`e140954`](https://github.com/swashata/wpackio-enqueue/commit/e140954090275714843c2e33da00510d20c54638) 104 | - feat: support child theme enqueue with new parameter [`b9ba694`](https://github.com/swashata/wpackio-enqueue/commit/b9ba694eeaec6fafaabe02b650a8eede247c0374) 105 | - test: fix failing tests and add missing ones [`0b74bb0`](https://github.com/swashata/wpackio-enqueue/commit/0b74bb067e13e71fad4ce25bd31b677b036301e2) 106 | 107 | ## [1.5.0](https://github.com/swashata/wpackio-enqueue/compare/1.4.0...1.5.0) - 2018-12-30 108 | 109 | ### Commits 110 | 111 | - fix: publicPath issue on admin side scripts [`0d71b19`](https://github.com/swashata/wpackio-enqueue/commit/0d71b19db112409fcf7aa478b1cf200575bc3840) 112 | - chore: add changelog [`c5da57d`](https://github.com/swashata/wpackio-enqueue/commit/c5da57d83a137ef4a335b4a332026ff7ab25f55e) 113 | 114 | ## [1.4.0](https://github.com/swashata/wpackio-enqueue/compare/1.3.0...1.4.0) - 2018-11-13 115 | 116 | ### Commits 117 | 118 | - feat: add register method to register assets [`b9d3440`](https://github.com/swashata/wpackio-enqueue/commit/b9d3440152374502b5b82a030c43c3d729c88979) 119 | - chore(changelog): update changelog [`6411c47`](https://github.com/swashata/wpackio-enqueue/commit/6411c4781ed58e62f746e01d081fd1838a212edf) 120 | 121 | ## [1.3.0](https://github.com/swashata/wpackio-enqueue/compare/1.2.0...1.3.0) - 2018-10-24 122 | 123 | ### Fixed 124 | 125 | - feat: add recursive dependencies for entrypoint chunks [`#2`](https://github.com/swashata/wpackio-enqueue/issues/2) 126 | 127 | ### Commits 128 | 129 | - chore: release 1.3.0 [`fab07e2`](https://github.com/swashata/wpackio-enqueue/commit/fab07e22707ad0767eb18b60a35253ff1f5d22ff) 130 | 131 | ## [1.2.0](https://github.com/swashata/wpackio-enqueue/compare/1.1.0...1.2.0) - 2018-10-21 132 | 133 | ### Fixed 134 | 135 | - fix: issue when same chunk is applied for different entry-points [`#1`](https://github.com/swashata/wpackio-enqueue/issues/1) 136 | 137 | ## [1.1.0](https://github.com/swashata/wpackio-enqueue/compare/1.0.1...1.1.0) - 2018-10-20 138 | 139 | ### Commits 140 | 141 | - feat: use unique handle for runtime.js [`168f281`](https://github.com/swashata/wpackio-enqueue/commit/168f2816232b2eb2c2686ef51603eb253981f631) 142 | 143 | ## [1.0.1](https://github.com/swashata/wpackio-enqueue/compare/1.0.0...1.0.1) - 2018-10-13 144 | 145 | ### Commits 146 | 147 | - chore: ignore some stuff for composer [`1df013e`](https://github.com/swashata/wpackio-enqueue/commit/1df013e09974fac27cc9f9cb28da769a44d958d8) 148 | 149 | ## 1.0.0 - 2018-10-13 150 | 151 | ### Commits 152 | 153 | - feat: copy from @wpackio/scripts [`dd13f02`](https://github.com/swashata/wpackio-enqueue/commit/dd13f02276c2cdb1afbef6e3086c36e12fc4a55c) 154 | - test: add phpunit tests [`d120767`](https://github.com/swashata/wpackio-enqueue/commit/d12076746d45ae5fae5cb8bb0654e8bdd55556ea) 155 | - feat: finalize enqueue api [`288f974`](https://github.com/swashata/wpackio-enqueue/commit/288f9745f72265db70299d2f6b2d2474482d60a2) 156 | -------------------------------------------------------------------------------- /inc/Enqueue.php: -------------------------------------------------------------------------------- 1 | 6 | * @package WPackio\Enqueue 7 | */ 8 | 9 | namespace WPackio; 10 | 11 | /** 12 | * The primary API class for enqueuing assets using WordPress APIs. 13 | */ 14 | class Enqueue { 15 | /** 16 | * Output path relative to the root of this plugin/theme. 17 | * 18 | * @var string 19 | */ 20 | private $outputPath; 21 | 22 | /** 23 | * Absolute path to plugin main file. 24 | * 25 | * @var string 26 | */ 27 | private $pluginPath; 28 | 29 | /** 30 | * Whether this is a plugin or theme. 31 | * 32 | * @var string 33 | */ 34 | private $type = 'plugin'; 35 | 36 | /** 37 | * Plugin/Theme Version. 38 | * 39 | * @var string 40 | */ 41 | private $version = ''; 42 | 43 | /** 44 | * Manifest cache to prevent multiple reading from filesystem. 45 | * 46 | * @var array 47 | */ 48 | private $manifestCache = []; 49 | 50 | /** 51 | * Root absolute path to the output directory. With forward slash. 52 | * 53 | * @var string 54 | */ 55 | private $rootPath = ''; 56 | 57 | /** 58 | * Root URL to the output directory. With forward slash. 59 | * 60 | * @var string 61 | */ 62 | private $rootUrl = ''; 63 | 64 | /** 65 | * Application Name (userland). 66 | * 67 | * @var string 68 | */ 69 | private $appName = ''; 70 | 71 | /** 72 | * Theme type ('child' or 'regular'). 73 | * 74 | * @var string 75 | */ 76 | private $themeType = ''; 77 | 78 | /** 79 | * Create an instance of the Enqueue helper class. 80 | * 81 | * @throws \LogicException If $type is not plugin or theme. 82 | * 83 | * @param string $appName Name of the application, same as wpackio.project.js. 84 | * @param string $outputPath Output path relative to the root of this plugin/theme, same as wpackio.project.js. 85 | * @param string $version Version of your plugin/theme, used to generate query URL. 86 | * @param string $type The type of enqueue, either 'plugin' or 'theme', same as wpackio.project.js. 87 | * @param string|boolean $pluginPath If this is a plugin, then pass absolute path of the plugin main file, otherwise pass false. 88 | * @param string $themeType If this is a theme, then you can declare if it is a 'child' or 'regular' theme. 89 | */ 90 | public function __construct( $appName, $outputPath, $version, $type = 'plugin', $pluginPath = false, $themeType = 'regular' ) { 91 | $this->appName = $appName; 92 | $this->outputPath = $outputPath; 93 | $this->version = $version; 94 | if ( ! in_array( $type, [ 'plugin', 'theme' ], true ) ) { 95 | throw new \LogicException( 'You can only enter "plugin" or "theme" as type.' ); 96 | } 97 | $this->type = $type; 98 | $this->pluginPath = $pluginPath; 99 | $this->themeType = $themeType; 100 | $themePath = \get_template_directory(); 101 | $themeUri = \get_template_directory_uri(); 102 | 103 | if ( 'theme' === $this->type && 'child' === $this->themeType ) { 104 | $themePath = \get_stylesheet_directory(); 105 | $themeUri = \get_stylesheet_directory_uri(); 106 | } 107 | 108 | // Set the root path and URL 109 | $filepath = \trailingslashit( $themePath ) . $this->outputPath . '/'; 110 | $url = \trailingslashit( $themeUri ) . $this->outputPath . '/'; 111 | if ( 'plugin' === $this->type ) { 112 | $filepath = \trailingslashit( dirname( $this->pluginPath ) ) . $this->outputPath . '/'; 113 | $url = \trailingslashit( \plugins_url( $this->outputPath, $this->pluginPath ) ); 114 | } 115 | $this->rootPath = $filepath; 116 | $this->rootUrl = $url; 117 | // wp_head is done before printing any script or style tag 118 | \add_action( 'wp_head', [ $this, 'printPublicPath' ], -1000 ); 119 | // in case of admin, styles and scripts are printed before admin_head 120 | // so we use admin_print_scripts 121 | \add_action( 'admin_print_scripts', [ $this, 'printPublicPath' ], -1000 ); 122 | } 123 | 124 | /** 125 | * Sanitizes a string key. 126 | * 127 | * @param string $path The path to be sanitized. 128 | * 129 | * @return string 130 | */ 131 | private function sanitize_path( $path ) { 132 | return preg_replace( '/[^a-z0-9_\-]/i', '', $path ); 133 | } 134 | 135 | /** 136 | * Print a small JavaScript code to defined WordPress generated publicPath 137 | * for this theme or plugin. 138 | * 139 | * The entrypoint from `@wpackio/scripts/lib/entrypoint.js` automatically 140 | * uses this to define webpack publicPath in runtime. 141 | * 142 | * This the magic that happens behind the scene which makes code-splitting 143 | * and dynamic imports possible. 144 | */ 145 | public function printPublicPath() { 146 | $publicPath = apply_filters( 'wpackio_print_public_path', $this->getUrl( '' ), $this->appName, $this->outputPath ); 147 | $jsCode = 'window.__wpackIo' . $this->sanitize_path( $this->appName . $this->outputPath ) . '=\'' . esc_js( $publicPath ) . '\';'; 148 | echo ''; 149 | } 150 | 151 | /** 152 | * Register script handles with WordPress for an entrypoint inside a source. 153 | * It does not enqueue the assets, just calls wp_register_* on the asset. 154 | * 155 | * This is useful if just registering script for things like gutenberg. 156 | * 157 | * @throws \LogicException If manifest.json is not found in the directory. 158 | * 159 | * @see \WPackio\Enqueue::normalizeAssetConfig 160 | * 161 | * @param string $name The name of the files entry. 162 | * @param string $entryPoint Which entrypoint would you like to enqueue. 163 | * @param array $config Additional configuration. 164 | * @return array Associative with `css` and `js`. Each of them are arrays 165 | * containing ['handle' => string, 'url' => string]. 166 | */ 167 | public function register( $name, $entryPoint, $config ) { 168 | $config = $this->normalizeAssetConfig( $config ); 169 | // Get asset urls 170 | $assets = $this->getAssets( $name, $entryPoint, $config ); 171 | 172 | // Enqueue all js 173 | $jses = $assets['js']; 174 | $csses = $assets['css']; 175 | 176 | // Hold a flag to calculate dependencies 177 | $jsDeps = $this->getJsBuildDependencies( $name, $entryPoint ); 178 | $cssDeps = []; 179 | 180 | // Register javascript files 181 | if ( $config['js'] ) { 182 | foreach ( $jses as $js ) { 183 | \wp_register_script( 184 | $js['handle'], 185 | $js['url'], 186 | array_merge( $config['js_dep'], $jsDeps ), 187 | $this->version, 188 | $config['in_footer'] 189 | ); 190 | // The next one depends on this one 191 | $jsDeps[] = $js['handle']; 192 | } 193 | } 194 | 195 | // Register CSS files 196 | if ( $config['css'] ) { 197 | foreach ( $csses as $css ) { 198 | \wp_register_style( 199 | $css['handle'], 200 | $css['url'], 201 | array_merge( $config['css_dep'], $cssDeps ), 202 | $this->version, 203 | $config['media'] 204 | ); 205 | // The next one depends on this one 206 | $cssDeps[] = $css['handle']; 207 | } 208 | } 209 | 210 | return $assets; 211 | } 212 | 213 | /** 214 | * Enqueue all the assets for an entrypoint inside a source. 215 | * 216 | * @throws \LogicException If manifest.json is not found in the directory. 217 | * 218 | * @see \WPackio\Enqueue::normalizeAssetConfig 219 | * 220 | * @param string $name The name of the files entry. 221 | * @param string $entryPoint Which entrypoint would you like to enqueue. 222 | * @param array $config Additional configuration. 223 | * @return array Associative with `css` and `js`. Each of them are arrays 224 | * containing ['handle' => string, 'url' => string]. 225 | */ 226 | public function enqueue( $name, $entryPoint, $config ) { 227 | $config = $this->normalizeAssetConfig( $config ); 228 | // Register with WordPress and get asset handles 229 | $assets = $this->register( $name, $entryPoint, $config ); 230 | // Enqueue all js 231 | $jses = $assets['js']; 232 | $csses = $assets['css']; 233 | 234 | if ( $config['js'] ) { 235 | foreach ( $jses as $js ) { 236 | \wp_enqueue_script( $js['handle'] ); 237 | } 238 | } 239 | 240 | if ( $config['css'] ) { 241 | foreach ( $csses as $css ) { 242 | \wp_enqueue_style( $css['handle'] ); 243 | } 244 | } 245 | 246 | return $assets; 247 | } 248 | 249 | /** 250 | * Get handle for a script or style where it would be unique based on 251 | * name, path and type. 252 | * 253 | * @throws \LogicException If $type is not script or style. 254 | * 255 | * @param string $name The name of the files entry. 256 | * @param string $path Asset path from manifest file. 257 | * @param string $type Either 'script' or 'style'. 258 | * 259 | * @return string Unique handle for this asset. 260 | */ 261 | public function getHandle( $name, $path, $type = 'script' ) { 262 | if ( ! \in_array( $type, [ 'script', 'style' ], true ) ) { 263 | throw new \LogicException( 'Type has to be either script or style.' ); 264 | } 265 | $handle = 'wpackio_' 266 | . $this->appName 267 | . $name 268 | . '_' 269 | . $path 270 | . '_' 271 | . $type; 272 | return \preg_replace( '/[^a-z0-9]/i', '_', $handle ); 273 | } 274 | 275 | /** 276 | * Get handle and Url of all assets from the entrypoint. 277 | * 278 | * It doesn't enqueue anything for you, rather returns an associative array 279 | * with handles and urls. You should use it to enqueue it on your own. 280 | * 281 | * @throws \LogicException If the entrypoint is not found in the manifest. 282 | * 283 | * @see \WPackio\Enqueue::normalizeAssetConfig 284 | * 285 | * @param string $name The name of the files entry. 286 | * @param string $entryPoint Which entrypoint would you like to enqueue. 287 | * @param array $config Additional configuration. 288 | * @return array Associative with `css` and `js`. Each of them are arrays 289 | * containing ['handle' => string, 'url' => string]. 290 | */ 291 | public function getAssets( $name, $entryPoint, $config ) { 292 | $config = $this->normalizeAssetConfig( $config ); 293 | // Get the manifest 294 | $manifest = $this->getManifest( $name ); 295 | // Get the entrypoint 296 | if ( ! isset( $manifest['wpackioEp'][ $entryPoint ] ) ) { 297 | throw new \LogicException( 'No entry point found in the manifest' ); 298 | } 299 | $enqueue = 300 | isset( $manifest['wpackioEp'][ $entryPoint ]['assets'] ) 301 | ? $manifest['wpackioEp'][ $entryPoint ]['assets'] 302 | : false; 303 | 304 | if ( $enqueue === false ) { 305 | throw new \LogicException( 'No assets found in the entry point. Make sure you are using @wpackio/scripts version 6+.' ); 306 | } 307 | 308 | $js_handles = []; 309 | $css_handles = []; 310 | 311 | // Figure out all javascript assets 312 | $total_js_assets = count( (array) $enqueue['js'] ); 313 | if ( $config['js'] && isset( $enqueue['js'] ) && $total_js_assets ) { 314 | foreach ( $enqueue['js'] as $index => $js ) { 315 | $handle = $this->getHandle( $name, $js, 'script' ); 316 | // override the runtime handle if needed 317 | if ( 318 | ! empty( $config['runtime_js_handle'] ) 319 | // runtime is always the first dependency 320 | && $index === 0 321 | // and it must have the name "runtime" in it, per wpackio config 322 | && \strpos( $handle, 'runtime' ) !== false 323 | ) { 324 | $handle = $config['runtime_js_handle']; 325 | } 326 | 327 | // override the last one's handle if needed 328 | if ( 329 | ! empty( $config['main_js_handle'] ) 330 | // the last item in the dependency is the main handle 331 | && $index === $total_js_assets - 1 332 | ) { 333 | $handle = $config['main_js_handle']; 334 | } 335 | 336 | $js_handles[] = [ 337 | 'handle' => $handle, 338 | 'url' => $this->getUrl( $js ), 339 | ]; 340 | } 341 | } 342 | 343 | // Figure out all css assets 344 | if ( $config['css'] && isset( $enqueue['css'] ) && count( (array) $enqueue['css'] ) ) { 345 | foreach ( $enqueue['css'] as $index => $css ) { 346 | $handle = $this->getHandle( $name, $css, 'style' ); 347 | $css_handles[] = [ 348 | 'handle' => $handle, 349 | 'url' => $this->getUrl( $css ), 350 | ]; 351 | } 352 | } 353 | 354 | // Return 355 | return [ 356 | 'css' => $css_handles, 357 | 'js' => $js_handles, 358 | ]; 359 | } 360 | 361 | 362 | /** 363 | * Normalizes the configuration array of assets. 364 | * 365 | * Here are the supported keys: 366 | * `js` (`boolean`) True if we are to include javascripts. 367 | * `css` (`boolean`) True if we are to include stylesheets. 368 | * `js_dep` (`array`) Additional dependencies for the javascript assets. 369 | * `css_dep` (`array`) Additional dependencies for the stylesheet assets. 370 | * `in_footer` (`boolean`) Whether to print the assets in footer (for js only). 371 | * `media` (`string`) Media attribute for stylesheets (defaults `'all'`). 372 | * 373 | * @param array $config Configuration array. 374 | * @return array Normalized configuration with all the mentioned keys. 375 | */ 376 | public function normalizeAssetConfig( $config ) { 377 | return wp_parse_args( 378 | $config, 379 | [ 380 | 'js' => true, 381 | 'css' => true, 382 | 'js_dep' => [], 383 | 'css_dep' => [], 384 | 'in_footer' => true, 385 | 'media' => 'all', 386 | 'main_js_handle' => null, 387 | 'runtime_js_handle' => null, 388 | ] 389 | ); 390 | } 391 | 392 | /** 393 | * Get Url of an asset. 394 | * 395 | * @param string $asset Asset as recovered from manifest.json. 396 | * @return string Complete URL. 397 | */ 398 | public function getUrl( $asset ) { 399 | return $this->rootUrl . $asset; 400 | } 401 | 402 | /** 403 | * Given an entry name and a entrypoint, get back its JavaScript dependencies 404 | * as generated from wpackio scripts. 405 | * 406 | * @param string $name The name of the files entry. 407 | * @param string $entryPoint Which entrypoint would you like to get for. 408 | * @return array array of registered handles. 409 | */ 410 | public function getJsBuildDependencies( $name, $entryPoint ) { 411 | $filepath = $this->rootPath 412 | . $name 413 | . '/' 414 | . $entryPoint 415 | . '.dependencies.wp.json'; 416 | if ( ! \file_exists( $filepath ) ) { 417 | return []; 418 | } 419 | $deps = json_decode( file_get_contents( $filepath ), true ); 420 | if ( $deps !== null && isset( $deps['dependencies'] ) ) { 421 | return $deps['dependencies']; 422 | } 423 | return []; 424 | } 425 | 426 | /** 427 | * Get manifest from cache or from file. 428 | * 429 | * @throws \LogicException If manifest file is not found. 430 | * 431 | * @param string $dir The Source directory. 432 | * @return array wpackio compatible manifest item. 433 | */ 434 | public function getManifest( $dir ) { 435 | // If already present in the cache, then return it 436 | if ( isset( $this->manifestCache[ $this->outputPath ][ $dir ] ) ) { 437 | return $this->manifestCache[ $this->outputPath ][ $dir ]; 438 | } 439 | // It is not, so get the json file 440 | $filepath = $this->rootPath . $dir . '/manifest.json'; 441 | 442 | // Check if it exists 443 | if ( ! file_exists( $filepath ) ) { 444 | throw new \LogicException( sprintf( 'Manifest %s does not exist.', $filepath ) ); 445 | } 446 | $manifest = json_decode( file_get_contents( $filepath ), true ); 447 | if ( $manifest === null || ! isset( $manifest['wpackioEp'] ) ) { 448 | throw new \LogicException( sprintf( 'Invalid manifest file at %s. Either it is not valid JSON or wpackioEp does not exist.', $filepath ) ); 449 | } 450 | if ( ! isset( $this->manifestCache[ $this->outputPath ] ) ) { 451 | $this->manifestCache[ $this->outputPath ] = []; 452 | } 453 | $this->manifestCache[ $this->outputPath ][ $dir ] = $manifest; 454 | return $this->manifestCache[ $this->outputPath ][ $dir ]; 455 | } 456 | 457 | /** 458 | * Get primary handle from enqueued/registered assets. 459 | * 460 | * @param array $assets Assets array as returned from enqueue or register. 461 | * @param string $type Type of asset, either `js` or `css`. 462 | * @return string|false string if handle was found, false otherwise. 463 | */ 464 | public function getPrimaryHandle( $assets, $type = 'js' ) { 465 | if ( 466 | ! \is_array( $assets ) 467 | || ! isset( $assets[ $type ] ) 468 | || ! \is_array( $assets[ $type ] ) 469 | ) { 470 | return false; 471 | } 472 | $lastJsAsset = array_pop( $assets[ $type ] ); 473 | if ( ! $lastJsAsset || ! isset( $lastJsAsset['handle'] ) ) { 474 | return false; 475 | } 476 | return $lastJsAsset['handle']; 477 | } 478 | 479 | /** 480 | * Get primary js handle from enqueued/registered assets. 481 | * 482 | * This is useful to localize/translate the script handle. 483 | * 484 | * @param mixed $assets Assets array as returned from enqueue or register. 485 | * @return string|false string if handle was found, false otherwise. 486 | */ 487 | public function getPrimaryJsHandle( $assets ) { 488 | return $this->getPrimaryHandle( $assets, 'js' ); 489 | } 490 | 491 | /** 492 | * Get runtime js handle from enqueued/registered assets. 493 | * 494 | * This is useful to localize/translate dependent script handles in the 495 | * same files entry. By calling `wp_set_script_translations` on the runtime 496 | * you can collectively enqueue translate json for all the dependencies on 497 | * the entries. 498 | * 499 | * @param mixed $assets Assets array as returned from enqueue or register. 500 | * @return string|false string if handle was found, false otherwise. 501 | */ 502 | public function getRuntimeJsHandle( $assets ) { 503 | if ( 504 | ! \is_array( $assets ) 505 | || ! isset( $assets[ 'js' ] ) 506 | || ! \is_array( $assets[ 'js' ] ) 507 | ) { 508 | return false; 509 | } 510 | // runtime asset is the first one in the assets list 511 | $runtimeAsset = $assets['js'][0]; 512 | if ( ! $runtimeAsset || ! isset( $runtimeAsset['handle'] ) ) { 513 | return false; 514 | } 515 | return $runtimeAsset['handle']; 516 | } 517 | 518 | /** 519 | * Get primary css handle from enqueued/registered assets. 520 | * 521 | * This is useful to localize/translate the script handle. 522 | * 523 | * @param mixed $assets Assets array as returned from enqueue or register. 524 | * @return string|false string if handle was found, false otherwise. 525 | */ 526 | public function getPrimaryCssHandle( $assets ) { 527 | return $this->getPrimaryHandle( $assets, 'css' ); 528 | } 529 | 530 | /** 531 | * Get handles of a particular type from enqueued/registered assets. 532 | * 533 | * @param mixed $assets Assets array as returned from enqueue or register. 534 | * @param string $type Type of asset, either `js` or `css`. 535 | * @return array Array of handles. Would return an empty handle if not found. 536 | */ 537 | public function getHandles( $assets, $type = 'js' ) { 538 | $handles = []; 539 | if ( 540 | \is_array( $assets ) 541 | && isset( $assets[ $type ] ) 542 | && \count( $assets[ $type ] ) 543 | ) { 544 | foreach ( $assets[ $type ] as $asset ) { 545 | $handles[] = $asset['handle']; 546 | } 547 | } 548 | return $handles; 549 | } 550 | 551 | /** 552 | * Get all css handles from enqueued/registered assets. 553 | * 554 | * @param mixed $assets Assets array as returned from enqueue or register. 555 | * @return array Array of css handles. Would return an empty handle if not found. 556 | */ 557 | public function getCssHandles( $assets ) { 558 | return $this->getHandles( $assets, 'css' ); 559 | } 560 | 561 | /** 562 | * Get all js handles from enqueued/registered assets. 563 | * 564 | * @param mixed $assets Assets array as returned from enqueue or register. 565 | * @return array Array of js handles. Would return an empty handle if not found. 566 | */ 567 | public function getJsHandles( $assets ) { 568 | return $this->getHandles( $assets, 'js' ); 569 | } 570 | } 571 | -------------------------------------------------------------------------------- /composer.lock: -------------------------------------------------------------------------------- 1 | { 2 | "_readme": [ 3 | "This file locks the dependencies of your project to a known state", 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", 5 | "This file is @generated automatically" 6 | ], 7 | "content-hash": "2ff53a664d180ecd784095e7d408db8e", 8 | "packages": [], 9 | "packages-dev": [ 10 | { 11 | "name": "antecedent/patchwork", 12 | "version": "2.1.12", 13 | "source": { 14 | "type": "git", 15 | "url": "https://github.com/antecedent/patchwork.git", 16 | "reference": "b98e046dd4c0acc34a0846604f06f6111654d9ea" 17 | }, 18 | "dist": { 19 | "type": "zip", 20 | "url": "https://api.github.com/repos/antecedent/patchwork/zipball/b98e046dd4c0acc34a0846604f06f6111654d9ea", 21 | "reference": "b98e046dd4c0acc34a0846604f06f6111654d9ea", 22 | "shasum": "" 23 | }, 24 | "require": { 25 | "php": ">=5.4.0" 26 | }, 27 | "require-dev": { 28 | "phpunit/phpunit": ">=4" 29 | }, 30 | "type": "library", 31 | "notification-url": "https://packagist.org/downloads/", 32 | "license": [ 33 | "MIT" 34 | ], 35 | "authors": [ 36 | { 37 | "name": "Ignas Rudaitis", 38 | "email": "ignas.rudaitis@gmail.com" 39 | } 40 | ], 41 | "description": "Method redefinition (monkey-patching) functionality for PHP.", 42 | "homepage": "http://patchwork2.org/", 43 | "keywords": [ 44 | "aop", 45 | "aspect", 46 | "interception", 47 | "monkeypatching", 48 | "redefinition", 49 | "runkit", 50 | "testing" 51 | ], 52 | "time": "2019-12-22T17:52:09+00:00" 53 | }, 54 | { 55 | "name": "brain/monkey", 56 | "version": "2.6.0", 57 | "source": { 58 | "type": "git", 59 | "url": "https://github.com/Brain-WP/BrainMonkey.git", 60 | "reference": "7042140000b4b18034c0c0010d86274a00f25442" 61 | }, 62 | "dist": { 63 | "type": "zip", 64 | "url": "https://api.github.com/repos/Brain-WP/BrainMonkey/zipball/7042140000b4b18034c0c0010d86274a00f25442", 65 | "reference": "7042140000b4b18034c0c0010d86274a00f25442", 66 | "shasum": "" 67 | }, 68 | "require": { 69 | "antecedent/patchwork": "^2.0", 70 | "mockery/mockery": ">=0.9 <2", 71 | "php": ">=5.6.0" 72 | }, 73 | "require-dev": { 74 | "dealerdirect/phpcodesniffer-composer-installer": "^0.6 || ^0.7", 75 | "phpcompatibility/php-compatibility": "^9.3.0", 76 | "phpunit/phpunit": "^5.7.9 || ^6.0 || ^7.0 || ^8.0 || ^9.0" 77 | }, 78 | "type": "library", 79 | "extra": { 80 | "branch-alias": { 81 | "dev-version/1": "1.x-dev", 82 | "dev-master": "2.0.x-dev" 83 | } 84 | }, 85 | "autoload": { 86 | "psr-4": { 87 | "Brain\\Monkey\\": "src/" 88 | }, 89 | "files": [ 90 | "inc/api.php" 91 | ] 92 | }, 93 | "notification-url": "https://packagist.org/downloads/", 94 | "license": [ 95 | "MIT" 96 | ], 97 | "authors": [ 98 | { 99 | "name": "Giuseppe Mazzapica", 100 | "email": "giuseppe.mazzapica@gmail.com", 101 | "homepage": "https://gmazzap.me", 102 | "role": "Developer" 103 | } 104 | ], 105 | "description": "Mocking utility for PHP functions and WordPress plugin API", 106 | "keywords": [ 107 | "Monkey Patching", 108 | "interception", 109 | "mock", 110 | "mock functions", 111 | "mockery", 112 | "patchwork", 113 | "redefinition", 114 | "runkit", 115 | "test", 116 | "testing" 117 | ], 118 | "time": "2020-10-13T17:56:14+00:00" 119 | }, 120 | { 121 | "name": "dealerdirect/phpcodesniffer-composer-installer", 122 | "version": "v0.5.0", 123 | "source": { 124 | "type": "git", 125 | "url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git", 126 | "reference": "e749410375ff6fb7a040a68878c656c2e610b132" 127 | }, 128 | "dist": { 129 | "type": "zip", 130 | "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/e749410375ff6fb7a040a68878c656c2e610b132", 131 | "reference": "e749410375ff6fb7a040a68878c656c2e610b132", 132 | "shasum": "" 133 | }, 134 | "require": { 135 | "composer-plugin-api": "^1.0", 136 | "php": "^5.3|^7", 137 | "squizlabs/php_codesniffer": "^2|^3" 138 | }, 139 | "require-dev": { 140 | "composer/composer": "*", 141 | "phpcompatibility/php-compatibility": "^9.0", 142 | "sensiolabs/security-checker": "^4.1.0" 143 | }, 144 | "type": "composer-plugin", 145 | "extra": { 146 | "class": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin" 147 | }, 148 | "autoload": { 149 | "psr-4": { 150 | "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\": "src/" 151 | } 152 | }, 153 | "notification-url": "https://packagist.org/downloads/", 154 | "license": [ 155 | "MIT" 156 | ], 157 | "authors": [ 158 | { 159 | "name": "Franck Nijhof", 160 | "email": "franck.nijhof@dealerdirect.com", 161 | "homepage": "http://www.frenck.nl", 162 | "role": "Developer / IT Manager" 163 | } 164 | ], 165 | "description": "PHP_CodeSniffer Standards Composer Installer Plugin", 166 | "homepage": "http://www.dealerdirect.com", 167 | "keywords": [ 168 | "PHPCodeSniffer", 169 | "PHP_CodeSniffer", 170 | "code quality", 171 | "codesniffer", 172 | "composer", 173 | "installer", 174 | "phpcs", 175 | "plugin", 176 | "qa", 177 | "quality", 178 | "standard", 179 | "standards", 180 | "style guide", 181 | "stylecheck", 182 | "tests" 183 | ], 184 | "time": "2018-10-26T13:21:45+00:00" 185 | }, 186 | { 187 | "name": "doctrine/instantiator", 188 | "version": "1.4.0", 189 | "source": { 190 | "type": "git", 191 | "url": "https://github.com/doctrine/instantiator.git", 192 | "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b" 193 | }, 194 | "dist": { 195 | "type": "zip", 196 | "url": "https://api.github.com/repos/doctrine/instantiator/zipball/d56bf6102915de5702778fe20f2de3b2fe570b5b", 197 | "reference": "d56bf6102915de5702778fe20f2de3b2fe570b5b", 198 | "shasum": "" 199 | }, 200 | "require": { 201 | "php": "^7.1 || ^8.0" 202 | }, 203 | "require-dev": { 204 | "doctrine/coding-standard": "^8.0", 205 | "ext-pdo": "*", 206 | "ext-phar": "*", 207 | "phpbench/phpbench": "^0.13 || 1.0.0-alpha2", 208 | "phpstan/phpstan": "^0.12", 209 | "phpstan/phpstan-phpunit": "^0.12", 210 | "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" 211 | }, 212 | "type": "library", 213 | "autoload": { 214 | "psr-4": { 215 | "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" 216 | } 217 | }, 218 | "notification-url": "https://packagist.org/downloads/", 219 | "license": [ 220 | "MIT" 221 | ], 222 | "authors": [ 223 | { 224 | "name": "Marco Pivetta", 225 | "email": "ocramius@gmail.com", 226 | "homepage": "https://ocramius.github.io/" 227 | } 228 | ], 229 | "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", 230 | "homepage": "https://www.doctrine-project.org/projects/instantiator.html", 231 | "keywords": [ 232 | "constructor", 233 | "instantiate" 234 | ], 235 | "funding": [ 236 | { 237 | "url": "https://www.doctrine-project.org/sponsorship.html", 238 | "type": "custom" 239 | }, 240 | { 241 | "url": "https://www.patreon.com/phpdoctrine", 242 | "type": "patreon" 243 | }, 244 | { 245 | "url": "https://tidelift.com/funding/github/packagist/doctrine%2Finstantiator", 246 | "type": "tidelift" 247 | } 248 | ], 249 | "time": "2020-11-10T18:47:58+00:00" 250 | }, 251 | { 252 | "name": "giacocorsiglia/wordpress-stubs", 253 | "version": "v4.9.9", 254 | "source": { 255 | "type": "git", 256 | "url": "https://github.com/GiacoCorsiglia/wordpress-stubs.git", 257 | "reference": "7729a0f26dba5491846b0eb30fee11c85196ed46" 258 | }, 259 | "dist": { 260 | "type": "zip", 261 | "url": "https://api.github.com/repos/GiacoCorsiglia/wordpress-stubs/zipball/7729a0f26dba5491846b0eb30fee11c85196ed46", 262 | "reference": "7729a0f26dba5491846b0eb30fee11c85196ed46", 263 | "shasum": "" 264 | }, 265 | "require-dev": { 266 | "giacocorsiglia/stubs-generator": "^0.5.0", 267 | "johnpbloch/wordpress": "4.9.9", 268 | "php": "^7.1" 269 | }, 270 | "type": "library", 271 | "notification-url": "https://packagist.org/downloads/", 272 | "license": [ 273 | "GPL-2.0+" 274 | ], 275 | "authors": [ 276 | { 277 | "name": "Giaco Corsiglia", 278 | "email": "GiacoCorsiglia@gmail.com" 279 | } 280 | ], 281 | "description": "WordPress function, class, and global variable declaration stubs for easier static analysis.", 282 | "homepage": "https://github.com/GiacoCorsiglia/wordpress-stubs", 283 | "keywords": [ 284 | "static analysis", 285 | "wordpress" 286 | ], 287 | "time": "2019-01-24T19:32:21+00:00" 288 | }, 289 | { 290 | "name": "hamcrest/hamcrest-php", 291 | "version": "v2.0.1", 292 | "source": { 293 | "type": "git", 294 | "url": "https://github.com/hamcrest/hamcrest-php.git", 295 | "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3" 296 | }, 297 | "dist": { 298 | "type": "zip", 299 | "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", 300 | "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", 301 | "shasum": "" 302 | }, 303 | "require": { 304 | "php": "^5.3|^7.0|^8.0" 305 | }, 306 | "replace": { 307 | "cordoval/hamcrest-php": "*", 308 | "davedevelopment/hamcrest-php": "*", 309 | "kodova/hamcrest-php": "*" 310 | }, 311 | "require-dev": { 312 | "phpunit/php-file-iterator": "^1.4 || ^2.0", 313 | "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0" 314 | }, 315 | "type": "library", 316 | "extra": { 317 | "branch-alias": { 318 | "dev-master": "2.1-dev" 319 | } 320 | }, 321 | "autoload": { 322 | "classmap": [ 323 | "hamcrest" 324 | ] 325 | }, 326 | "notification-url": "https://packagist.org/downloads/", 327 | "license": [ 328 | "BSD-3-Clause" 329 | ], 330 | "description": "This is the PHP port of Hamcrest Matchers", 331 | "keywords": [ 332 | "test" 333 | ], 334 | "time": "2020-07-09T08:09:16+00:00" 335 | }, 336 | { 337 | "name": "mockery/mockery", 338 | "version": "1.3.4", 339 | "source": { 340 | "type": "git", 341 | "url": "https://github.com/mockery/mockery.git", 342 | "reference": "31467aeb3ca3188158613322d66df81cedd86626" 343 | }, 344 | "dist": { 345 | "type": "zip", 346 | "url": "https://api.github.com/repos/mockery/mockery/zipball/31467aeb3ca3188158613322d66df81cedd86626", 347 | "reference": "31467aeb3ca3188158613322d66df81cedd86626", 348 | "shasum": "" 349 | }, 350 | "require": { 351 | "hamcrest/hamcrest-php": "^2.0.1", 352 | "lib-pcre": ">=7.0", 353 | "php": ">=5.6.0" 354 | }, 355 | "require-dev": { 356 | "phpunit/phpunit": "^5.7.10|^6.5|^7.5|^8.5|^9.3" 357 | }, 358 | "type": "library", 359 | "extra": { 360 | "branch-alias": { 361 | "dev-master": "1.3.x-dev" 362 | } 363 | }, 364 | "autoload": { 365 | "psr-0": { 366 | "Mockery": "library/" 367 | } 368 | }, 369 | "notification-url": "https://packagist.org/downloads/", 370 | "license": [ 371 | "BSD-3-Clause" 372 | ], 373 | "authors": [ 374 | { 375 | "name": "Pádraic Brady", 376 | "email": "padraic.brady@gmail.com", 377 | "homepage": "http://blog.astrumfutura.com" 378 | }, 379 | { 380 | "name": "Dave Marshall", 381 | "email": "dave.marshall@atstsolutions.co.uk", 382 | "homepage": "http://davedevelopment.co.uk" 383 | } 384 | ], 385 | "description": "Mockery is a simple yet flexible PHP mock object framework", 386 | "homepage": "https://github.com/mockery/mockery", 387 | "keywords": [ 388 | "BDD", 389 | "TDD", 390 | "library", 391 | "mock", 392 | "mock objects", 393 | "mockery", 394 | "stub", 395 | "test", 396 | "test double", 397 | "testing" 398 | ], 399 | "time": "2021-02-24T09:51:00+00:00" 400 | }, 401 | { 402 | "name": "myclabs/deep-copy", 403 | "version": "1.10.2", 404 | "source": { 405 | "type": "git", 406 | "url": "https://github.com/myclabs/DeepCopy.git", 407 | "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220" 408 | }, 409 | "dist": { 410 | "type": "zip", 411 | "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220", 412 | "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220", 413 | "shasum": "" 414 | }, 415 | "require": { 416 | "php": "^7.1 || ^8.0" 417 | }, 418 | "replace": { 419 | "myclabs/deep-copy": "self.version" 420 | }, 421 | "require-dev": { 422 | "doctrine/collections": "^1.0", 423 | "doctrine/common": "^2.6", 424 | "phpunit/phpunit": "^7.1" 425 | }, 426 | "type": "library", 427 | "autoload": { 428 | "psr-4": { 429 | "DeepCopy\\": "src/DeepCopy/" 430 | }, 431 | "files": [ 432 | "src/DeepCopy/deep_copy.php" 433 | ] 434 | }, 435 | "notification-url": "https://packagist.org/downloads/", 436 | "license": [ 437 | "MIT" 438 | ], 439 | "description": "Create deep copies (clones) of your objects", 440 | "keywords": [ 441 | "clone", 442 | "copy", 443 | "duplicate", 444 | "object", 445 | "object graph" 446 | ], 447 | "funding": [ 448 | { 449 | "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", 450 | "type": "tidelift" 451 | } 452 | ], 453 | "time": "2020-11-13T09:40:50+00:00" 454 | }, 455 | { 456 | "name": "nikic/php-parser", 457 | "version": "v4.10.4", 458 | "source": { 459 | "type": "git", 460 | "url": "https://github.com/nikic/PHP-Parser.git", 461 | "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e" 462 | }, 463 | "dist": { 464 | "type": "zip", 465 | "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/c6d052fc58cb876152f89f532b95a8d7907e7f0e", 466 | "reference": "c6d052fc58cb876152f89f532b95a8d7907e7f0e", 467 | "shasum": "" 468 | }, 469 | "require": { 470 | "ext-tokenizer": "*", 471 | "php": ">=7.0" 472 | }, 473 | "require-dev": { 474 | "ircmaxell/php-yacc": "^0.0.7", 475 | "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" 476 | }, 477 | "bin": [ 478 | "bin/php-parse" 479 | ], 480 | "type": "library", 481 | "extra": { 482 | "branch-alias": { 483 | "dev-master": "4.9-dev" 484 | } 485 | }, 486 | "autoload": { 487 | "psr-4": { 488 | "PhpParser\\": "lib/PhpParser" 489 | } 490 | }, 491 | "notification-url": "https://packagist.org/downloads/", 492 | "license": [ 493 | "BSD-3-Clause" 494 | ], 495 | "authors": [ 496 | { 497 | "name": "Nikita Popov" 498 | } 499 | ], 500 | "description": "A PHP parser written in PHP", 501 | "keywords": [ 502 | "parser", 503 | "php" 504 | ], 505 | "time": "2020-12-20T10:01:03+00:00" 506 | }, 507 | { 508 | "name": "pcov/clobber", 509 | "version": "v2.0.3", 510 | "source": { 511 | "type": "git", 512 | "url": "https://github.com/krakjoe/pcov-clobber.git", 513 | "reference": "4c30759e912e6e5d5bf833fb3d77b5bd51709f05" 514 | }, 515 | "dist": { 516 | "type": "zip", 517 | "url": "https://api.github.com/repos/krakjoe/pcov-clobber/zipball/4c30759e912e6e5d5bf833fb3d77b5bd51709f05", 518 | "reference": "4c30759e912e6e5d5bf833fb3d77b5bd51709f05", 519 | "shasum": "" 520 | }, 521 | "require": { 522 | "ext-pcov": "^1.0", 523 | "nikic/php-parser": "^4.2" 524 | }, 525 | "bin": [ 526 | "bin/pcov" 527 | ], 528 | "type": "library", 529 | "autoload": { 530 | "psr-4": { 531 | "pcov\\Clobber\\": "src/pcov/clobber" 532 | } 533 | }, 534 | "notification-url": "https://packagist.org/downloads/", 535 | "time": "2019-10-29T05:03:37+00:00" 536 | }, 537 | { 538 | "name": "phar-io/manifest", 539 | "version": "1.0.3", 540 | "source": { 541 | "type": "git", 542 | "url": "https://github.com/phar-io/manifest.git", 543 | "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4" 544 | }, 545 | "dist": { 546 | "type": "zip", 547 | "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", 548 | "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", 549 | "shasum": "" 550 | }, 551 | "require": { 552 | "ext-dom": "*", 553 | "ext-phar": "*", 554 | "phar-io/version": "^2.0", 555 | "php": "^5.6 || ^7.0" 556 | }, 557 | "type": "library", 558 | "extra": { 559 | "branch-alias": { 560 | "dev-master": "1.0.x-dev" 561 | } 562 | }, 563 | "autoload": { 564 | "classmap": [ 565 | "src/" 566 | ] 567 | }, 568 | "notification-url": "https://packagist.org/downloads/", 569 | "license": [ 570 | "BSD-3-Clause" 571 | ], 572 | "authors": [ 573 | { 574 | "name": "Arne Blankerts", 575 | "email": "arne@blankerts.de", 576 | "role": "Developer" 577 | }, 578 | { 579 | "name": "Sebastian Heuer", 580 | "email": "sebastian@phpeople.de", 581 | "role": "Developer" 582 | }, 583 | { 584 | "name": "Sebastian Bergmann", 585 | "email": "sebastian@phpunit.de", 586 | "role": "Developer" 587 | } 588 | ], 589 | "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", 590 | "time": "2018-07-08T19:23:20+00:00" 591 | }, 592 | { 593 | "name": "phar-io/version", 594 | "version": "2.0.1", 595 | "source": { 596 | "type": "git", 597 | "url": "https://github.com/phar-io/version.git", 598 | "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6" 599 | }, 600 | "dist": { 601 | "type": "zip", 602 | "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6", 603 | "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6", 604 | "shasum": "" 605 | }, 606 | "require": { 607 | "php": "^5.6 || ^7.0" 608 | }, 609 | "type": "library", 610 | "autoload": { 611 | "classmap": [ 612 | "src/" 613 | ] 614 | }, 615 | "notification-url": "https://packagist.org/downloads/", 616 | "license": [ 617 | "BSD-3-Clause" 618 | ], 619 | "authors": [ 620 | { 621 | "name": "Arne Blankerts", 622 | "email": "arne@blankerts.de", 623 | "role": "Developer" 624 | }, 625 | { 626 | "name": "Sebastian Heuer", 627 | "email": "sebastian@phpeople.de", 628 | "role": "Developer" 629 | }, 630 | { 631 | "name": "Sebastian Bergmann", 632 | "email": "sebastian@phpunit.de", 633 | "role": "Developer" 634 | } 635 | ], 636 | "description": "Library for handling version information and constraints", 637 | "time": "2018-07-08T19:19:57+00:00" 638 | }, 639 | { 640 | "name": "phpcompatibility/php-compatibility", 641 | "version": "9.3.5", 642 | "source": { 643 | "type": "git", 644 | "url": "https://github.com/PHPCompatibility/PHPCompatibility.git", 645 | "reference": "9fb324479acf6f39452e0655d2429cc0d3914243" 646 | }, 647 | "dist": { 648 | "type": "zip", 649 | "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/9fb324479acf6f39452e0655d2429cc0d3914243", 650 | "reference": "9fb324479acf6f39452e0655d2429cc0d3914243", 651 | "shasum": "" 652 | }, 653 | "require": { 654 | "php": ">=5.3", 655 | "squizlabs/php_codesniffer": "^2.3 || ^3.0.2" 656 | }, 657 | "conflict": { 658 | "squizlabs/php_codesniffer": "2.6.2" 659 | }, 660 | "require-dev": { 661 | "phpunit/phpunit": "~4.5 || ^5.0 || ^6.0 || ^7.0" 662 | }, 663 | "suggest": { 664 | "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically.", 665 | "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." 666 | }, 667 | "type": "phpcodesniffer-standard", 668 | "notification-url": "https://packagist.org/downloads/", 669 | "license": [ 670 | "LGPL-3.0-or-later" 671 | ], 672 | "authors": [ 673 | { 674 | "name": "Wim Godden", 675 | "homepage": "https://github.com/wimg", 676 | "role": "lead" 677 | }, 678 | { 679 | "name": "Juliette Reinders Folmer", 680 | "homepage": "https://github.com/jrfnl", 681 | "role": "lead" 682 | }, 683 | { 684 | "name": "Contributors", 685 | "homepage": "https://github.com/PHPCompatibility/PHPCompatibility/graphs/contributors" 686 | } 687 | ], 688 | "description": "A set of sniffs for PHP_CodeSniffer that checks for PHP cross-version compatibility.", 689 | "homepage": "http://techblog.wimgodden.be/tag/codesniffer/", 690 | "keywords": [ 691 | "compatibility", 692 | "phpcs", 693 | "standards" 694 | ], 695 | "time": "2019-12-27T09:44:58+00:00" 696 | }, 697 | { 698 | "name": "phpcompatibility/phpcompatibility-paragonie", 699 | "version": "1.3.1", 700 | "source": { 701 | "type": "git", 702 | "url": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie.git", 703 | "reference": "ddabec839cc003651f2ce695c938686d1086cf43" 704 | }, 705 | "dist": { 706 | "type": "zip", 707 | "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/ddabec839cc003651f2ce695c938686d1086cf43", 708 | "reference": "ddabec839cc003651f2ce695c938686d1086cf43", 709 | "shasum": "" 710 | }, 711 | "require": { 712 | "phpcompatibility/php-compatibility": "^9.0" 713 | }, 714 | "require-dev": { 715 | "dealerdirect/phpcodesniffer-composer-installer": "^0.7", 716 | "paragonie/random_compat": "dev-master", 717 | "paragonie/sodium_compat": "dev-master" 718 | }, 719 | "suggest": { 720 | "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", 721 | "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." 722 | }, 723 | "type": "phpcodesniffer-standard", 724 | "notification-url": "https://packagist.org/downloads/", 725 | "license": [ 726 | "LGPL-3.0-or-later" 727 | ], 728 | "authors": [ 729 | { 730 | "name": "Wim Godden", 731 | "role": "lead" 732 | }, 733 | { 734 | "name": "Juliette Reinders Folmer", 735 | "role": "lead" 736 | } 737 | ], 738 | "description": "A set of rulesets for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by the Paragonie polyfill libraries.", 739 | "homepage": "http://phpcompatibility.com/", 740 | "keywords": [ 741 | "compatibility", 742 | "paragonie", 743 | "phpcs", 744 | "polyfill", 745 | "standards" 746 | ], 747 | "time": "2021-02-15T10:24:51+00:00" 748 | }, 749 | { 750 | "name": "phpcompatibility/phpcompatibility-wp", 751 | "version": "2.1.1", 752 | "source": { 753 | "type": "git", 754 | "url": "https://github.com/PHPCompatibility/PHPCompatibilityWP.git", 755 | "reference": "b7dc0cd7a8f767ccac5e7637550ea1c50a67b09e" 756 | }, 757 | "dist": { 758 | "type": "zip", 759 | "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/b7dc0cd7a8f767ccac5e7637550ea1c50a67b09e", 760 | "reference": "b7dc0cd7a8f767ccac5e7637550ea1c50a67b09e", 761 | "shasum": "" 762 | }, 763 | "require": { 764 | "phpcompatibility/php-compatibility": "^9.0", 765 | "phpcompatibility/phpcompatibility-paragonie": "^1.0" 766 | }, 767 | "require-dev": { 768 | "dealerdirect/phpcodesniffer-composer-installer": "^0.7" 769 | }, 770 | "suggest": { 771 | "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", 772 | "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." 773 | }, 774 | "type": "phpcodesniffer-standard", 775 | "notification-url": "https://packagist.org/downloads/", 776 | "license": [ 777 | "LGPL-3.0-or-later" 778 | ], 779 | "authors": [ 780 | { 781 | "name": "Wim Godden", 782 | "role": "lead" 783 | }, 784 | { 785 | "name": "Juliette Reinders Folmer", 786 | "role": "lead" 787 | } 788 | ], 789 | "description": "A ruleset for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by WordPress.", 790 | "homepage": "http://phpcompatibility.com/", 791 | "keywords": [ 792 | "compatibility", 793 | "phpcs", 794 | "standards", 795 | "wordpress" 796 | ], 797 | "time": "2021-02-15T12:58:46+00:00" 798 | }, 799 | { 800 | "name": "phpdocumentor/reflection-common", 801 | "version": "2.2.0", 802 | "source": { 803 | "type": "git", 804 | "url": "https://github.com/phpDocumentor/ReflectionCommon.git", 805 | "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b" 806 | }, 807 | "dist": { 808 | "type": "zip", 809 | "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/1d01c49d4ed62f25aa84a747ad35d5a16924662b", 810 | "reference": "1d01c49d4ed62f25aa84a747ad35d5a16924662b", 811 | "shasum": "" 812 | }, 813 | "require": { 814 | "php": "^7.2 || ^8.0" 815 | }, 816 | "type": "library", 817 | "extra": { 818 | "branch-alias": { 819 | "dev-2.x": "2.x-dev" 820 | } 821 | }, 822 | "autoload": { 823 | "psr-4": { 824 | "phpDocumentor\\Reflection\\": "src/" 825 | } 826 | }, 827 | "notification-url": "https://packagist.org/downloads/", 828 | "license": [ 829 | "MIT" 830 | ], 831 | "authors": [ 832 | { 833 | "name": "Jaap van Otterdijk", 834 | "email": "opensource@ijaap.nl" 835 | } 836 | ], 837 | "description": "Common reflection classes used by phpdocumentor to reflect the code structure", 838 | "homepage": "http://www.phpdoc.org", 839 | "keywords": [ 840 | "FQSEN", 841 | "phpDocumentor", 842 | "phpdoc", 843 | "reflection", 844 | "static analysis" 845 | ], 846 | "time": "2020-06-27T09:03:43+00:00" 847 | }, 848 | { 849 | "name": "phpdocumentor/reflection-docblock", 850 | "version": "5.2.2", 851 | "source": { 852 | "type": "git", 853 | "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", 854 | "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" 855 | }, 856 | "dist": { 857 | "type": "zip", 858 | "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", 859 | "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", 860 | "shasum": "" 861 | }, 862 | "require": { 863 | "ext-filter": "*", 864 | "php": "^7.2 || ^8.0", 865 | "phpdocumentor/reflection-common": "^2.2", 866 | "phpdocumentor/type-resolver": "^1.3", 867 | "webmozart/assert": "^1.9.1" 868 | }, 869 | "require-dev": { 870 | "mockery/mockery": "~1.3.2" 871 | }, 872 | "type": "library", 873 | "extra": { 874 | "branch-alias": { 875 | "dev-master": "5.x-dev" 876 | } 877 | }, 878 | "autoload": { 879 | "psr-4": { 880 | "phpDocumentor\\Reflection\\": "src" 881 | } 882 | }, 883 | "notification-url": "https://packagist.org/downloads/", 884 | "license": [ 885 | "MIT" 886 | ], 887 | "authors": [ 888 | { 889 | "name": "Mike van Riel", 890 | "email": "me@mikevanriel.com" 891 | }, 892 | { 893 | "name": "Jaap van Otterdijk", 894 | "email": "account@ijaap.nl" 895 | } 896 | ], 897 | "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", 898 | "time": "2020-09-03T19:13:55+00:00" 899 | }, 900 | { 901 | "name": "phpdocumentor/type-resolver", 902 | "version": "1.4.0", 903 | "source": { 904 | "type": "git", 905 | "url": "https://github.com/phpDocumentor/TypeResolver.git", 906 | "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" 907 | }, 908 | "dist": { 909 | "type": "zip", 910 | "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", 911 | "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", 912 | "shasum": "" 913 | }, 914 | "require": { 915 | "php": "^7.2 || ^8.0", 916 | "phpdocumentor/reflection-common": "^2.0" 917 | }, 918 | "require-dev": { 919 | "ext-tokenizer": "*" 920 | }, 921 | "type": "library", 922 | "extra": { 923 | "branch-alias": { 924 | "dev-1.x": "1.x-dev" 925 | } 926 | }, 927 | "autoload": { 928 | "psr-4": { 929 | "phpDocumentor\\Reflection\\": "src" 930 | } 931 | }, 932 | "notification-url": "https://packagist.org/downloads/", 933 | "license": [ 934 | "MIT" 935 | ], 936 | "authors": [ 937 | { 938 | "name": "Mike van Riel", 939 | "email": "me@mikevanriel.com" 940 | } 941 | ], 942 | "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", 943 | "time": "2020-09-17T18:55:26+00:00" 944 | }, 945 | { 946 | "name": "phpspec/prophecy", 947 | "version": "1.12.2", 948 | "source": { 949 | "type": "git", 950 | "url": "https://github.com/phpspec/prophecy.git", 951 | "reference": "245710e971a030f42e08f4912863805570f23d39" 952 | }, 953 | "dist": { 954 | "type": "zip", 955 | "url": "https://api.github.com/repos/phpspec/prophecy/zipball/245710e971a030f42e08f4912863805570f23d39", 956 | "reference": "245710e971a030f42e08f4912863805570f23d39", 957 | "shasum": "" 958 | }, 959 | "require": { 960 | "doctrine/instantiator": "^1.2", 961 | "php": "^7.2 || ~8.0, <8.1", 962 | "phpdocumentor/reflection-docblock": "^5.2", 963 | "sebastian/comparator": "^3.0 || ^4.0", 964 | "sebastian/recursion-context": "^3.0 || ^4.0" 965 | }, 966 | "require-dev": { 967 | "phpspec/phpspec": "^6.0", 968 | "phpunit/phpunit": "^8.0 || ^9.0" 969 | }, 970 | "type": "library", 971 | "extra": { 972 | "branch-alias": { 973 | "dev-master": "1.11.x-dev" 974 | } 975 | }, 976 | "autoload": { 977 | "psr-4": { 978 | "Prophecy\\": "src/Prophecy" 979 | } 980 | }, 981 | "notification-url": "https://packagist.org/downloads/", 982 | "license": [ 983 | "MIT" 984 | ], 985 | "authors": [ 986 | { 987 | "name": "Konstantin Kudryashov", 988 | "email": "ever.zet@gmail.com", 989 | "homepage": "http://everzet.com" 990 | }, 991 | { 992 | "name": "Marcello Duarte", 993 | "email": "marcello.duarte@gmail.com" 994 | } 995 | ], 996 | "description": "Highly opinionated mocking framework for PHP 5.3+", 997 | "homepage": "https://github.com/phpspec/prophecy", 998 | "keywords": [ 999 | "Double", 1000 | "Dummy", 1001 | "fake", 1002 | "mock", 1003 | "spy", 1004 | "stub" 1005 | ], 1006 | "time": "2020-12-19T10:15:11+00:00" 1007 | }, 1008 | { 1009 | "name": "phpunit/php-code-coverage", 1010 | "version": "6.1.4", 1011 | "source": { 1012 | "type": "git", 1013 | "url": "https://github.com/sebastianbergmann/php-code-coverage.git", 1014 | "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d" 1015 | }, 1016 | "dist": { 1017 | "type": "zip", 1018 | "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", 1019 | "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", 1020 | "shasum": "" 1021 | }, 1022 | "require": { 1023 | "ext-dom": "*", 1024 | "ext-xmlwriter": "*", 1025 | "php": "^7.1", 1026 | "phpunit/php-file-iterator": "^2.0", 1027 | "phpunit/php-text-template": "^1.2.1", 1028 | "phpunit/php-token-stream": "^3.0", 1029 | "sebastian/code-unit-reverse-lookup": "^1.0.1", 1030 | "sebastian/environment": "^3.1 || ^4.0", 1031 | "sebastian/version": "^2.0.1", 1032 | "theseer/tokenizer": "^1.1" 1033 | }, 1034 | "require-dev": { 1035 | "phpunit/phpunit": "^7.0" 1036 | }, 1037 | "suggest": { 1038 | "ext-xdebug": "^2.6.0" 1039 | }, 1040 | "type": "library", 1041 | "extra": { 1042 | "branch-alias": { 1043 | "dev-master": "6.1-dev" 1044 | } 1045 | }, 1046 | "autoload": { 1047 | "classmap": [ 1048 | "src/" 1049 | ] 1050 | }, 1051 | "notification-url": "https://packagist.org/downloads/", 1052 | "license": [ 1053 | "BSD-3-Clause" 1054 | ], 1055 | "authors": [ 1056 | { 1057 | "name": "Sebastian Bergmann", 1058 | "email": "sebastian@phpunit.de", 1059 | "role": "lead" 1060 | } 1061 | ], 1062 | "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", 1063 | "homepage": "https://github.com/sebastianbergmann/php-code-coverage", 1064 | "keywords": [ 1065 | "coverage", 1066 | "testing", 1067 | "xunit" 1068 | ], 1069 | "time": "2018-10-31T16:06:48+00:00" 1070 | }, 1071 | { 1072 | "name": "phpunit/php-file-iterator", 1073 | "version": "2.0.3", 1074 | "source": { 1075 | "type": "git", 1076 | "url": "https://github.com/sebastianbergmann/php-file-iterator.git", 1077 | "reference": "4b49fb70f067272b659ef0174ff9ca40fdaa6357" 1078 | }, 1079 | "dist": { 1080 | "type": "zip", 1081 | "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/4b49fb70f067272b659ef0174ff9ca40fdaa6357", 1082 | "reference": "4b49fb70f067272b659ef0174ff9ca40fdaa6357", 1083 | "shasum": "" 1084 | }, 1085 | "require": { 1086 | "php": ">=7.1" 1087 | }, 1088 | "require-dev": { 1089 | "phpunit/phpunit": "^8.5" 1090 | }, 1091 | "type": "library", 1092 | "extra": { 1093 | "branch-alias": { 1094 | "dev-master": "2.0.x-dev" 1095 | } 1096 | }, 1097 | "autoload": { 1098 | "classmap": [ 1099 | "src/" 1100 | ] 1101 | }, 1102 | "notification-url": "https://packagist.org/downloads/", 1103 | "license": [ 1104 | "BSD-3-Clause" 1105 | ], 1106 | "authors": [ 1107 | { 1108 | "name": "Sebastian Bergmann", 1109 | "email": "sebastian@phpunit.de", 1110 | "role": "lead" 1111 | } 1112 | ], 1113 | "description": "FilterIterator implementation that filters files based on a list of suffixes.", 1114 | "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", 1115 | "keywords": [ 1116 | "filesystem", 1117 | "iterator" 1118 | ], 1119 | "funding": [ 1120 | { 1121 | "url": "https://github.com/sebastianbergmann", 1122 | "type": "github" 1123 | } 1124 | ], 1125 | "time": "2020-11-30T08:25:21+00:00" 1126 | }, 1127 | { 1128 | "name": "phpunit/php-text-template", 1129 | "version": "1.2.1", 1130 | "source": { 1131 | "type": "git", 1132 | "url": "https://github.com/sebastianbergmann/php-text-template.git", 1133 | "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" 1134 | }, 1135 | "dist": { 1136 | "type": "zip", 1137 | "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", 1138 | "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", 1139 | "shasum": "" 1140 | }, 1141 | "require": { 1142 | "php": ">=5.3.3" 1143 | }, 1144 | "type": "library", 1145 | "autoload": { 1146 | "classmap": [ 1147 | "src/" 1148 | ] 1149 | }, 1150 | "notification-url": "https://packagist.org/downloads/", 1151 | "license": [ 1152 | "BSD-3-Clause" 1153 | ], 1154 | "authors": [ 1155 | { 1156 | "name": "Sebastian Bergmann", 1157 | "email": "sebastian@phpunit.de", 1158 | "role": "lead" 1159 | } 1160 | ], 1161 | "description": "Simple template engine.", 1162 | "homepage": "https://github.com/sebastianbergmann/php-text-template/", 1163 | "keywords": [ 1164 | "template" 1165 | ], 1166 | "time": "2015-06-21T13:50:34+00:00" 1167 | }, 1168 | { 1169 | "name": "phpunit/php-timer", 1170 | "version": "2.1.3", 1171 | "source": { 1172 | "type": "git", 1173 | "url": "https://github.com/sebastianbergmann/php-timer.git", 1174 | "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662" 1175 | }, 1176 | "dist": { 1177 | "type": "zip", 1178 | "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/2454ae1765516d20c4ffe103d85a58a9a3bd5662", 1179 | "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662", 1180 | "shasum": "" 1181 | }, 1182 | "require": { 1183 | "php": ">=7.1" 1184 | }, 1185 | "require-dev": { 1186 | "phpunit/phpunit": "^8.5" 1187 | }, 1188 | "type": "library", 1189 | "extra": { 1190 | "branch-alias": { 1191 | "dev-master": "2.1-dev" 1192 | } 1193 | }, 1194 | "autoload": { 1195 | "classmap": [ 1196 | "src/" 1197 | ] 1198 | }, 1199 | "notification-url": "https://packagist.org/downloads/", 1200 | "license": [ 1201 | "BSD-3-Clause" 1202 | ], 1203 | "authors": [ 1204 | { 1205 | "name": "Sebastian Bergmann", 1206 | "email": "sebastian@phpunit.de", 1207 | "role": "lead" 1208 | } 1209 | ], 1210 | "description": "Utility class for timing", 1211 | "homepage": "https://github.com/sebastianbergmann/php-timer/", 1212 | "keywords": [ 1213 | "timer" 1214 | ], 1215 | "funding": [ 1216 | { 1217 | "url": "https://github.com/sebastianbergmann", 1218 | "type": "github" 1219 | } 1220 | ], 1221 | "time": "2020-11-30T08:20:02+00:00" 1222 | }, 1223 | { 1224 | "name": "phpunit/php-token-stream", 1225 | "version": "3.1.2", 1226 | "source": { 1227 | "type": "git", 1228 | "url": "https://github.com/sebastianbergmann/php-token-stream.git", 1229 | "reference": "472b687829041c24b25f475e14c2f38a09edf1c2" 1230 | }, 1231 | "dist": { 1232 | "type": "zip", 1233 | "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/472b687829041c24b25f475e14c2f38a09edf1c2", 1234 | "reference": "472b687829041c24b25f475e14c2f38a09edf1c2", 1235 | "shasum": "" 1236 | }, 1237 | "require": { 1238 | "ext-tokenizer": "*", 1239 | "php": ">=7.1" 1240 | }, 1241 | "require-dev": { 1242 | "phpunit/phpunit": "^7.0" 1243 | }, 1244 | "type": "library", 1245 | "extra": { 1246 | "branch-alias": { 1247 | "dev-master": "3.1-dev" 1248 | } 1249 | }, 1250 | "autoload": { 1251 | "classmap": [ 1252 | "src/" 1253 | ] 1254 | }, 1255 | "notification-url": "https://packagist.org/downloads/", 1256 | "license": [ 1257 | "BSD-3-Clause" 1258 | ], 1259 | "authors": [ 1260 | { 1261 | "name": "Sebastian Bergmann", 1262 | "email": "sebastian@phpunit.de" 1263 | } 1264 | ], 1265 | "description": "Wrapper around PHP's tokenizer extension.", 1266 | "homepage": "https://github.com/sebastianbergmann/php-token-stream/", 1267 | "keywords": [ 1268 | "tokenizer" 1269 | ], 1270 | "funding": [ 1271 | { 1272 | "url": "https://github.com/sebastianbergmann", 1273 | "type": "github" 1274 | } 1275 | ], 1276 | "abandoned": true, 1277 | "time": "2020-11-30T08:38:46+00:00" 1278 | }, 1279 | { 1280 | "name": "phpunit/phpunit", 1281 | "version": "7.5.20", 1282 | "source": { 1283 | "type": "git", 1284 | "url": "https://github.com/sebastianbergmann/phpunit.git", 1285 | "reference": "9467db479d1b0487c99733bb1e7944d32deded2c" 1286 | }, 1287 | "dist": { 1288 | "type": "zip", 1289 | "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9467db479d1b0487c99733bb1e7944d32deded2c", 1290 | "reference": "9467db479d1b0487c99733bb1e7944d32deded2c", 1291 | "shasum": "" 1292 | }, 1293 | "require": { 1294 | "doctrine/instantiator": "^1.1", 1295 | "ext-dom": "*", 1296 | "ext-json": "*", 1297 | "ext-libxml": "*", 1298 | "ext-mbstring": "*", 1299 | "ext-xml": "*", 1300 | "myclabs/deep-copy": "^1.7", 1301 | "phar-io/manifest": "^1.0.2", 1302 | "phar-io/version": "^2.0", 1303 | "php": "^7.1", 1304 | "phpspec/prophecy": "^1.7", 1305 | "phpunit/php-code-coverage": "^6.0.7", 1306 | "phpunit/php-file-iterator": "^2.0.1", 1307 | "phpunit/php-text-template": "^1.2.1", 1308 | "phpunit/php-timer": "^2.1", 1309 | "sebastian/comparator": "^3.0", 1310 | "sebastian/diff": "^3.0", 1311 | "sebastian/environment": "^4.0", 1312 | "sebastian/exporter": "^3.1", 1313 | "sebastian/global-state": "^2.0", 1314 | "sebastian/object-enumerator": "^3.0.3", 1315 | "sebastian/resource-operations": "^2.0", 1316 | "sebastian/version": "^2.0.1" 1317 | }, 1318 | "conflict": { 1319 | "phpunit/phpunit-mock-objects": "*" 1320 | }, 1321 | "require-dev": { 1322 | "ext-pdo": "*" 1323 | }, 1324 | "suggest": { 1325 | "ext-soap": "*", 1326 | "ext-xdebug": "*", 1327 | "phpunit/php-invoker": "^2.0" 1328 | }, 1329 | "bin": [ 1330 | "phpunit" 1331 | ], 1332 | "type": "library", 1333 | "extra": { 1334 | "branch-alias": { 1335 | "dev-master": "7.5-dev" 1336 | } 1337 | }, 1338 | "autoload": { 1339 | "classmap": [ 1340 | "src/" 1341 | ] 1342 | }, 1343 | "notification-url": "https://packagist.org/downloads/", 1344 | "license": [ 1345 | "BSD-3-Clause" 1346 | ], 1347 | "authors": [ 1348 | { 1349 | "name": "Sebastian Bergmann", 1350 | "email": "sebastian@phpunit.de", 1351 | "role": "lead" 1352 | } 1353 | ], 1354 | "description": "The PHP Unit Testing framework.", 1355 | "homepage": "https://phpunit.de/", 1356 | "keywords": [ 1357 | "phpunit", 1358 | "testing", 1359 | "xunit" 1360 | ], 1361 | "time": "2020-01-08T08:45:45+00:00" 1362 | }, 1363 | { 1364 | "name": "sebastian/code-unit-reverse-lookup", 1365 | "version": "1.0.2", 1366 | "source": { 1367 | "type": "git", 1368 | "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", 1369 | "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619" 1370 | }, 1371 | "dist": { 1372 | "type": "zip", 1373 | "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/1de8cd5c010cb153fcd68b8d0f64606f523f7619", 1374 | "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619", 1375 | "shasum": "" 1376 | }, 1377 | "require": { 1378 | "php": ">=5.6" 1379 | }, 1380 | "require-dev": { 1381 | "phpunit/phpunit": "^8.5" 1382 | }, 1383 | "type": "library", 1384 | "extra": { 1385 | "branch-alias": { 1386 | "dev-master": "1.0.x-dev" 1387 | } 1388 | }, 1389 | "autoload": { 1390 | "classmap": [ 1391 | "src/" 1392 | ] 1393 | }, 1394 | "notification-url": "https://packagist.org/downloads/", 1395 | "license": [ 1396 | "BSD-3-Clause" 1397 | ], 1398 | "authors": [ 1399 | { 1400 | "name": "Sebastian Bergmann", 1401 | "email": "sebastian@phpunit.de" 1402 | } 1403 | ], 1404 | "description": "Looks up which function or method a line of code belongs to", 1405 | "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", 1406 | "funding": [ 1407 | { 1408 | "url": "https://github.com/sebastianbergmann", 1409 | "type": "github" 1410 | } 1411 | ], 1412 | "time": "2020-11-30T08:15:22+00:00" 1413 | }, 1414 | { 1415 | "name": "sebastian/comparator", 1416 | "version": "3.0.3", 1417 | "source": { 1418 | "type": "git", 1419 | "url": "https://github.com/sebastianbergmann/comparator.git", 1420 | "reference": "1071dfcef776a57013124ff35e1fc41ccd294758" 1421 | }, 1422 | "dist": { 1423 | "type": "zip", 1424 | "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1071dfcef776a57013124ff35e1fc41ccd294758", 1425 | "reference": "1071dfcef776a57013124ff35e1fc41ccd294758", 1426 | "shasum": "" 1427 | }, 1428 | "require": { 1429 | "php": ">=7.1", 1430 | "sebastian/diff": "^3.0", 1431 | "sebastian/exporter": "^3.1" 1432 | }, 1433 | "require-dev": { 1434 | "phpunit/phpunit": "^8.5" 1435 | }, 1436 | "type": "library", 1437 | "extra": { 1438 | "branch-alias": { 1439 | "dev-master": "3.0-dev" 1440 | } 1441 | }, 1442 | "autoload": { 1443 | "classmap": [ 1444 | "src/" 1445 | ] 1446 | }, 1447 | "notification-url": "https://packagist.org/downloads/", 1448 | "license": [ 1449 | "BSD-3-Clause" 1450 | ], 1451 | "authors": [ 1452 | { 1453 | "name": "Sebastian Bergmann", 1454 | "email": "sebastian@phpunit.de" 1455 | }, 1456 | { 1457 | "name": "Jeff Welch", 1458 | "email": "whatthejeff@gmail.com" 1459 | }, 1460 | { 1461 | "name": "Volker Dusch", 1462 | "email": "github@wallbash.com" 1463 | }, 1464 | { 1465 | "name": "Bernhard Schussek", 1466 | "email": "bschussek@2bepublished.at" 1467 | } 1468 | ], 1469 | "description": "Provides the functionality to compare PHP values for equality", 1470 | "homepage": "https://github.com/sebastianbergmann/comparator", 1471 | "keywords": [ 1472 | "comparator", 1473 | "compare", 1474 | "equality" 1475 | ], 1476 | "funding": [ 1477 | { 1478 | "url": "https://github.com/sebastianbergmann", 1479 | "type": "github" 1480 | } 1481 | ], 1482 | "time": "2020-11-30T08:04:30+00:00" 1483 | }, 1484 | { 1485 | "name": "sebastian/diff", 1486 | "version": "3.0.3", 1487 | "source": { 1488 | "type": "git", 1489 | "url": "https://github.com/sebastianbergmann/diff.git", 1490 | "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211" 1491 | }, 1492 | "dist": { 1493 | "type": "zip", 1494 | "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/14f72dd46eaf2f2293cbe79c93cc0bc43161a211", 1495 | "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211", 1496 | "shasum": "" 1497 | }, 1498 | "require": { 1499 | "php": ">=7.1" 1500 | }, 1501 | "require-dev": { 1502 | "phpunit/phpunit": "^7.5 || ^8.0", 1503 | "symfony/process": "^2 || ^3.3 || ^4" 1504 | }, 1505 | "type": "library", 1506 | "extra": { 1507 | "branch-alias": { 1508 | "dev-master": "3.0-dev" 1509 | } 1510 | }, 1511 | "autoload": { 1512 | "classmap": [ 1513 | "src/" 1514 | ] 1515 | }, 1516 | "notification-url": "https://packagist.org/downloads/", 1517 | "license": [ 1518 | "BSD-3-Clause" 1519 | ], 1520 | "authors": [ 1521 | { 1522 | "name": "Sebastian Bergmann", 1523 | "email": "sebastian@phpunit.de" 1524 | }, 1525 | { 1526 | "name": "Kore Nordmann", 1527 | "email": "mail@kore-nordmann.de" 1528 | } 1529 | ], 1530 | "description": "Diff implementation", 1531 | "homepage": "https://github.com/sebastianbergmann/diff", 1532 | "keywords": [ 1533 | "diff", 1534 | "udiff", 1535 | "unidiff", 1536 | "unified diff" 1537 | ], 1538 | "funding": [ 1539 | { 1540 | "url": "https://github.com/sebastianbergmann", 1541 | "type": "github" 1542 | } 1543 | ], 1544 | "time": "2020-11-30T07:59:04+00:00" 1545 | }, 1546 | { 1547 | "name": "sebastian/environment", 1548 | "version": "4.2.4", 1549 | "source": { 1550 | "type": "git", 1551 | "url": "https://github.com/sebastianbergmann/environment.git", 1552 | "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0" 1553 | }, 1554 | "dist": { 1555 | "type": "zip", 1556 | "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", 1557 | "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", 1558 | "shasum": "" 1559 | }, 1560 | "require": { 1561 | "php": ">=7.1" 1562 | }, 1563 | "require-dev": { 1564 | "phpunit/phpunit": "^7.5" 1565 | }, 1566 | "suggest": { 1567 | "ext-posix": "*" 1568 | }, 1569 | "type": "library", 1570 | "extra": { 1571 | "branch-alias": { 1572 | "dev-master": "4.2-dev" 1573 | } 1574 | }, 1575 | "autoload": { 1576 | "classmap": [ 1577 | "src/" 1578 | ] 1579 | }, 1580 | "notification-url": "https://packagist.org/downloads/", 1581 | "license": [ 1582 | "BSD-3-Clause" 1583 | ], 1584 | "authors": [ 1585 | { 1586 | "name": "Sebastian Bergmann", 1587 | "email": "sebastian@phpunit.de" 1588 | } 1589 | ], 1590 | "description": "Provides functionality to handle HHVM/PHP environments", 1591 | "homepage": "http://www.github.com/sebastianbergmann/environment", 1592 | "keywords": [ 1593 | "Xdebug", 1594 | "environment", 1595 | "hhvm" 1596 | ], 1597 | "funding": [ 1598 | { 1599 | "url": "https://github.com/sebastianbergmann", 1600 | "type": "github" 1601 | } 1602 | ], 1603 | "time": "2020-11-30T07:53:42+00:00" 1604 | }, 1605 | { 1606 | "name": "sebastian/exporter", 1607 | "version": "3.1.3", 1608 | "source": { 1609 | "type": "git", 1610 | "url": "https://github.com/sebastianbergmann/exporter.git", 1611 | "reference": "6b853149eab67d4da22291d36f5b0631c0fd856e" 1612 | }, 1613 | "dist": { 1614 | "type": "zip", 1615 | "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/6b853149eab67d4da22291d36f5b0631c0fd856e", 1616 | "reference": "6b853149eab67d4da22291d36f5b0631c0fd856e", 1617 | "shasum": "" 1618 | }, 1619 | "require": { 1620 | "php": ">=7.0", 1621 | "sebastian/recursion-context": "^3.0" 1622 | }, 1623 | "require-dev": { 1624 | "ext-mbstring": "*", 1625 | "phpunit/phpunit": "^6.0" 1626 | }, 1627 | "type": "library", 1628 | "extra": { 1629 | "branch-alias": { 1630 | "dev-master": "3.1.x-dev" 1631 | } 1632 | }, 1633 | "autoload": { 1634 | "classmap": [ 1635 | "src/" 1636 | ] 1637 | }, 1638 | "notification-url": "https://packagist.org/downloads/", 1639 | "license": [ 1640 | "BSD-3-Clause" 1641 | ], 1642 | "authors": [ 1643 | { 1644 | "name": "Sebastian Bergmann", 1645 | "email": "sebastian@phpunit.de" 1646 | }, 1647 | { 1648 | "name": "Jeff Welch", 1649 | "email": "whatthejeff@gmail.com" 1650 | }, 1651 | { 1652 | "name": "Volker Dusch", 1653 | "email": "github@wallbash.com" 1654 | }, 1655 | { 1656 | "name": "Adam Harvey", 1657 | "email": "aharvey@php.net" 1658 | }, 1659 | { 1660 | "name": "Bernhard Schussek", 1661 | "email": "bschussek@gmail.com" 1662 | } 1663 | ], 1664 | "description": "Provides the functionality to export PHP variables for visualization", 1665 | "homepage": "http://www.github.com/sebastianbergmann/exporter", 1666 | "keywords": [ 1667 | "export", 1668 | "exporter" 1669 | ], 1670 | "funding": [ 1671 | { 1672 | "url": "https://github.com/sebastianbergmann", 1673 | "type": "github" 1674 | } 1675 | ], 1676 | "time": "2020-11-30T07:47:53+00:00" 1677 | }, 1678 | { 1679 | "name": "sebastian/global-state", 1680 | "version": "2.0.0", 1681 | "source": { 1682 | "type": "git", 1683 | "url": "https://github.com/sebastianbergmann/global-state.git", 1684 | "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" 1685 | }, 1686 | "dist": { 1687 | "type": "zip", 1688 | "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", 1689 | "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", 1690 | "shasum": "" 1691 | }, 1692 | "require": { 1693 | "php": "^7.0" 1694 | }, 1695 | "require-dev": { 1696 | "phpunit/phpunit": "^6.0" 1697 | }, 1698 | "suggest": { 1699 | "ext-uopz": "*" 1700 | }, 1701 | "type": "library", 1702 | "extra": { 1703 | "branch-alias": { 1704 | "dev-master": "2.0-dev" 1705 | } 1706 | }, 1707 | "autoload": { 1708 | "classmap": [ 1709 | "src/" 1710 | ] 1711 | }, 1712 | "notification-url": "https://packagist.org/downloads/", 1713 | "license": [ 1714 | "BSD-3-Clause" 1715 | ], 1716 | "authors": [ 1717 | { 1718 | "name": "Sebastian Bergmann", 1719 | "email": "sebastian@phpunit.de" 1720 | } 1721 | ], 1722 | "description": "Snapshotting of global state", 1723 | "homepage": "http://www.github.com/sebastianbergmann/global-state", 1724 | "keywords": [ 1725 | "global state" 1726 | ], 1727 | "time": "2017-04-27T15:39:26+00:00" 1728 | }, 1729 | { 1730 | "name": "sebastian/object-enumerator", 1731 | "version": "3.0.4", 1732 | "source": { 1733 | "type": "git", 1734 | "url": "https://github.com/sebastianbergmann/object-enumerator.git", 1735 | "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2" 1736 | }, 1737 | "dist": { 1738 | "type": "zip", 1739 | "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", 1740 | "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", 1741 | "shasum": "" 1742 | }, 1743 | "require": { 1744 | "php": ">=7.0", 1745 | "sebastian/object-reflector": "^1.1.1", 1746 | "sebastian/recursion-context": "^3.0" 1747 | }, 1748 | "require-dev": { 1749 | "phpunit/phpunit": "^6.0" 1750 | }, 1751 | "type": "library", 1752 | "extra": { 1753 | "branch-alias": { 1754 | "dev-master": "3.0.x-dev" 1755 | } 1756 | }, 1757 | "autoload": { 1758 | "classmap": [ 1759 | "src/" 1760 | ] 1761 | }, 1762 | "notification-url": "https://packagist.org/downloads/", 1763 | "license": [ 1764 | "BSD-3-Clause" 1765 | ], 1766 | "authors": [ 1767 | { 1768 | "name": "Sebastian Bergmann", 1769 | "email": "sebastian@phpunit.de" 1770 | } 1771 | ], 1772 | "description": "Traverses array structures and object graphs to enumerate all referenced objects", 1773 | "homepage": "https://github.com/sebastianbergmann/object-enumerator/", 1774 | "funding": [ 1775 | { 1776 | "url": "https://github.com/sebastianbergmann", 1777 | "type": "github" 1778 | } 1779 | ], 1780 | "time": "2020-11-30T07:40:27+00:00" 1781 | }, 1782 | { 1783 | "name": "sebastian/object-reflector", 1784 | "version": "1.1.2", 1785 | "source": { 1786 | "type": "git", 1787 | "url": "https://github.com/sebastianbergmann/object-reflector.git", 1788 | "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d" 1789 | }, 1790 | "dist": { 1791 | "type": "zip", 1792 | "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", 1793 | "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", 1794 | "shasum": "" 1795 | }, 1796 | "require": { 1797 | "php": ">=7.0" 1798 | }, 1799 | "require-dev": { 1800 | "phpunit/phpunit": "^6.0" 1801 | }, 1802 | "type": "library", 1803 | "extra": { 1804 | "branch-alias": { 1805 | "dev-master": "1.1-dev" 1806 | } 1807 | }, 1808 | "autoload": { 1809 | "classmap": [ 1810 | "src/" 1811 | ] 1812 | }, 1813 | "notification-url": "https://packagist.org/downloads/", 1814 | "license": [ 1815 | "BSD-3-Clause" 1816 | ], 1817 | "authors": [ 1818 | { 1819 | "name": "Sebastian Bergmann", 1820 | "email": "sebastian@phpunit.de" 1821 | } 1822 | ], 1823 | "description": "Allows reflection of object attributes, including inherited and non-public ones", 1824 | "homepage": "https://github.com/sebastianbergmann/object-reflector/", 1825 | "funding": [ 1826 | { 1827 | "url": "https://github.com/sebastianbergmann", 1828 | "type": "github" 1829 | } 1830 | ], 1831 | "time": "2020-11-30T07:37:18+00:00" 1832 | }, 1833 | { 1834 | "name": "sebastian/recursion-context", 1835 | "version": "3.0.1", 1836 | "source": { 1837 | "type": "git", 1838 | "url": "https://github.com/sebastianbergmann/recursion-context.git", 1839 | "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb" 1840 | }, 1841 | "dist": { 1842 | "type": "zip", 1843 | "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/367dcba38d6e1977be014dc4b22f47a484dac7fb", 1844 | "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb", 1845 | "shasum": "" 1846 | }, 1847 | "require": { 1848 | "php": ">=7.0" 1849 | }, 1850 | "require-dev": { 1851 | "phpunit/phpunit": "^6.0" 1852 | }, 1853 | "type": "library", 1854 | "extra": { 1855 | "branch-alias": { 1856 | "dev-master": "3.0.x-dev" 1857 | } 1858 | }, 1859 | "autoload": { 1860 | "classmap": [ 1861 | "src/" 1862 | ] 1863 | }, 1864 | "notification-url": "https://packagist.org/downloads/", 1865 | "license": [ 1866 | "BSD-3-Clause" 1867 | ], 1868 | "authors": [ 1869 | { 1870 | "name": "Sebastian Bergmann", 1871 | "email": "sebastian@phpunit.de" 1872 | }, 1873 | { 1874 | "name": "Jeff Welch", 1875 | "email": "whatthejeff@gmail.com" 1876 | }, 1877 | { 1878 | "name": "Adam Harvey", 1879 | "email": "aharvey@php.net" 1880 | } 1881 | ], 1882 | "description": "Provides functionality to recursively process PHP variables", 1883 | "homepage": "http://www.github.com/sebastianbergmann/recursion-context", 1884 | "funding": [ 1885 | { 1886 | "url": "https://github.com/sebastianbergmann", 1887 | "type": "github" 1888 | } 1889 | ], 1890 | "time": "2020-11-30T07:34:24+00:00" 1891 | }, 1892 | { 1893 | "name": "sebastian/resource-operations", 1894 | "version": "2.0.2", 1895 | "source": { 1896 | "type": "git", 1897 | "url": "https://github.com/sebastianbergmann/resource-operations.git", 1898 | "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3" 1899 | }, 1900 | "dist": { 1901 | "type": "zip", 1902 | "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/31d35ca87926450c44eae7e2611d45a7a65ea8b3", 1903 | "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3", 1904 | "shasum": "" 1905 | }, 1906 | "require": { 1907 | "php": ">=7.1" 1908 | }, 1909 | "type": "library", 1910 | "extra": { 1911 | "branch-alias": { 1912 | "dev-master": "2.0-dev" 1913 | } 1914 | }, 1915 | "autoload": { 1916 | "classmap": [ 1917 | "src/" 1918 | ] 1919 | }, 1920 | "notification-url": "https://packagist.org/downloads/", 1921 | "license": [ 1922 | "BSD-3-Clause" 1923 | ], 1924 | "authors": [ 1925 | { 1926 | "name": "Sebastian Bergmann", 1927 | "email": "sebastian@phpunit.de" 1928 | } 1929 | ], 1930 | "description": "Provides a list of PHP built-in functions that operate on resources", 1931 | "homepage": "https://www.github.com/sebastianbergmann/resource-operations", 1932 | "funding": [ 1933 | { 1934 | "url": "https://github.com/sebastianbergmann", 1935 | "type": "github" 1936 | } 1937 | ], 1938 | "time": "2020-11-30T07:30:19+00:00" 1939 | }, 1940 | { 1941 | "name": "sebastian/version", 1942 | "version": "2.0.1", 1943 | "source": { 1944 | "type": "git", 1945 | "url": "https://github.com/sebastianbergmann/version.git", 1946 | "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" 1947 | }, 1948 | "dist": { 1949 | "type": "zip", 1950 | "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", 1951 | "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", 1952 | "shasum": "" 1953 | }, 1954 | "require": { 1955 | "php": ">=5.6" 1956 | }, 1957 | "type": "library", 1958 | "extra": { 1959 | "branch-alias": { 1960 | "dev-master": "2.0.x-dev" 1961 | } 1962 | }, 1963 | "autoload": { 1964 | "classmap": [ 1965 | "src/" 1966 | ] 1967 | }, 1968 | "notification-url": "https://packagist.org/downloads/", 1969 | "license": [ 1970 | "BSD-3-Clause" 1971 | ], 1972 | "authors": [ 1973 | { 1974 | "name": "Sebastian Bergmann", 1975 | "email": "sebastian@phpunit.de", 1976 | "role": "lead" 1977 | } 1978 | ], 1979 | "description": "Library that helps with managing the version number of Git-hosted PHP projects", 1980 | "homepage": "https://github.com/sebastianbergmann/version", 1981 | "time": "2016-10-03T07:35:21+00:00" 1982 | }, 1983 | { 1984 | "name": "spatie/phpunit-snapshot-assertions", 1985 | "version": "1.4.2", 1986 | "source": { 1987 | "type": "git", 1988 | "url": "https://github.com/spatie/phpunit-snapshot-assertions.git", 1989 | "reference": "b237c40d4b7ffdb824b75d30169070772acd2e96" 1990 | }, 1991 | "dist": { 1992 | "type": "zip", 1993 | "url": "https://api.github.com/repos/spatie/phpunit-snapshot-assertions/zipball/b237c40d4b7ffdb824b75d30169070772acd2e96", 1994 | "reference": "b237c40d4b7ffdb824b75d30169070772acd2e96", 1995 | "shasum": "" 1996 | }, 1997 | "require": { 1998 | "php": "^7.0", 1999 | "phpunit/phpunit": "^6.0.5|^7.0" 2000 | }, 2001 | "type": "library", 2002 | "autoload": { 2003 | "psr-4": { 2004 | "Spatie\\Snapshots\\": "src" 2005 | } 2006 | }, 2007 | "notification-url": "https://packagist.org/downloads/", 2008 | "license": [ 2009 | "MIT" 2010 | ], 2011 | "authors": [ 2012 | { 2013 | "name": "Sebastian De Deyne", 2014 | "email": "sebastian@spatie.be", 2015 | "homepage": "https://spatie.be", 2016 | "role": "Developer" 2017 | } 2018 | ], 2019 | "description": "Snapshot testing with PHPUnit", 2020 | "homepage": "https://github.com/spatie/phpunit-snapshot-assertions", 2021 | "keywords": [ 2022 | "assert", 2023 | "phpunit", 2024 | "phpunit-snapshot-assertions", 2025 | "snapshot", 2026 | "spatie", 2027 | "testing" 2028 | ], 2029 | "time": "2019-05-13T06:15:55+00:00" 2030 | }, 2031 | { 2032 | "name": "squizlabs/php_codesniffer", 2033 | "version": "3.5.8", 2034 | "source": { 2035 | "type": "git", 2036 | "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", 2037 | "reference": "9d583721a7157ee997f235f327de038e7ea6dac4" 2038 | }, 2039 | "dist": { 2040 | "type": "zip", 2041 | "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/9d583721a7157ee997f235f327de038e7ea6dac4", 2042 | "reference": "9d583721a7157ee997f235f327de038e7ea6dac4", 2043 | "shasum": "" 2044 | }, 2045 | "require": { 2046 | "ext-simplexml": "*", 2047 | "ext-tokenizer": "*", 2048 | "ext-xmlwriter": "*", 2049 | "php": ">=5.4.0" 2050 | }, 2051 | "require-dev": { 2052 | "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" 2053 | }, 2054 | "bin": [ 2055 | "bin/phpcs", 2056 | "bin/phpcbf" 2057 | ], 2058 | "type": "library", 2059 | "extra": { 2060 | "branch-alias": { 2061 | "dev-master": "3.x-dev" 2062 | } 2063 | }, 2064 | "notification-url": "https://packagist.org/downloads/", 2065 | "license": [ 2066 | "BSD-3-Clause" 2067 | ], 2068 | "authors": [ 2069 | { 2070 | "name": "Greg Sherwood", 2071 | "role": "lead" 2072 | } 2073 | ], 2074 | "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", 2075 | "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", 2076 | "keywords": [ 2077 | "phpcs", 2078 | "standards" 2079 | ], 2080 | "time": "2020-10-23T02:01:07+00:00" 2081 | }, 2082 | { 2083 | "name": "symfony/polyfill-ctype", 2084 | "version": "v1.22.1", 2085 | "source": { 2086 | "type": "git", 2087 | "url": "https://github.com/symfony/polyfill-ctype.git", 2088 | "reference": "c6c942b1ac76c82448322025e084cadc56048b4e" 2089 | }, 2090 | "dist": { 2091 | "type": "zip", 2092 | "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/c6c942b1ac76c82448322025e084cadc56048b4e", 2093 | "reference": "c6c942b1ac76c82448322025e084cadc56048b4e", 2094 | "shasum": "" 2095 | }, 2096 | "require": { 2097 | "php": ">=7.1" 2098 | }, 2099 | "suggest": { 2100 | "ext-ctype": "For best performance" 2101 | }, 2102 | "type": "library", 2103 | "extra": { 2104 | "branch-alias": { 2105 | "dev-main": "1.22-dev" 2106 | }, 2107 | "thanks": { 2108 | "name": "symfony/polyfill", 2109 | "url": "https://github.com/symfony/polyfill" 2110 | } 2111 | }, 2112 | "autoload": { 2113 | "psr-4": { 2114 | "Symfony\\Polyfill\\Ctype\\": "" 2115 | }, 2116 | "files": [ 2117 | "bootstrap.php" 2118 | ] 2119 | }, 2120 | "notification-url": "https://packagist.org/downloads/", 2121 | "license": [ 2122 | "MIT" 2123 | ], 2124 | "authors": [ 2125 | { 2126 | "name": "Gert de Pagter", 2127 | "email": "BackEndTea@gmail.com" 2128 | }, 2129 | { 2130 | "name": "Symfony Community", 2131 | "homepage": "https://symfony.com/contributors" 2132 | } 2133 | ], 2134 | "description": "Symfony polyfill for ctype functions", 2135 | "homepage": "https://symfony.com", 2136 | "keywords": [ 2137 | "compatibility", 2138 | "ctype", 2139 | "polyfill", 2140 | "portable" 2141 | ], 2142 | "funding": [ 2143 | { 2144 | "url": "https://symfony.com/sponsor", 2145 | "type": "custom" 2146 | }, 2147 | { 2148 | "url": "https://github.com/fabpot", 2149 | "type": "github" 2150 | }, 2151 | { 2152 | "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", 2153 | "type": "tidelift" 2154 | } 2155 | ], 2156 | "time": "2021-01-07T16:49:33+00:00" 2157 | }, 2158 | { 2159 | "name": "theseer/tokenizer", 2160 | "version": "1.2.0", 2161 | "source": { 2162 | "type": "git", 2163 | "url": "https://github.com/theseer/tokenizer.git", 2164 | "reference": "75a63c33a8577608444246075ea0af0d052e452a" 2165 | }, 2166 | "dist": { 2167 | "type": "zip", 2168 | "url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a", 2169 | "reference": "75a63c33a8577608444246075ea0af0d052e452a", 2170 | "shasum": "" 2171 | }, 2172 | "require": { 2173 | "ext-dom": "*", 2174 | "ext-tokenizer": "*", 2175 | "ext-xmlwriter": "*", 2176 | "php": "^7.2 || ^8.0" 2177 | }, 2178 | "type": "library", 2179 | "autoload": { 2180 | "classmap": [ 2181 | "src/" 2182 | ] 2183 | }, 2184 | "notification-url": "https://packagist.org/downloads/", 2185 | "license": [ 2186 | "BSD-3-Clause" 2187 | ], 2188 | "authors": [ 2189 | { 2190 | "name": "Arne Blankerts", 2191 | "email": "arne@blankerts.de", 2192 | "role": "Developer" 2193 | } 2194 | ], 2195 | "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", 2196 | "funding": [ 2197 | { 2198 | "url": "https://github.com/theseer", 2199 | "type": "github" 2200 | } 2201 | ], 2202 | "time": "2020-07-12T23:59:07+00:00" 2203 | }, 2204 | { 2205 | "name": "webmozart/assert", 2206 | "version": "1.9.1", 2207 | "source": { 2208 | "type": "git", 2209 | "url": "https://github.com/webmozarts/assert.git", 2210 | "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389" 2211 | }, 2212 | "dist": { 2213 | "type": "zip", 2214 | "url": "https://api.github.com/repos/webmozarts/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", 2215 | "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389", 2216 | "shasum": "" 2217 | }, 2218 | "require": { 2219 | "php": "^5.3.3 || ^7.0 || ^8.0", 2220 | "symfony/polyfill-ctype": "^1.8" 2221 | }, 2222 | "conflict": { 2223 | "phpstan/phpstan": "<0.12.20", 2224 | "vimeo/psalm": "<3.9.1" 2225 | }, 2226 | "require-dev": { 2227 | "phpunit/phpunit": "^4.8.36 || ^7.5.13" 2228 | }, 2229 | "type": "library", 2230 | "autoload": { 2231 | "psr-4": { 2232 | "Webmozart\\Assert\\": "src/" 2233 | } 2234 | }, 2235 | "notification-url": "https://packagist.org/downloads/", 2236 | "license": [ 2237 | "MIT" 2238 | ], 2239 | "authors": [ 2240 | { 2241 | "name": "Bernhard Schussek", 2242 | "email": "bschussek@gmail.com" 2243 | } 2244 | ], 2245 | "description": "Assertions to validate method input/output with nice error messages.", 2246 | "keywords": [ 2247 | "assert", 2248 | "check", 2249 | "validate" 2250 | ], 2251 | "time": "2020-07-08T17:02:28+00:00" 2252 | }, 2253 | { 2254 | "name": "wp-coding-standards/wpcs", 2255 | "version": "2.3.0", 2256 | "source": { 2257 | "type": "git", 2258 | "url": "https://github.com/WordPress/WordPress-Coding-Standards.git", 2259 | "reference": "7da1894633f168fe244afc6de00d141f27517b62" 2260 | }, 2261 | "dist": { 2262 | "type": "zip", 2263 | "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/7da1894633f168fe244afc6de00d141f27517b62", 2264 | "reference": "7da1894633f168fe244afc6de00d141f27517b62", 2265 | "shasum": "" 2266 | }, 2267 | "require": { 2268 | "php": ">=5.4", 2269 | "squizlabs/php_codesniffer": "^3.3.1" 2270 | }, 2271 | "require-dev": { 2272 | "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || ^0.6", 2273 | "phpcompatibility/php-compatibility": "^9.0", 2274 | "phpcsstandards/phpcsdevtools": "^1.0", 2275 | "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" 2276 | }, 2277 | "suggest": { 2278 | "dealerdirect/phpcodesniffer-composer-installer": "^0.6 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically." 2279 | }, 2280 | "type": "phpcodesniffer-standard", 2281 | "notification-url": "https://packagist.org/downloads/", 2282 | "license": [ 2283 | "MIT" 2284 | ], 2285 | "authors": [ 2286 | { 2287 | "name": "Contributors", 2288 | "homepage": "https://github.com/WordPress/WordPress-Coding-Standards/graphs/contributors" 2289 | } 2290 | ], 2291 | "description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions", 2292 | "keywords": [ 2293 | "phpcs", 2294 | "standards", 2295 | "wordpress" 2296 | ], 2297 | "time": "2020-05-13T23:57:56+00:00" 2298 | } 2299 | ], 2300 | "aliases": [], 2301 | "minimum-stability": "stable", 2302 | "stability-flags": [], 2303 | "prefer-stable": false, 2304 | "prefer-lowest": false, 2305 | "platform": { 2306 | "php": ">=5.6" 2307 | }, 2308 | "platform-dev": [], 2309 | "plugin-api-version": "1.1.0" 2310 | } 2311 | --------------------------------------------------------------------------------