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

Use ServiceEntityRepository #3395

Merged
merged 17 commits into from Jun 29, 2021

Conversation

carakas
Copy link
Member

@carakas carakas commented May 11, 2021

Type

  • Enhancement

Fixes

closes #3298

Pull request description

Switch all repositories over to the ServiceEntityRepository for easy autowiring

@carakas carakas added this to the Restructure Core milestone May 11, 2021
@carakas carakas requested a review from a team as a code owner May 11, 2021 10:49
@carakas carakas added this to In progress in Restructure Core via automation May 11, 2021
@carakas carakas changed the title Refactor repositories Use ServiceEntityRepository May 11, 2021
@carakas carakas linked an issue May 11, 2021 that may be closed by this pull request
Because I'm tired of reinstalling when switching between Fork CMS 5 and 6
@codecov
Copy link

codecov bot commented May 11, 2021

Codecov Report

Merging #3395 (2e470cd) into restructure-core (f562a81) will increase coverage by 0.06%.
The diff coverage is 48.09%.

Impacted file tree graph

@@                  Coverage Diff                   @@
##             restructure-core    #3395      +/-   ##
======================================================
+ Coverage               32.97%   33.04%   +0.06%     
- Complexity               8814     8833      +19     
======================================================
  Files                     666      666              
  Lines                   32478    32514      +36     
======================================================
+ Hits                    10711    10744      +33     
- Misses                  21767    21770       +3     
Flag Coverage Δ
functional 26.50% <16.26%> (+0.03%) ⬆️
installer 4.77% <2.85%> (+0.01%) ⬆️
unit 12.31% <37.61%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/Backend/Core/Ajax/GenerateUrl.php 0.00% <0.00%> (ø)
...c/Backend/Modules/ContentBlocks/Actions/Delete.php 0.00% <0.00%> (ø)
src/Backend/Modules/ContentBlocks/Actions/Edit.php 0.00% <0.00%> (ø)
...ules/MediaGalleries/Actions/MediaGalleryDelete.php 0.00% <0.00%> (ø)
...odules/MediaGalleries/Actions/MediaGalleryEdit.php 0.00% <0.00%> (ø)
...Galleries/Console/MediaGalleryDeleteAllCommand.php 0.00% <0.00%> (ø)
...ies/Domain/MediaGallery/MediaGalleryRepository.php 0.00% <0.00%> (ø)
...kend/Modules/MediaLibrary/Actions/MediaBrowser.php 0.00% <0.00%> (ø)
...Modules/MediaLibrary/Actions/MediaFolderDelete.php 0.00% <0.00%> (ø)
...d/Modules/MediaLibrary/Actions/MediaItemDelete.php 0.00% <0.00%> (ø)
... and 46 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f562a81...2e470cd. Read the comment docs.

@@ -314,8 +314,8 @@ services:
public: true
arguments:
- "@fork.settings"
- "@ForkCMS\\Google\\TagManager\\DataLayer"
- "@ForkCMS\\Privacy\\ConsentDialog"
- '@ForkCMS\Google\TagManager\DataLayer'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

' or " ? Should we decide on one format? (the line above is inconsistent - "@fork.settings")

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing that in the symfony 5 branch

@@ -10,14 +10,14 @@ services:
- "80:80"
- "443:443"
depends_on:
- db
- db6
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WIP? 👀

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

c7be020 nope, did this on purpose.
We can change it when merging in master but this makes switching between branches during development way easier

- Common\Doctrine\Entity\Meta
Common\Doctrine\Entity\CreateSchema:

Common\Doctrine\Repository\MetaRepository:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we define an alias so modules can still use 'fork.repository.meta'? Or just break forward with Fork v6?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would do a break here.
It is way cleaner to use these type of service name.
Unless we make these private and where needed things like fork.repository.meta public.

@@ -1,2 +1,3 @@
data/
*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@carakas carakas merged commit 4e41a0f into forkcms:restructure-core Jun 29, 2021
Restructure Core automation moved this from In progress to Done Jun 29, 2021
@carakas carakas deleted the refactor-repositories branch June 29, 2021 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Use ServiceEntityRepository
2 participants