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

Stop passing parameters by reference in mapping drivers #2609

Merged
merged 1 commit into from
Sep 9, 2023

Conversation

phansys
Copy link
Collaborator

@phansys phansys commented Mar 22, 2023

Related to #2605, as this is the first step to gain governance around the manipulation performed on the received mapping configuration.

@phansys phansys force-pushed the mapping_references branch 2 times, most recently from 5033463 to a4733e3 Compare March 22, 2023 22:24
@phansys phansys marked this pull request as ready for review March 22, 2023 22:28
@phansys phansys requested review from franmomu and AkenRoberts March 22, 2023 22:28
Copy link
Collaborator

@franmomu franmomu left a comment

Choose a reason for hiding this comment

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

Sorry for taking so long to review, should we check that the value received from Driver::readExtendedMetadata() call is actually an array? in case we are calling to someone else's implementation.

src/Mapping/Driver.php Outdated Show resolved Hide resolved
*/
#[\ReturnTypeWillChange]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same concern here about the use of the ReturnTypeWillChange attribute.

@phansys phansys force-pushed the mapping_references branch 2 times, most recently from e9e7100 to 3077db3 Compare May 19, 2023 00:07
@phansys phansys requested a review from franmomu May 19, 2023 00:14
@phansys phansys force-pushed the mapping_references branch from 3077db3 to eac0d7d Compare August 20, 2023 19:12
@codecov
Copy link

codecov bot commented Aug 20, 2023

Codecov Report

Patch coverage: 81.05% and project coverage change: +0.03% 🎉

Comparison is base (0848a48) 79.60% compared to head (3772a39) 79.64%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2609      +/-   ##
==========================================
+ Coverage   79.60%   79.64%   +0.03%     
==========================================
  Files         161      161              
  Lines        8415     8468      +53     
==========================================
+ Hits         6699     6744      +45     
- Misses       1716     1724       +8     
Files Changed Coverage Δ
src/Blameable/Mapping/Driver/Xml.php 0.00% <0.00%> (ø)
src/Blameable/Mapping/Driver/Yaml.php 0.00% <0.00%> (ø)
src/IpTraceable/Mapping/Driver/Xml.php 0.00% <0.00%> (ø)
src/IpTraceable/Mapping/Driver/Yaml.php 0.00% <0.00%> (ø)
src/ReferenceIntegrity/Mapping/Driver/Yaml.php 0.00% <0.00%> (ø)
src/References/Mapping/Driver/Yaml.php 0.00% <0.00%> (ø)
src/Mapping/Driver/Chain.php 40.90% <50.00%> (+2.02%) ⬆️
src/Loggable/Mapping/Driver/Xml.php 83.33% <66.66%> (+0.83%) ⬆️
src/Sluggable/Mapping/Driver/Xml.php 84.61% <80.00%> (+0.48%) ⬆️
src/Sluggable/Mapping/Driver/Yaml.php 80.00% <80.00%> (+0.68%) ⬆️
... and 28 more

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@phansys
Copy link
Collaborator Author

phansys commented Aug 20, 2023

Sorry for taking so long to review, should we check that the value received from Driver::readExtendedMetadata() call is actually an array? in case we are calling to someone else's implementation.

Nice catch! 😶‍🌫️
I've pushed again, adding the required conditions for this case.

Thank you!

@phansys phansys force-pushed the mapping_references branch from eac0d7d to f3f4ff5 Compare August 20, 2023 19:16
@phansys phansys force-pushed the mapping_references branch 2 times, most recently from 7b3a0a1 to f4a6945 Compare September 5, 2023 07:06
@phansys phansys merged commit 23316d6 into doctrine-extensions:main Sep 9, 2023
21 checks passed
@phansys phansys deleted the mapping_references branch September 9, 2023 01:25
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