Code Monkey home page Code Monkey logo

kirby3-doctor's Issues

Does not run under PHP8

We have moved the project to PHP 8 as PHP 7.4 is EOL at the end of the year. Unfortunately, one dependency does not tolerate the change:

Your requirements could not be resolved to an installable set of packages.

Problem 1
- bnomei/kirby3-doctor[1.5.0, ..., 1.5.1] require zendframework/zenddiagnostics ^1.6 -> satisfiable by zendframework/zenddiagnostics[v1.6.0].
- zendframework/zenddiagnostics v1.6.0 requires php ^5.6 || ^7.0 -> your php version (8.0.13) does not satisfy that requirement.
- Root composer.json requires bnomei/kirby3-doctor ^1.5 -> satisfiable by bnomei/kirby3-doctor[1.5.0, 1.5.1].

Allow plugins to define checks

As the plugin allows to define custom checks in the config.php file, it would be a great addition to give plugins access to that functionality as well. A thumbnail generator could check is the driver works or necessary CLI tools are available, plugins accessing third-party APIs could check whether the API keys are valid etc.

Kirby’s plugin method can hold custom parameters, the implementation could be done as simple as follows:

Kirby::plugin('my/plugin', [
  'bnomei.doctor.checks' => [
    "MyNamespace\\MyClass" => true, // enable new
  ],
]);

The Doctor class could load the checks defined by plugins pretty easily:

$pluginChecks = [];

foreach (kirby()->plugins() as $plugin) {
  $pluginChecks = array_merge($pluginChecks, $plugin->extends()['bnomei.doctor.checks'] ?? []);
}

site/config

add to must be writeable because of license

Registering custom Doctor checks

Hey @bnomei ,
Thinking about this plugin, I thought it would be awesome to let other Kirby plugins register their own Doctor checks, if installed together.
A bit like how Doctor uses Kirby Log : if plugins (and user config.php?) could extend Doctor checks, this plugin would unleash its true powers.
Any thoughts about this ?

Plugin does not comply with psr-4 autoloading standard.

I get the following warning message,please fix this to comply with Composer V2.0:

Deprecation Notice: Class Bnomei\Interfaces\Doctor located in ./site/plugins/kirby3-doctor/classes/Interfaces/DoctorInterface.php does not comply with psr-4 autoloading standard.

It will not autoload anymore in Composer v2.0. in phar:///Applications/DevDesktop/tools/composer.phar/src/Composer/Autoload/ClassMapGenerator.php:201

Deprecation Notice: Class Bnomei\Interfaces\Doctor located in ./site/plugins/kirby3-doctor/classes/Interfaces/DoctorInterface.php does not comply with psr-4 autoloading standard. 
It will not autoload anymore in Composer v2.0. in phar:///Applications/DevDesktop/tools/composer.phar/src/Composer/Autoload/ClassMapGenerator.php:201

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.