- What is pxlrbt/acf-configurator used for?
- It is a PHP wrapper for defining and configuring Advanced Custom Fields field groups in code. Instead of building field groups only through the ACF admin UI, you can declare fields, locations, and settings in PHP so the configuration is reusable and easier to review. The fluent API is designed to feel familiar to Laravel developers.
- How do I install pxlrbt/acf-configurator?
- Install it with Composer using composer require pxlrbt/acf-configurator. Your project still needs Advanced Custom Fields available where the field groups are registered, and you should check the package's composer.json for PHP and dependency requirements. After installation, use your normal Composer autoloading workflow and register your field group definitions during application bootstrapping.
- Which Laravel versions does pxlrbt/acf-configurator support?
- The package is a PHP wrapper rather than a Laravel-only component, so its compatibility is primarily driven by its PHP and dependency constraints. Check the composer.json for the release you plan to install and test it against your application's Laravel version. If you use it inside a Laravel project, confirm that your PHP version meets both Laravel's and the package's requirements.
- How do I define an ACF field group in PHP with this package?
- You build a field group through the package's fluent API, declaring the group and then adding fields with their types and settings. The exact class names and method calls are shown in the package README; the general pattern is to create a definition in PHP and register it so ACF picks it up. Keep each field group in its own class or file to make large ACF setups easier to maintain.
- Can I keep ACF field groups in version control with pxlrbt/acf-configurator?
- Yes. The main benefit of defining ACF field groups in PHP is that the configuration lives in your repository alongside the rest of your code. That makes changes reviewable in pull requests and avoids losing field setup when a database is rebuilt or moved between environments. You can also reuse field definitions across projects or environments.
- How do I configure field types, locations, and subfields?
- Use the fluent API to specify each field's type and options, such as text, image, repeater, or flexible content. Field group locations determine where ACF displays the group, and subfields are typically declared within their parent field's configuration. Refer to the package README for the supported field methods and for examples of nested field structures.
- How should I test ACF field definitions built with pxlrbt/acf-configurator?
- Test the PHP definitions the same way you test other configuration code: assert that the expected field groups and fields are registered with the correct keys and settings. If your test suite boots the WordPress/ACF environment, you can verify that ACF receives the definitions; otherwise unit-test the definition classes in isolation. Keep tests focused on the structure and important settings rather than on ACF's internal rendering.
- Is pxlrbt/acf-configurator safe to use in production?
- It can be used in production when the package version is pinned and your field definitions are tested in a staging environment first. Because it changes how ACF field groups are registered, verify that existing content still maps to the same field keys after deployment. Avoid changing field keys or types without a migration plan, since ACF stores values against those keys.
- What are alternatives to pxlrbt/acf-configurator?
- Alternatives include defining ACF field groups with ACF's local JSON sync, using the ACF admin UI with exported JSON, or writing your own registration code against ACF's acf_add_local_field_group function. Some teams also use general WordPress configuration-as-code tools rather than an ACF-specific wrapper. The best choice depends on whether you want a fluent PHP API, JSON files, or direct ACF function calls.
- Is pxlrbt/acf-configurator actively maintained?
- Check the GitHub repository for the latest release date, commit activity, and open issues before adopting it. The package is small and focused, so maintenance may consist of compatibility updates rather than frequent feature releases. If long-term support is critical, review the license and consider whether you can fork or maintain the wrapper internally.