Repository navigation
2.7.5 — type-safety pass
Blogr 2.7.5
A type-safety pass over the package — what it turned up is fixed here.
Fixes
- Nullable timestamps. The sitemap and the SEO block dereferenced
published_at/updated_at
without a check: a post without a publish date answered 500 on/sitemap.xmlinstead of being
skipped. - Reading time.
BlogPostTranslation::calculateReadingTime()storedceil()'s float in an integer
column. - Console argv.
SettingsRepositoryread$_SERVER['argv']without checking it exists — php-fpm
has none, and the one place that reads it is theconfig:cacheguard. - Admin draft import. Offsets of a value built from JSON were read without checking its type.
- CMS blocks. The
blockscolumn lives oncms_page_translations; the merge with the published
revision is documented against that model, where the column actually is.
Internals
Every model now documents its columns (@property) and its relations
(@return BelongsTo<X, $this>), which is what PHPStan level 9 needs to follow a relation out of a
controller. The baseline is regenerated (1199 entries for 1877 findings, replacing 1391 entries that no
longer matched), so pint and phpstan both pass and the pre-commit hook is usable again.
Upgrade
composer require happytodev/blogr:^2.7.5
php artisan view:clear && php artisan optimize:clearNo migration, no configuration change.