-
Notifications
You must be signed in to change notification settings - Fork 1.7k
reduce dynamic.php #7328
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
reduce dynamic.php #7328
Conversation
…nto enh/reduce-dynamic-php
Can you please update the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gevorgmansuryan Thanks for the PR.
I like the approach with the 'SettingsLoader'.
-
What happens if a 'Mailer' or 'Cache', for example, is still specified in the configuration file? Would this still be possible?
-
I think that now the
mailer
(anduser
) component seems to be always instantiated. Previously, this was only the case when a mail was sent. Do you see a change to avoid this?
|
||
// Remove old theme/view stuff | ||
unset($config['components']['view']); | ||
unset($config['components']['mailer']['view']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should unset
all old dynamic.php
vars, otherwise it would not be removed on the next save.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was done in second PR
|
@gevorgmansuryan Thanks for the adjustments. Somehow, I'm not so happy with the code, it looks duplicated and complex, since it handles the instanciated and config state. Any idea how to improve this? Maybe we could here adjust the config with default values, if not provided? |
@luke- we can just remove duplications and just use app->set as all components are not instanciated at this step. |
@gevorgmansuryan That would be perfect. Perhaps we can log a warning if a component has already been initialized. |
…namic-php # Conflicts: # CHANGELOG.md # protected/humhub/config/common.php
…o enh/reduce-dynamic-php
…o enh/reduce-dynamic-php # Conflicts: # protected/humhub/components/bootstrap/SettingsLoader.php
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gevorgmansuryan Thanks, looks good. one small thing:
…o enh/reduce-dynamic-php
…namic-php # Conflicts: # CHANGELOG.md
* Update common.php * Fix Session Timeout (#6818) * Updated Composer.lock * Fix composer lock * Prototype: Check module requirements before install/update (#6816) * Prototype: Check module requirements before install/update * Prevent serialization of requirements check * Fixed ModuleId * Use requirements.php file instead of config.php * Fix module deletion on update * Add errors to the log * Test module with `requirements.php` --------- Co-authored-by: Marc Farré <contact@marc.fun> Co-authored-by: Yuriy Bakhtin <yurybakh@gmail.com> * Update php-test.yml * Autocommit PHP CS Fixer * reduce dynamic.php (#7328) * Reduce dynamic.php content - remove `mailer` from dynamic.php * Autocommit PHP CS Fixer * Reduce dynamic.php content - remove `mailer` from dynamic.php * Reduce dynamic.php content - remove `mailer` from dynamic.php * Reduce dynamic.php content - remove `cache` from dynamic.php * Reduce dynamic.php content * Reduce dynamic.php content * Reduce dynamic.php content * Autocommit PHP CS Fixer * Reduce dynamic.php content * Reduce dynamic.php content * Reduce dynamic.php content * Reduce dynamic.php content * Reduce dynamic.php content * Reduce dynamic.php content * Reduce dynamic.php content * Autocommit PHP CS Fixer * Reduce dynamic.php content * Reduce dynamic.php content * Autocommit PHP CS Fixer * Reduce dynamic.php content * Update CHANGELOG.md --------- Co-authored-by: gevorgmansuryan <gevorgmansuryan@users.noreply.github.com> Co-authored-by: Lucas Bartholemy <luke-@users.noreply.github.com> * Reduce dynamic.php content params (#7332) * Reduce dynamic.php content - remove `mailer` from dynamic.php * Autocommit PHP CS Fixer * Reduce dynamic.php content - remove `mailer` from dynamic.php * Reduce dynamic.php content - remove `mailer` from dynamic.php * Reduce dynamic.php content - remove `cache` from dynamic.php * Reduce dynamic.php content * Reduce dynamic.php content params * Reduce dynamic.php content params * Reduce dynamic.php content params * Reduce dynamic.php content params * Reduce dynamic.php content * Reduce dynamic.php content * Autocommit PHP CS Fixer * Reduce dynamic.php content * Autocommit PHP CS Fixer * Reduce dynamic.php content * Reduce dynamic.php content * Reduce dynamic.php content * Reduce dynamic.php content * Reduce dynamic.php content * Reduce dynamic.php content * Reduce dynamic.php content * Autocommit PHP CS Fixer * Reduce dynamic.php content * Reduce dynamic.php content * Autocommit PHP CS Fixer * Reduce dynamic.php content * Reduce dynamic.php content * Reduce dynamic.php content --------- Co-authored-by: gevorgmansuryan <gevorgmansuryan@users.noreply.github.com> * settings cleanup (#7338) * Remove horImageScrollOnMobile option #471 * Remove horImageScrollOnMobile option #471< 9E81 /a> * Remove horImageScrollOnMobile option #471 * Refactor application state mechanism (#7361) * Check Codeceptions Tests #473 * Check Codeceptions Tests #473 * Check Codeceptions Tests #473 * Check Codeceptions Tests #473 * Check Codeceptions Tests #473 * Check Codeceptions Tests #473 * Refactor applicationState mechanism * Refactor applicationState mechanism * Refactor applicationState mechanism * Refactor applicationState mechanism * Autocommit PHP CS Fixer * Refactor applicationState mechanism * Refactor applicationState mechanism * Refactor applicationState mechanism * Refactor applicationState mechanism * Refactor applicationState mechanism * Refactor applicationState mechanism * Refactor applicationState mechanism * Refactor applicationState mechanism * Refactor applicationState mechanism * Refactor applicationState mechanism * Refactor applicationState mechanism * Refactor applicationState mechanism * Refactor applicationState mechanism * Refactor applicationState mechanism * Refactor applicationState mechanism - fixes * Refactor applicationState mechanism - fixes * Refactor applicationState mechanism - fixes * Revert "Refactor applicationState mechanism" This reverts commit 9ffd324. * Refactor applicationState mechanism - fixes * Revert "Refactor applicationState mechanism" This reverts commit 0694c84. * Refactor applicationState mechanism - fixes * Refactor applicationState mechanism - fixes * Refactor applicationState mechanism - fixes/revert * Refactoring (#7372) * Fix Test * Refactor application state mechanism - fixes * Revert "Refactoring (#7372)" This reverts commit ce1b39c * Refactor application state mechanism - fixes * Refactor application state mechanism - fix tests * Refactor application state mechanism - fix tests * Refactor application state mechanism - fixes * Refactor application state mechanism - fixes * Refactor application state mechanism - fixes * Refactor application state mechanism - fixes * Refactor application state mechanism - fixes * Refactor application state mechanism - fixes * Make SetState private --------- Co-authored-by: gevorgmansuryan <gevorgmansuryan@users.noreply.github.com> Co-authored-by: Lucas Bartholemy <luke-@users.noreply.github.com> Co-authored-by: Lucas Bartholemy <lucas@bartholemy.com> --------- Co-authored-by: Marc Farré <contact@marc.fun> Co-authored-by: Yuriy Bakhtin <yurybakh@gmail.com> Co-authored-by: Gevorg Mansuryan <gevorgmansuryan@gmail.com> Co-authored-by: gevorgmansuryan <gevorgmansuryan@users.noreply.github.com>
* Update common.php * Fix Session Timeout (#6818) * Updated Composer.lock * Fix composer lock * Prototype: Check module requirements before install/update (#6816) * Prototype: Check module requirements before install/update * Prevent serialization of requirements check * Fixed ModuleId * Use requirements.php file instead of config.php * Fix module deletion on update * Add errors to the log * Test module with `requirements.php` --------- Co-authored-by: Marc Farré <contact@marc.fun> Co-authored-by: Yuriy Bakhtin <yurybakh@gmail.com> * Update php-test.yml * Autocommit PHP CS Fixer * reduce dynamic.php (#7328) * Reduce dynamic.php content - remove `mailer` from dynamic.php * Autocommit PHP CS Fixer * Reduce dynamic.php content - remove `mailer` from dynamic.php * Reduce dynamic.php content - remove `mailer` from dynamic.php * Reduce dynamic.php content - remove `cache` from dynamic.php * Reduce dynamic.php content * Reduce dynamic.php content * Reduce dynamic.php content * Autocommit PHP CS Fixer * Reduce dynamic.php content * Reduce dynamic.php content * Reduce dynamic.php content * Reduce dynamic.php content * Reduce dynamic.php content * Reduce dynamic.php content * Reduce dynamic.php content * Autocommit PHP CS Fixer * Reduce dynamic.php content * Reduce dynamic.php content * Autocommit PHP CS Fixer * Reduce dynamic.php content * Update CHANGELOG.md --------- Co-authored-by: gevorgmansuryan <gevorgmansuryan@users.noreply.github.com> Co-authored-by: Lucas Bartholemy <luke-@users.noreply.github.com> * Reduce dynamic.php content params (#7332) * Reduce dynamic.php content - remove `mailer` from dynamic.php * Autocommit PHP CS Fixer * Reduce dynamic.php content - remove `mailer` from dynamic.php * Reduce dynamic.php content - remove `mailer` from dynamic.php * Reduce dynamic.php content - remove `cache` from dynamic.php * Reduce dynamic.php content * Reduce dynamic.php content params * Reduce dynamic.php content params * Reduce dynamic.php content params * Reduce dynamic.php content params * Reduce dynamic.php content * Reduce dynamic.php content * Autocommit PHP CS Fixer * Reduce dynamic.php content * Autocommit PHP CS Fixer * Reduce dynamic.php content * Reduce dynamic.php content * Reduce dynamic.php content * Reduce dynamic.php content * Reduce dynamic.php content * Reduce dynamic.php content * Reduce dynamic.php content * Autocommit PHP CS Fixer * Reduce dynamic.php content * Reduce dynamic.php content * Autocommit PHP CS Fixer * Reduce dynamic.php content * Reduce dynamic.php content * Reduce dynamic.php content --------- Co-authored-by: gevorgmansuryan <gevorgmansuryan@users.noreply.github.com> * settings cleanup (#7338) * Remove horImageScrollOnMobile option #471 * Remove horImageScrollOnMobile option #471 * Remove horImageScrollOnMobile option #471 * Refactor application state mechanism (#7361) * Check Codeceptions Tests #473 * Check Codeceptions Tests #473 * Check Codeceptions Tests #473 * Check Codeceptions Tests #473 * Check Codeceptions Tests #473 * Check Codeceptions Tests #473 * Refactor applicationState mechanism * Refactor applicationState mechanism * Refactor applicationState mechanism * Refactor applicationState mechanism * Autocommit PHP CS Fixer * Refactor applicationState mechanism * Refactor applicationState mechanism * Refactor applicationState mechanism * Refactor applicationState mechanism * Refactor applicationState mechanism * Refactor applicationState mechanism * Refactor applicationState mechanism * Refactor applicationState mechanism * Refactor applicationState mechanism * Refactor applicationState mechanism * Refactor applicationState mechanism * Refactor applicationState mechanism * Refactor applicationState mechanism * Refactor applicationState mechanism * Refactor applicationState mechanism - fixes * Refactor applicationState mechanism - fixes * Refactor applicationState mechanism - fixes * Revert "Refactor applicationState mechanism" This reverts commit 9ffd324. * Refactor applicationState mechanism - fixes * Revert "Refactor applicationState mechanism" This reverts commit 0694c84. * Refactor applicationState mechanism - fixes * Refactor applicationState mechanism - fixes * Refactor applicationState mechanism - fixes/revert * Refactoring (#7372) * Fix Test * Refactor application state mechanism - fixes * Revert "Refactoring (#7372)" This reverts commit ce1b39c * Refactor application state mechanism - fixes * Refactor application state mechanism - fix tests * Refactor application state mechanism - fix tests * Refactor application state mechanism - fixes * Refactor application state mechanism - fixes * Refactor application state mechanism - fixes * Refactor application state mechanism - fixes * Refactor application state mechanism - fixes * Refactor application state mechanism - fixes * Make SetState private --------- Co-authored-by: gevorgmansuryan <gevorgmansuryan@users.noreply.github.com> Co-authored-by: Lucas Bartholemy <luke-@users.noreply.github.com> Co-authored-by: Lucas Bartholemy <lucas@bartholemy.com> --------- Co-authored-by: Marc Farré <contact@marc.fun> Co-authored-by: Yuriy Bakhtin <yurybakh@gmail.com> Co-authored-by: Gevorg Mansuryan <gevorgmansuryan@gmail.com> Co-authored-by: gevorgmansuryan <gevorgmansuryan@users.noreply.github.com>
#5458