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

Adding withCookieCollection() to the Response object #12551

Closed
wants to merge 5 commits into from

Conversation

burzum
Copy link
Contributor

@burzum burzum commented Sep 11, 2018

No description provided.

src/Http/Response.php Show resolved Hide resolved
src/Http/Response.php Show resolved Hide resolved
@markstory markstory added this to the 4.0.0 milestone Sep 11, 2018
@codecov
Copy link

codecov bot commented Feb 26, 2019

Codecov Report

Merging #12551 into 4.x will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##                4.x   #12551      +/-   ##
============================================
+ Coverage     93.18%   93.18%   +<.01%     
- Complexity    13132    13133       +1     
============================================
  Files           472      472              
  Lines         32620    32624       +4     
============================================
+ Hits          30397    30401       +4     
  Misses         2223     2223
Impacted Files Coverage Δ Complexity Δ
src/Http/Response.php 98.79% <100%> (+0.01%) 132 <2> (+1) ⬆️
src/Http/Cookie/CookieCollection.php 100% <100%> (ø) 57 <4> (ø) ⬇️

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 6d69680...147b77c. Read the comment docs.

@codecov
Copy link

codecov bot commented Feb 26, 2019

Codecov Report

Merging #12551 into 4.x will increase coverage by 0.8%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff             @@
##                4.x   #12551     +/-   ##
===========================================
+ Coverage     93.18%   93.98%   +0.8%     
- Complexity    13132    13566    +434     
===========================================
  Files           472      459     -13     
  Lines         32620    32902    +282     
===========================================
+ Hits          30397    30924    +527     
+ Misses         2223     1978    -245
Impacted Files Coverage Δ Complexity Δ
src/Http/Response.php 98.18% <100%> (-0.61%) 129 <2> (-2)
src/Http/Cookie/CookieCollection.php 100% <100%> (ø) 57 <3> (ø) ⬇️
src/TestSuite/Constraint/Response/CookieSet.php 60% <0%> (-40%) 2% <0%> (-1%)
src/Console/ConsoleInput.php 21.42% <0%> (-34.83%) 6% <0%> (ø)
src/ORM/TableRegistry.php 57.14% <0%> (-30.36%) 18% <0%> (+10%)
src/TestSuite/Constraint/Response/HeaderSet.php 77.77% <0%> (-22.23%) 4% <0%> (ø)
src/Http/Server.php 85.71% <0%> (-8.23%) 21% <0%> (+5%)
src/Http/Client/Adapter/Curl.php 89.06% <0%> (-8.16%) 18% <0%> (-3%)
src/Http/ActionDispatcher.php 91.89% <0%> (-8.11%) 19% <0%> (+4%)
src/Console/Command.php 89.65% <0%> (-6.5%) 18% <0%> (+1%)
... and 238 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 6d69680...a0c520f. Read the comment docs.

Copy link
Member

@ADmad ADmad left a comment

Choose a reason for hiding this comment

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

I have rebased and pushed updates.

@cleptric
Copy link
Member

cleptric commented Feb 26, 2019

That's actually something I need. 😄
@burzum are you finishing it or shall I?

@ADmad
Copy link
Member

ADmad commented Feb 27, 2019

@cleptric I believe if have already done required changes.

But I am concerned about the CookieCollectionInterface that is added and using the interface for return typehint. CookieCollection has extra methods addToRequest() and addToResponse() which do not exist on the interface.

So usage like $response->getCookieCollection()->addFromResponse($response, $request) will cause static analysers / IDEs to generate error like:

Call to an undefined method Cake\Http\Cookie\CookieCollectionInterface::addFromResponse()

ADmad added a commit that referenced this pull request Apr 26, 2019
@ADmad
Copy link
Member

ADmad commented Apr 30, 2019

Response::withCookieCollection() added to 3.8.

@ADmad ADmad closed this Apr 30, 2019
@ADmad ADmad deleted the 4.x-cookie-response branch April 30, 2019 14:27
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.

None yet

4 participants