Closed (duplicate)
Project:
Drupal core
Version:
8.0.x-dev
Component:
forms system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
10 Nov 2014 at 19:04 UTC
Updated:
10 Mar 2015 at 11:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
martin107 commentedI am working on this now...
Comment #2
martin107 commentedFirstly- This is a first iteration. One unit test is failing and I am open to other ways forward.
There are 2 highly specialize calls to request_uri(TRUE), both called before the container and the request stack are available.
I have chosen to simplify the logic in request_uri for those function calls and place them in a new function request_uri_without_query_string().
I think that is an acceptable compromise, but hey that needs review.
Second - The following objects expect extra parameter in their constructors.
core/modules/locale/src/LocaleLookup.php - now requires a $request_uri string
core/modules/locale/src/LocaleTranslation.php - now requires a RequestStack object
This at first may look funny... I have followed the Law of Demeter, LocaleLookup only uses a string $request_uri and so I did not want to pass in a RequestStack object just so it could "reach through the parameter" to get what is actually wanted.
Thirdly
this from LocaleLookup.php
So this class was providing it own version of a wrapper used only once .. in short it can now be rationalized away..
Lastly @dawehner, can I confirm what I think you are thinking....
So the line is at this stage of the release cycle is :-
I will try and finish this off tonight...
Comment #4
martin107 commentedI have backouted out 85% of my changes.
LocaleLocaleLookupTest is failing a circular dependency test.
I have this quote from the constructor of \Drupal\early_translation_test\Auth
So using similar arguments a Request cannot be injected into LocaleLookup because
of the whole bootstrap thing... Ah so you live and learn :)
Also, request_uri_without_query_string() has been reverted back to request_uri()
I was being too clever and it doesn't work in the general case.
Other test are still failing ... but I will look more soon.
( The interdiff is not helpful in this instance and anyway the patch is small. )
Comment #6
martin107 commentedTrivial fixup of DblogTest
Comment #8
martin107 commentedA) Corrected mistake in annotation.
B) Removed function making a single called to another function. ( And the function overriding it for testing. )
Looking at failing test, which is due to this new call to getRequestUri()
in FormBuilder::prepareForm()
$form['#action'] is set to "/batch?id=6&op=do_nojs&op=do"
I will have more time to look at this on Sunday
Comment #10
sonu.raj.chauhan commentedComment #11
sonu.raj.chauhan commentedComment #13
dawehnerI guess we need to linebreak this :)
Comment #14
sonu.raj.chauhan commentedComment #15
sonu.raj.chauhan commentedComment #18
diego21 commentedWorking on this issue now.
Comment #21
diego21 commentedComment #22
keopxre-roll
Comment #24
segi commentedComment #25
segi commentedComment #28
keopxRerrol patch based on #8 because y newed versions didnt appeared some changes.
Comment #32
diego21 commentedComment #33
diego21 commentedIt works for me.
Comment #34
diego21 commentedSorry for changing the status, it was a mistake.
Comment #36
penyaskito@keopx Thanks for working on this!
Some remarks.
Does NB mean nota bene? Should be clarified. It is not common to use abbreviations in code comments.
Whereever typo, should be wherever.
These comment lines exceed 80 chars. We need to re-wrap them.
Comment #38
nlisgo commentedI've addressed remarks in #36.
I've removed the NB comment and wondered if it should be instead tagged as deprecated?
Comment #40
dawehnerTotally forgot about this issue but #2426489: Remove request_uri() does the same and is RTBC :(
Comment #41
nlisgo commented@dawehner This issue should be closed now right and marked as duplicate?
Comment #42
nlisgo commentedIssue #2426489: Remove request_uri() was created after this issue but had progressed to RTBC before this issue was noticed.