roots / docs

📝 Documentation for Roots projects
https://roots.io/docs/
168 stars 183 forks source link

`roots/paths` filters missing from 3.x #506

Open kapoko opened 1 year ago

kapoko commented 1 year ago

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

QWp6t commented 5 months ago

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:

Gonna punt this to the docs repo.

Thanks again!