Skip to content
Snippets Groups Projects
Commit 68c9c5e7 authored by Sebastian Pisula's avatar Sebastian Pisula
Browse files

Merge branch 'feature/fix-tests' into 'feature/autoload-classmap'

feature(core): restore changes and adding only __DIR__

See merge request !34
parents f5ab5afa e15f41fa
No related branches found
No related tags found
2 merge requests!34feature(core): restore changes and adding only __DIR__,!32feature(core): Added classmap autoload
Pipeline #11111 failed
## [3.3.0] - 2022-04-21
## [3.2.8] - 2022-04-22
### Added
- classmap autoload
- __DIR__ for requires
## [3.2.7] - 2021-03-01
### Fixed
......
......@@ -19,10 +19,10 @@
"wimg/php-compatibility": "^8"
},
"autoload": {
"classmap": ["src"]
},
"autoload-dev": {
"classmap": ["tests"]
"classmap": ["src", "tests"]
},
"extra": {
"text-domain": "wp-basic-requirements",
......
<?php
if ( ! interface_exists( 'WPDesk_Requirement_Checker' ) ) {
require_once __DIR__ . '/Requirement_Checker.php';
}
if ( ! class_exists( 'WPDesk_Basic_Requirement_Checker' ) ) {
/**
* Checks requirements for plugin
* have to be compatible with PHP 5.3.x
*/
class WPDesk_Basic_Requirement_Checker implements WPDesk_Requirement_Checker {
const EXTENSION_NAME_OPENSSL = 'openssl';
const HOOK_ADMIN_NOTICES_ACTION = 'admin_notices';
......@@ -621,3 +630,4 @@ class WPDesk_Basic_Requirement_Checker implements WPDesk_Requirement_Checker {
}
}
}
}
\ No newline at end of file
<?php
if ( ! class_exists( 'Basic_Requirement_Checker' ) ) {
require_once __DIR__ . '/Basic_Requirement_Checker.php';
}
if ( ! class_exists( 'WPDesk_Basic_Requirement_Checker_With_Update_Disable' ) ) {
require_once __DIR__ . '/Basic_Requirement_Checker_With_Update_Disable.php';
}
/**
* Falicitates createion of requirement checker
*/
......
<?php
if ( ! class_exists( 'WPDesk_Basic_Requirement_Checker' ) ) {
require_once __DIR__ . '/Basic_Requirement_Checker.php';
}
if ( ! class_exists( 'WPDesk_Basic_Requirement_Checker_With_Update_Disable' ) ) {
/**
* Checks requirements for plugin. When required plugin is updated right now, then say that requirements are not met temporary.
* have to be compatible with PHP 5.2.x
*/
class WPDesk_Basic_Requirement_Checker_With_Update_Disable extends WPDesk_Basic_Requirement_Checker {
/**
......@@ -35,3 +44,4 @@ class WPDesk_Basic_Requirement_Checker_With_Update_Disable extends WPDesk_Basic_
return isset( $_GET['action'] ) && $_GET['action'] === 'upgrade-plugin' && $_GET['plugin'] === $name;
}
}
}
\ No newline at end of file
<?php
/**
* Checks requirements for plugin
* have to be compatible with PHP 5.2.x
*/
interface WPDesk_Requirement_Checker {
interface WPDesk_Requirement_Checker
{
/**
* @param string $version
*
......
<?php
interface WPDesk_Requirement_Checker_Factory {
interface WPDesk_Requirement_Checker_Factory
{
/**
* @param $plugin_file
* @param $plugin_name
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment