🏄‍♂️🇦🇺Sydney, Australia
Account created on 24 September 2008, over 15 years ago
  • Co-Founder and Technical Director at Skpr 
  • Co-Founder and Technical Director at PreviousNext 
#

Merge Requests

More

Recent comments

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

No, there is no support for neural search at this time. Contributions are welcome!

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

We missed a few methods on \Drupal\file\Upload\InputStreamUploadedFile

Created 📌 [11.x] Remove deprecated methods in InputStreamUploadedFile Active

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

kim.pepper created an issue.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

We left in the method InputStreamUploadedFile::supportsMoveUploadedFile() from an approach that we ditched in favour of the InputStreamUploadedFile::validate() approach. Created 🐛 Remove incorrectly added InputStreamUploadedFile::supportsMoveUploadedFile() Active to clean this up.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia
🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

I think it's feasible that anonymous users would be able to see file upload progress, so I don't think it's an access thing. But I do agree we should check if the extension is enabled.

Created a MR.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

kim.pepper made their first commit to this issue’s fork.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

📌 [PP-1] Refactor JSON-API file uploads to use FileUploadHandler Postponed Just landed so I think we are safe to mark this fixed now.

Thanks to everyone here for the years of work and support to get us to this point. Much appreciated. 🫶

No doubt there will be follow up issues to further refine and improve the code re-use here, but I think we are now in a much more secure situation that before.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Oh wow. This wraps up years of effort unifying file uploads. 🥲

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Changed to `drupal:10.3.0` for removal in `drupal:11.0.0`.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Thanks for the review. I've addressed all feedback.

This feels rather close, and i'll be quite happy to have the "Temporary" class killed :D

Committed on 20 Mar 2019 so temporary for 5 years. 🤣

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Feedback addressed and MR for 10.4.x created with BC layer.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Created MR for 10.4.x with BC layer.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

📌 Refactor FileUploadResource to use FileUploadHandler RTBC is in so this is unblocked. 🙌

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Once this goes in, we can start on 📌 [PP-1] Refactor JSON-API file uploads to use FileUploadHandler Postponed

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Re-organizing parent meta issue.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Marking this as a meta issue now have two child issues that we want to do one at a time:

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

This is postponed on 📌 Refactor FileUploadResource to use FileUploadHandler RTBC as we are adding some new classes there that we will need here.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

kim.pepper created an issue.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

@alexpott are you happy if we look into your concerns in 📌 Simplify how 'allow all extensions' file upload validation works Active ?

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

We should add a Universal object crate to PHPStan config to suppress this warning until we resolve it.

This came up in another issue somewhere, but I can't seem to find it.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Another example of a commit message that has no room for a meaningful message because it's just a list of contributors:

commit dae385398eb9860650b50f2aac087c33ee35083b (HEAD -> 11.x, origin/11.x)
Author: Lauri Eskola <lauri.eskola@acquia.com>
Date:   Sat Apr 27 00:43:13 2024 +0300

    Issue #3438895 by finnsky, larowlan, plopesc, m4olivei, ckrina, mherchel, catch, alexpott, nod_, deviantintegral, jwitkowski79, nod_, jponch, jwitkowski79, rkoller, Ana Barcelona, YurkinPark, finnsky, javi-er, alvarito75, ctrlADel, AaronMcHale, Emma Horrell, akshayadhav, claireristow, baluv3, bronzehedwick, NikMis, deviantintegral, hot_sauce, kostyashupenko, gnuschichten, keyboardcowboy, gdd, silviu, Prashant.c, ehsann_95, pjudge, rkoller, Shreya_th, starshaped, bal krishna, meeni_dhobale, mherchel, jo→
🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

MR needs to be closed.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Cleaned up after a few merge conflicts.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

kim.pepper made their first commit to this issue’s fork.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Addressed feedback so back to NR

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Closing as won't fix. Please feel to re-open if you think there is a way to achieve this.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Committed to 2.x and 3.x. Thanks!

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Created a MR so we can run gitlab ci.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

kim.pepper made their first commit to this issue’s fork.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Changing this to critical as it is a part of 📌 [PP-4] Unify file upload logic of REST and JSON:API Postponed which is critical.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

I think this can be closed as outdated.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

The next step forward for this effort is now ready for reviews: 📌 Refactor FileUploadResource to use FileUploadHandler RTBC

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Many thanks to @larowlan for helping resolve the file extensions issues. 🙌🏻🥳

This is ready for reviews now.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

There is a test failure due to a behaviour change. I'm scratching my head to work out why.

Before: example.php gets renamed:
example.php => example.php_.txt

After: example.php gets rejected because the .php extension isn't in the allow extensions list.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Explains 🧐

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Added 🐴 explanation

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

I tried to convert the test but ended up in a whole lot of pain. I'm not entirely sure if the sub-attributes make things better or worse.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Addressed feedback. Just one open question.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

kim.pepper made their first commit to this issue’s fork.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

@Berdir #10 i had a look at 📌 Convert entity type discovery to PHP attributes Needs review and doesn't look this you are doing this anymore?

I have left the properties in for now.

Re: config_dependencies I found this in the docs for \Drupal\Core\Config\Entity\ConfigDependencyManager

 * Classes for configurable plugins are a special case. They can either declare
 * their configuration dependencies using the calculateDependencies() method
 * described in the paragraph above, or if they have only static dependencies,
 * these can be declared using the 'config_dependencies' annotation key.
🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia
🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Created a new MR that just checks if it is a FormUploadedFile and uses \Drupal\Core\File\FileSystemInterface::moveUploadedFile() or otherwise \Drupal\Core\File\FileSystemInterface::move()

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Updated title and IS

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

A typehint of string|false would be more accurate. We never return TRUE.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

I took the approach suggested in #30 of creating a file item from the field definition. I put it in a trait so it could get used by both REST and JSON API.

@alexpott Do we still want to postpone the deprecation to 12.x? It seems much less disruptive now.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

@alexpott thanks for the review, but we still need to work out how to do this. See #28

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

I created a new issue to follow this same pattern for moveUploadedFile() 📌 Provide a method for FileUploads to be moved Active

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Deprecated the old \Drupal\Tests\token\Kernel\KernelTestBase and added a CR.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

@alexpott #25 we only ever return a string inline with the PHP dirname() function, so our documentation is wrong. The example you provided typehints the return type as bool which is wrong.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

I couldn't find anything for enums in Drupal Coder or existing rules about enum case in https://github.com/slevomat/coding-standard or https://github.com/squizlabs/PHP_CodeSniffer

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Thanks for confirming. This docs change looks good to me.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Even though we have 3 already, add myself as a supporter too.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

@alexpott re: #26 I added the method to\Drupal\file\Plugin\Field\FieldType\FileFieldItemList::getUploadLocation() but not sure how to access that from a $field_definition.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Created a new MR based on 11.x.

I think we should go through the rest of the methods to ensure we have the correct documented return types.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Ah, we can't add return typehints on interfaces without breaking bc.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Can we take this further and add string|false a the typehint rather than just the docs?

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

I think the approach for validation here is a better one that the current version.

RTBC for me.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Rebased and test green so back to RTBC

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

We do have a rule in coder_sniffer but it's not case-sensitive https://git.drupalcode.org/project/coder/-/blob/8.3.x/coder_sniffer/Drup...

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses defaults to case-insensitive but looks like we can configure that to be case-sensitive.

https://github.com/slevomat/coding-standard/blob/master/SlevomatCodingSt...

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

+1 from me.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Added the template to the issue summary.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Addressed feedback.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Committed to 2.x. Thanks!

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Leaving open for more fixes.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

kim.pepper created an issue.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Committed to 2.x

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

kim.pepper created an issue.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Removed hook_file_validate() and doc references to calling file_validate()

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Had a look for docs that say we require a @return annotation and couldn't find one. Only docs for describing the format of the @return annotation. https://www.drupal.org/docs/develop/standards/php/api-documentation-and-...

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Addressed feedback.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia
🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Created a MR to show what I mean.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Ah yes. But we also should have deprecated the hook in file.api.php docblock according to https://www.drupal.org/about/core/policies/core-change-policies/drupal-d...

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Created 📌 Deprecate hook_file_validate() Active

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

kim.pepper created an issue.

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Published the CR

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

🖐 I'm putting my hand up for issue credit for this one as I wrote the original mermaid that was posted to slack (see #34)

🇦🇺Australia kim.pepper 🏄‍♂️🇦🇺Sydney, Australia

Addressed feedback.

Coming back to this after a long while, I am wondering why we didn't deprecate hook_file_validate() at the time?

Production build 0.67.2 2024