Greater London
Account created on 27 May 2013, about 12 years ago
  • Contract Drupal developer at CTI Digital 
  • Contract Drupal developer at Fiora 
#

Merge Requests

More

Recent comments

🇬🇧United Kingdom oily Greater London

@berdir I am not sure why line 212 of Renderer.php has /* array */ instead of typehinting the $elements parameter 'array'?

public function render(/* array */&$elements, $is_root_call = FALSE) {

🇬🇧United Kingdom oily Greater London

#29 +1. I realised I had come across this before with Symfony textarea field. I wanted to allow the user to enter a list, actually Black Cab runs which students of the Knowledge study and memorise, for example,

Leave on Left Green Lanes
Right Highbury New Park
etc
etc
etc
Forward into Gibson Square

All the runs follow a similar pattern, but they vary a lot in length (how many lines in total).

You have a choice to either present one textbox per line or a textarea for all the lines. Thinking it through I realised that the newlines are easily handled by explode() on the TEXT (string) value. Then custom validation can be applied to the array. The flexibility of the textarea field type, including the length of the field value, is what seems to make it so useful.

I think there might be edge cases where a maxlength value is desirable. But IMO it is best to leave the core textarea field as it is. Developers can create a custom field or use custom validation. But such cases will be relatively infrequent.

🇬🇧United Kingdom oily Greater London

@godotislate I have looked at your new kernel test coverage. Can you please advise me if you think I should refactor my test coverage 'borrowing' from your code to take account of new lines? I am not sure my test coverage is currently fit for purpose?

🇬🇧United Kingdom oily Greater London

oily changed the visibility of the branch 11.x to hidden.

🇬🇧United Kingdom oily Greater London

#39 +1. Are we ready for RTBTC? We have test coverage in place, CR seems done.. Pipeline green?

🇬🇧United Kingdom oily Greater London

I have had a look at the CR and the MR and recent comments. I note there are 2x todos, 1 in User.php and 1 in Workspace.php. It would seem a follow-up issue could deal with those? Since the 2x timestamps involved in the todos are unusual and need to be handled differently since we are allowing safe handling of NULL values for timestamp in this issue but these 2x todos are when NULL is not currently supposed to be allowed.

Worth taking a look at the phpdocs for the 2x timestamps to see why they should not return NULL and if should throw an exception or how null values are to be dealt with.

🇬🇧United Kingdom oily Greater London

Some work needed on the test case. Add newlines to the random text and test how that affects the length?

🇬🇧United Kingdom oily Greater London

oily made their first commit to this issue’s fork.

🇬🇧United Kingdom oily Greater London

oily made their first commit to this issue’s fork.

🇬🇧United Kingdom oily Greater London

oily made their first commit to this issue’s fork.

🇬🇧United Kingdom oily Greater London

Test-only test now fails as it should. Other tests in the pipeline are breaking. Not sure if related.

🇬🇧United Kingdom oily Greater London

Fixed PHPCS. Rebased. Now several tests seem broken in pipeline.

🇬🇧United Kingdom oily Greater London

oily made their first commit to this issue’s fork.

🇬🇧United Kingdom oily Greater London

Applied several of @longwave's suggestions, PHPSTAN/CS

🇬🇧United Kingdom oily Greater London

oily made their first commit to this issue’s fork.

🇬🇧United Kingdom oily Greater London

@smustgrave. I agree. I created a code review as others here did. My review was to change 'string' to 'callable'. I believe my review was ignored while everyone else's was resolved. No idea why.

🇬🇧United Kingdom oily Greater London

#49 @smustgrave Because the typehint should not be 'string' it should be 'callable'. If you disagree, please explain why.

🇬🇧United Kingdom oily Greater London

@acbramley I used the online single file editor. Weird.

🇬🇧United Kingdom oily Greater London

Not sure why pipeline failed. Failures dont seem related. It has failed on a one word commit.

🇬🇧United Kingdom oily Greater London

Re: #64 Can you please explain why. Please reference the comments I have made. A reasoned response is much appreciated.

🇬🇧United Kingdom oily Greater London

@xjm Thank you for #42 but I respectfully disagree: I have been constantly changing my 'point'. It has evolved.

The status is 'Needs review'. Distilled from the above is this:

At line 493:

string|NULL should be callable|NULL

If others disagree then I am keen to hear their viewpoint.

🇬🇧United Kingdom oily Greater London

If the callback at line 493 is 'invoked' then it should be typehinted as \Closure, not string|NULL.

🇬🇧United Kingdom oily Greater London

Thank you for #36 @xjm. Please refer to #30:

A PHP callable is a PHP variable that can be used by the call_user_func() function and returns true when passed to the is_callable() function. It can be a \Closure instance, an object implementing an __invoke() method (which is what closures are in fact), a string representing a function or an array representing an object method or a class method.,

That seems to be a clear description of PHP callables. It explains the variance in Drupal docs you have highlighted in #36.

The action to take when documenting a callable is straightforward:

  1. Is it a \Closure? If so it must be an object implementing an __invoke() method. So it is 'invoked'..
  2. If not a \Closure and does not invoke an __invoke() method, is may be a string representing a function?
  3. If neither of the above, is must be an array?

Line 508
throw new \InvalidArgumentException('Default value callback must be a <strong>string</strong>,...

makes it clear that the $callback parameter of BaseFieldDefinition::setDefaultValueCallback() is a string callback (see item 2).

Therefore, it is 'called' not 'invoked'. Callables elsewhere e.g. in Drupal API docs (see item 1) are correctly described as 'invoked'.

🇬🇧United Kingdom oily Greater London

Re #32 "Plus addressing @joachim's feedback". So why not addressing my 'feedback', too?

🇬🇧United Kingdom oily Greater London

#31 @xjm

@oily, Thanks for your interest in this topic.

Everyone else has 'contributed' to this discussion.

... the discussion is out of scope for this issue

How is it 'out of scope'?!

🇬🇧United Kingdom oily Greater London

@xjm You are correct that in Drupal API docs eg:
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Extension...

there are:

callable $callback: A callable that invokes a hook implementation.

But is that the purpose of the callback in this issue?

If not then best to contradistinguish the chalk from the cheese?

🇬🇧United Kingdom oily Greater London

@xjm If you are unconvinced by my arguments (code review), do you want to do a follow-up to change the few instances of 'calling' callables' in the existing Drupal codebase to 'invoking'?

🇬🇧United Kingdom oily Greater London

Chaging to needs work after creating a review of the code. A couple of perhaps nitty suggestions on code comments.

🇬🇧United Kingdom oily Greater London

oily made their first commit to this issue’s fork.

🇬🇧United Kingdom oily Greater London

Added test coverage. Rebased. Not sure why tests failed.

🇬🇧United Kingdom oily Greater London

oily made their first commit to this issue’s fork.

🇬🇧United Kingdom oily Greater London

#59 "..To ensure that all participants are heard and respected, we encourage a brief pause from the conversation to gain perspective.."

So why #60? I am following #59. Suggest the others involved do the same.

🇬🇧United Kingdom oily Greater London

oily made their first commit to this issue’s fork.

🇬🇧United Kingdom oily Greater London

oily made their first commit to this issue’s fork.

🇬🇧United Kingdom oily Greater London

RE: #54 'This one did have a conflict in OpenTelemetryNodePagePerformanceTest, which it seems like you fixed, but then the fix failed tests.'

I do not know how to fix the tests. Anything wrong with that?

🇬🇧United Kingdom oily Greater London

@tim.plunkett Not interested in your opinion.

🇬🇧United Kingdom oily Greater London

@quietone So revert the commit.

🇬🇧United Kingdom oily Greater London

You were dressing up with a thin veneer of politeness impudent and unwelcome advice. Now that the veneer is removed. And you try to discredit my contributions and my professional image in front of a potentially wide audience. I have no problem with the rules.

🇬🇧United Kingdom oily Greater London

@smustgrave Thanks for reverting I agree with it (in hindsight)- seemed a good idea at the time : ).

🇬🇧United Kingdom oily Greater London

@acbramley I am sure it would.

🇬🇧United Kingdom oily Greater London

oily made their first commit to this issue’s fork.

🇬🇧United Kingdom oily Greater London

oily made their first commit to this issue’s fork.

🇬🇧United Kingdom oily Greater London

oily made their first commit to this issue’s fork.

🇬🇧United Kingdom oily Greater London

oily made their first commit to this issue’s fork.

🇬🇧United Kingdom oily Greater London

oily made their first commit to this issue’s fork.

🇬🇧United Kingdom oily Greater London

oily made their first commit to this issue’s fork.

🇬🇧United Kingdom oily Greater London

oily changed the visibility of the branch 3453331-recipeconfiginstaller-should-process to hidden.

🇬🇧United Kingdom oily Greater London

oily made their first commit to this issue’s fork.

🇬🇧United Kingdom oily Greater London

oily made their first commit to this issue’s fork.

🇬🇧United Kingdom oily Greater London

oily made their first commit to this issue’s fork.

🇬🇧United Kingdom oily Greater London

oily made their first commit to this issue’s fork.

🇬🇧United Kingdom oily Greater London

oily made their first commit to this issue’s fork.

🇬🇧United Kingdom oily Greater London

oily made their first commit to this issue’s fork.

🇬🇧United Kingdom oily Greater London

oily made their first commit to this issue’s fork.

🇬🇧United Kingdom oily Greater London

oily made their first commit to this issue’s fork.

🇬🇧United Kingdom oily Greater London

@aaronbauman you also probably need to create a new 11.x branch and merge into that. Core maintainers then decide which branches to port to.

🇬🇧United Kingdom oily Greater London

There is a gitlab template that can be used in projects. Can use it at default settings or vary them. I think most projects will have test-only test in pipeline unless the maintainer had a good reason to exclude it.

🇬🇧United Kingdom oily Greater London

A separate 'test-only' branch is not necessary. There is a 'test-only' manually activated test in the pipeline.

🇬🇧United Kingdom oily Greater London

oily changed the visibility of the branch 3532360-TEST-ONLY to hidden.

🇬🇧United Kingdom oily Greater London

oily changed the visibility of the branch 3532360-TEST-ONLY to hidden.

🇬🇧United Kingdom oily Greater London

oily made their first commit to this issue’s fork.

🇬🇧United Kingdom oily Greater London

oily made their first commit to this issue’s fork.

🇬🇧United Kingdom oily Greater London

Reduced PHPSTAN errors.

🇬🇧United Kingdom oily Greater London

oily changed the visibility of the branch 3496369-preload-without-cache to hidden.

🇬🇧United Kingdom oily Greater London

oily made their first commit to this issue’s fork.

🇬🇧United Kingdom oily Greater London

oily changed the visibility of the branch 2339235-remove-taxonomy-hard to hidden.

🇬🇧United Kingdom oily Greater London

Solved merge conflict. Synced branch with main dev branch.

🇬🇧United Kingdom oily Greater London

oily made their first commit to this issue’s fork.

🇬🇧United Kingdom oily Greater London

oily made their first commit to this issue’s fork.

🇬🇧United Kingdom oily Greater London

oily made their first commit to this issue’s fork.

🇬🇧United Kingdom oily Greater London

oily made their first commit to this issue’s fork.

🇬🇧United Kingdom oily Greater London

@julio_retkwa If you want to have another go at the test coverage, good if you can start by merging your test into the active branch. Can then run manually the 'test-only' test which will fail if test coverage is working well.

🇬🇧United Kingdom oily Greater London

RE: #14 Trying a merge request to see if the active fork/ MR is syncing with the 11.x dev branch. It is currently about 90 commits behind it.

🇬🇧United Kingdom oily Greater London

@julioretkwa I am trying to get the pipeline to show green with a minor PHPSTAN fix. Your test coverage in your new branch can be ported over to the active branch, then. Then can make sure the test works correctly in the pipeline, too.

🇬🇧United Kingdom oily Greater London

oily changed the visibility of the branch 11.x to hidden.

🇬🇧United Kingdom oily Greater London

@alexpott Thanks for considering my suggestion. The CR looks good!

🇬🇧United Kingdom oily Greater London

Reviewed CR. 'materialized' views is interesting. Just looked it up. Need to research further. Asking myself 'how to create material view as opposed to a normal view..' Could CR benefit from example Mysql query to create a material view? The example is the IS is: "CREATE VIEW test AS SELECT * FROM users;" That does create a 'material' view?

🇬🇧United Kingdom oily Greater London

@acbramley Okay 'opening separate browser tabs' might be I was thinking of a nightwatch test. I'll have another review of the latest. My suggestions were nitty.

🇬🇧United Kingdom oily Greater London

@acbramley Okay with the test. Perhaps pedantically I thought implementing a new interface would mean a unit test. I support a kernel test if ticks the box.

🇬🇧United Kingdom oily Greater London

Test coverage in place. Test-only test fails as it should.

Can move to RTBTC?

🇬🇧United Kingdom oily Greater London

@alexpott The commit I queried.. I understand the purpose now. Line 688 reveals the relevance to this issue. If i had scrolled up a bit I would have seen it.

🇬🇧United Kingdom oily Greater London

@alexpott

I added code comment to: https://git.drupalcode.org/project/drupal/-/merge_requests/12442/diffs?c...

Is that commit necessary for filtering views amongst tables?

🇬🇧United Kingdom oily Greater London

If we could add minimal support for DB views into core say by adding createView() method, possibly related CRUD methods too. Then do minor refactor of existing test functions eg the one that tests tables all have primary keys. So the test function would do a 'it has not got a primary key. Is it a view? Yes? In which case, no problem.'

🇬🇧United Kingdom oily Greater London

The core Schema.php has a method createTable() but has no equivalent method to create views. The tests rely on createTable(). Not sure it is worthwhile or feasible to support views in the piecemeal fashion of this issue.

If we are going to take cognisance of views should be not build it into the database api including the core Schema.php. As it stands we will need, i think, to use raw sql queries in the tests ie CREATE VIEW statements as mentioned in the steps to reproduce.

🇬🇧United Kingdom oily Greater London

Okay, I see that the errors in the IS are triggered because views do not need to contain a primary key. There is existing code in other test functions involving the presence/ non-presence of primary keys. Possibly test coverage should be by extending such functions. Or perhaps can incorporate the primary key test code into the new test function..

If test table (view) contains no primary key, check if findTables() 2nd parameter is set to TRUE. If it is, check if the table is a view. Assertion passes if it is a view with no primary key..

Production build 0.71.5 2024