Demo plugin that adds admin widget printing some content with Phel.
- Run (local) WordPress installation (eg. VVV Vagrant).
- Clone this repository into
wp-content/plugins/phel-wp-plugin
. - Install composer dependencies with
cd phel-wp-plugin && composer install
. - Activate plugin on plugin management page or with
wp plugin activate phel-wp-plugin
and open Admin Dashboard (/wp-admin
) where this widget should be visible.
- XDebug's (included with VVV) infinite loop detection gives false positive on default setting and requires
ini_set('xdebug.max_nesting_level', 300);
- Error log file path needs to be set into existing directory, set into plugin dir with
->setErrorLogFile($projectRootDir . 'error.log')
Delete cache files rm -rf data/.cache/
after composer update
. Following should be fixed:
Deprecation warning appearing on page with 0.15.1 (Phel repo issue):
Error Unknown(4437) found! message: "Since gacela-project/gacela 1.8: `Gacela\Framework\AbstractDependencyProvider` is deprecated and will be removed in version 2.0. Use `Gacela\Framework\AbstractProvider` instead.
Fatal error after updating to 0.15.2 (because of cached files):
Uncaught TypeError: Gacela\Framework\ClassResolver\AbstractClassResolver::createInstance(): Return value must be of type object, null returned in /srv/www/wordpress-one/public_html/wp-content/pl
ugins/phel-wp-wishlist/vendor/gacela-project/gacela/src/Framework/ClassResolver/AbstractClassResolver.php:151