Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

roots/paths filters missing from 3.x #506

Open
kapoko opened this issue Aug 14, 2023 · 1 comment
Open

roots/paths filters missing from 3.x #506

kapoko opened this issue Aug 14, 2023 · 1 comment
Labels

Comments

@kapoko
Copy link

kapoko commented Aug 14, 2023

Version

3.x

What did you expect to happen?

Even though mentioned in the docs for 3.x the acorn/path filters do nothing in acorn 3.x

Relevant function in 2.x where the filters are still present: https://github.com/roots/acorn/blob/16b91ac15d17a861515552e958195b11e94b2a49/src/Roots/Acorn/Bootloader.php#L242-L259

Same function in 3.x: https://github.com/roots/acorn/blob/c94b27f83002ac12ef42790d1a4cfb270d512c61/src/Roots/Acorn/Bootloader.php#L324-L335

What actually happens?

add_filter('acorn/paths', ...) does nothing.

Steps to reproduce

In functions.php add the following filter before booting Acorn, it prints 'filter called' in Acorn 2.x but not in 3.x.

add_filter('acorn/paths', function() {
    var_dump('filter called');
});

\Roots\bootloader()->boot();

System info

No response

Log output

No response

Please confirm this isn't a support request.

No

@kapoko kapoko added the bug label Aug 14, 2023
@QWp6t
Copy link
Member

QWp6t commented Mar 18, 2024

Thanks for bringing this to our attention.

We removed this feature in Acorn v3 in favor of environment variables or constants.

Feel free to define any of the following to override your paths:

  • ACORN_BASEPATH
  • ACORN_APP_PATH
  • ACORN_CONFIG_PATH
  • ACORN_STORAGE_PATH
  • ACORN_RESOURCES_PATH
  • ACORN_PUBLIC_PATH

Gonna punt this to the docs repo.

Thanks again!

@QWp6t QWp6t transferred this issue from roots/acorn Mar 18, 2024
@retlehs retlehs added acorn and removed bug labels Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants