A plugin is laid out like core: src/<Bucket>/<Class>.php - #163
Merged
Conversation
Mirrors FOGProject/fogproject#1540 and FOGProject/fog-plugins#34. A plugin's PHP moved out of class/ pages/ hooks/ events/ reports/ tasks/ and into src/<Bucket>/<Class>.php, declaring FOG\Plugins\<Segment>\<Bucket>\<Class> -- the same PSR-4 arrangement core already used on itself. The plugin DIRECTORY does not move: it is still the routing node, the permission string and the js/ path. plugin-development.md is re-ported from the fogproject copy, so it carries the rewritten §2, §3, §4.2-4.5, §7a, §9a, §10 and §11, loses the "Discovery still works by filename" subsection that taught the rule this reverses, and gains §11b -- the port table for a plugin still on the pre-1.6 layout. plugin-schema-migrations.md's Key files table still named lib/fog/*.class.php paths that moved when core itself went PSR-4; the reference implementation is now lib/plugins/location/src/Managers/LocationManager.php. reports.md is the user-facing half and was teaching a path that no longer exists. A report is packages/web/src/Reports/<Class>.php, or <plugin>/src/Reports/<Class>.php inside a plugin, and the underscores in Fleet_Report are load bearing -- the menu label, the base64 `f` parameter and the permission node are all derived from that name. Two adjacent references corrected while here: the storage-node hook guide pointed at lib/fog/storagegroup.class.php and told authors to write a *.hook.php in lib/hooks/, and the CSV guide named the Location plugin's hook by its old filename. Translations are left alone. scripts/translate.mjs regenerates a page when its source hash moves, so the French copies refresh themselves once a provider is configured. Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mirrors FOGProject/fogproject#1540 and FOGProject/fog-plugins#34.
A plugin's PHP moved out of
class/ pages/ hooks/ events/ reports/ tasks/and into:— the same PSR-4 arrangement core already used on itself. The plugin directory does not move: it is still the routing node, the permission string and the
js/path, so nothing user-visible changes and there is no migration for an admin to run.What changed here
docs/development/plugin-development.mddocs/development/plugin-schema-migrations.mdlib/fog/*.class.phppaths that moved when core itself went PSR-4.docs/1.6/management/web/reports.mdpackages/web/src/Reports/<Class>.php, or<plugin>/src/Reports/<Class>.phpinside a plugin. Also spells out why the underscores inFleet_Reportare load-bearing — the menu label, the base64fURL parameter and the permission node are all derived from that name.docs/development/storage-node-selection-hooks.mdlib/fog/storagegroup.class.phpand told authors to write a*.hook.phpinlib/hooks/.docs/1.6/kb/reference/csv_import_export.mdTranslations
Left alone deliberately.
scripts/translate.mjsretranslates a page when its source hash moves, so the French copies refresh themselves on the next run once a provider is configured — hand-editing them now would only be overwritten.Not changed, and worth a separate look
reports.md's Importing a report section documents a form that has no server-side handler:ReportManagement::upload()renders the Import Reports form, and there is nouploadPost()anywhere inpackages/web— nor has there ever been onworking-1.6(git log -S uploadPostis empty). That is a pre-existing defect, independent of this move, so the section is untouched here rather than quietly deleted.