├── .distignore ├── .editorconfig ├── .eslintignore ├── .eslintrc ├── .github ├── CONTRIBUTING.md ├── ISSUE_TEMPLATE.md ├── ISSUE_TEMPLATE │ ├── 1-bug-report.yml │ ├── 2-enhancement.yml │ └── config.yml └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── .travis.yml ├── .wordpress-org ├── banner-1544x500.png ├── banner-772x250.png ├── icon-128x128.png └── icon-256x256.png ├── README.md ├── assets ├── css │ └── admin.css └── js │ ├── version-information.js │ ├── version-information.min.js │ ├── version-picker.js │ └── version-picker.min.js ├── bin └── build-zip.sh ├── changelog.txt ├── composer.json ├── composer.lock ├── includes ├── class-wc-beta-tester-admin-assets.php ├── class-wc-beta-tester-admin-menus.php ├── class-wc-beta-tester-admin-notices.php ├── class-wc-beta-tester-channel.php ├── class-wc-beta-tester-import-export.php ├── class-wc-beta-tester-plugin-upgrader.php ├── class-wc-beta-tester-version-picker.php ├── class-wc-beta-tester.php ├── views │ └── html-admin-missing-woocommerce.php └── wc-beta-tester-settings-list.php ├── package-lock.json ├── package.json ├── phpcs.xml ├── readme.txt └── woocommerce-beta-tester.php /.distignore: -------------------------------------------------------------------------------- 1 | .distignore 2 | .editorconfig 3 | .gitignore 4 | .travis.yml 5 | .git/ 6 | .wordpress-org/ 7 | composer.json 8 | composer.lock 9 | package-lock.json 10 | package.json 11 | phpcs.xml 12 | 13 | # build files 14 | woocommerce-beta-tester.zip 15 | node_modules/ 16 | build/ 17 | bin/ 18 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # This file is for unifying the coding style for different editors and IDEs 2 | # editorconfig.org 3 | 4 | # WordPress Coding Standards 5 | # https://make.wordpress.org/core/handbook/coding-standards/ 6 | 7 | root = true 8 | 9 | [*] 10 | charset = utf-8 11 | end_of_line = lf 12 | indent_size = 4 13 | tab_width = 4 14 | indent_style = tab 15 | insert_final_newline = true 16 | trim_trailing_whitespace = true 17 | 18 | [*.txt] 19 | trim_trailing_whitespace = false 20 | 21 | [*.{md,json,yml}] 22 | trim_trailing_whitespace = false 23 | indent_style = space 24 | indent_size = 2 25 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | *.min.js 2 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | "env": { 4 | "browser": true, 5 | "node": true 6 | }, 7 | "globals": { 8 | "wp": true, 9 | "es6": true 10 | }, 11 | "rules": { 12 | "camelcase": 0, 13 | "indent": 0, 14 | "max-len": [ 15 | 2, 16 | { 17 | "code": 140 18 | } 19 | ], 20 | "no-console": 1 21 | }, 22 | "parserOptions": { 23 | "ecmaVersion": 6 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing ✨ 2 | 3 | Your help will be greatly appreciated :) 4 | 5 | WooCommerce is licensed under the GPLv3+, and all contributions to the project will be released under the same license. You maintain copyright over any contribution you make, and by submitting a pull request, you are agreeing to release that contribution under the GPLv3+ license. 6 | 7 | ## Coding Guidelines and Development 🛠 8 | 9 | - Ensure you stick to the [WordPress Coding Standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/php/) 10 | - Whenever possible please fix pre-existing code standards errors in the files that you change. It is ok to skip that for larger files or complex fixes. 11 | - Ensure you use LF line endings in your code editor. Use [EditorConfig](http://editorconfig.org/) if your editor supports it so that indentation, line endings and other settings are auto configured. 12 | - When committing, reference your issue number (#1234) and include a note about the fix. 13 | - Push the changes to your fork and submit a pull request on the trunk branch of the repository. 14 | - Make sure to write good and detailed commit messages (see [this post](https://chris.beams.io/posts/git-commit/) for more on this) and follow all the applicable sections of the pull request template. 15 | - Please avoid modifying the changelog directly or updating the .pot files. These will be updated by the team. 16 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | **Prerequisites (mark completed items with an [x]):** 4 | - [ ] I have checked that my issue type is not listed here https://github.com/woocommerce/woocommerce-beta-tester/issues/new/choose 5 | - [ ] My issue is not a security issue, bug report, or enhancement (Please use the link above if it is). 6 | 7 | **Issue Description:** 8 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/1-bug-report.yml: -------------------------------------------------------------------------------- 1 | name: 🐞 Bug Report 2 | description: Report a bug if something isn't working as expected in WooCommerce Beta Tester Plugin. 3 | body: 4 | - type: markdown 5 | attributes: 6 | value: | 7 | ### Thanks for contributing! 8 | 9 | Please provide us with the information requested in this bug report. 10 | Without these details, we won't be able to fully evaluate this issue. 11 | Bug reports lacking detail, or for any other reason than to report a bug, may be closed without action. 12 | 13 | Make sure to look through the [existing `bug` issues](https://github.com/woocommerce/woocommerce-beta-tester/issues?q=is%3Aissue+is%3Aopen+label%3Abug) to see whether your bug has already been submitted. 14 | Feel free to contribute to any existing issues. 15 | - type: checkboxes 16 | id: prerequisites 17 | attributes: 18 | label: Prerequisites 19 | description: Please confirm these before submitting the issue. 20 | options: 21 | - label: I have carried out troubleshooting steps and I believe I have found a bug. 22 | - label: I have searched for similar bugs in both open and closed issues and cannot find a duplicate. 23 | validations: 24 | required: true 25 | - type: textarea 26 | id: summary 27 | attributes: 28 | label: Describe the bug 29 | description: | 30 | A clear and concise description of what the bug is and what actually happens. Please be as descriptive as possible. 31 | Please also include any error logs or output. 32 | If applicable you can attach screenshot(s) or recording(s) directly by dragging & dropping. 33 | validations: 34 | required: true 35 | - type: textarea 36 | id: environment 37 | attributes: 38 | label: WordPress Environment 39 | description: | 40 | Please share the [WooCommerce System Status Report](https://woocommerce.com/document/understanding-the-woocommerce-system-status-report/) of your site to help us evaluate the issue. 41 | placeholder: | 42 | The System Status Report is found in your WordPress admin under **WooCommerce > Status**. 43 | Please select “Get system report”, then “Copy for support”, and then paste it here. 44 | - type: checkboxes 45 | id: isolating 46 | attributes: 47 | label: Isolating the problem 48 | description: | 49 | Please try testing your site for theme and plugins conflict. 50 | To do that deactivate all plugins except for WooCommerce and WooCommerce Beta Tester and switch to a default WordPress theme or [Storefront](https://en-gb.wordpress.org/themes/storefront/). Then test again. 51 | If the issue is resolved with the default theme and all plugins deactivated, it means that one of your plugins or a theme is causing the issue. 52 | You will then need to enable it one by one and test every time you do that in order to figure out which plugin is causing the issue. 53 | options: 54 | - label: I have deactivated other plugins and confirmed this bug occurs when only WooCommerce and WooCommerce Beta Tester plugins are active. 55 | - label: This bug happens with a default WordPress theme active, or [Storefront](https://woocommerce.com/storefront/). 56 | - label: I can reproduce this bug consistently using the steps above. 57 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/2-enhancement.yml: -------------------------------------------------------------------------------- 1 | name: ✨ Enhancement Request 2 | description: If you have an idea to improve WooCommerce Beta Tester Plugin or need something for development please let us know or submit a Pull Request! 3 | title: "[Enhancement]: " 4 | body: 5 | - type: markdown 6 | attributes: 7 | value: | 8 | ### Thanks for contributing! 9 | 10 | Please provide us with the information requested in this form. 11 | 12 | Make sure to look through [existing `enhancement` issues](https://github.com/woocommerce/woocommerce-beta-tester/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement) to see whether your idea is already being discussed. 13 | Feel free to contribute to any existing issues. 14 | - type: textarea 15 | id: summary 16 | attributes: 17 | label: Describe the solution you'd like 18 | description: A clear and concise description of what you want to happen. 19 | validations: 20 | required: true 21 | - type: textarea 22 | id: alternative 23 | attributes: 24 | label: Describe alternatives you've considered 25 | description: A clear and concise description of any alternative solutions or features you've considered. 26 | - type: textarea 27 | id: context 28 | attributes: 29 | label: Additional context 30 | description: Add any other context or screenshots about the feature request here. 31 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: true 2 | contact_links: 3 | - name: 🔒 Security issue 4 | url: https://hackerone.com/automattic/ 5 | about: For security reasons, please report all security issues via HackerOne. Also, if the issue is valid, a bug bounty will be paid out to you. Please disclose responsibly and not via GitHub (which allows for exploiting issues in the wild before the patch is released). 6 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### All Submissions: 2 | 3 | * [ ] Have you followed the [Contributing guidelines](https://github.com/woocommerce/woocommerce-beta-tester/blob/trunk/.github/CONTRIBUTING.md)? 4 | * [ ] Does your code follow the [WordPress' coding standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/)? 5 | * [ ] Have you checked to ensure there aren't other open [Pull Requests](https://github.com/woocommerce/woocommerce-beta-tester/pulls) for the same update/change? 6 | 7 | 8 | 9 | 10 | 11 | ### Changes proposed in this Pull Request: 12 | 13 | 14 | 15 | Closes # . 16 | 17 | ### How to test the changes in this Pull Request: 18 | 19 | 1. 20 | 2. 21 | 3. 22 | 23 | ### Other information: 24 | 25 | * [ ] Have you added an explanation of what your changes do and why you'd like us to include them? 26 | * [ ] Have you written new tests for your changes, as applicable? 27 | * [ ] Have you successfully run tests with your changes locally? 28 | 29 | 30 | 31 | ### Changelog entry 32 | 33 | > Enter a summary of all changes on this Pull Request. This will appear in the changelog if accepted. 34 | 35 | ### FOR PR REVIEWER ONLY: 36 | 37 | * [ ] I have reviewed that everything is sanitized/escaped appropriately for any SQL or XSS injection possibilities. I made sure Linting is not ignored or disabled. 38 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Operating System files 2 | .DS_Store 3 | Thumbs.db 4 | 5 | # IDE files 6 | .idea 7 | .vscode/ 8 | project.xml 9 | project.properties 10 | .project 11 | .settings* 12 | *.sublime-project 13 | *.sublime-workspace 14 | .sublimelinterrc 15 | 16 | vendor/ 17 | node_modules/ 18 | build/ 19 | woocommerce-beta-tester.zip 20 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | 3 | before_script: 4 | - | 5 | # Remove Xdebug for a huge performance increase: 6 | if [ -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ]; then 7 | phpenv config-rm xdebug.ini 8 | else 9 | echo "xdebug.ini does not exist" 10 | fi 11 | - composer install 12 | 13 | script: 14 | - ./vendor/bin/phpcs -s -n -p * 15 | 16 | # Specifies that Travis should create branch builds only for master. 17 | branches: 18 | only: 19 | - master 20 | -------------------------------------------------------------------------------- /.wordpress-org/banner-1544x500.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woocommerce/woocommerce-beta-tester/c0d20973cc021828f32600187ec5566eca468529/.wordpress-org/banner-1544x500.png -------------------------------------------------------------------------------- /.wordpress-org/banner-772x250.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woocommerce/woocommerce-beta-tester/c0d20973cc021828f32600187ec5566eca468529/.wordpress-org/banner-772x250.png -------------------------------------------------------------------------------- /.wordpress-org/icon-128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woocommerce/woocommerce-beta-tester/c0d20973cc021828f32600187ec5566eca468529/.wordpress-org/icon-128x128.png -------------------------------------------------------------------------------- /.wordpress-org/icon-256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/woocommerce/woocommerce-beta-tester/c0d20973cc021828f32600187ec5566eca468529/.wordpress-org/icon-256x256.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # This repository has been moved! 2 | 3 | As part of an effort to centralize plugins and packages directly related to WooCommerce Core, [this repository has 4 | been merged into `woocommerce/woocommerce`](https://github.com/woocommerce/woocommerce/tree/trunk/plugins/woocommerce-beta-tester). 5 | Please direct any pull requests and issue requests to the new home of the plugin. 6 | -------------------------------------------------------------------------------- /assets/css/admin.css: -------------------------------------------------------------------------------- 1 | .plugins_page_wc-beta-tester-version-picker .wc-backbone-modal-main .wc-backbone-modal-header h1 { 2 | margin: 0 35px 0 0; 3 | } 4 | -------------------------------------------------------------------------------- /assets/js/version-information.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Handles version information modal. 3 | * 4 | * @package WooCommerceBetaTester\JS 5 | */ 6 | 7 | jQuery(function( $ ) { 8 | 9 | /** 10 | * Version information 11 | */ 12 | var wc_beta_tester_version_information = { 13 | 14 | /** 15 | * Initialize Version Information click 16 | */ 17 | init: function() { 18 | $( '#wp-admin-bar-show-version-info' ) 19 | .on( 'click', this.showModal ); 20 | }, 21 | 22 | /** 23 | * Handler for showing/hiding version information modal 24 | */ 25 | showModal: function( event ) { 26 | event.preventDefault(); 27 | 28 | // Prevent multiple modals. 29 | if ( 0 < $( '.wc-backbone-modal-beta-tester-version-info' ).length ) { 30 | return; 31 | } 32 | 33 | $( this ).WCBackboneModal({ 34 | template: 'wc-beta-tester-version-info', 35 | variable: { 36 | version: wc_beta_tester_version_info_params.version, 37 | description: wc_beta_tester_version_info_params.description, 38 | }, 39 | }); 40 | } 41 | }; 42 | 43 | wc_beta_tester_version_information.init(); 44 | }); 45 | -------------------------------------------------------------------------------- /assets/js/version-information.min.js: -------------------------------------------------------------------------------- 1 | jQuery(function(i){({init:function(){i("#wp-admin-bar-show-version-info").on("click",this.showModal)},showModal:function(e){e.preventDefault(),0=5.3", 419 | "squizlabs/php_codesniffer": "^2.3 || ^3.0.2" 420 | }, 421 | "conflict": { 422 | "squizlabs/php_codesniffer": "2.6.2" 423 | }, 424 | "require-dev": { 425 | "phpunit/phpunit": "~4.5 || ^5.0 || ^6.0 || ^7.0" 426 | }, 427 | "suggest": { 428 | "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically.", 429 | "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." 430 | }, 431 | "type": "phpcodesniffer-standard", 432 | "notification-url": "https://packagist.org/downloads/", 433 | "license": [ 434 | "LGPL-3.0-or-later" 435 | ], 436 | "authors": [ 437 | { 438 | "name": "Contributors", 439 | "homepage": "https://github.com/PHPCompatibility/PHPCompatibility/graphs/contributors" 440 | }, 441 | { 442 | "name": "Wim Godden", 443 | "homepage": "https://github.com/wimg", 444 | "role": "lead" 445 | }, 446 | { 447 | "name": "Juliette Reinders Folmer", 448 | "homepage": "https://github.com/jrfnl", 449 | "role": "lead" 450 | } 451 | ], 452 | "description": "A set of sniffs for PHP_CodeSniffer that checks for PHP cross-version compatibility.", 453 | "homepage": "http://techblog.wimgodden.be/tag/codesniffer/", 454 | "keywords": [ 455 | "compatibility", 456 | "phpcs", 457 | "standards" 458 | ], 459 | "time": "2018-12-30T23:16:27+00:00" 460 | }, 461 | { 462 | "name": "phpcompatibility/phpcompatibility-paragonie", 463 | "version": "1.0.1", 464 | "source": { 465 | "type": "git", 466 | "url": "https://github.com/PHPCompatibility/PHPCompatibilityParagonie.git", 467 | "reference": "9160de79fcd683b5c99e9c4133728d91529753ea" 468 | }, 469 | "dist": { 470 | "type": "zip", 471 | "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityParagonie/zipball/9160de79fcd683b5c99e9c4133728d91529753ea", 472 | "reference": "9160de79fcd683b5c99e9c4133728d91529753ea", 473 | "shasum": "" 474 | }, 475 | "require": { 476 | "phpcompatibility/php-compatibility": "^9.0" 477 | }, 478 | "require-dev": { 479 | "dealerdirect/phpcodesniffer-composer-installer": "^0.4.4" 480 | }, 481 | "suggest": { 482 | "dealerdirect/phpcodesniffer-composer-installer": "^0.4.4 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", 483 | "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." 484 | }, 485 | "type": "phpcodesniffer-standard", 486 | "notification-url": "https://packagist.org/downloads/", 487 | "license": [ 488 | "LGPL-3.0-or-later" 489 | ], 490 | "authors": [ 491 | { 492 | "name": "Wim Godden", 493 | "role": "lead" 494 | }, 495 | { 496 | "name": "Juliette Reinders Folmer", 497 | "role": "lead" 498 | } 499 | ], 500 | "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.", 501 | "homepage": "http://phpcompatibility.com/", 502 | "keywords": [ 503 | "compatibility", 504 | "paragonie", 505 | "phpcs", 506 | "polyfill", 507 | "standards" 508 | ], 509 | "time": "2018-12-16T19:10:44+00:00" 510 | }, 511 | { 512 | "name": "phpcompatibility/phpcompatibility-wp", 513 | "version": "2.0.0", 514 | "source": { 515 | "type": "git", 516 | "url": "https://github.com/PHPCompatibility/PHPCompatibilityWP.git", 517 | "reference": "cb303f0067cd5b366a41d4fb0e254fb40ff02efd" 518 | }, 519 | "dist": { 520 | "type": "zip", 521 | "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibilityWP/zipball/cb303f0067cd5b366a41d4fb0e254fb40ff02efd", 522 | "reference": "cb303f0067cd5b366a41d4fb0e254fb40ff02efd", 523 | "shasum": "" 524 | }, 525 | "require": { 526 | "phpcompatibility/php-compatibility": "^9.0", 527 | "phpcompatibility/phpcompatibility-paragonie": "^1.0" 528 | }, 529 | "require-dev": { 530 | "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3" 531 | }, 532 | "suggest": { 533 | "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3 || This Composer plugin will sort out the PHP_CodeSniffer 'installed_paths' automatically.", 534 | "roave/security-advisories": "dev-master || Helps prevent installing dependencies with known security issues." 535 | }, 536 | "type": "phpcodesniffer-standard", 537 | "notification-url": "https://packagist.org/downloads/", 538 | "license": [ 539 | "LGPL-3.0-or-later" 540 | ], 541 | "authors": [ 542 | { 543 | "name": "Wim Godden", 544 | "role": "lead" 545 | }, 546 | { 547 | "name": "Juliette Reinders Folmer", 548 | "role": "lead" 549 | } 550 | ], 551 | "description": "A ruleset for PHP_CodeSniffer to check for PHP cross-version compatibility issues in projects, while accounting for polyfills provided by WordPress.", 552 | "homepage": "http://phpcompatibility.com/", 553 | "keywords": [ 554 | "compatibility", 555 | "phpcs", 556 | "standards", 557 | "wordpress" 558 | ], 559 | "time": "2018-10-07T18:31:37+00:00" 560 | }, 561 | { 562 | "name": "phpdocumentor/reflection-common", 563 | "version": "1.0.1", 564 | "source": { 565 | "type": "git", 566 | "url": "https://github.com/phpDocumentor/ReflectionCommon.git", 567 | "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" 568 | }, 569 | "dist": { 570 | "type": "zip", 571 | "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", 572 | "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", 573 | "shasum": "" 574 | }, 575 | "require": { 576 | "php": ">=5.5" 577 | }, 578 | "require-dev": { 579 | "phpunit/phpunit": "^4.6" 580 | }, 581 | "type": "library", 582 | "extra": { 583 | "branch-alias": { 584 | "dev-master": "1.0.x-dev" 585 | } 586 | }, 587 | "autoload": { 588 | "psr-4": { 589 | "phpDocumentor\\Reflection\\": [ 590 | "src" 591 | ] 592 | } 593 | }, 594 | "notification-url": "https://packagist.org/downloads/", 595 | "license": [ 596 | "MIT" 597 | ], 598 | "authors": [ 599 | { 600 | "name": "Jaap van Otterdijk", 601 | "email": "opensource@ijaap.nl" 602 | } 603 | ], 604 | "description": "Common reflection classes used by phpdocumentor to reflect the code structure", 605 | "homepage": "http://www.phpdoc.org", 606 | "keywords": [ 607 | "FQSEN", 608 | "phpDocumentor", 609 | "phpdoc", 610 | "reflection", 611 | "static analysis" 612 | ], 613 | "time": "2017-09-11T18:02:19+00:00" 614 | }, 615 | { 616 | "name": "phpdocumentor/reflection-docblock", 617 | "version": "4.3.0", 618 | "source": { 619 | "type": "git", 620 | "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", 621 | "reference": "94fd0001232e47129dd3504189fa1c7225010d08" 622 | }, 623 | "dist": { 624 | "type": "zip", 625 | "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", 626 | "reference": "94fd0001232e47129dd3504189fa1c7225010d08", 627 | "shasum": "" 628 | }, 629 | "require": { 630 | "php": "^7.0", 631 | "phpdocumentor/reflection-common": "^1.0.0", 632 | "phpdocumentor/type-resolver": "^0.4.0", 633 | "webmozart/assert": "^1.0" 634 | }, 635 | "require-dev": { 636 | "doctrine/instantiator": "~1.0.5", 637 | "mockery/mockery": "^1.0", 638 | "phpunit/phpunit": "^6.4" 639 | }, 640 | "type": "library", 641 | "extra": { 642 | "branch-alias": { 643 | "dev-master": "4.x-dev" 644 | } 645 | }, 646 | "autoload": { 647 | "psr-4": { 648 | "phpDocumentor\\Reflection\\": [ 649 | "src/" 650 | ] 651 | } 652 | }, 653 | "notification-url": "https://packagist.org/downloads/", 654 | "license": [ 655 | "MIT" 656 | ], 657 | "authors": [ 658 | { 659 | "name": "Mike van Riel", 660 | "email": "me@mikevanriel.com" 661 | } 662 | ], 663 | "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", 664 | "time": "2017-11-30T07:14:17+00:00" 665 | }, 666 | { 667 | "name": "phpdocumentor/type-resolver", 668 | "version": "0.4.0", 669 | "source": { 670 | "type": "git", 671 | "url": "https://github.com/phpDocumentor/TypeResolver.git", 672 | "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" 673 | }, 674 | "dist": { 675 | "type": "zip", 676 | "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", 677 | "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", 678 | "shasum": "" 679 | }, 680 | "require": { 681 | "php": "^5.5 || ^7.0", 682 | "phpdocumentor/reflection-common": "^1.0" 683 | }, 684 | "require-dev": { 685 | "mockery/mockery": "^0.9.4", 686 | "phpunit/phpunit": "^5.2||^4.8.24" 687 | }, 688 | "type": "library", 689 | "extra": { 690 | "branch-alias": { 691 | "dev-master": "1.0.x-dev" 692 | } 693 | }, 694 | "autoload": { 695 | "psr-4": { 696 | "phpDocumentor\\Reflection\\": [ 697 | "src/" 698 | ] 699 | } 700 | }, 701 | "notification-url": "https://packagist.org/downloads/", 702 | "license": [ 703 | "MIT" 704 | ], 705 | "authors": [ 706 | { 707 | "name": "Mike van Riel", 708 | "email": "me@mikevanriel.com" 709 | } 710 | ], 711 | "time": "2017-07-14T14:27:02+00:00" 712 | }, 713 | { 714 | "name": "phpspec/prophecy", 715 | "version": "1.8.0", 716 | "source": { 717 | "type": "git", 718 | "url": "https://github.com/phpspec/prophecy.git", 719 | "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06" 720 | }, 721 | "dist": { 722 | "type": "zip", 723 | "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06", 724 | "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06", 725 | "shasum": "" 726 | }, 727 | "require": { 728 | "doctrine/instantiator": "^1.0.2", 729 | "php": "^5.3|^7.0", 730 | "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", 731 | "sebastian/comparator": "^1.1|^2.0|^3.0", 732 | "sebastian/recursion-context": "^1.0|^2.0|^3.0" 733 | }, 734 | "require-dev": { 735 | "phpspec/phpspec": "^2.5|^3.2", 736 | "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" 737 | }, 738 | "type": "library", 739 | "extra": { 740 | "branch-alias": { 741 | "dev-master": "1.8.x-dev" 742 | } 743 | }, 744 | "autoload": { 745 | "psr-0": { 746 | "Prophecy\\": "src/" 747 | } 748 | }, 749 | "notification-url": "https://packagist.org/downloads/", 750 | "license": [ 751 | "MIT" 752 | ], 753 | "authors": [ 754 | { 755 | "name": "Konstantin Kudryashov", 756 | "email": "ever.zet@gmail.com", 757 | "homepage": "http://everzet.com" 758 | }, 759 | { 760 | "name": "Marcello Duarte", 761 | "email": "marcello.duarte@gmail.com" 762 | } 763 | ], 764 | "description": "Highly opinionated mocking framework for PHP 5.3+", 765 | "homepage": "https://github.com/phpspec/prophecy", 766 | "keywords": [ 767 | "Double", 768 | "Dummy", 769 | "fake", 770 | "mock", 771 | "spy", 772 | "stub" 773 | ], 774 | "time": "2018-08-05T17:53:17+00:00" 775 | }, 776 | { 777 | "name": "phpunit/php-code-coverage", 778 | "version": "5.3.2", 779 | "source": { 780 | "type": "git", 781 | "url": "https://github.com/sebastianbergmann/php-code-coverage.git", 782 | "reference": "c89677919c5dd6d3b3852f230a663118762218ac" 783 | }, 784 | "dist": { 785 | "type": "zip", 786 | "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/c89677919c5dd6d3b3852f230a663118762218ac", 787 | "reference": "c89677919c5dd6d3b3852f230a663118762218ac", 788 | "shasum": "" 789 | }, 790 | "require": { 791 | "ext-dom": "*", 792 | "ext-xmlwriter": "*", 793 | "php": "^7.0", 794 | "phpunit/php-file-iterator": "^1.4.2", 795 | "phpunit/php-text-template": "^1.2.1", 796 | "phpunit/php-token-stream": "^2.0.1", 797 | "sebastian/code-unit-reverse-lookup": "^1.0.1", 798 | "sebastian/environment": "^3.0", 799 | "sebastian/version": "^2.0.1", 800 | "theseer/tokenizer": "^1.1" 801 | }, 802 | "require-dev": { 803 | "phpunit/phpunit": "^6.0" 804 | }, 805 | "suggest": { 806 | "ext-xdebug": "^2.5.5" 807 | }, 808 | "type": "library", 809 | "extra": { 810 | "branch-alias": { 811 | "dev-master": "5.3.x-dev" 812 | } 813 | }, 814 | "autoload": { 815 | "classmap": [ 816 | "src/" 817 | ] 818 | }, 819 | "notification-url": "https://packagist.org/downloads/", 820 | "license": [ 821 | "BSD-3-Clause" 822 | ], 823 | "authors": [ 824 | { 825 | "name": "Sebastian Bergmann", 826 | "email": "sebastian@phpunit.de", 827 | "role": "lead" 828 | } 829 | ], 830 | "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", 831 | "homepage": "https://github.com/sebastianbergmann/php-code-coverage", 832 | "keywords": [ 833 | "coverage", 834 | "testing", 835 | "xunit" 836 | ], 837 | "time": "2018-04-06T15:36:58+00:00" 838 | }, 839 | { 840 | "name": "phpunit/php-file-iterator", 841 | "version": "1.4.5", 842 | "source": { 843 | "type": "git", 844 | "url": "https://github.com/sebastianbergmann/php-file-iterator.git", 845 | "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" 846 | }, 847 | "dist": { 848 | "type": "zip", 849 | "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", 850 | "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", 851 | "shasum": "" 852 | }, 853 | "require": { 854 | "php": ">=5.3.3" 855 | }, 856 | "type": "library", 857 | "extra": { 858 | "branch-alias": { 859 | "dev-master": "1.4.x-dev" 860 | } 861 | }, 862 | "autoload": { 863 | "classmap": [ 864 | "src/" 865 | ] 866 | }, 867 | "notification-url": "https://packagist.org/downloads/", 868 | "license": [ 869 | "BSD-3-Clause" 870 | ], 871 | "authors": [ 872 | { 873 | "name": "Sebastian Bergmann", 874 | "email": "sb@sebastian-bergmann.de", 875 | "role": "lead" 876 | } 877 | ], 878 | "description": "FilterIterator implementation that filters files based on a list of suffixes.", 879 | "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", 880 | "keywords": [ 881 | "filesystem", 882 | "iterator" 883 | ], 884 | "time": "2017-11-27T13:52:08+00:00" 885 | }, 886 | { 887 | "name": "phpunit/php-text-template", 888 | "version": "1.2.1", 889 | "source": { 890 | "type": "git", 891 | "url": "https://github.com/sebastianbergmann/php-text-template.git", 892 | "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" 893 | }, 894 | "dist": { 895 | "type": "zip", 896 | "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", 897 | "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", 898 | "shasum": "" 899 | }, 900 | "require": { 901 | "php": ">=5.3.3" 902 | }, 903 | "type": "library", 904 | "autoload": { 905 | "classmap": [ 906 | "src/" 907 | ] 908 | }, 909 | "notification-url": "https://packagist.org/downloads/", 910 | "license": [ 911 | "BSD-3-Clause" 912 | ], 913 | "authors": [ 914 | { 915 | "name": "Sebastian Bergmann", 916 | "email": "sebastian@phpunit.de", 917 | "role": "lead" 918 | } 919 | ], 920 | "description": "Simple template engine.", 921 | "homepage": "https://github.com/sebastianbergmann/php-text-template/", 922 | "keywords": [ 923 | "template" 924 | ], 925 | "time": "2015-06-21T13:50:34+00:00" 926 | }, 927 | { 928 | "name": "phpunit/php-timer", 929 | "version": "1.0.9", 930 | "source": { 931 | "type": "git", 932 | "url": "https://github.com/sebastianbergmann/php-timer.git", 933 | "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" 934 | }, 935 | "dist": { 936 | "type": "zip", 937 | "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", 938 | "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", 939 | "shasum": "" 940 | }, 941 | "require": { 942 | "php": "^5.3.3 || ^7.0" 943 | }, 944 | "require-dev": { 945 | "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" 946 | }, 947 | "type": "library", 948 | "extra": { 949 | "branch-alias": { 950 | "dev-master": "1.0-dev" 951 | } 952 | }, 953 | "autoload": { 954 | "classmap": [ 955 | "src/" 956 | ] 957 | }, 958 | "notification-url": "https://packagist.org/downloads/", 959 | "license": [ 960 | "BSD-3-Clause" 961 | ], 962 | "authors": [ 963 | { 964 | "name": "Sebastian Bergmann", 965 | "email": "sb@sebastian-bergmann.de", 966 | "role": "lead" 967 | } 968 | ], 969 | "description": "Utility class for timing", 970 | "homepage": "https://github.com/sebastianbergmann/php-timer/", 971 | "keywords": [ 972 | "timer" 973 | ], 974 | "time": "2017-02-26T11:10:40+00:00" 975 | }, 976 | { 977 | "name": "phpunit/php-token-stream", 978 | "version": "2.0.2", 979 | "source": { 980 | "type": "git", 981 | "url": "https://github.com/sebastianbergmann/php-token-stream.git", 982 | "reference": "791198a2c6254db10131eecfe8c06670700904db" 983 | }, 984 | "dist": { 985 | "type": "zip", 986 | "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db", 987 | "reference": "791198a2c6254db10131eecfe8c06670700904db", 988 | "shasum": "" 989 | }, 990 | "require": { 991 | "ext-tokenizer": "*", 992 | "php": "^7.0" 993 | }, 994 | "require-dev": { 995 | "phpunit/phpunit": "^6.2.4" 996 | }, 997 | "type": "library", 998 | "extra": { 999 | "branch-alias": { 1000 | "dev-master": "2.0-dev" 1001 | } 1002 | }, 1003 | "autoload": { 1004 | "classmap": [ 1005 | "src/" 1006 | ] 1007 | }, 1008 | "notification-url": "https://packagist.org/downloads/", 1009 | "license": [ 1010 | "BSD-3-Clause" 1011 | ], 1012 | "authors": [ 1013 | { 1014 | "name": "Sebastian Bergmann", 1015 | "email": "sebastian@phpunit.de" 1016 | } 1017 | ], 1018 | "description": "Wrapper around PHP's tokenizer extension.", 1019 | "homepage": "https://github.com/sebastianbergmann/php-token-stream/", 1020 | "keywords": [ 1021 | "tokenizer" 1022 | ], 1023 | "time": "2017-11-27T05:48:46+00:00" 1024 | }, 1025 | { 1026 | "name": "phpunit/phpunit", 1027 | "version": "6.5.14", 1028 | "source": { 1029 | "type": "git", 1030 | "url": "https://github.com/sebastianbergmann/phpunit.git", 1031 | "reference": "bac23fe7ff13dbdb461481f706f0e9fe746334b7" 1032 | }, 1033 | "dist": { 1034 | "type": "zip", 1035 | "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/bac23fe7ff13dbdb461481f706f0e9fe746334b7", 1036 | "reference": "bac23fe7ff13dbdb461481f706f0e9fe746334b7", 1037 | "shasum": "" 1038 | }, 1039 | "require": { 1040 | "ext-dom": "*", 1041 | "ext-json": "*", 1042 | "ext-libxml": "*", 1043 | "ext-mbstring": "*", 1044 | "ext-xml": "*", 1045 | "myclabs/deep-copy": "^1.6.1", 1046 | "phar-io/manifest": "^1.0.1", 1047 | "phar-io/version": "^1.0", 1048 | "php": "^7.0", 1049 | "phpspec/prophecy": "^1.7", 1050 | "phpunit/php-code-coverage": "^5.3", 1051 | "phpunit/php-file-iterator": "^1.4.3", 1052 | "phpunit/php-text-template": "^1.2.1", 1053 | "phpunit/php-timer": "^1.0.9", 1054 | "phpunit/phpunit-mock-objects": "^5.0.9", 1055 | "sebastian/comparator": "^2.1", 1056 | "sebastian/diff": "^2.0", 1057 | "sebastian/environment": "^3.1", 1058 | "sebastian/exporter": "^3.1", 1059 | "sebastian/global-state": "^2.0", 1060 | "sebastian/object-enumerator": "^3.0.3", 1061 | "sebastian/resource-operations": "^1.0", 1062 | "sebastian/version": "^2.0.1" 1063 | }, 1064 | "conflict": { 1065 | "phpdocumentor/reflection-docblock": "3.0.2", 1066 | "phpunit/dbunit": "<3.0" 1067 | }, 1068 | "require-dev": { 1069 | "ext-pdo": "*" 1070 | }, 1071 | "suggest": { 1072 | "ext-xdebug": "*", 1073 | "phpunit/php-invoker": "^1.1" 1074 | }, 1075 | "bin": [ 1076 | "phpunit" 1077 | ], 1078 | "type": "library", 1079 | "extra": { 1080 | "branch-alias": { 1081 | "dev-master": "6.5.x-dev" 1082 | } 1083 | }, 1084 | "autoload": { 1085 | "classmap": [ 1086 | "src/" 1087 | ] 1088 | }, 1089 | "notification-url": "https://packagist.org/downloads/", 1090 | "license": [ 1091 | "BSD-3-Clause" 1092 | ], 1093 | "authors": [ 1094 | { 1095 | "name": "Sebastian Bergmann", 1096 | "email": "sebastian@phpunit.de", 1097 | "role": "lead" 1098 | } 1099 | ], 1100 | "description": "The PHP Unit Testing framework.", 1101 | "homepage": "https://phpunit.de/", 1102 | "keywords": [ 1103 | "phpunit", 1104 | "testing", 1105 | "xunit" 1106 | ], 1107 | "time": "2019-02-01T05:22:47+00:00" 1108 | }, 1109 | { 1110 | "name": "phpunit/phpunit-mock-objects", 1111 | "version": "5.0.10", 1112 | "source": { 1113 | "type": "git", 1114 | "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", 1115 | "reference": "cd1cf05c553ecfec36b170070573e540b67d3f1f" 1116 | }, 1117 | "dist": { 1118 | "type": "zip", 1119 | "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/cd1cf05c553ecfec36b170070573e540b67d3f1f", 1120 | "reference": "cd1cf05c553ecfec36b170070573e540b67d3f1f", 1121 | "shasum": "" 1122 | }, 1123 | "require": { 1124 | "doctrine/instantiator": "^1.0.5", 1125 | "php": "^7.0", 1126 | "phpunit/php-text-template": "^1.2.1", 1127 | "sebastian/exporter": "^3.1" 1128 | }, 1129 | "conflict": { 1130 | "phpunit/phpunit": "<6.0" 1131 | }, 1132 | "require-dev": { 1133 | "phpunit/phpunit": "^6.5.11" 1134 | }, 1135 | "suggest": { 1136 | "ext-soap": "*" 1137 | }, 1138 | "type": "library", 1139 | "extra": { 1140 | "branch-alias": { 1141 | "dev-master": "5.0.x-dev" 1142 | } 1143 | }, 1144 | "autoload": { 1145 | "classmap": [ 1146 | "src/" 1147 | ] 1148 | }, 1149 | "notification-url": "https://packagist.org/downloads/", 1150 | "license": [ 1151 | "BSD-3-Clause" 1152 | ], 1153 | "authors": [ 1154 | { 1155 | "name": "Sebastian Bergmann", 1156 | "email": "sebastian@phpunit.de", 1157 | "role": "lead" 1158 | } 1159 | ], 1160 | "description": "Mock Object library for PHPUnit", 1161 | "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", 1162 | "keywords": [ 1163 | "mock", 1164 | "xunit" 1165 | ], 1166 | "abandoned": true, 1167 | "time": "2018-08-09T05:50:03+00:00" 1168 | }, 1169 | { 1170 | "name": "sebastian/code-unit-reverse-lookup", 1171 | "version": "1.0.1", 1172 | "source": { 1173 | "type": "git", 1174 | "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", 1175 | "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" 1176 | }, 1177 | "dist": { 1178 | "type": "zip", 1179 | "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", 1180 | "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", 1181 | "shasum": "" 1182 | }, 1183 | "require": { 1184 | "php": "^5.6 || ^7.0" 1185 | }, 1186 | "require-dev": { 1187 | "phpunit/phpunit": "^5.7 || ^6.0" 1188 | }, 1189 | "type": "library", 1190 | "extra": { 1191 | "branch-alias": { 1192 | "dev-master": "1.0.x-dev" 1193 | } 1194 | }, 1195 | "autoload": { 1196 | "classmap": [ 1197 | "src/" 1198 | ] 1199 | }, 1200 | "notification-url": "https://packagist.org/downloads/", 1201 | "license": [ 1202 | "BSD-3-Clause" 1203 | ], 1204 | "authors": [ 1205 | { 1206 | "name": "Sebastian Bergmann", 1207 | "email": "sebastian@phpunit.de" 1208 | } 1209 | ], 1210 | "description": "Looks up which function or method a line of code belongs to", 1211 | "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", 1212 | "time": "2017-03-04T06:30:41+00:00" 1213 | }, 1214 | { 1215 | "name": "sebastian/comparator", 1216 | "version": "2.1.3", 1217 | "source": { 1218 | "type": "git", 1219 | "url": "https://github.com/sebastianbergmann/comparator.git", 1220 | "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9" 1221 | }, 1222 | "dist": { 1223 | "type": "zip", 1224 | "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/34369daee48eafb2651bea869b4b15d75ccc35f9", 1225 | "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9", 1226 | "shasum": "" 1227 | }, 1228 | "require": { 1229 | "php": "^7.0", 1230 | "sebastian/diff": "^2.0 || ^3.0", 1231 | "sebastian/exporter": "^3.1" 1232 | }, 1233 | "require-dev": { 1234 | "phpunit/phpunit": "^6.4" 1235 | }, 1236 | "type": "library", 1237 | "extra": { 1238 | "branch-alias": { 1239 | "dev-master": "2.1.x-dev" 1240 | } 1241 | }, 1242 | "autoload": { 1243 | "classmap": [ 1244 | "src/" 1245 | ] 1246 | }, 1247 | "notification-url": "https://packagist.org/downloads/", 1248 | "license": [ 1249 | "BSD-3-Clause" 1250 | ], 1251 | "authors": [ 1252 | { 1253 | "name": "Jeff Welch", 1254 | "email": "whatthejeff@gmail.com" 1255 | }, 1256 | { 1257 | "name": "Volker Dusch", 1258 | "email": "github@wallbash.com" 1259 | }, 1260 | { 1261 | "name": "Bernhard Schussek", 1262 | "email": "bschussek@2bepublished.at" 1263 | }, 1264 | { 1265 | "name": "Sebastian Bergmann", 1266 | "email": "sebastian@phpunit.de" 1267 | } 1268 | ], 1269 | "description": "Provides the functionality to compare PHP values for equality", 1270 | "homepage": "https://github.com/sebastianbergmann/comparator", 1271 | "keywords": [ 1272 | "comparator", 1273 | "compare", 1274 | "equality" 1275 | ], 1276 | "time": "2018-02-01T13:46:46+00:00" 1277 | }, 1278 | { 1279 | "name": "sebastian/diff", 1280 | "version": "2.0.1", 1281 | "source": { 1282 | "type": "git", 1283 | "url": "https://github.com/sebastianbergmann/diff.git", 1284 | "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd" 1285 | }, 1286 | "dist": { 1287 | "type": "zip", 1288 | "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", 1289 | "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", 1290 | "shasum": "" 1291 | }, 1292 | "require": { 1293 | "php": "^7.0" 1294 | }, 1295 | "require-dev": { 1296 | "phpunit/phpunit": "^6.2" 1297 | }, 1298 | "type": "library", 1299 | "extra": { 1300 | "branch-alias": { 1301 | "dev-master": "2.0-dev" 1302 | } 1303 | }, 1304 | "autoload": { 1305 | "classmap": [ 1306 | "src/" 1307 | ] 1308 | }, 1309 | "notification-url": "https://packagist.org/downloads/", 1310 | "license": [ 1311 | "BSD-3-Clause" 1312 | ], 1313 | "authors": [ 1314 | { 1315 | "name": "Kore Nordmann", 1316 | "email": "mail@kore-nordmann.de" 1317 | }, 1318 | { 1319 | "name": "Sebastian Bergmann", 1320 | "email": "sebastian@phpunit.de" 1321 | } 1322 | ], 1323 | "description": "Diff implementation", 1324 | "homepage": "https://github.com/sebastianbergmann/diff", 1325 | "keywords": [ 1326 | "diff" 1327 | ], 1328 | "time": "2017-08-03T08:09:46+00:00" 1329 | }, 1330 | { 1331 | "name": "sebastian/environment", 1332 | "version": "3.1.0", 1333 | "source": { 1334 | "type": "git", 1335 | "url": "https://github.com/sebastianbergmann/environment.git", 1336 | "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5" 1337 | }, 1338 | "dist": { 1339 | "type": "zip", 1340 | "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5", 1341 | "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5", 1342 | "shasum": "" 1343 | }, 1344 | "require": { 1345 | "php": "^7.0" 1346 | }, 1347 | "require-dev": { 1348 | "phpunit/phpunit": "^6.1" 1349 | }, 1350 | "type": "library", 1351 | "extra": { 1352 | "branch-alias": { 1353 | "dev-master": "3.1.x-dev" 1354 | } 1355 | }, 1356 | "autoload": { 1357 | "classmap": [ 1358 | "src/" 1359 | ] 1360 | }, 1361 | "notification-url": "https://packagist.org/downloads/", 1362 | "license": [ 1363 | "BSD-3-Clause" 1364 | ], 1365 | "authors": [ 1366 | { 1367 | "name": "Sebastian Bergmann", 1368 | "email": "sebastian@phpunit.de" 1369 | } 1370 | ], 1371 | "description": "Provides functionality to handle HHVM/PHP environments", 1372 | "homepage": "http://www.github.com/sebastianbergmann/environment", 1373 | "keywords": [ 1374 | "Xdebug", 1375 | "environment", 1376 | "hhvm" 1377 | ], 1378 | "time": "2017-07-01T08:51:00+00:00" 1379 | }, 1380 | { 1381 | "name": "sebastian/exporter", 1382 | "version": "3.1.0", 1383 | "source": { 1384 | "type": "git", 1385 | "url": "https://github.com/sebastianbergmann/exporter.git", 1386 | "reference": "234199f4528de6d12aaa58b612e98f7d36adb937" 1387 | }, 1388 | "dist": { 1389 | "type": "zip", 1390 | "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937", 1391 | "reference": "234199f4528de6d12aaa58b612e98f7d36adb937", 1392 | "shasum": "" 1393 | }, 1394 | "require": { 1395 | "php": "^7.0", 1396 | "sebastian/recursion-context": "^3.0" 1397 | }, 1398 | "require-dev": { 1399 | "ext-mbstring": "*", 1400 | "phpunit/phpunit": "^6.0" 1401 | }, 1402 | "type": "library", 1403 | "extra": { 1404 | "branch-alias": { 1405 | "dev-master": "3.1.x-dev" 1406 | } 1407 | }, 1408 | "autoload": { 1409 | "classmap": [ 1410 | "src/" 1411 | ] 1412 | }, 1413 | "notification-url": "https://packagist.org/downloads/", 1414 | "license": [ 1415 | "BSD-3-Clause" 1416 | ], 1417 | "authors": [ 1418 | { 1419 | "name": "Jeff Welch", 1420 | "email": "whatthejeff@gmail.com" 1421 | }, 1422 | { 1423 | "name": "Volker Dusch", 1424 | "email": "github@wallbash.com" 1425 | }, 1426 | { 1427 | "name": "Bernhard Schussek", 1428 | "email": "bschussek@2bepublished.at" 1429 | }, 1430 | { 1431 | "name": "Sebastian Bergmann", 1432 | "email": "sebastian@phpunit.de" 1433 | }, 1434 | { 1435 | "name": "Adam Harvey", 1436 | "email": "aharvey@php.net" 1437 | } 1438 | ], 1439 | "description": "Provides the functionality to export PHP variables for visualization", 1440 | "homepage": "http://www.github.com/sebastianbergmann/exporter", 1441 | "keywords": [ 1442 | "export", 1443 | "exporter" 1444 | ], 1445 | "time": "2017-04-03T13:19:02+00:00" 1446 | }, 1447 | { 1448 | "name": "sebastian/global-state", 1449 | "version": "2.0.0", 1450 | "source": { 1451 | "type": "git", 1452 | "url": "https://github.com/sebastianbergmann/global-state.git", 1453 | "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" 1454 | }, 1455 | "dist": { 1456 | "type": "zip", 1457 | "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", 1458 | "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", 1459 | "shasum": "" 1460 | }, 1461 | "require": { 1462 | "php": "^7.0" 1463 | }, 1464 | "require-dev": { 1465 | "phpunit/phpunit": "^6.0" 1466 | }, 1467 | "suggest": { 1468 | "ext-uopz": "*" 1469 | }, 1470 | "type": "library", 1471 | "extra": { 1472 | "branch-alias": { 1473 | "dev-master": "2.0-dev" 1474 | } 1475 | }, 1476 | "autoload": { 1477 | "classmap": [ 1478 | "src/" 1479 | ] 1480 | }, 1481 | "notification-url": "https://packagist.org/downloads/", 1482 | "license": [ 1483 | "BSD-3-Clause" 1484 | ], 1485 | "authors": [ 1486 | { 1487 | "name": "Sebastian Bergmann", 1488 | "email": "sebastian@phpunit.de" 1489 | } 1490 | ], 1491 | "description": "Snapshotting of global state", 1492 | "homepage": "http://www.github.com/sebastianbergmann/global-state", 1493 | "keywords": [ 1494 | "global state" 1495 | ], 1496 | "time": "2017-04-27T15:39:26+00:00" 1497 | }, 1498 | { 1499 | "name": "sebastian/object-enumerator", 1500 | "version": "3.0.3", 1501 | "source": { 1502 | "type": "git", 1503 | "url": "https://github.com/sebastianbergmann/object-enumerator.git", 1504 | "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" 1505 | }, 1506 | "dist": { 1507 | "type": "zip", 1508 | "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", 1509 | "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", 1510 | "shasum": "" 1511 | }, 1512 | "require": { 1513 | "php": "^7.0", 1514 | "sebastian/object-reflector": "^1.1.1", 1515 | "sebastian/recursion-context": "^3.0" 1516 | }, 1517 | "require-dev": { 1518 | "phpunit/phpunit": "^6.0" 1519 | }, 1520 | "type": "library", 1521 | "extra": { 1522 | "branch-alias": { 1523 | "dev-master": "3.0.x-dev" 1524 | } 1525 | }, 1526 | "autoload": { 1527 | "classmap": [ 1528 | "src/" 1529 | ] 1530 | }, 1531 | "notification-url": "https://packagist.org/downloads/", 1532 | "license": [ 1533 | "BSD-3-Clause" 1534 | ], 1535 | "authors": [ 1536 | { 1537 | "name": "Sebastian Bergmann", 1538 | "email": "sebastian@phpunit.de" 1539 | } 1540 | ], 1541 | "description": "Traverses array structures and object graphs to enumerate all referenced objects", 1542 | "homepage": "https://github.com/sebastianbergmann/object-enumerator/", 1543 | "time": "2017-08-03T12:35:26+00:00" 1544 | }, 1545 | { 1546 | "name": "sebastian/object-reflector", 1547 | "version": "1.1.1", 1548 | "source": { 1549 | "type": "git", 1550 | "url": "https://github.com/sebastianbergmann/object-reflector.git", 1551 | "reference": "773f97c67f28de00d397be301821b06708fca0be" 1552 | }, 1553 | "dist": { 1554 | "type": "zip", 1555 | "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", 1556 | "reference": "773f97c67f28de00d397be301821b06708fca0be", 1557 | "shasum": "" 1558 | }, 1559 | "require": { 1560 | "php": "^7.0" 1561 | }, 1562 | "require-dev": { 1563 | "phpunit/phpunit": "^6.0" 1564 | }, 1565 | "type": "library", 1566 | "extra": { 1567 | "branch-alias": { 1568 | "dev-master": "1.1-dev" 1569 | } 1570 | }, 1571 | "autoload": { 1572 | "classmap": [ 1573 | "src/" 1574 | ] 1575 | }, 1576 | "notification-url": "https://packagist.org/downloads/", 1577 | "license": [ 1578 | "BSD-3-Clause" 1579 | ], 1580 | "authors": [ 1581 | { 1582 | "name": "Sebastian Bergmann", 1583 | "email": "sebastian@phpunit.de" 1584 | } 1585 | ], 1586 | "description": "Allows reflection of object attributes, including inherited and non-public ones", 1587 | "homepage": "https://github.com/sebastianbergmann/object-reflector/", 1588 | "time": "2017-03-29T09:07:27+00:00" 1589 | }, 1590 | { 1591 | "name": "sebastian/recursion-context", 1592 | "version": "3.0.0", 1593 | "source": { 1594 | "type": "git", 1595 | "url": "https://github.com/sebastianbergmann/recursion-context.git", 1596 | "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" 1597 | }, 1598 | "dist": { 1599 | "type": "zip", 1600 | "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", 1601 | "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", 1602 | "shasum": "" 1603 | }, 1604 | "require": { 1605 | "php": "^7.0" 1606 | }, 1607 | "require-dev": { 1608 | "phpunit/phpunit": "^6.0" 1609 | }, 1610 | "type": "library", 1611 | "extra": { 1612 | "branch-alias": { 1613 | "dev-master": "3.0.x-dev" 1614 | } 1615 | }, 1616 | "autoload": { 1617 | "classmap": [ 1618 | "src/" 1619 | ] 1620 | }, 1621 | "notification-url": "https://packagist.org/downloads/", 1622 | "license": [ 1623 | "BSD-3-Clause" 1624 | ], 1625 | "authors": [ 1626 | { 1627 | "name": "Jeff Welch", 1628 | "email": "whatthejeff@gmail.com" 1629 | }, 1630 | { 1631 | "name": "Sebastian Bergmann", 1632 | "email": "sebastian@phpunit.de" 1633 | }, 1634 | { 1635 | "name": "Adam Harvey", 1636 | "email": "aharvey@php.net" 1637 | } 1638 | ], 1639 | "description": "Provides functionality to recursively process PHP variables", 1640 | "homepage": "http://www.github.com/sebastianbergmann/recursion-context", 1641 | "time": "2017-03-03T06:23:57+00:00" 1642 | }, 1643 | { 1644 | "name": "sebastian/resource-operations", 1645 | "version": "1.0.0", 1646 | "source": { 1647 | "type": "git", 1648 | "url": "https://github.com/sebastianbergmann/resource-operations.git", 1649 | "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" 1650 | }, 1651 | "dist": { 1652 | "type": "zip", 1653 | "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", 1654 | "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", 1655 | "shasum": "" 1656 | }, 1657 | "require": { 1658 | "php": ">=5.6.0" 1659 | }, 1660 | "type": "library", 1661 | "extra": { 1662 | "branch-alias": { 1663 | "dev-master": "1.0.x-dev" 1664 | } 1665 | }, 1666 | "autoload": { 1667 | "classmap": [ 1668 | "src/" 1669 | ] 1670 | }, 1671 | "notification-url": "https://packagist.org/downloads/", 1672 | "license": [ 1673 | "BSD-3-Clause" 1674 | ], 1675 | "authors": [ 1676 | { 1677 | "name": "Sebastian Bergmann", 1678 | "email": "sebastian@phpunit.de" 1679 | } 1680 | ], 1681 | "description": "Provides a list of PHP built-in functions that operate on resources", 1682 | "homepage": "https://www.github.com/sebastianbergmann/resource-operations", 1683 | "time": "2015-07-28T20:34:47+00:00" 1684 | }, 1685 | { 1686 | "name": "sebastian/version", 1687 | "version": "2.0.1", 1688 | "source": { 1689 | "type": "git", 1690 | "url": "https://github.com/sebastianbergmann/version.git", 1691 | "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" 1692 | }, 1693 | "dist": { 1694 | "type": "zip", 1695 | "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", 1696 | "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", 1697 | "shasum": "" 1698 | }, 1699 | "require": { 1700 | "php": ">=5.6" 1701 | }, 1702 | "type": "library", 1703 | "extra": { 1704 | "branch-alias": { 1705 | "dev-master": "2.0.x-dev" 1706 | } 1707 | }, 1708 | "autoload": { 1709 | "classmap": [ 1710 | "src/" 1711 | ] 1712 | }, 1713 | "notification-url": "https://packagist.org/downloads/", 1714 | "license": [ 1715 | "BSD-3-Clause" 1716 | ], 1717 | "authors": [ 1718 | { 1719 | "name": "Sebastian Bergmann", 1720 | "email": "sebastian@phpunit.de", 1721 | "role": "lead" 1722 | } 1723 | ], 1724 | "description": "Library that helps with managing the version number of Git-hosted PHP projects", 1725 | "homepage": "https://github.com/sebastianbergmann/version", 1726 | "time": "2016-10-03T07:35:21+00:00" 1727 | }, 1728 | { 1729 | "name": "squizlabs/php_codesniffer", 1730 | "version": "3.4.1", 1731 | "source": { 1732 | "type": "git", 1733 | "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", 1734 | "reference": "5b4333b4010625d29580eb4a41f1e53251be6baa" 1735 | }, 1736 | "dist": { 1737 | "type": "zip", 1738 | "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/5b4333b4010625d29580eb4a41f1e53251be6baa", 1739 | "reference": "5b4333b4010625d29580eb4a41f1e53251be6baa", 1740 | "shasum": "" 1741 | }, 1742 | "require": { 1743 | "ext-simplexml": "*", 1744 | "ext-tokenizer": "*", 1745 | "ext-xmlwriter": "*", 1746 | "php": ">=5.4.0" 1747 | }, 1748 | "require-dev": { 1749 | "phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0" 1750 | }, 1751 | "bin": [ 1752 | "bin/phpcs", 1753 | "bin/phpcbf" 1754 | ], 1755 | "type": "library", 1756 | "extra": { 1757 | "branch-alias": { 1758 | "dev-master": "3.x-dev" 1759 | } 1760 | }, 1761 | "notification-url": "https://packagist.org/downloads/", 1762 | "license": [ 1763 | "BSD-3-Clause" 1764 | ], 1765 | "authors": [ 1766 | { 1767 | "name": "Greg Sherwood", 1768 | "role": "lead" 1769 | } 1770 | ], 1771 | "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", 1772 | "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", 1773 | "keywords": [ 1774 | "phpcs", 1775 | "standards" 1776 | ], 1777 | "time": "2019-03-19T03:22:27+00:00" 1778 | }, 1779 | { 1780 | "name": "symfony/polyfill-ctype", 1781 | "version": "v1.11.0", 1782 | "source": { 1783 | "type": "git", 1784 | "url": "https://github.com/symfony/polyfill-ctype.git", 1785 | "reference": "82ebae02209c21113908c229e9883c419720738a" 1786 | }, 1787 | "dist": { 1788 | "type": "zip", 1789 | "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/82ebae02209c21113908c229e9883c419720738a", 1790 | "reference": "82ebae02209c21113908c229e9883c419720738a", 1791 | "shasum": "" 1792 | }, 1793 | "require": { 1794 | "php": ">=5.3.3" 1795 | }, 1796 | "suggest": { 1797 | "ext-ctype": "For best performance" 1798 | }, 1799 | "type": "library", 1800 | "extra": { 1801 | "branch-alias": { 1802 | "dev-master": "1.11-dev" 1803 | } 1804 | }, 1805 | "autoload": { 1806 | "psr-4": { 1807 | "Symfony\\Polyfill\\Ctype\\": "" 1808 | }, 1809 | "files": [ 1810 | "bootstrap.php" 1811 | ] 1812 | }, 1813 | "notification-url": "https://packagist.org/downloads/", 1814 | "license": [ 1815 | "MIT" 1816 | ], 1817 | "authors": [ 1818 | { 1819 | "name": "Symfony Community", 1820 | "homepage": "https://symfony.com/contributors" 1821 | }, 1822 | { 1823 | "name": "Gert de Pagter", 1824 | "email": "backendtea@gmail.com" 1825 | } 1826 | ], 1827 | "description": "Symfony polyfill for ctype functions", 1828 | "homepage": "https://symfony.com", 1829 | "keywords": [ 1830 | "compatibility", 1831 | "ctype", 1832 | "polyfill", 1833 | "portable" 1834 | ], 1835 | "time": "2019-02-06T07:57:58+00:00" 1836 | }, 1837 | { 1838 | "name": "theseer/tokenizer", 1839 | "version": "1.1.0", 1840 | "source": { 1841 | "type": "git", 1842 | "url": "https://github.com/theseer/tokenizer.git", 1843 | "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b" 1844 | }, 1845 | "dist": { 1846 | "type": "zip", 1847 | "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b", 1848 | "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b", 1849 | "shasum": "" 1850 | }, 1851 | "require": { 1852 | "ext-dom": "*", 1853 | "ext-tokenizer": "*", 1854 | "ext-xmlwriter": "*", 1855 | "php": "^7.0" 1856 | }, 1857 | "type": "library", 1858 | "autoload": { 1859 | "classmap": [ 1860 | "src/" 1861 | ] 1862 | }, 1863 | "notification-url": "https://packagist.org/downloads/", 1864 | "license": [ 1865 | "BSD-3-Clause" 1866 | ], 1867 | "authors": [ 1868 | { 1869 | "name": "Arne Blankerts", 1870 | "email": "arne@blankerts.de", 1871 | "role": "Developer" 1872 | } 1873 | ], 1874 | "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", 1875 | "time": "2017-04-07T12:08:54+00:00" 1876 | }, 1877 | { 1878 | "name": "webmozart/assert", 1879 | "version": "1.4.0", 1880 | "source": { 1881 | "type": "git", 1882 | "url": "https://github.com/webmozart/assert.git", 1883 | "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9" 1884 | }, 1885 | "dist": { 1886 | "type": "zip", 1887 | "url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9", 1888 | "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9", 1889 | "shasum": "" 1890 | }, 1891 | "require": { 1892 | "php": "^5.3.3 || ^7.0", 1893 | "symfony/polyfill-ctype": "^1.8" 1894 | }, 1895 | "require-dev": { 1896 | "phpunit/phpunit": "^4.6", 1897 | "sebastian/version": "^1.0.1" 1898 | }, 1899 | "type": "library", 1900 | "extra": { 1901 | "branch-alias": { 1902 | "dev-master": "1.3-dev" 1903 | } 1904 | }, 1905 | "autoload": { 1906 | "psr-4": { 1907 | "Webmozart\\Assert\\": "src/" 1908 | } 1909 | }, 1910 | "notification-url": "https://packagist.org/downloads/", 1911 | "license": [ 1912 | "MIT" 1913 | ], 1914 | "authors": [ 1915 | { 1916 | "name": "Bernhard Schussek", 1917 | "email": "bschussek@gmail.com" 1918 | } 1919 | ], 1920 | "description": "Assertions to validate method input/output with nice error messages.", 1921 | "keywords": [ 1922 | "assert", 1923 | "check", 1924 | "validate" 1925 | ], 1926 | "time": "2018-12-25T11:19:39+00:00" 1927 | }, 1928 | { 1929 | "name": "woocommerce/woocommerce-sniffs", 1930 | "version": "0.0.6", 1931 | "source": { 1932 | "type": "git", 1933 | "url": "https://github.com/woocommerce/woocommerce-sniffs.git", 1934 | "reference": "a3032bdddd60c71d1330f591e1a9128e115f81ee" 1935 | }, 1936 | "dist": { 1937 | "type": "zip", 1938 | "url": "https://api.github.com/repos/woocommerce/woocommerce-sniffs/zipball/a3032bdddd60c71d1330f591e1a9128e115f81ee", 1939 | "reference": "a3032bdddd60c71d1330f591e1a9128e115f81ee", 1940 | "shasum": "" 1941 | }, 1942 | "require": { 1943 | "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0", 1944 | "php": ">=7.0", 1945 | "phpcompatibility/phpcompatibility-wp": "2.0.0", 1946 | "wp-coding-standards/wpcs": "^1.2" 1947 | }, 1948 | "type": "phpcodesniffer-standard", 1949 | "notification-url": "https://packagist.org/downloads/", 1950 | "license": [ 1951 | "MIT" 1952 | ], 1953 | "authors": [ 1954 | { 1955 | "name": "Claudio Sanches", 1956 | "email": "claudio@automattic.com" 1957 | } 1958 | ], 1959 | "description": "WooCommerce sniffs", 1960 | "keywords": [ 1961 | "phpcs", 1962 | "standards", 1963 | "woocommerce", 1964 | "wordpress" 1965 | ], 1966 | "time": "2019-03-11T15:30:23+00:00" 1967 | }, 1968 | { 1969 | "name": "wp-coding-standards/wpcs", 1970 | "version": "1.2.1", 1971 | "source": { 1972 | "type": "git", 1973 | "url": "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git", 1974 | "reference": "f328bcafd97377e8e5e5d7b244d5ddbf301a3a5c" 1975 | }, 1976 | "dist": { 1977 | "type": "zip", 1978 | "url": "https://api.github.com/repos/WordPress-Coding-Standards/WordPress-Coding-Standards/zipball/f328bcafd97377e8e5e5d7b244d5ddbf301a3a5c", 1979 | "reference": "f328bcafd97377e8e5e5d7b244d5ddbf301a3a5c", 1980 | "shasum": "" 1981 | }, 1982 | "require": { 1983 | "php": ">=5.3", 1984 | "squizlabs/php_codesniffer": "^2.9.0 || ^3.0.2" 1985 | }, 1986 | "require-dev": { 1987 | "phpcompatibility/php-compatibility": "^9.0" 1988 | }, 1989 | "suggest": { 1990 | "dealerdirect/phpcodesniffer-composer-installer": "^0.4.3 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically." 1991 | }, 1992 | "type": "phpcodesniffer-standard", 1993 | "notification-url": "https://packagist.org/downloads/", 1994 | "license": [ 1995 | "MIT" 1996 | ], 1997 | "authors": [ 1998 | { 1999 | "name": "Contributors", 2000 | "homepage": "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/graphs/contributors" 2001 | } 2002 | ], 2003 | "description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions", 2004 | "keywords": [ 2005 | "phpcs", 2006 | "standards", 2007 | "wordpress" 2008 | ], 2009 | "time": "2018-12-18T09:43:51+00:00" 2010 | } 2011 | ], 2012 | "aliases": [], 2013 | "minimum-stability": "dev", 2014 | "stability-flags": [], 2015 | "prefer-stable": true, 2016 | "prefer-lowest": false, 2017 | "platform": [], 2018 | "platform-dev": [] 2019 | } 2020 | -------------------------------------------------------------------------------- /includes/class-wc-beta-tester-admin-assets.php: -------------------------------------------------------------------------------- 1 | id : ''; 28 | 29 | $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; 30 | $version = WC_VERSION; 31 | 32 | // Need admin styles for the modal. 33 | wp_register_style( 'wc-beta-tester-admin', WC_Beta_Tester::instance()->plugin_url() . '/assets/css/admin.css', array( 'woocommerce_admin_styles' ) ); 34 | 35 | // Register scripts. 36 | wp_register_script( 'wc-beta-tester-version-info', WC_Beta_Tester::instance()->plugin_url() . '/assets/js/version-information' . $suffix . '.js', array( 'wc-backbone-modal' ), WC_BETA_TESTER_VERSION ); 37 | wp_register_script( 'wc-beta-tester-version-picker', WC_Beta_Tester::instance()->plugin_url() . '/assets/js/version-picker' . $suffix . '.js', array( 'wc-backbone-modal' ), WC_BETA_TESTER_VERSION ); 38 | 39 | wp_localize_script( 40 | 'wc-beta-tester-version-info', 41 | 'wc_beta_tester_version_info_params', 42 | array( 43 | 'version' => $version, 44 | /* translators: %s: Release version number */ 45 | 'description' => sprintf( __( 'Release of version %s', 'woocommerce-beta-tester' ), $version ), 46 | ) 47 | ); 48 | 49 | wp_localize_script( 50 | 'wc-beta-tester-version-picker', 51 | 'wc_beta_tester_version_picker_params', 52 | array( 53 | 'i18n_pick_version' => __( 'Please pick a WooCommerce version.', 'woocommerce-beta-tester' ), 54 | ) 55 | ); 56 | 57 | if ( in_array( $screen_id, array( 'plugins_page_wc-beta-tester', 'plugins_page_wc-beta-tester-version-picker' ) ) ) { 58 | wp_enqueue_style( 'wc-beta-tester-admin' ); 59 | wp_enqueue_script( 'wc-beta-tester-version-info' ); 60 | wp_enqueue_script( 'wc-beta-tester-version-picker' ); 61 | } 62 | } 63 | } 64 | 65 | return new WC_Beta_Tester_Admin_Assets(); 66 | -------------------------------------------------------------------------------- /includes/class-wc-beta-tester-admin-menus.php: -------------------------------------------------------------------------------- 1 | 34 | **Describe the bug** 35 | A clear and concise description of what the bug is. Please be as descriptive as possible; issues lacking detail, or for any other reason than to report a bug, may be closed without action. 36 | 37 | **To Reproduce** 38 | Steps to reproduce the behavior: 39 | 1. Go to '...' 40 | 2. Click on '....' 41 | 3. Scroll down to '....' 42 | 4. See error 43 | 44 | **Screenshots** 45 | If applicable, add screenshots to help explain your problem. 46 | 47 | **Expected behavior** 48 | A clear and concise description of what you expected to happen. 49 | 50 | **Isolating the problem (mark completed items with an [x]):** 51 | - [ ] I have deactivated other plugins and confirmed this bug occurs when only WooCommerce plugin is active. 52 | - [ ] This bug happens with a default WordPress theme active, or [Storefront](https://woocommerce.com/storefront/). 53 | - [ ] I can reproduce this bug consistently using the steps above. 54 | 55 | **WordPress Environment** 56 |
57 | ``` 58 | Copy and paste the system status report from **WooCommerce > System Status** in WordPress admin. 59 | ``` 60 |
61 | ' ) ) { 130 | /* translators: %s: plugin latest version */ 131 | $version_string = sprintf( esc_html__( '%s is available', 'woocommerce-beta-tester' ), $plugin['version_latest'] ); 132 | } 133 | 134 | if ( false !== (bool) $plugin['network_activated'] ) { 135 | $network_string = __( 'Network enabled', 'woocommerce-beta-tester' ); 136 | } 137 | } 138 | $untested_string = ''; 139 | if ( array_key_exists( $plugin['plugin'], $untested_plugins ) ) { 140 | $untested_string = __( 'Not tested with the active version of WooCommerce', 'woocommerce-beta-tester' ); 141 | } 142 | 143 | $plugins_info .= sprintf( __( "%1\$s: by %2\$s - %3\$s - %4\$s\n", 'woocommerce-beta-tester' ), $plugin_name, $plugin['author_name'], $plugin['version'], $version_string . $untested_string . $network_string ); 144 | } 145 | } 146 | 147 | return $plugins_info; 148 | } 149 | 150 | /** 151 | * Constructs a WC System Status Report. 152 | * 153 | * @return string 154 | */ 155 | protected function construct_ssr() { 156 | if ( version_compare( WC()->version, '3.6', '<' ) ) { 157 | return ''; 158 | } 159 | 160 | $transient_name = 'wc-beta-tester-ssr'; 161 | $ssr = get_transient( $transient_name ); 162 | 163 | if ( false === $ssr ) { 164 | // When running WC 3.6 or greater it is necessary to manually load the REST API classes. 165 | if ( ! did_action( 'rest_api_init' ) ) { 166 | WC()->api->rest_api_includes(); 167 | } 168 | 169 | if ( ! class_exists( 'WC_REST_System_Status_Controller' ) ) { 170 | return ''; 171 | } 172 | 173 | // Get SSR. 174 | $api = new WC_REST_System_Status_Controller(); 175 | $schema = $api->get_item_schema(); 176 | $mappings = $api->get_item_mappings(); 177 | $response = array(); 178 | 179 | foreach ( $mappings as $section => $values ) { 180 | foreach ( $values as $key => $value ) { 181 | if ( isset( $schema['properties'][ $section ]['properties'][ $key ]['type'] ) ) { 182 | settype( $values[ $key ], $schema['properties'][ $section ]['properties'][ $key ]['type'] ); 183 | } 184 | } 185 | settype( $values, $schema['properties'][ $section ]['type'] ); 186 | $response[ $section ] = $values; 187 | } 188 | 189 | $ssr = ''; 190 | foreach ( $response['environment'] as $key => $value ) { 191 | $index = $key; 192 | if ( 'external_object_cache' === $index ) { 193 | $ssr .= sprintf( "%s: %s\n", 'External object cache', wc_bool_to_string( $value ) ); 194 | continue; 195 | } 196 | 197 | if ( is_bool( $value ) ) { 198 | $value = wc_bool_to_string( $value ); 199 | } 200 | 201 | $ssr .= sprintf( "%s: %s\n", $schema['properties']['environment']['properties'][ $index ]['description'], $value ); 202 | } 203 | 204 | $active_plugins = $api->get_active_plugins(); 205 | $plugin_updates = new WC_Plugin_Updates(); 206 | $untested_plugins = $plugin_updates->get_untested_plugins( WC()->version, 'minor' ); 207 | $ssr .= $this->get_plugins_ssr_info( $active_plugins, $untested_plugins ); 208 | $theme = $api->get_theme_info(); 209 | $ssr .= $this->get_theme_ssr_info( $theme ); 210 | 211 | set_transient( $transient_name, $ssr, DAY_IN_SECONDS ); 212 | } 213 | 214 | return $ssr; 215 | } 216 | 217 | /** 218 | * Get URL for creating a GitHub ticket. 219 | * 220 | * @return string 221 | */ 222 | protected function get_github_ticket_url() { 223 | $bug_tpl = $this->get_ticket_template(); 224 | $ssr = $this->construct_ssr(); 225 | $body = str_replace( 'Copy and paste the system status report from **WooCommerce > System Status** in WordPress admin.', $ssr, $bug_tpl ); 226 | $body = str_replace( '```', '', $body ); // Remove since this break how is displayed. 227 | 228 | $wc_plugin_data = get_plugin_data( WC_PLUGIN_FILE ); 229 | if ( isset( $wc_plugin_data['Version'] ) ) { 230 | $version = $wc_plugin_data['Version']; 231 | } else { 232 | $version = '-'; 233 | } 234 | 235 | return add_query_arg( 236 | array( 237 | 'body' => rawurlencode( $body ), 238 | /* translators: %s: woocommerce version */ 239 | 'title' => rawurlencode( sprintf( __( '[WC Beta Tester] Bug report for version "%s"', 'woocommerce-beta-tester' ), $version ) ), 240 | ), 241 | 'https://github.com/woocommerce/woocommerce/issues/new' 242 | ); 243 | } 244 | 245 | /** 246 | * Add the "Visit Store" link in admin bar main menu. 247 | * 248 | * @param WP_Admin_Bar $wp_admin_bar Admin bar instance. 249 | */ 250 | public function admin_bar_menus( $wp_admin_bar ) { 251 | if ( ! is_admin() || ! is_user_logged_in() ) { 252 | return; 253 | } 254 | 255 | // Show only when the user is a member of this site, or they're a super admin. 256 | if ( ! is_user_member_of_blog() && ! is_super_admin() ) { 257 | return; 258 | } 259 | 260 | // Add the beta tester root node. 261 | $wp_admin_bar->add_node( 262 | array( 263 | 'parent' => 0, 264 | 'id' => 'wc-beta-tester', 265 | 'title' => __( 'WC Beta Tester', 'woocommerce-beta-tester' ), 266 | ) 267 | ); 268 | 269 | $settings = WC_Beta_Tester::get_settings(); 270 | switch ( $settings->channel ) { 271 | case 'beta': 272 | $current_channel = __( 'Beta', 'woocommerce-beta-tester' ); 273 | break; 274 | case 'rc': 275 | $current_channel = __( 'Release Candidate', 'woocommerce-beta-tester' ); 276 | break; 277 | default: 278 | $current_channel = __( 'Stable', 'woocommerce-beta-tester' ); 279 | break; 280 | } 281 | 282 | $nodes = array( 283 | array( 284 | 'parent' => 'wc-beta-tester', 285 | 'id' => 'update-channel', 286 | /* translators: %s: current channel */ 287 | 'title' => sprintf( __( 'Channel: %s', 'woocommerce-beta-tester' ), $current_channel ), 288 | 'href' => admin_url( 'plugins.php?page=wc-beta-tester' ), 289 | ), 290 | array( 291 | 'parent' => 'wc-beta-tester', 292 | 'id' => 'import-export-settings', 293 | 'title' => __( 'Import/Export Settings', 'woocommerce-beta-tester' ), 294 | 'href' => admin_url( 'admin.php?page=wc-beta-tester-settings' ), 295 | ), 296 | array( 297 | 'parent' => 'wc-beta-tester', 298 | 'id' => 'show-version-info', 299 | /* translators: %s: current version */ 300 | 'title' => sprintf( __( 'Release %s information', 'woocommerce-beta-tester' ), WC_VERSION ), 301 | 'href' => '#', 302 | ), 303 | array( 304 | 'parent' => 'wc-beta-tester', 305 | 'id' => 'switch-version', 306 | 'title' => __( 'Switch versions', 'woocommerce-beta-tester' ), 307 | 'href' => admin_url( 'plugins.php?page=wc-beta-tester-version-picker' ), 308 | ), 309 | array( 310 | 'parent' => 'wc-beta-tester', 311 | 'id' => 'submit-gh-ticket', 312 | 'title' => __( 'Submit bug report', 'woocommerce-beta-tester' ), 313 | 'href' => '#', 314 | 'meta' => array( 315 | // We can't simply use the href here since WP core calls esc_url on it which strips some parts. 316 | 'onclick' => 'javascript:window.open( "' . esc_js( $this->get_github_ticket_url() ) . '" );', 317 | ), 318 | ), 319 | ); 320 | 321 | foreach ( $nodes as $node ) { 322 | $wp_admin_bar->add_node( $node ); 323 | } 324 | } 325 | 326 | /** 327 | * Hide menu items from view so the pages exist, but the menu items do not. 328 | */ 329 | public function hide_from_menus() { 330 | global $submenu; 331 | 332 | $items_to_remove = array( 'wc-beta-tester-settings', 'wc-beta-tester-version-picker', 'wc-beta-tester' ); 333 | if ( isset( $submenu['plugins.php'] ) ) { 334 | foreach ( $submenu['plugins.php'] as $key => $menu ) { 335 | if ( in_array( $menu[2], $items_to_remove ) ) { 336 | unset( $submenu['plugins.php'][ $key ] ); 337 | } 338 | } 339 | } 340 | } 341 | 342 | /** 343 | * Template for version information. 344 | */ 345 | public function version_information_template() { 346 | ?> 347 | 375 | 'channel', 44 | ) 45 | ); 46 | 47 | add_settings_field( 48 | 'wc-beta-tester-auto-update', 49 | __( 'Automatic Updates', 'woocommerce-beta-tester' ), 50 | array( $this, 'automatic_update_checkbox_html' ), 51 | 'wc-beta-tester', 52 | 'wc-beta-tester-update', 53 | array( 54 | 'label_for' => 'auto_update', 55 | ) 56 | ); 57 | } 58 | 59 | /** 60 | * Update section HTML output. 61 | * 62 | * @param array $args Arguments. 63 | */ 64 | public function update_section_html( $args ) { 65 | ?> 66 |

67 | array( 79 | 'name' => __( 'Beta Releases', 'woocommerce-beta-tester' ), 80 | 'description' => __( 'Beta releases contain experimental functionality for testing purposes only. This channel will also include RC and stable releases if more current.', 'woocommerce-beta-tester' ), 81 | ), 82 | 'rc' => array( 83 | 'name' => __( 'Release Candidates', 'woocommerce-beta-tester' ), 84 | 'description' => __( 'Release candidates are released to ensure any critical problems have not gone undetected. This channel will also include stable releases if more current.', 'woocommerce-beta-tester' ), 85 | ), 86 | 'stable' => array( 87 | 'name' => __( 'Stable Releases', 'woocommerce-beta-tester' ), 88 | 'description' => __( 'This is the default behavior in WordPress.', 'woocommerce-beta-tester' ), 89 | ), 90 | ); 91 | echo '
' . esc_html__( 'Update Channel', 'woocommerce-beta-tester' ) . ''; 92 | foreach ( $channels as $channel_id => $channel ) { 93 | ?> 94 | 101 |
102 | '; 105 | } 106 | 107 | /** 108 | * Auto updates checkbox markup output. 109 | * 110 | * @param array $args Arguments. 111 | */ 112 | public function automatic_update_checkbox_html( $args ) { 113 | $settings = WC_Beta_Tester::get_settings(); 114 | ?> 115 | 119 | 145 |
146 |

147 |
148 | 155 |
156 |
157 | add_hooks(); 49 | } 50 | 51 | /** 52 | * Hook into WordPress. 53 | */ 54 | public function add_hooks() { 55 | add_action( 'admin_menu', array( $this, 'add_to_menu' ), 55 ); 56 | add_action( 'wp_ajax_' . static::AJAX_HOOK, array( $this, 'export_settings' ) ); 57 | } 58 | /** 59 | * Add options page to menu 60 | */ 61 | public function add_to_menu() { 62 | add_submenu_page( 'plugins.php', __( 'WC Beta Tester Import/Export', 'woocommerce-beta-tester' ), __( 'WC Import/Export', 'woocommerce-beta-tester' ), static::IMPORT_CAP, 'wc-beta-tester-settings', array( $this, 'settings_page_html' ) ); 63 | } 64 | 65 | /** 66 | * Output settings HTML 67 | */ 68 | public function settings_page_html() { 69 | if ( ! current_user_can( static::IMPORT_CAP ) ) { 70 | return; 71 | } 72 | 73 | $export_url = wp_nonce_url( admin_url( 'admin-ajax.php?action=wc_beta_tester_export_settings' ), static::NONCE_ACTION ); 74 | $this->maybe_import_settings(); 75 | 76 | // show error/update messages. 77 | if ( ! empty( $this->message ) ) { 78 | ?> 79 |
message['message'] ); ?>
82 | 85 |
86 |

87 |

88 | 92 |
93 |
94 | 95 | 96 |

97 | 101 | 102 |
103 |
104 | get_settings() ); 124 | exit; 125 | } 126 | 127 | /** 128 | * Import settings in json format if submitted. 129 | */ 130 | public function maybe_import_settings() { 131 | if ( empty( $_POST ) || empty( $_POST['action'] ) || $_POST['action'] !== static::IMPORT_ACTION ) { 132 | return; 133 | } 134 | 135 | if ( ! wp_verify_nonce( $_POST['_wpnonce'], static::NONCE_ACTION ) ) { 136 | $this->add_message( __( 'Invalid submission', 'woocommerce-beta-tester' ) ); 137 | return; 138 | } 139 | 140 | if ( empty( $_FILES[ static::IMPORT_FILENAME ] ) ) { 141 | $this->add_message( __( 'No file uploaded.', 'woocommerce-beta-tester' ) ); 142 | return; 143 | } 144 | 145 | $tmp_file = $_FILES[ static::IMPORT_FILENAME ]['tmp_name']; 146 | if ( empty( $tmp_file ) ) { 147 | $this->add_message( __( 'No file uploaded.', 'woocommerce-beta-tester' ) ); 148 | return; 149 | } 150 | 151 | if ( ! is_readable( $tmp_file ) ) { 152 | $this->add_message( __( 'File could not be read.', 'woocommerce-beta-tester' ) ); 153 | return; 154 | } 155 | 156 | $maybe_json = file_get_contents( $tmp_file ); 157 | $settings = json_decode( $maybe_json, true ); 158 | if ( $settings !== null ) { 159 | foreach ( $this->get_setting_list() as $option_name ) { 160 | if ( ! isset( $settings[ $option_name ] ) ) { 161 | continue; 162 | } 163 | $setting = maybe_unserialize( $settings[ $option_name ] ); 164 | if ( is_null( $setting ) ) { 165 | delete_option( $option_name ); 166 | } else { 167 | update_option( $option_name, $setting ); 168 | } 169 | } 170 | $this->add_message( __( 'Settings Imported', 'woocommerce-beta-tester' ), 'updated' ); 171 | } else { 172 | $this->add_message( __( 'File did not contain well formed JSON.', 'woocommerce-beta-tester' ) ); 173 | } 174 | } 175 | 176 | /** 177 | * Get an array of the WooCommerce related settings. 178 | */ 179 | protected function get_settings() { 180 | $settings = array(); 181 | if ( current_user_can( 'manage_woocommerce' ) ) { 182 | foreach ( $this->get_setting_list() as $option_name ) { 183 | $setting = get_option( $option_name ); 184 | if ( false === $setting ) { 185 | $setting = null; 186 | } 187 | $settings[ $option_name ] = is_string( $setting ) ? $setting : serialize( $setting ); 188 | } 189 | } 190 | return $settings; 191 | } 192 | 193 | /** 194 | * Add a settings import status message. 195 | * 196 | * @param string $message Message string. 197 | * @param string $type Message type. Optional. Default 'error'. 198 | */ 199 | protected function add_message( $message, $type = 'error' ) { 200 | $this->message = array( 201 | 'message' => $message, 202 | 'type' => $type 203 | ); 204 | } 205 | 206 | /** 207 | * Get the WooCommerce settings list keys. 208 | */ 209 | private function get_setting_list() { 210 | require_once( dirname(__FILE__ ) . '/wc-beta-tester-settings-list.php'); 211 | return wc_beta_tester_setting_list(); 212 | } 213 | } 214 | -------------------------------------------------------------------------------- /includes/class-wc-beta-tester-plugin-upgrader.php: -------------------------------------------------------------------------------- 1 | true, 33 | ); 34 | $parsed_args = wp_parse_args( $args, $defaults ); 35 | 36 | $this->init(); 37 | $this->upgrade_strings(); 38 | 39 | $plugin_version = $this->skin->options['version']; 40 | 41 | $download_url = WC_Beta_Tester::instance()->get_download_url( $plugin_version ); 42 | 43 | add_filter( 'upgrader_pre_install', array( $this, 'deactivate_plugin_before_upgrade' ), 10, 2 ); 44 | add_filter( 'upgrader_clear_destination', array( $this, 'delete_old_plugin' ), 10, 4 ); 45 | 46 | $this->run( 47 | array( 48 | 'package' => $download_url, 49 | 'destination' => WP_PLUGIN_DIR, 50 | 'clear_destination' => true, 51 | 'clear_working' => true, 52 | 'hook_extra' => array( 53 | 'plugin' => $plugin, 54 | 'type' => 'plugin', 55 | 'action' => 'update', 56 | ), 57 | ) 58 | ); 59 | 60 | // Cleanup our hooks, in case something else does a upgrade on this connection. 61 | remove_filter( 'upgrader_pre_install', array( $this, 'deactivate_plugin_before_upgrade' ) ); 62 | remove_filter( 'upgrader_clear_destination', array( $this, 'delete_old_plugin' ) ); 63 | 64 | if ( ! $this->result || is_wp_error( $this->result ) ) { 65 | return $this->result; 66 | } 67 | 68 | // Force refresh of plugin update information. 69 | wp_clean_plugins_cache( $parsed_args['clear_update_cache'] ); 70 | 71 | return true; 72 | } 73 | 74 | } 75 | -------------------------------------------------------------------------------- /includes/class-wc-beta-tester-version-picker.php: -------------------------------------------------------------------------------- 1 | 'web', 57 | 'url' => 'plugins.php?page=wc-beta-tester-version-picker', 58 | 'title' => 'Version switch result', 59 | 'plugin' => $plugin_name, 60 | 'version' => $version, 61 | 'nonce' => wp_unslash( $_GET['_wpnonce'] ), // WPCS: Input var ok, sanitization ok. 62 | ); 63 | 64 | $skin = new Automatic_Upgrader_Skin( $skin_args ); 65 | $upgrader = new WC_Beta_Tester_Plugin_Upgrader( $skin ); 66 | $result = $upgrader->switch_version( $plugin ); 67 | 68 | // Try to reactivate. 69 | activate_plugin( $plugin, '', is_network_admin(), true ); 70 | 71 | if ( is_wp_error( $skin->result ) ) { 72 | throw new Exception( $skin->result->get_error_message() ); 73 | } elseif ( false === $result ) { 74 | throw new Exception( __( 'Update failed', 'woocommerce-beta-tester' ) ); 75 | } 76 | 77 | wp_safe_redirect( admin_url( 'plugins.php?page=wc-beta-tester-version-picker&switched=' . rawurlencode( $version ) ) ); 78 | exit; 79 | } catch ( Exception $e ) { 80 | if ( class_exists( 'WC_Admin_Notices' ) ) { 81 | WC_Admin_Notices::add_custom_notice( 82 | $plugin . '_update_error', 83 | sprintf( 84 | // translators: 1: plugin name, 2: error message. 85 | __( '%1$s could not be updated (%2$s).', 'woocommerce-beta-tester' ), 86 | $plugin, 87 | $e->getMessage() 88 | ) 89 | ); 90 | wp_safe_redirect( admin_url( 'plugins.php?page=wc-beta-tester-version-picker' ) ); 91 | exit; 92 | } else { 93 | wp_die( esc_html( $e->getMessage() ) ); 94 | } 95 | } 96 | } 97 | 98 | /** 99 | * Add options page to menu. 100 | * 101 | * @return void 102 | */ 103 | public function add_to_menus() { 104 | add_submenu_page( 105 | 'plugins.php', 106 | __( 'WooCommerce Version Switch', 'woocommerce-beta-tester' ), 107 | __( 'WooCommerce Version Switch', 'woocommerce-beta-tester' ), 108 | 'install_plugins', 109 | 'wc-beta-tester-version-picker', 110 | array( $this, 'select_versions_form_html' ) 111 | ); 112 | } 113 | 114 | /** 115 | * Return HTML code representation of list of WooCommerce versions for the selected channel. 116 | * 117 | * @param string $channel Filter versions by channel: all|beta|rc|stable. 118 | * @return string 119 | */ 120 | public function get_versions_html( $channel ) { 121 | $tags = WC_Beta_Tester::instance()->get_tags( $channel ); 122 | 123 | if ( ! $tags ) { 124 | return ''; 125 | } 126 | 127 | usort( $tags, 'version_compare' ); 128 | $tags = array_reverse( $tags ); 129 | $versions_html = ''; 130 | 131 | if ( ! empty( $_GET['switched'] ) ) { // WPCS: input var ok, CSRF ok. 132 | /* translators: %s: WooCoomerce version */ 133 | $versions_html .= '

' . sprintf( esc_html__( 'Successfully switched version to %s.', 'woocommerce-beta-tester' ), esc_html( sanitize_text_field( wp_unslash( $_GET['switched'] ) ) ) ) . '

'; // WPCS: input var ok, CSRF ok. 134 | } 135 | 136 | $versions_html .= ''; 156 | 157 | return $versions_html; 158 | } 159 | 160 | /** 161 | * Echo HTML form to switch WooCommerce versions, filtered for the selected channel. 162 | */ 163 | public function select_versions_form_html() { 164 | if ( ! current_user_can( 'install_plugins' ) ) { 165 | return; 166 | } 167 | 168 | $settings = WC_Beta_Tester::get_settings(); 169 | $channel = $settings->channel; 170 | 171 | ?> 172 |
173 |
174 |

175 |
176 |
177 | get_versions_html( $channel ); // WPCS: XSS ok. ?> 178 |
179 |
180 | 181 |
182 | 183 | 184 | 185 | 186 | 230 | 231 |
232 |
233 |
234 | 'beta', 56 | 'auto_update' => false, 57 | ) 58 | ); 59 | 60 | $settings->channel = $settings->channel; 61 | $settings->auto_update = (bool) $settings->auto_update; 62 | 63 | return $settings; 64 | } 65 | 66 | /** 67 | * Get the plugin url. 68 | * 69 | * @return string 70 | */ 71 | public function plugin_url() { 72 | return untrailingslashit( plugins_url( '/', WC_BETA_TESTER_FILE ) ); 73 | } 74 | 75 | /** 76 | * Constructor 77 | */ 78 | public function __construct() { 79 | $this->plugin_name = plugin_basename( WC_BETA_TESTER_FILE ); 80 | $this->plugin_config = array( 81 | 'plugin_file' => 'woocommerce/woocommerce.php', 82 | 'slug' => 'woocommerce', 83 | 'proper_folder_name' => 'woocommerce', 84 | 'api_url' => 'https://api.wordpress.org/plugins/info/1.0/woocommerce.json', 85 | 'repo_url' => 'https://wordpress.org/plugins/woocommerce/', 86 | ); 87 | 88 | add_filter( "plugin_action_links_{$this->plugin_name}", array( $this, 'plugin_action_links' ), 10, 1 ); 89 | add_filter( 'auto_update_plugin', array( $this, 'auto_update_woocommerce' ), 100, 2 ); 90 | 91 | if ( 'stable' !== $this->get_settings()->channel ) { 92 | add_filter( 'pre_set_site_transient_update_plugins', array( $this, 'api_check' ) ); 93 | add_filter( 'plugins_api_result', array( $this, 'plugins_api_result' ), 10, 3 ); 94 | add_filter( 'upgrader_source_selection', array( $this, 'upgrader_source_selection' ), 10, 3 ); 95 | } 96 | 97 | $this->includes(); 98 | } 99 | 100 | /** 101 | * Include any classes we need within admin. 102 | */ 103 | public function includes() { 104 | include_once dirname( __FILE__ ) . '/class-wc-beta-tester-admin-menus.php'; 105 | include_once dirname( __FILE__ ) . '/class-wc-beta-tester-admin-assets.php'; 106 | } 107 | 108 | /** 109 | * Check whether or not the transients need to be overruled and API needs to be called for every single page load 110 | * 111 | * @return bool overrule or not 112 | */ 113 | public function overrule_transients() { 114 | return defined( 'WC_BETA_TESTER_FORCE_UPDATE' ) && WC_BETA_TESTER_FORCE_UPDATE; 115 | } 116 | 117 | /** 118 | * Checks if a given version is a pre-release. 119 | * 120 | * @param string $version Version to compare. 121 | * @return bool 122 | */ 123 | public function is_prerelease( $version ) { 124 | return preg_match( '/(.*)?-(beta|rc)(.*)/', $version ); 125 | } 126 | 127 | /** 128 | * Get New Version from WPorg 129 | * 130 | * @since 1.0 131 | * @return int $version the version number 132 | */ 133 | public function get_latest_channel_release() { 134 | $tagged_version = get_site_transient( md5( $this->plugin_config['slug'] ) . '_latest_tag' ); 135 | 136 | if ( $this->overrule_transients() || empty( $tagged_version ) ) { 137 | 138 | $data = $this->get_wporg_data(); 139 | 140 | $latest_version = $data->version; 141 | $versions = (array) $data->versions; 142 | $channel = $this->get_settings()->channel; 143 | 144 | foreach ( $versions as $version => $download_url ) { 145 | if ( 'trunk' === $version ) { 146 | continue; 147 | } 148 | switch ( $channel ) { 149 | case 'stable': 150 | if ( $this->is_in_stable_channel( $version ) ) { 151 | $tagged_version = $version; 152 | } 153 | break; 154 | case 'rc': 155 | if ( $this->is_in_rc_channel( $version ) ) { 156 | $tagged_version = $version; 157 | } 158 | break; 159 | case 'beta': 160 | if ( $this->is_in_beta_channel( $version ) ) { 161 | $tagged_version = $version; 162 | } 163 | break; 164 | } 165 | } 166 | 167 | // Refresh every 6 hours. 168 | if ( ! empty( $tagged_version ) ) { 169 | set_site_transient( md5( $this->plugin_config['slug'] ) . '_latest_tag', $tagged_version, HOUR_IN_SECONDS * 6 ); 170 | } 171 | } 172 | 173 | return $tagged_version; 174 | } 175 | 176 | /** 177 | * Get Data from .org API. 178 | * 179 | * @since 1.0 180 | * @return array $wporg_data The data. 181 | */ 182 | public function get_wporg_data() { 183 | if ( ! empty( $this->wporg_data ) ) { 184 | return $this->wporg_data; 185 | } 186 | 187 | $wporg_data = get_site_transient( md5( $this->plugin_config['slug'] ) . '_wporg_data' ); 188 | 189 | if ( $this->overrule_transients() || ( ! isset( $wporg_data ) || ! $wporg_data || '' === $wporg_data ) ) { 190 | $wporg_data = wp_remote_get( $this->plugin_config['api_url'] ); 191 | 192 | if ( is_wp_error( $wporg_data ) ) { 193 | return false; 194 | } 195 | 196 | $wporg_data = json_decode( $wporg_data['body'] ); 197 | 198 | // Refresh every 6 hours. 199 | set_site_transient( md5( $this->plugin_config['slug'] ) . '_wporg_data', $wporg_data, HOUR_IN_SECONDS * 6 ); 200 | } 201 | 202 | // Store the data in this class instance for future calls. 203 | $this->wporg_data = $wporg_data; 204 | 205 | return $wporg_data; 206 | } 207 | 208 | /** 209 | * Get plugin download URL. 210 | * 211 | * @since 1.0 212 | * @param string $version The version. 213 | * @return string 214 | */ 215 | public function get_download_url( $version ) { 216 | $data = $this->get_wporg_data(); 217 | 218 | if ( empty( $data->versions->$version ) ) { 219 | return false; 220 | } 221 | 222 | return $data->versions->$version; 223 | } 224 | 225 | /** 226 | * Get Plugin data. 227 | * 228 | * @since 1.0 229 | * @return object $data The data. 230 | */ 231 | public function get_plugin_data() { 232 | return get_plugin_data( WP_PLUGIN_DIR . '/' . $this->plugin_config['plugin_file'] ); 233 | } 234 | 235 | /** 236 | * Hook into the plugin update check and connect to WPorg. 237 | * 238 | * @since 1.0 239 | * @param object $transient The plugin data transient. 240 | * @return object $transient Updated plugin data transient. 241 | */ 242 | public function api_check( $transient ) { 243 | // Clear our transient. 244 | delete_site_transient( md5( $this->plugin_config['slug'] ) . '_latest_tag' ); 245 | 246 | // Get version data. 247 | $plugin_data = $this->get_plugin_data(); 248 | $version = $plugin_data['Version']; 249 | $new_version = $this->get_latest_channel_release(); 250 | 251 | // check the version and decide if it's new. 252 | $update = version_compare( $new_version, $version, '>' ); 253 | 254 | if ( ! $update ) { 255 | return $transient; 256 | } 257 | 258 | // Populate response data. 259 | if ( ! isset( $transient->response['woocommerce/woocommerce.php'] ) ) { 260 | $transient->response['woocommerce/woocommerce.php'] = (object) $this->plugin_config; 261 | } 262 | 263 | $transient->response['woocommerce/woocommerce.php']->new_version = $new_version; 264 | $transient->response['woocommerce/woocommerce.php']->zip_url = $this->get_download_url( $new_version ); 265 | $transient->response['woocommerce/woocommerce.php']->package = $this->get_download_url( $new_version ); 266 | 267 | return $transient; 268 | } 269 | 270 | /** 271 | * Filters the Plugin Installation API response results. 272 | * 273 | * @param object|WP_Error $response Response object or WP_Error. 274 | * @param string $action The type of information being requested from the Plugin Installation API. 275 | * @param object $args Plugin API arguments. 276 | * @return object 277 | */ 278 | public function plugins_api_result( $response, $action, $args ) { 279 | // Check if this call API is for the right plugin. 280 | if ( ! isset( $response->slug ) || $response->slug !== $this->plugin_config['slug'] ) { 281 | return $response; 282 | } 283 | 284 | $new_version = $this->get_latest_channel_release(); 285 | 286 | if ( version_compare( $response->version, $new_version, '=' ) ) { 287 | return $response; 288 | } 289 | 290 | if ( $this->is_beta_version( $new_version ) ) { 291 | $warning = __( '

This is a beta release

', 'woocommerce-beta-tester' ); 292 | } 293 | 294 | if ( $this->is_rc_version( $new_version ) ) { 295 | $warning = __( '

This is a pre-release version

', 'woocommerce-beta-tester' ); 296 | } 297 | 298 | // If we are returning a different version than the stable tag on .org, manipulate the returned data. 299 | $response->version = $new_version; 300 | $response->download_link = $this->get_download_url( $new_version ); 301 | 302 | $response->sections['changelog'] = sprintf( 303 | '

' . __( 'Read the changelog and find out more about the release on GitHub.', 'woocommerce-beta-tester' ) . '

', 304 | 'https://github.com/woocommerce/woocommerce/blob/' . $response->version . '/readme.txt' 305 | ); 306 | 307 | foreach ( $response->sections as $key => $section ) { 308 | $response->sections[ $key ] = $warning . $section; 309 | } 310 | 311 | return $response; 312 | } 313 | 314 | /** 315 | * Rename the downloaded zip 316 | * 317 | * @param string $source File source location. 318 | * @param string $remote_source Remote file source location. 319 | * @param WP_Upgrader $upgrader WordPress Upgrader instance. 320 | * @return string 321 | */ 322 | public function upgrader_source_selection( $source, $remote_source, $upgrader ) { 323 | global $wp_filesystem; 324 | 325 | if ( strstr( $source, '/woocommerce-woocommerce-' ) ) { 326 | $corrected_source = trailingslashit( $remote_source ) . trailingslashit( $this->plugin_config['proper_folder_name'] ); 327 | 328 | if ( $wp_filesystem->move( $source, $corrected_source, true ) ) { 329 | return $corrected_source; 330 | } else { 331 | return new WP_Error(); 332 | } 333 | } 334 | 335 | return $source; 336 | } 337 | 338 | /** 339 | * Enable auto updates for WooCommerce. 340 | * 341 | * @param bool $update Should this autoupdate. 342 | * @param object $plugin Plugin being checked. 343 | * @return bool 344 | */ 345 | public function auto_update_woocommerce( $update, $plugin ) { 346 | if ( true === $this->get_settings()->auto_update && 'woocommerce' === $plugin->slug ) { 347 | return true; 348 | } else { 349 | return $update; 350 | } 351 | } 352 | 353 | /** 354 | * Return true if version string is a beta version. 355 | * 356 | * @param string $version_str Version string. 357 | * @return bool 358 | */ 359 | protected static function is_beta_version( $version_str ) { 360 | return strpos( $version_str, 'beta' ) !== false; 361 | } 362 | 363 | /** 364 | * Return true if version string is a Release Candidate. 365 | * 366 | * @param string $version_str Version string. 367 | * @return bool 368 | */ 369 | protected static function is_rc_version( $version_str ) { 370 | return strpos( $version_str, 'rc' ) !== false; 371 | } 372 | 373 | /** 374 | * Return true if version string is a stable version. 375 | * 376 | * @param string $version_str Version string. 377 | * @return bool 378 | */ 379 | protected static function is_stable_version( $version_str ) { 380 | return ! self::is_beta_version( $version_str ) && ! self::is_rc_version( $version_str ); 381 | } 382 | 383 | /** 384 | * Return true if release's version string belongs to beta channel, i.e. 385 | * if it's beta, rc or stable release. 386 | * 387 | * @param string $version_str Version string of the release. 388 | * @return bool 389 | */ 390 | protected static function is_in_beta_channel( $version_str ) { 391 | return self::is_beta_version( $version_str ) || self::is_rc_version( $version_str ) || self::is_stable_version( $version_str ); 392 | } 393 | 394 | /** 395 | * Return true if release's version string belongs to release candidate channel, i.e. 396 | * if it's rc or stable release. 397 | * 398 | * @param string $version_str Version string of the release. 399 | * @return bool 400 | */ 401 | protected static function is_in_rc_channel( $version_str ) { 402 | return self::is_rc_version( $version_str ) || self::is_stable_version( $version_str ); 403 | } 404 | 405 | /** 406 | * Return true if release's version string belongs to stable channel, i.e. 407 | * if it's stable release and not a beta or rc. 408 | * 409 | * @param string $version_str Version string of the release. 410 | * @return bool 411 | */ 412 | protected static function is_in_stable_channel( $version_str ) { 413 | return self::is_stable_version( $version_str ); 414 | } 415 | 416 | /** 417 | * Return available versions from wp.org tags belonging to selected channel. 418 | * 419 | * @param string $channel Filter versions by channel: all|beta|rc|stable. 420 | * @return array(string) 421 | */ 422 | public function get_tags( $channel = 'all' ) { 423 | $data = $this->get_wporg_data(); 424 | $releases = (array) $data->versions; 425 | 426 | unset( $releases['trunk'] ); 427 | 428 | $releases = array_keys( $releases ); 429 | foreach ( $releases as $index => $version ) { 430 | if ( version_compare( $version, '3.6', '<' ) ) { 431 | unset( $releases[ $index ] ); 432 | } 433 | } 434 | 435 | if ( 'beta' === $channel ) { 436 | $releases = array_filter( $releases, array( __CLASS__, 'is_in_beta_channel' ) ); 437 | } elseif ( 'rc' === $channel ) { 438 | $releases = array_filter( $releases, array( __CLASS__, 'is_in_rc_channel' ) ); 439 | } elseif ( 'stable' === $channel ) { 440 | $releases = array_filter( $releases, array( __CLASS__, 'is_in_stable_channel' ) ); 441 | } 442 | 443 | return $releases; 444 | } 445 | 446 | /** 447 | * Show action links on the plugin screen. 448 | * 449 | * @param mixed $links Plugin Action links. 450 | * @return array 451 | */ 452 | public function plugin_action_links( $links ) { 453 | $action_links = array( 454 | 'switch-version' => sprintf( 455 | '%s', 456 | esc_url( admin_url( 'plugins.php?page=wc-beta-tester-version-picker' ) ), 457 | esc_html__( 'Switch versions', 'woocommerce-beta-tester' ) 458 | ), 459 | 'settings' => sprintf( 460 | '%s', 461 | esc_url( admin_url( 'plugins.php?page=wc-beta-tester' ) ), 462 | esc_html__( 'Settings', 'woocommerce-beta-tester' ) 463 | ), 464 | ); 465 | 466 | return array_merge( $action_links, $links ); 467 | } 468 | } 469 | -------------------------------------------------------------------------------- /includes/views/html-admin-missing-woocommerce.php: -------------------------------------------------------------------------------- 1 | 11 | 12 |
13 |

14 | ' . esc_html__( 'WooCommerce Beta Tester', 'woocommerce-beta-tester' ) . '' ); 17 | ?> 18 |

19 | 20 | 21 |

22 | 26 | 27 | 28 | 29 | 30 | 31 |

32 | 33 | 40 |

41 | 42 | 43 | 44 | 45 |

46 | 47 |
48 | -------------------------------------------------------------------------------- /includes/wc-beta-tester-settings-list.php: -------------------------------------------------------------------------------- 1 | $file.min.js; done", 29 | "lint:js": "eslint assets/js --ext=js" 30 | }, 31 | "engines": { 32 | "node": ">=10.15.0", 33 | "npm": ">=6.4.1" 34 | }, 35 | "husky": { 36 | "hooks": { 37 | "pre-commit": "lint-staged" 38 | } 39 | }, 40 | "lint-staged": { 41 | "linters": { 42 | "*.php": [ 43 | "php -d display_errors=1 -l", 44 | "composer run-script phpcs-pre-commit" 45 | ], 46 | "*.js": [ 47 | "eslint --fix", 48 | "git add" 49 | ] 50 | }, 51 | "ignore": [ 52 | "*.min.js" 53 | ] 54 | }, 55 | "woorelease": { 56 | "svn_reauth": "true", 57 | "wp_org_slug": "woocommerce-beta-tester" 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /phpcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | WooCommerce dev PHP_CodeSniffer ruleset. 7 | 8 | 9 | */node_modules/* 10 | */vendor/* 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | tests/ 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 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /readme.txt: -------------------------------------------------------------------------------- 1 | === WooCommerce Beta Tester === 2 | Contributors: automattic, bor0, claudiosanches, claudiulodro, kloon, mikejolley, peterfabian1000, rodrigosprimo, wpmuguru 3 | Tags: woocommerce, woo commerce, beta, beta tester, bleeding edge, testing 4 | Requires at least: 4.7 5 | Tested up to: 5.6 6 | Stable tag: 2.0.5 7 | License: GPLv3 8 | License URI: https://www.gnu.org/licenses/gpl-3.0.html 9 | 10 | Easily update to prerelease versions of WooCommerce for testing and development purposes. 11 | 12 | == Description == 13 | 14 | **WooCommerce Beta Tester** allows you to try out new versions of WooCommerce before they are officially released. 15 | 16 | **Use with caution, not on production sites. Beta releases may not be stable.** 17 | 18 | After activation, you'll be able to choose an update channel: 19 | 20 | 1. Beta - Update to beta releases, RC, or stable, depending on what is newest. 21 | 2. Release Candidate - Update to RC releases or stable, depending on what is newest. 22 | 3. Stable - No beta updates. Default WordPress behavior. 23 | 24 | These will surface pre-releases via automatic updates in WordPress. Updates will replace your installed version of WooCommerce. 25 | 26 | **Note**, this will not check for updates on every admin page load unless you explicitly tell it to. You can do this by clicking the "Check Again" button from the WordPress updates screen or you can set the `WC_BETA_TESTER_FORCE_UPDATE` to true in your `wp-config.php` file. 27 | 28 | == Frequently Asked Questions == 29 | 30 | = Does this allow me to install multiple versions of WooCommerce at the same time? 31 | 32 | No; updates will replace your currently installed version of WooCommerce. You can switch to any version from this plugin via the interface however. 33 | 34 | = Where do updates come from? = 35 | 36 | Updates are downloaded from the WordPress.org SVN repository where we tag prerelease versions specifically for this purpose. 37 | 38 | = Does this rollback my data? = 39 | 40 | This plugin does not rollback or update data on your store automatically. 41 | 42 | Database updates are manually ran like after regular updates. If you downgrade, data will not be modified. We don't recommend using this in production. 43 | 44 | = Where can I report bugs or contribute to WooCommerce Beta Tester? = 45 | 46 | Bugs can be reported to the [WooCommerce Beta Tester GitHub issue tracker](https://github.com/woocommerce/woocommerce-beta-tester). 47 | 48 | = Where can I report bugs or contribute to WooCommerce? = 49 | 50 | Join in on our [GitHub repository](https://github.com/woocommerce/woocommerce/). 51 | 52 | See our [contributing guidelines here](https://github.com/woocommerce/woocommerce/blob/master/.github/CONTRIBUTING.md). 53 | 54 | == Changelog == 55 | 56 | = 2.0.5 - 2021-12-17 = 57 | * Fix: make WC version comparison case insensitive 58 | 59 | = 2.0.4 - 2021-09-29 = 60 | * Dev: Bump tested to version 61 | * Fix: enqueue logic for css/js assets 62 | 63 | = 2.0.3 - 2021-09-22 = 64 | * Fix: Bump version to release version including admin.css. 65 | 66 | = 2.0.2 = 67 | 68 | * Fix notice for undefined `item` 69 | * Fix auto_update_plugin filter reference 70 | * Fix including SSR in bug report 71 | * Fix style in version modal header 72 | * Add check for WooCommerce installed in default location 73 | 74 | = 2.0.1 = 75 | * Changes to make this plugin compatible with the upcoming WooCommerce 3.6 76 | 77 | = 2.0.0 = 78 | * Enhancement - Re-built to pull updates from the WordPress.org repository rather than GitHub. 79 | * Enhancement - Channel selection; choose to receive RC or beta versions. 80 | * Enhancement - Admin bar item shows version information, and offers shortcuts to functionality. 81 | * Enhancement - Shortcut to log GitHub issues. 82 | * Enhancement - Version switcher; choose which release or prerelease to switch to. 83 | * Enhancement - Setting to enable auto-updates. 84 | 85 | = 1.0.3 = 86 | * Fix repo URLs and directory renaming. 87 | 88 | = 1.0.2 = 89 | * Updated API URL. 90 | 91 | = 1.0.1 = 92 | * Switched to releases API to get latest release, rather than tag which are not chronological. 93 | 94 | = 1.0 = 95 | * First release. 96 | -------------------------------------------------------------------------------- /woocommerce-beta-tester.php: -------------------------------------------------------------------------------- 1 |