SimpleSAMLphp Autoloader overriding available TWIG Version
-
## Background
Our sites are built using the 1.x version of the Timber Starter Theme.
We have not upgraded because it is still ‘in development’. Thus, the ‘recommended’ version of TWIG to use for the Timber theme is
1.x
.## Issue
Recently when updating
private/simplesamlphp/composer.json
, it downloaded and installed the2.x
version of TWIG, which triggered a number of errors.The reason for this is because the
twig/twig
available site-wide is being provided byprivate/simplesamlphp/
instead ofwp-content/plugins/timber-library/
.The root-cause for these errors is via
simplesamlphp_autoload
withinwp-saml-auth.php
andinc/class-wp-saml-auth-cli.php
are both calling the entire/simplesamlphp/lib/_autoload.php
and associated classes/vendor-files.I understand that
private/
is available to themes/plugins (but not web), but it seems counter-intuitive that the available theme-engine for TWIG should be provided (and overridden) by the SSO tooling.## Potential Solution(s)
1. It is noted within the code/documentation that
this plugin will work if it can find the SimpleSAML_Auth_Simple
class, but additional instructions are not provided in the documentation *how* to nullify the need for thesimplesamlphp_autoload
$option_name
when configuring the plugin. Perhaps the documentation could be updated to reflect ‘if using Timber theme, do this’?2. As the Timber theme is a popular WordPress theme, simplesamlphp intends to maintain backwards compatibility, and
twig/twig:1.x
does not currently have a planned deprecation, perhaps the plugin should be configured to look for the current theme and (if using Timber), only load cli-based classes?## Final Question
As an interim solution, I ensured that the 1.x TWIG files were being loaded, but I would ask this:
Should the available
twig/twig
engine be loading from theprivate/
directory? I’m not familiar enough with WordPress to know if this is concern or not.
- The topic ‘SimpleSAMLphp Autoloader overriding available TWIG Version’ is closed to new replies.