Skip to content

Document the project provider discovery - #43

Merged
GautierDele merged 1 commit into
mainfrom
feature/project-provider-discovery
Jul 31, 2026
Merged

Document the project provider discovery#43
GautierDele merged 1 commit into
mainfrom
feature/project-provider-discovery

Conversation

@GautierDele

Copy link
Copy Markdown
Member

Documents the provider discovery added in xefi/faker-php#84.

Faker now also reads the extra.faker section of the project's own composer.json, not only the installed packages ones. This gives applications a way to register their own extensions without publishing a package, and without calling resolveExtensions() before every generation.

Changes

  • Package Development — new Project discovery section next to the existing Package discovery one, covering the extra.faker declaration in the project composer.json and the cache invalidation on composer.json change.
  • Custom Extension — points to that section as the alternative to repeating faker()->resolveExtensions([...]), which was until now the only documented way to load an application-local extension.

Should be merged together with xefi/faker-php#84.

Faker now also reads the extra.faker section of the project's own
composer.json, so extensions living in the application can be registered
through a service provider instead of calling resolveExtensions() before
every generation.
@GautierDele
GautierDele merged commit 0611676 into main Jul 31, 2026
@GautierDele
GautierDele deleted the feature/project-provider-discovery branch July 31, 2026 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant