Skip to content

Fix crash on no translation in entity_load producer #1016

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

Open
wants to merge 1 commit into
base: 8.x-4.x
Choose a base branch
from

Conversation

OleksiiTsulun
Copy link

Fixes bug when entity_load data producer tries to get entity's translation without checking if translation exists.

@codecov
Copy link

codecov bot commented May 28, 2020

Codecov Report

Merging #1016 into 8.x-4.x will decrease coverage by 0.31%.
The diff coverage is 75.00%.

Impacted file tree graph

@@              Coverage Diff              @@
##             8.x-4.x    #1016      +/-   ##
=============================================
- Coverage      54.74%   54.43%   -0.32%     
- Complexity       626      627       +1     
=============================================
  Files            113      113              
  Lines           1569     1580      +11     
=============================================
+ Hits             859      860       +1     
- Misses           710      720      +10     
Impacted Files Coverage Δ Complexity Δ
.../Plugin/GraphQL/DataProducer/Entity/EntityLoad.php 90.90% <75.00%> (-4.10%) 14.00 <0.00> (+1.00) ⬇️
src/Plugin/GraphQL/Schema/SdlSchemaPluginBase.php 41.50% <0.00%> (-4.33%) 19.00% <0.00%> (ø%)
...n/GraphQL/DataProducer/EntityDefinition/Fields.php 0.00% <0.00%> (ø) 12.00% <0.00%> (ø%)
...L/SchemaExtension/SdlSchemaExtensionPluginBase.php 0.00% <0.00%> (ø) 5.00% <0.00%> (ø%)

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 7d5ad05...2418c4e. Read the comment docs.

@klausi klausi added the 4.x label Jun 24, 2020
Copy link
Contributor

@klausi klausi left a comment

Choose a reason for hiding this comment

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

Makes sense!

Can you add some test coverage? In EntityTest.php we already have a bit of coverage for languages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants