Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

Added some more information for autoloading in the readme #1780

Merged
merged 1 commit into from
Aug 27, 2019
Merged

Added some more information for autoloading in the readme #1780

merged 1 commit into from
Aug 27, 2019

Conversation

pimjansen
Copy link
Contributor

Added some more info about autoloading since there are some questions as issues on this. Since 99% of the people will install the package via composer anyways i think its more easy

readme.md Outdated Show resolved Hide resolved
Use `Faker\Factory::create()` to create and initialize a faker generator, which can generate data by accessing properties named after the type of data you want.
### Autoloading

Faker supports both `PSR-0` as `PSR-4` autoloaders.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if users care about the kind of autoloader we use internally.

Perhaps we should point out two options:

  • when installed via composer, require vendor/autoload.php
  • otherwise, require /path/to/Faker/src/autoload.php

What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do agree but this is a bit "as is" and i think we should not just wipe it. The focus now is on composer autoload and otherwise the custom one which is psr0.

But i would not be suprised if there are enough people around that just load it manually instead and that do not use composer yet.

@localheinz localheinz merged commit 3aba041 into fzaninotto:master Aug 27, 2019
@localheinz
Copy link
Contributor

Thank you, @pimjansen!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants