spatie / .github Goto Github PK
View Code? Open in Web Editor NEWGitHub settings for the Spatie organisation
Home Page: https://spatie.be
GitHub settings for the Spatie organisation
Home Page: https://spatie.be
Hi every one. I found that many of my friends use this package for their projects, but they found that the documentation is in English h, and I would like to translate it. Is there any one for suggestion?
I would like to write a new Image manipulation to work on JPEG metadata data (read/write EXIF/IPTC, etc. without recompression) using external binaries. I was wondering if extending Image was the right approach to it, or if I should separate that into something different. Most PHP image manipulation packages have no more than basic metadata reading features and the user is left on his own. EXIF/IPTC writing on manipulated image is a mandatory requirement of my project so I am not asking if that is a good or useful idea (nine of out of ten times you just want to strip everything out to lower the file payload).
I am indeed asking
See Laravel Shift result
https://laravelshift.com/can-i-upgrade-laravel/spatie/cpu-load-health-check
I've been using standard Laravel mailables in my project and had a couple of tests asserting some string in the mailable HTML like
$mailable = new UserInvitation($userInvitation);
$mailable->assertSeeInHtml($url);
After migrating my mailables to this package, this assertion started erroring with:
Illuminate\Support\HtmlString::__toString(): Return value must be of type string, null returned
at vendor/laravel/framework/src/Illuminate/Support/HtmlString.php:64
60▕ * @return string
61▕ */
62▕ public function __toString()
63▕ {
➜ 64▕ return $this->toHtml();
65▕ }
66▕ }
67▕
After some digging, I see that the original buildView()
method is as follows:
if (isset($this->html)) {
return array_filter([
'html' => new HtmlString($this->html),
'text' => $this->textView ?? null,
]);
}
And the corresponding part of the override in the package:
$html = $renderer->renderHtmlLayout($viewData);
$text = $renderer->renderTextLayout($viewData);
return array_filter([
'html' => new HtmlString($html),
'text' => new HtmlString($text) ?? null,
]);
I saw that the renderTextLayout()
method is already returning consistently with the original method signature:
if (! $this->mailTemplate->getTextTemplate()) {
return $this->textView ?? null;
}
So, I tried replacing 'text' => new HtmlString($text) ?? null
with 'text' => $text
and got the tests passing.
Considering renderTextLayout()
will always return null when there is no text template (which is optional), any assertion on the html template will generate this same error.
I am not yet sure about further side effects of the change I made, therefore not submitting a PR.
I'd appreciate any insight into this.
All Spatie repositories link to https://github.com/spatie/.github/blob/main/CONTRIBUTING.md
which returns a 404 for the CONTRIBUTING link. Looks like it was deleted ~28 days ago in this commit d72dc90
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.