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

feat(admin): Document server autoloading and class maps #12024

Merged
merged 1 commit into from
Aug 6, 2024

Conversation

ChristophWurst
Copy link
Member

☑️ Resolves

  • Engineers asking how to do this

🖼️ Screenshots

image

When you add, move or delete a class file you have to update the autoloaders for the class to be found. The process is slightly different for classes that belong to the server itself, and apps that are included in the server repository:

1. Use ``composer dump-autoload`` to update the server class map.
2. Use ``composer -d apps/dav/composer dump-autoload`` to update the class map of the dav app.
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add a sentence that this applies to all apps that are included?

Suggested change
2. Use ``composer -d apps/dav/composer dump-autoload`` to update the class map of the dav app.
2. Use ``composer -d apps/dav/composer dump-autoload`` to update the class map of the dav app, for example. All shipped apps have their own composer folder where you should run this command.

Copy link
Member

Choose a reason for hiding this comment

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

Or run bash build/autoloaderchecker.sh && git restore apps/**/installed.php to update all

Copy link
Member Author

Choose a reason for hiding this comment

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

Works too, but is very slow. And with the many lines printed I have the feeling most engineers don't know what they are doing. So I prefer the more direct approach.

@ChristophWurst ChristophWurst force-pushed the feat/admin/server-autoloading branch from c8ffef8 to ae9bc1e Compare August 6, 2024 06:54
@ChristophWurst ChristophWurst merged commit ca1a894 into master Aug 6, 2024
12 checks passed
@ChristophWurst ChristophWurst deleted the feat/admin/server-autoloading branch August 6, 2024 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants