Skip to content

[11.x] document new cache driver #10032

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

Draft
wants to merge 161 commits into
base: 11.x
Choose a base branch
from

Conversation

browner12
Copy link
Contributor

documentation for this PR.

should not be merged until after next release so my bugfix is in there and it actually works.

I struggled with the wording on this. maybe it'd be better to just show an example config/auth.php entry?

@taylorotwell
Copy link
Member

taylorotwell commented Nov 19, 2024

Before we document this could we implement that automatic hashing of the keys so we don't need to worry about prefixes @browner12?

@taylorotwell taylorotwell marked this pull request as draft November 19, 2024 22:32
@browner12
Copy link
Contributor Author

@taylorotwell was that suggested somewhere? I'm not seeing it.

Also, I'm a little confused. Are you suggesting to hash the "prefix.email" combo? How would we retrieve it from the cache then?

taylorotwell and others added 22 commits January 27, 2025 16:52
* Update validation.md

* Update validation.md

* Update validation.md

* Update validation.md

* Update validation.md

* Remove extra new line

* Revert "Remove extra new line"

This reverts commit 8cadafd.

* Revert "Update validation.md"

This reverts commit aa684e6.

* Revert "Update validation.md"

This reverts commit 84f56ee.

* Revert "Update validation.md"

This reverts commit d262a82.

* Update validation.md

* fix commas

* Revert "fix commas"

This reverts commit a9749b7.

* formatting

* Update validation.md

* formatting

---------

Co-authored-by: Taylor Otwell <[email protected]>
both `bash` and `shell` are used interchangably for the code blocks they surround, so we'll standardize to the more common `shell` option.
- `nothing` and `none` are both invalid language keys, so replace both of them with the valid generic `text`. the reason I chose `text` over an empty "```" line is that it will make targeting in "find" or "find/replace" easier.
- use `shell` where appropriate
standardize the language to `shell`.

also, as far as I can tell, `sh` doesn't even technically exist in Torchlight.
* use fenced code blocks

- better syntax highlighting
- easier copy/pasting of code examples
- consistency throughout docs block

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip
- use "ini" for `.env` examples
- use "text" for plain text blocks
- remove some empty line breaks at and inside the end of code blocks
- add some missing "php" and "shell" entries
2 consecutive empty lines
in order to indicate "more content" or "content not relevant to example", we often use an ellipsis. in PHP and other languages, this pattern actually is relevant to the language.

this change standardizes usage of the ellipsis for the above examples to be in a comment. this give us valid PHP and Javascipt, and reduced ambiguity with the language construct.
…vel#10199)

* multi-schema database inspecting

* better examples

* formatting

* upgrade guide

---------

Co-authored-by: Taylor Otwell <[email protected]>
taylorotwell and others added 30 commits April 8, 2025 14:56
corrected mispelling of "destination"
…el#10321)

* Document the optional argument on database transactions

* Update database.md

---------

Co-authored-by: Taylor Otwell <[email protected]>
* Added instructions for publishing all files with '--provider' flag in packages.md

* Update packages.md

---------

Co-authored-by: Taylor Otwell <[email protected]>
* Added documentation for `spellOrdinal` in Number Facade

* Update helpers.md

---------

Co-authored-by: Taylor Otwell <[email protected]>
* Group imports in Blade `@use` directive

* Update blade.md

---------

Co-authored-by: Taylor Otwell <[email protected]>
* Adds `AsColection::map()` section

As part of [#55383](laravel/framework#55383).

* Added more clarification

* More clarification

* Update eloquent-mutators.md

Co-authored-by: Sebastian Hädrich <[email protected]>

* Adds openinh PHP on full class

* Better, almost final, clarification.

* Minor change to the Option example so it makes sense

* Better clarification about serialization

* formatting

---------

Co-authored-by: Sebastian Hädrich <[email protected]>
Co-authored-by: Taylor Otwell <[email protected]>
…10342)

* clarify how to "set" value objects with custom casts

the current wording only accounts for 1 of the 2 scenarios that can occur when using a custom cast with a value object. that Value Object can encompasses either 1 or many values on the model.

the current documentation addresses the example of an `Address`, which would have multiple fields like "line1", "line2", "city", etc.  this `set` method should return the array as currently documented.

an example of a single value Value Object would be a phone number. a user might want it as an value object rather than a raw number to encapsulate behavior. this `set` method should return a string.

there is one distinct advantage to returning a string vs an array. it prevents the cast from being tied to explicit model field names. this allows a field of any name to use the cast:

```php
'phone' => AsPhone::class,
'telephone' => AsPhone::class,
```

if a user returns an array from this simple 1 value cast, the cast loses its flexibility and the above example does not work.

* Update eloquent-mutators.md

---------

Co-authored-by: Taylor Otwell <[email protected]>
while this is definitely a subjective change, I think it provides some significant benefits:

- consistent naming pattern with Laravel internal casts
- prefix helps indicate a cast object, and avoid confusion with names of value objects
- avoids having to alias imports. value objects get the noun, and casts get the prefix.

generally speaking, I think these changes improve readability and consistency.
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.