Open datengraben opened 3 days ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 50.41%. Comparing base (
665d7e9
) to head (2dc6429
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@hansmorb ok jetzt habe ich doch eine Lösung gefunden. Ich habe es aber noch nicht bei uns im Staging getestet.
This PR fixes #1200 (the composer autoloader issue) and enables the following:
vendor/bin
)vendor/bin
)Problem
The
ed-itsolutions/cmb2-field-ajax-search
dependency registers itself in the autoloader.files directive very early. See: https://github.com/Ed-ITSolutions/cmb2-field-ajax-search/blob/18f11794eef0ac638041192f25311580f68ef90a/composer.json#L16But it has no own autoloader or bootstrapping files, so it won't load wordpress definitions on its own.
So the plugin file depends on wordpress definitions
do_action
etc., which are not loaded at this moment. https://github.com/Ed-ITSolutions/cmb2-field-ajax-search/blob/18f11794eef0ac638041192f25311580f68ef90a/cmb2-field-ajax-search.php#L24Because of this, the autoloading process of commonsbooking fails, but the autoload of any other plugin, that depends on it will fail too.
Solution
Since it seems to be no good style and also breaking the autoloader of other wordpress plugins (I testet it), I forked the 4 years inactivate cmb2-ajax-search module and removed the autoloader from our composer json (https://github.com/datengraben/cmb2-field-ajax-search/commit/887470a5cb9363a51d573bb8d49259435f519511) , added a require_once to our plugin initialization file (https://github.com/wielebenwir/commonsbooking/pull/1656/commits/46dea14bd057ccc517f0b85f107d7c7b38a32f4f).