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

Tiki integration: refactoring environment & autoload import in framework.php to support tiki usage #853

Merged
merged 1 commit into from
Jan 10, 2024

Conversation

Shadow243
Copy link
Member

Description

This pull request includes small adjustments to the Cypht integration to facilitate seamless integration with Tiki. The changes primarily involve accommodating differences in the environment, such as the path for requiring the autoload.php file.

Specifically, the adjustments ensure compatibility with Tiki's structure, where the path to the autoload file needs to be adapted to Tiki's requirements.

Changes

  • Modified paths, including the require_once VENDOR_PATH . 'autoload.php' statement, to align with Tiki's integration needs.

GitLab Merge Request: Link to GitLab Merge Request

@kroky
Copy link
Member

kroky commented Jan 3, 2024

Tiki-specific integration code should go inside Tiki, not Cypht. Cypth works perfectly well without Tiki, so we shouldn't include such code here. If you want to make that extensible - either modifty the Tiki-Cypht installation code found in https://gitlab.com/tikiwiki/tiki/-/blob/master/lib/core/Tiki/Composer/PatchCypht.php (see how we modify existing Cypht code for the purpose of integration) or modify the code here to be extensible - e.g. Tiki can override the require path of the autoload or even disable autoloading as Tiki has already autoloaded everything necessary.

@Shadow243 Shadow243 force-pushed the tiki-cypht-integration branch 2 times, most recently from dd53efc to 5654f14 Compare January 4, 2024 20:08
@Shadow243
Copy link
Member Author

Tiki-specific integration code should go inside Tiki, not Cypht. Cypth works perfectly well without Tiki, so we shouldn't include such code here. If you want to make that extensible - either modifty the Tiki-Cypht installation code found in https://gitlab.com/tikiwiki/tiki/-/blob/master/lib/core/Tiki/Composer/PatchCypht.php (see how we modify existing Cypht code for the purpose of integration) or modify the code here to be extensible - e.g. Tiki can override the require path of the autoload or even disable autoloading as Tiki has already autoloaded everything necessary.

Copy that @kroky . tiki support has been removed. we still have an if check in this PR. I updated https://gitlab.com/tikiwiki/tiki/-/blob/master/lib/core/Tiki/Composer/PatchCypht.php to support Tiki cypht integration

@Shadow243
Copy link
Member Author

To avoid a schema error when running the composer -d vendor_bundled update command into TIKI, I intentionally refrained from importing autoload.php into framework.php. The PatchCypht calls lib/framework.php, which imports autoload.php at its beginning. By adjusting the order of the code managing the environment in Cypht, we circumvent this error that was blocking the generation of the site folder due to a missing file: autoload.php.

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.

None yet

2 participants