6.8 KiB
6.8 KiB
Changelog
All notable changes to sitemap-generator will be documented in this file.
- The format is based on Keep a Changelog,
- This project adheres to Semantic Versioning,
- Commits respect Conventional Commits & use Gitmoji.
[v8.1.0] - 15/10/2026
Added
GenerateSitemapJobqueueable job (ShouldQueue) for asynchronous and background sitemap generation.--queueoption onuwil:sitemap:refreshartisan command to dispatch generation to the queue.
Fixed
- Fixed scheduler crash on staging (
Target class [uwil:sitemap:refresh] does not exist) inSitemapGeneratorServiceProviderby schedulingnew GenerateSitemapJob()instead of command signature string.
[v8.0.0] - 14/10/2026
Added
- Unit and integration test suites powered by Pest PHP (
pestphp/pest: ^5.3) with full GWT structure. - Static analysis with Larastan (
larastan/larastan: ^3.0) at level 10 and code formatting with Laravel Pint. - Configurable output disk and path via
output.storage_diskandoutput.pathinconfig/sitemap-generator.php(backed by Laravel Storage / Flysystem). - Contract-based route localization (
RouteLocalizerInterface) allowing custom or default implementations. - Configurable localizer strategy via
localizerinconfig/sitemap-generator.php(supports'default','mcamara', or custom class). - Model localization support via
Uwil\SitemapGenerator\Contracts\Sitemapablewith automated alternate tag resolution. - Exhaustive test coverage for CRUD queries supporting model filters, relation filters (closures, arrays, string booleans), and
allow_null_relation. - Fail-fast migration guards with actionable error messages for deprecated config keys (
singlePages,output_path,relationFilters,modelFilters,allowNullRelation).
Changed
- Breaking: Required PHP version bumped to
^8.5and Laravel/Illuminate to^13.0. - Breaking: Replaced
output_pathwithoutput(storage_diskandpath) to support any Flysystem disk (local, public, S3, etc.). - Breaking: Renamed config key
singlePagestosingle_pages(snake_case). - Breaking: Standardized CRUD configuration keys to snake_case (
relation_filters,model_filters,allow_null_relation). - Decoupled
mcamara/laravel-localization: it is now an optional suggest/dev dependency.DefaultRouteLocalizeris used as fallback when absent. - Deep internal architecture refactor:
- Extracted generation logic out of
GenerateSitemapCommandinto dedicatedSitemapGeneratorandSitemapConfigclasses. - Introduced
SitemapStorageencapsulation for disk interactions (reading, writing, streaming, path normalization). - Refactored
SitemapHelperfrom a static helper into a container-bound dependency. - Moved
Sitemapablecontract under namespaceUwil\SitemapGenerator\Contracts\Sitemapable. - Enforced strict types (
declare(strict_types=1);) across the entire codebase.
- Extracted generation logic out of
- Dynamically served sitemap in
GET /sitemap.xmlas a stream directly from the configured storage disk.
Fixed
- Fixed
--dry-runconsole option detection inuwil:sitemap:refresh. - Fixed Mcamara route localizer to return
nullinstead of falling back to bare locale root (/fr) when route translations are missing. - Improved relation filter support in CRUD queries to safely support Closures, arrays, and boolean strings.
- Fixed CRUD list parsing in
SitemapConfigto reliably support list-based arrays.
Migrate to 8.0.0
-
Config file update: Update your
config/sitemap-generator.phpwith the new keys:// Before (v7) 'singlePages' => ['homepage'], 'output_path' => storage_path('app/public/sitemap.xml'), 'cruds' => [ [ 'model' => App\Models\Product::class, 'relationFilters' => [...], 'modelFilters' => [...], 'allowNullRelations' => [...], ], ], // After (v8) 'single_pages' => ['homepage'], 'output' => [ 'storage_disk' => 'public', 'path' => 'sitemap.xml', ], 'cruds' => [ [ 'model' => App\Models\Product::class, 'relation_filters' => [...], 'model_filters' => [...], 'allow_null_relation' => [...], ], ], -
Model contract namespace update: Update imports on your models implementing the sitemap contract:
// Before use Uwil\SitemapGenerator\Interfaces\Sitemapable; // After use Uwil\SitemapGenerator\Contracts\Sitemapable; -
Optional Dependency: If you rely on localized route translations via
mcamara/laravel-localization, make sure to require it explicitly in your application'scomposer.json, as it is no longer bundled by default.
[v7.1.1] - 24/08/2026
- Improve error catch in
uwil:sitemap:refreshcommand.
[v7.1.0] - 23/06/2026
- Added the possibility to get models with nullable relations.
New parameter in config:
'cruds' => [
[
'model' => 'App\Models\Product',
'model_filters' => [
['published', '=', true],
],
'relation_filters' => [
'range' => fn(Builder $q) => $q->where('status', true),
],
'allow_null_relation' => ['range'], // New parameter
],
[
'model' => 'App\Models\Article',
],
],
[v7.0.0] - 17/04/2026
- Laravel 13 Compatibility.
[v6.0.0] - 31/03/2026
Added
- Re-think the locale system to match new Google expectations.
- Added news sitemap support.
Migrate to 6.0.0
- Locales are now in
sitemap-generator.php(supported_locales). - Models must implement
Uwil\SitemapGenerator\Contracts\SitemapablewithgetLocalizedUrl(string $locale): string.
[v5.0.1] - 18/07/2025
Fixed
- Change model filters key in command.
[v5.0.0] - 18/07/2025
Added
- Add filters on model relations.
[v4.0.0] - 07/04/2025
Added
- Laravel 12 compatibility.
[v3.0.0] - 25/09/2024
Added
- Add manual implementation to control exposed data and handle translation.
- Change file location to handle Kubernetes restarts.
[v2.0.1] - 12/02/2024
Changed
- Kubernetes convenience output file option.
[v2.0.0] - 11/11/2023
Added
- Add manual implementation to control exposed data and manage translation.
[v1.0.3] - 11/08/2023
Fixed
- Sitemap output was the original, not the filtered one.
[v1.0.2] - 11/08/2023
Fixed
- Ignore URLs with queries (only RESTful URLs handled).
- Reduce dry-run output to fit console.
- Handle non-HTML URLs for which routes cannot be resolved.
[v1.0.1] - 11/08/2023
Fixed
- Install sitemap command.
[v1.0.0] - 11/08/2023
Added
- Initial release.