Skip to content

Commit

Permalink
Revert changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
spacedmonkey committed Nov 25, 2022
1 parent d41d483 commit f578bc2
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 84 deletions.
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"phpcompatibility/phpcompatibility-wp": "^2.1",
"phpmd/phpmd": "^2.9",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan-phpunit": "^1.2",
"roave/security-advisories": "dev-latest",
"sirbrillig/phpcs-variable-analysis": "^2.8",
"slevomat/coding-standard": "^8.0.0",
Expand Down
54 changes: 1 addition & 53 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ parameters:
path: includes/Admin/Customizer.php
paths:
- includes/
- tests/phpunit/unit/
- tests/phpunit/unit/includes/
- tests/phpunit/unit/tests/
- uninstall.php
excludePaths:
- includes/vendor/*
Expand All @@ -37,7 +38,6 @@ parameters:
stubFiles:
- tests/phpstan/stubs/wordpress-override.php
bootstrapFiles:
- tests/phpunit/unit/bootstrap.php
- tests/phpstan/bootstrap.php
- third-party/vendor/ampproject/amp-wp/includes/sanitizers/class-amp-base-sanitizer.php
- third-party/vendor/ampproject/amp-wp/includes/sanitizers/class-amp-meta-sanitizer.php
Expand Down
21 changes: 6 additions & 15 deletions tests/phpstan/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,12 @@
/*
* Global constants used in the analysed code need to be defined in bootstrap files.
*/
if ( ! defined( 'WEBSTORIES_VERSION' ) ) {
define( 'WEBSTORIES_VERSION', '0.0.0' );
}
if ( ! defined( 'WEBSTORIES_DB_VERSION' ) ) {
define( 'WEBSTORIES_DB_VERSION', '0.0.0' );
}
if ( ! defined( 'WEBSTORIES_AMP_VERSION' ) ) {
define( 'WEBSTORIES_AMP_VERSION', '0.0.0' );
}
if ( ! defined( 'WEBSTORIES_PLUGIN_FILE' ) ) {
define( 'WEBSTORIES_PLUGIN_FILE', dirname( __DIR__, 2 ) . '/web-stories.php' ); // phpcs:ignore PHPCompatibility.FunctionUse.NewFunctionParameters.dirname_levelsFound
}
if ( ! defined( 'WEBSTORIES_PLUGIN_DIR_PATH' ) ) {
define( 'WEBSTORIES_PLUGIN_DIR_PATH', dirname( WEBSTORIES_PLUGIN_FILE ) );
}

define( 'WEBSTORIES_VERSION', '0.0.0' );
define( 'WEBSTORIES_DB_VERSION', '0.0.0' );
define( 'WEBSTORIES_AMP_VERSION', '0.0.0' );
define( 'WEBSTORIES_PLUGIN_FILE', dirname( __DIR__, 2 ) . '/web-stories.php' ); // phpcs:ignore PHPCompatibility.FunctionUse.NewFunctionParameters.dirname_levelsFound
define( 'WEBSTORIES_PLUGIN_DIR_PATH', dirname( WEBSTORIES_PLUGIN_FILE ) );
define( 'WEBSTORIES_PLUGIN_DIR_URL', 'https://example.com/wp-content/plugins/web-stories/' );
define( 'WEBSTORIES_CDN_URL', 'https://wp.stories.google/static/main/' );
define( 'WEBSTORIES_MINIMUM_PHP_VERSION', '5.6' );
Expand Down
18 changes: 5 additions & 13 deletions tests/phpunit/unit/bootstrap.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

declare( strict_types = 1 );
declare(strict_types = 1);

/**
* PHPUnit bootstrap file.
Expand All @@ -11,21 +11,13 @@
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
*/

if ( ! defined( 'ABSPATH' ) ) {
require_once __DIR__ . '/../../../vendor/yoast/wp-test-utils/src/BrainMonkey/bootstrap.php';
}
require_once __DIR__ . '/../../../vendor/yoast/wp-test-utils/src/BrainMonkey/bootstrap.php';
require_once __DIR__ . '/../../../vendor/autoload.php';
require_once __DIR__ . '/../../../third-party/vendor/scoper-autoload.php';

if ( ! defined( 'WEBSTORIES_VERSION' ) ) {
define( 'WEBSTORIES_VERSION', '1.0.0' );
}
if ( ! defined( 'WEBSTORIES_DB_VERSION' ) ) {
define( 'WEBSTORIES_DB_VERSION', '1.0.0' );
}
if ( ! defined( 'WEBSTORIES_AMP_VERSION' ) ) {
define( 'WEBSTORIES_AMP_VERSION', '1.0.0' );
}
define( 'WEBSTORIES_VERSION', '1.0.0' );
define( 'WEBSTORIES_DB_VERSION', '1.0.0' );
define( 'WEBSTORIES_AMP_VERSION', '1.0.0' );

if ( ! defined( 'WEBSTORIES_PLUGIN_DIR_PATH' ) ) {
define( 'WEBSTORIES_PLUGIN_DIR_PATH', dirname( __DIR__, 3 ) );
Expand Down

0 comments on commit f578bc2

Please sign in to comment.