| 1 | <?php |
||
| 2 | /** |
||
| 3 | * WP Steak |
||
| 4 | * |
||
| 5 | * @package App |
||
| 6 | * |
||
| 7 | * Plugin Name: WP Steak |
||
| 8 | * Description: A fully structured plugin. |
||
| 9 | * Version: 0.1.0 |
||
| 10 | * Author: Apiki |
||
| 11 | * Author URI: https://apiki.com/ |
||
| 12 | * Text Domain: app |
||
| 13 | * Domain Path: /languages |
||
| 14 | * Requires PHP: 7.1 |
||
| 15 | */ |
||
| 16 | |||
| 17 | use Cedaro\WP\Plugin\PluginFactory; |
||
| 18 | |||
| 19 | if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) { |
||
| 20 | require __DIR__ . '/vendor/autoload.php'; |
||
| 21 | } |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Retrieve the main plugin instance. |
||
| 25 | * |
||
| 26 | * @return \Cedaro\WP\Plugin |
||
| 27 | */ |
||
| 28 | function wpsteak() { |
||
| 29 | static $instance; |
||
| 30 | |||
| 31 | if ( null === $instance ) { |
||
| 32 | $instance = PluginFactory::create( 'wpsteak' ); |
||
| 33 | } |
||
| 34 | |||
| 35 | return $instance; |
||
| 36 | } |
||
| 37 | |||
| 38 | $container = new League\Container\Container(); |
||
| 39 | |||
| 40 | /* register the reflection container as a delegate to enable auto wiring. */ |
||
| 41 | $container->delegate( |
||
| 42 | ( new League\Container\ReflectionContainer() )->cacheResolutions() |
||
| 43 | ); |
||
| 44 | |||
| 45 | $plugin = wpsteak(); |
||
| 46 | |||
| 47 | $plugin->set_container( $container ); |
||
| 48 | $plugin->register_hooks( $container->get( Cedaro\WP\Plugin\Provider\I18n::class ) ); |
||
| 49 | $plugin->register_hooks( $container->get( WPSteak\Providers\I18n::class ) ); |
||
|
0 ignored issues
–
show
|
|||
| 50 | |||
| 51 | $config = ( require __DIR__ . '/config.php' ); |
||
| 52 | |||
| 53 | foreach ( $config['service_providers'] as $service_provider ) { |
||
| 54 | $container->addServiceProvider( $service_provider ); |
||
| 55 | } |
||
| 56 | |||
| 57 | foreach ( $config['hook_providers'] as $hook_provider ) { |
||
| 58 | $plugin->register_hooks( $container->get( $hook_provider ) ); |
||
| 59 | } |
||
| 60 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths