8000 reduce dynamic.php by gevorgmansuryan · Pull Request #7328 · humhub/humhub · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 29 commits into from
Dec 11, 2024
Merged

reduce dynamic.php #7328

merged 29 commits into from
Dec 11, 2024

Conversation

gevorgmansuryan
Copy link
Contributor

@gevorgmansuryan gevorgmansuryan requested a review from luke- December 4, 2024 21:15
@gevorgmansuryan gevorgmansuryan self-assigned this Dec 4, 2024
@luke-
Copy link
Contributor
luke- commented Dec 5, 2024

Can you please update the develop branch, to get rid of the many PHPFixer changes?

Copy link
Contributor
@luke- luke- left a 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 (and user) 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']);
Copy link
Contributor

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.

Copy link
Contributor Author

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
Copy link
Contributor Author

@luke-

What happens if a 'Mailer' or 'Cache', for example, is still specified in the configuration file? Would this still be possible?
This was done in second OR

I think that now the mailer (and user) 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?
Right, should be fixed now

@luke-
Copy link
Contributor
luke- commented Dec 9, 2024

@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?
https://github.com/humhub/humhub/blob/develop/protected/humhub/components/ApplicationTrait.php#L46

@gevorgmansuryan
Copy link
Contributor Author

@luke- we can just remove duplications and just use app->set as all components are not instanciated at this step.

@luke-
Copy link
Contributor
luke- commented Dec 11, 2024

@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.

…o enh/reduce-dynamic-php

# Conflicts:
#	protected/humhub/components/bootstrap/SettingsLoader.php
Copy link
Contributor
@luke- luke- left a 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:

@luke- luke- changed the base branch from develop to next December 11, 2024 17:52
@luke- luke- merged commit 1633770 into next Dec 11, 2024
6 checks passed
@luke- luke- deleted the enh/reduce-dynamic-php branch December 21, 2024 14:47
luke- added a commit that referenced this pull request May 9, 2025
* 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>
luke- added a commit that referenced this pull request May 14, 2025
* 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>
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.

2 participants
0