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

[DX] Optimize Pimcore-managed code files for merges with fewest conflicts possible #3483

Closed
1 task done
dkarlovi opened this issue Oct 16, 2018 · 5 comments
Closed
1 task done

Comments

@dkarlovi
Copy link
Contributor

Feature Request

  • There is no existing issue regarding the same topic

Feature description

Code files managed by Pimcore which are expected to be checked in by VCS like Git should be optimized for easier merges (which might come from different branches doing different things with them).

The idea is to minimize the possibility of different actions changing the code at the same place in the same file, making merging much more difficult. It also makes diffs minimal since the changes are predictable.

Making these quite small changes makes for quite a difference in the long term.

For example:

  1. always add trailing commas where possible:
return [
    "bundle" => [
        "OutputDataConfigToolkitBundle\\OutputDataConfigToolkitBundle" => TRUE,
    ]
];
  1. where the order is unimportant, sort by name, key, etc:
return [
    "bundle" => [
        // even though this bundle is installed last, it comes first in the list
        "ImportDefinitionsBundle\\ImportDefinitionsBundle" => TRUE,
        "OutputDataConfigToolkitBundle\\OutputDataConfigToolkitBundle" => TRUE,
    ]
];
  1. in fluent invocations, hang the semicolon (this might not be applicable currently):
$listing
    ->setLimit(10)
    ->setOffset(20)
; // if this is on the last line, it is never touched as new calles in the fluent chain are added / removed / updated
@paulovitorbal
Copy link
Contributor

It will be really nice.
Also not recording the date timestamps on the definition files or other values that change just by saving the class (on GUI).

@dpfaffenbauer
Copy link
Contributor

Symfony actually did something similar. Re compiling the container without changing anything gives the same sha1. Pimcore should do the same.

@brusch
Copy link
Member

brusch commented Jan 29, 2019

PRs are welcome 😊

@stale
Copy link

stale bot commented Mar 15, 2022

Thanks a lot for reporting the issue. The issue was not considered by us as "Priority" or "Backlog", so we're not gonna work on that anytime soon. In case this is a bug report, please create a pull request fixing the issue, we'll then review it as soon as possible. If you're interested in contributing a feature, please contact us first here before creating a pull request, we'll then decide whether we'd accept it or not. Thanks for your understanding.

@stale stale bot added the PR Welcome label Mar 15, 2022
@fashxp
Copy link
Member

fashxp commented Dec 19, 2023

Dear community, it's been a while since that issue was updated the last time, so we decided to close it for now. If you're still interested in contributing, feel free to add comments here or contact us before creating a pull request to discuss next steps.

Thanks for your understanding.

@fashxp fashxp closed this as not planned Won't fix, can't repro, duplicate, stale Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants