profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/SjorsO/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Sjors Ottjes SjorsO Groningen, the Netherlands https://sjorso.com

SjorsO/keys-generator 80

Key generator for https://keys.lol

SjorsO/gobble 22

A Laravel specific wrapper around Guzzle that makes it easy to mock responses

SjorsO/wordpress-customizer-builder 16

A wrapper for WP_Customize_Manager that makes working with the WordPress customizer easier

SjorsO/enum 3

An abstract class for making enums in Laravel

SjorsO/mocks-time 3

A trait that provides a simple, fluent interface for working with Carbon::setTestNow()

SjorsO/dotfiles 1

Helpers for bash and git

SjorsO/pinyin 1

A package that converts Chinese to pinyin

SjorsO/docs 0

The Laravel documentation.

SjorsO/dusk 0

Laravel Dusk provides simple end-to-end testing and browser automation.

PR opened laravel/dusk

[6.x] Add `waitUntilEnabled` and `waitUntilDisabled`

This PR adds methods for waiting until an element is enabled or disabled.

These methods are especially useful when using wire:loading.attr="disabled" on Livewire buttons:

<x-button wire:click="generateExport"
          wire:loading.attr="disabled"
          dusk="generate-export"
>Export</x-button>
$browser->click('@generate-export')
    ->waitUntilEnabled('@generate-export')
    ...
+58 -0

0 comment

2 changed files

pr created time in 19 days

create barnchSjorsO/dusk

branch : wait-enabled

created branch time in 19 days

push eventSjorsO/dusk

Sjors Ottjes

commit sha 5586398a0c6b512fd6aafa8bfbaf99b120378d85

allow waiting for full URL location (#916)

view details

Dries Vints

commit sha 20a23f4c92d253fa0d188413b1f820a6cc05a8e6

Update CHANGELOG.md

view details

push time in 19 days

PR opened laravel/docs

Add that `waitForLocation` can wait for a URL

This was added in https://github.com/laravel/dusk/pull/916

+4 -0

0 comment

1 changed file

pr created time in 23 days

push eventSjorsO/docs

Sjors Ottjes

commit sha b13dde8ce6f4960565b129942a3cd79d048d02ce

Update dusk.md

view details

push time in 23 days

issue openedlaravel-idea/plugin

[Feature request] Create missing `wire:click` method from Livewire view

It would be useful if missing Livewire methods could be created from the view.

For example:

image

This public method regeneratePdf does not exist. It would be nice if it highlighted yellow and showed an action "create public method on component".

created time in 24 days

push eventSjorsO/framework

Sjors Ottjes

commit sha f4024a04f6d25f4ec9d1b665b464e5d0069b9ef9

cs

view details

push time in a month

push eventSjorsO/framework

Sjors Ottjes

commit sha 5802c465f95fcafac8a937db2fce27135de05e7e

add betweenAll to Stringable

view details

push time in a month

PR opened laravel/framework

[8.x] add `Str::betweenAll()`

This PR adds a Str::betweenAll() method:

$string = <<<STR
Follow your order with <a href="http://example.com/t&t">Track & Trace</a>

Or <a href="http://example.com/unsub">unsubscribe</a> forever.
STR;

Str::betweenAll($string, 'href="', '"'); // ['http://example.com/t&t', 'http://example.com/unsub']

My use-case is that I want to visit the first link from an email in a Dusk test. I intercept the email, and have to get the first link. With this new method I can do so using Str::betweenAll($email->body, 'href="', '"')[0].

This new method is similar to Str::between():

Str::between('[a]', '[', ']') // 'a'
Str::betweenAll('[a]', '[', ']') // ['a']

Str::between('[a] [b]', '[', ']') // 'a] [b'
Str::betweenAll('[a]', '[', ']') // ['a', 'b']
+52 -0

0 comment

2 changed files

pr created time in a month

create barnchSjorsO/framework

branch : str-between

created branch time in a month

push eventSjorsO/framework

Dries Vints

commit sha b3ef465c19d4a4853228d794bc961c32e87c5209

Deprecate MocksApplicationServices trait (#36716)

view details

Tetiana Blindaruk

commit sha 8f48242a88e6a3baa10f9c9dc8d7ffb3fb872f98

[8.x] update changelog

view details

Tetiana Blindaruk

commit sha 2377fa7c2119360852393e2aa94c8e6bbd0bb26a

Merge remote-tracking branch 'upstream/8.x' into 8.x

view details

Tetiana Blindaruk

commit sha ab703aa6d5358c162df212d7924f17eaf26aaa73

[6.x] update changelog

view details

Tetiana Blindaruk

commit sha 08815a1ba71c6fd850950305736fa4f5f5862aa0

[8.x] update changelog

view details

JUNO_OKYO

commit sha 24fafcad66127c217f6b1b6790265d41a6a0f636

Update changelog (#36724)

view details

Michael Grinspan

commit sha c04fa172ab4488f297549aa8618b066835b78d26

Remove useless loop (#36722)

view details

Sjors Ottjes

commit sha de5f6a7ac9be7674820d24c1d5e9ababcaf00c3e

[8.x] Make `ResponseSequence` macroable (#36719) * make ResponseSequence macroable * cs

view details

Graham Campbell

commit sha f53e96692cb8e12ac1549eacb01e102203559d21

Merge branch '6.x' into 8.x

view details

Victor

commit sha f75e51084689330ba59ae09d1dd50ab507b10555

[8.x] Allow lazy collection to be instantiated from a generator (#36738) * Allow lazy collection to be instantiated from any iterable * Fix only allow generator, not all iterables

view details

Dries Vints

commit sha 5be0afe0f5a712a8256c0f6cfad6842c2bd779a1

[6.x] DynamoDB in CI suite (#36749) * Set up DynamoDB testing * env variable * Random AWS keys * AWS endpoint * try different port * Try localhost * Dynamically create table * Add provider * uppercase * KeySchema * Update table * Apply fixes from StyleCI (#36746) * throughput * exception message * Switch env statement * Remove directory

view details

Jitendra

commit sha efba08c637bd39ecbb1a5279b3f43965e1807f5e

Removed filter on username for redis configuration parameter. (#36762) Co-authored-by: dschobert <d.schobert@ixolit.com>

view details

Mior Muhammad Zaki

commit sha 31c5e1f55f69ca7f78bb55c8f2c130493b922306

Fixes missing `lazy()` and `lazyById()` on BelongsToMany and HasManyThrough relation query builder. (#36758) Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>

view details

Dries Vints

commit sha 538a64ac4de1414bd61580ec5ecfe4b281fdb40e

Merge branch '6.x' into 8.x # Conflicts: # src/Illuminate/Cache/CacheServiceProvider.php

view details

vdlp-mw

commit sha 006ba38124df6a8a651546a0301d604665b394b7

Use qualified column names in pivot query (#36720) Co-authored-by: Menzo Wijmenga <menzo@vdlp.nl>

view details

cod1k

commit sha a2b7c7ceca5ee9470a50c3f67f54047c595940a2

illegal offset type fix

view details

cod1k

commit sha 7694d29782fdf3b69134fdd99165f74919522f34

refactoring + spreading to other relations types

view details

cod1k

commit sha 3ed38719e244a53bf12a372837d363d75e0bbe16

style fix

view details

cod1k

commit sha 302f66683919a12be3e81708f9e1422bb6459b2f

tests

view details

Taylor Otwell

commit sha 9d49b7d3ad22f0c4989fcfa60afb3ef24778e8a7

formatting

view details

push time in a month

pull request commentlaravel/framework

add assertNotAllowed to TestResponse

I think assertMethodNotAllowed is a better name. The 405 status code means the HTTP method is not allowed. The current name makes it feel like it has to do with not being authorized (401) or forbidden (403).

fheider

comment created time in a month

PR opened laravel/dusk

[6.x] Support waiting for URLs with `waitForLocation`

One of my projects has a model that returns a dynamic URL. In my test, I want Dusk to click a link, and then wait for that location. The test looks something like this:

$browser->click('@visit-'.$model->id)
    ->waitForLocation($model->detail_page_url)
    ...

The code above doesn't work, because $model->detail_page_url returns a full URL, but waitForLocation can only wait for paths (/some-path). This PR updates waitForLocation so it can also wait for full URLs. There is currently no method to wait for a URL.

I've chosen to use ${location.protocol}//${location.host}${location.pathname} to get the current url (taken from this StackOverflow answer). This way query parameters and fragment identifiers (#) in the current URL are ignored.

+21 -1

0 comment

2 changed files

pr created time in a month

create barnchSjorsO/dusk

branch : wait-for-loc

created branch time in a month

push eventSjorsO/dusk

Dries Vints

commit sha 2bc1035170f0a119521f9e09b82bba4889ee67b0

Update CHANGELOG.md

view details

Sjors Ottjes

commit sha 6112c8fffb6c001b83c3ebc80e2a85abc3a6a334

[6.x] Add `assertInputPresent` and `assertInputMissing` assertions (#914) * add assertInputPresent and assertInputMissing assertions * wip

view details

Dimitri König

commit sha 178253db79fe14ae84dccc707d4bce78e77194e4

Add source directory creation on install (#915)

view details

Dries Vints

commit sha 8563c4e853c32649919b09a6568cdf914284c129

Update CHANGELOG.md

view details

push time in a month

pull request commentlaravel/framework

[8.x] Feature: Environment conditional routes

You could just do this:

if (app()->environment('local')) {
    Route::get("/will-work-locally-only", function(){ return "local";})
}
arsangamal

comment created time in a month

PR opened laravel/docs

Document `assertInputPresent` and `assertInputMissing`

The assertInputPresent and assertInputMissing assertions were added in https://github.com/laravel/dusk/pull/914

+16 -0

0 comment

1 changed file

pr created time in a month

push eventSjorsO/docs

Sjors Ottjes

commit sha cb992c2619da0bf1993f116c0e58d74f3c0ffa43

Document `assertInputPresent` and `assertInputMissing` The `assertInputPresent` and `assertInputMissing` assertions were added in https://github.com/laravel/dusk/pull/914

view details

push time in a month

fork SjorsO/docs

The Laravel documentation.

https://laravel.com/docs

fork in a month

pull request commentlaravel/framework

[8.x] Improves type definitions by using generics, generic arrays, callable types, and more

With these type definitions, does PHPStorm know that User::all()->get(0) returns a User? Or does it only know that it's a Model?

nunomaduro

comment created time in a month

issue commentlaravel-idea/plugin

[Feature request] Array shape of `$request->validate()`

You're brilliant 😁👍

SjorsO

comment created time in a month

PR opened laravel/dusk

[6.x] Add `assertInputPresent` and `assertInputMissing` assertions

This PR adds two assertions: assertInputPresent and assertInputMissing. These assertions use the name of an input to assert if the input is present.

These assertions are useful when working with dynamic forms. I often use Livewire to hide input fields based on the value of a radio button. There is currently no convenient way to assert that an input with a specific name is missing. I'd have to add a dusk="" or id="" attribute to the input and then use assertMissing(). With these new assertions I can assert if an input is missing using its name, making extra attribute necessary.

Something to note: the name of the assertions might be slightly misleading. They don't just check input elements, but also textarea and select elements.

I haven't added any tests. I couldn't figure out how to craft a mock that calls itself. This probably wouldn't add much value to the test suite anyway. The new methods use the already tested assertPresent and assertMissing methods.

+30 -0

0 comment

1 changed file

pr created time in a month

push eventSjorsO/dusk

Sjors Ottjes

commit sha 1fe90e3e51c2dbc880df7a8ea4af4fdb61f949fe

wip

view details

push time in a month

create barnchSjorsO/dusk

branch : input-assertions

created branch time in a month

fork SjorsO/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

https://laravel.com/docs/dusk

fork in a month

pull request commentlaravel/framework

Add everyXDays and everyXDaysAt scheduling frequency helpers

Something similar was proposed and rejected before: https://github.com/laravel/framework/pull/33380

The problem with these methods is that they don't actually run every X days. For example: if a month has 31 days, everyTwoDays will run two days in a row, on the 31st and the 1st. The other proposed methods have the same kind of problem problem.

sowrensen

comment created time in 2 months

issue openedlaravel-idea/plugin

[Feature request] Array shape of `$validator->validated()`

image

Using $data = $request->validate() is a common pattern in Laravel. It would be great if $data would auto-complete the array shape defined by the validation rules.

This issue is related to https://github.com/laravel-idea/plugin/issues/174. But that issue seems to focus on FormRequest objects.

created time in 2 months

pull request commentlaravel/framework

[8.x] Adds `to_route` helper

This will be the str() helper all over again :smile:

nunomaduro

comment created time in 2 months

pull request commentlaravel/framework

[8.x] Add Validator::excludeArrays() to exclude array keys that aren't included in the validation rules

@SjorsO that's the plan for Laravel 9. But since it's a breaking change, people must opt-in.

So in Laravel 9 we won't have to call Validator::excludeArrays()?

If anyone has good ideas for the final method name of this method let me know.

It isn't easy to name something that fixes such a specific problem. Maybe something like:

  • Validator::excludeDataWithoutValidationRules()
  • Validator::excludeNestedDataWithoutValidationRules()
  • Validator::excludeUnvalidatedNestedData()
themsaid

comment created time in 2 months

pull request commentlaravel/framework

[8.x] Add Validator::excludeArrays() to exclude array keys that aren't included in the validation rules

This behavior of the validator has caused me trouble in the past too. The validate method returning data that wasn't validated should be considered a bug if you ask me. What about making this fix the default in Laravel 9, and removing the need for the Validator::excludeArrays() call?

themsaid

comment created time in 2 months