I have set Advanced Custom Fields as a must-use plugin with bedrock and it used to work. Now i made some changes to the code and updated plugins with composer, and started getting this error:
Fatal error: Uncaught Error: Undefined constant “AUTH_COOKIE” in /var/www/customers/Projects/proj_2019/web/wp/wp-includes/pluggable.php:932 Stack trace: #0 /var/www/customers/Projects/proj_2019/web/wp/wp-includes/pluggable.php(694): wp_parse_auth_cookie() #1 /var/www/customers/Projects/proj_2019/web/wp/wp-includes/class-wp-hook.php(324): wp_validate_auth_cookie() #2 /var/www/customers/Projects/proj_2019/web/wp/wp-includes/plugin.php(205): WP_Hook->apply_filters() #3 /var/www/customers/Projects/proj_2019/web/wp/wp-includes/user.php(3668): apply_filters() #4 /var/www/customers/Projects/proj_2019/web/wp/wp-includes/pluggable.php(70): _wp_get_current_user() #5 /var/www/customers/Projects/proj_2019/web/wp/wp-includes/l10n.php(98): wp_get_current_user() #6 /var/www/customers/Projects/proj_2019/web/wp/wp-includes/l10n.php(152): get_user_locale() #7 /var/www/customers/Projects/proj_2019/web/wp/wp-includes/l10n.php(1371): determine_locale() #8 /var/www/customers/Projects/proj_2019/web/wp/wp-includes/l10n.php(1402): _load_textdomain_just_in_time() #9 /var/www/customers/Projects/proj_2019/web/wp/wp-includes/l10n.php(194): get_translations_for_domain() #10 /var/www/customers/Projects/proj_2019/web/wp/wp-includes/l10n.php(306): translate() #11 /var/www/customers/Projects/proj_2019/web/app/mu-plugins/advanced-custom-fields/acf.php(89): __() #12 /var/www/customers/Projects/proj_2019/web/app/mu-plugins/advanced-custom-fields/acf.php(791): ACF->initialize() #13 /var/www/customers/Projects/proj_2019/web/app/mu-plugins/advanced-custom-fields/acf.php(797): acf() #14 /var/www/customers/Projects/proj_2019/vendor/roots/bedrock-autoloader/src/Autoloader.php(64): include_once(‘…’) #15 [internal function]: Roots\Bedrock\Autoloader::Roots\Bedrock{closure}() #16 /var/www/customers/Projects/proj_2019/vendor/roots/bedrock-autoloader/src/Autoloader.php(63): array_map() #17 /var/www/customers/Projects/proj_2019/vendor/roots/bedrock-autoloader/src/Autoloader.php(51): Roots\Bedrock\Autoloader->loadPlugins() #18 /var/www/customers/Projects/proj_2019/web/app/mu-plugins/bedrock-autoloader.php(15): Roots\Bedrock\Autoloader->__construct() #19 /var/www/customers/Projects/proj_2019/web/wp/wp-settings.php(447): include_once(‘…’) #20 /var/www/customers/Projects/proj_2019/web/wp-config.php(36): require_once(‘…’) #21 /var/www/customers/Projects/proj_2019/web/wp/wp-load.php(55): require_once(‘…’) #22 /var/www/customers/Projects/proj_2019/web/wp/wp-admin/admin.php(34): require_once(‘…’) #23 /var/www/customers/Projects/proj_2019/web/wp/wp-admin/plugins.php(10): require_once(‘…’) #24 {main} thrown in /var/www/customers/Projects/proj_2019/web/wp/wp-includes/pluggable.php on line 932
It seems the ACF plugin version is still the same as before this operation. If I move ACF to plugins, and activate it, everything works. Also, going back with my code changes (which should not affect this anyway) did not help. This seems to me like a loading order issue, any other options of solving this than changing ACF of not being MU-plugin?