Conversation
…oquent Driver for globals Co-authored-by: tdwesten <224501+tdwesten@users.noreply.github.com>
… hook Co-authored-by: tdwesten <224501+tdwesten@users.noreply.github.com>
…atabase globals Co-authored-by: tdwesten <224501+tdwesten@users.noreply.github.com>
Co-authored-by: tdwesten <224501+tdwesten@users.noreply.github.com>
Co-authored-by: tdwesten <224501+tdwesten@users.noreply.github.com>
Co-authored-by: tdwesten <224501+tdwesten@users.noreply.github.com>
…support' into copilot/add-global-registration-support
…`, refactor `BaseCollection`, and improve `MakeCollectionCommand` functionality Signed-off-by: Thomas van der Westen <thomas@codesmiths.nl>
…repository enhancements, and related tests Signed-off-by: Thomas van der Westen <thomas@codesmiths.nl>
…repository enhancements, and related tests Signed-off-by: Thomas van der Westen <thomas@codesmiths.nl>
…ng `AssetContainerRepository`, `FieldsetRepository`, `TaxonomyRepository`, and custom field types like `ForeignField` and `Section` Signed-off-by: Thomas van der Westen <thomas@codesmiths.nl>
…nd`, `MakeFieldsetCommand`, and `MakeTaxonomyCommand` Signed-off-by: Thomas van der Westen <thomas@codesmiths.nl>
…es, commands, and related components Signed-off-by: Thomas van der Westen <thomas@codesmiths.nl>
…sets, collections, taxonomies, globals, sites, and navigations; add relevant config options, methods, and tests Signed-off-by: Thomas van der Westen <thomas@codesmiths.nl>
…iguration details Signed-off-by: Thomas van der Westen <thomas@codesmiths.nl>
…Taggable`; add new field types including `Hidden`, `Money`, `Number`, `Password`, and `Rating` with respective tests Signed-off-by: Thomas van der Westen <thomas@codesmiths.nl>
Signed-off-by: Thomas van der Westen <thomas@codesmiths.nl>
…lementation, commands, discovery, and tests - Added `BaseAssetContainer` class with default methods for asset container management. - Created `MakeAssetContainerCommand` for generating asset container classes. - Enhanced auto-discovery to include asset containers. - Updated `AssetContainerRepository` to manage builder-registered containers. - Added configuration options and documentation for asset containers. - Included unit and feature tests for asset container functionality. Signed-off-by: Thomas van der Westen <thomas@codesmiths.nl>
…aravel versions - Added `.github/workflows/tests.yml` with matrix strategy for PHP (8.2 - 8.4) and Laravel (10.* - 12.*). - Updated README badge to reflect the new workflow file. Signed-off-by: Thomas van der Westen <thomas@codesmiths.nl>
- Added `: void` return type to all test closures for consistency and compatibility. - Removed unnecessary `TestCase` extends and extensions in test files. - Adjusted `uses` configuration in `Pest.php` to apply globally for all tests. Signed-off-by: Thomas van der Westen <thomas@codesmiths.nl>
…c versions - Updated README with new PHP (8.2+), Laravel (11/12), and Statamic (5.4+/6.0 Alpha) requirements. - Modified `.github/workflows/tests.yml` to include Statamic matrix and stability settings. - Updated `composer.json` to reflect dependency range adjustments. - Updated `composer.lock` with dependency version changes. Signed-off-by: Thomas van der Westen <thomas@codesmiths.nl>
- Removed `.github/workflows/ci.yml` to streamline workflows. - Merged linting and testing into a single `.github/workflows/tests.yml`. - Added dependency installation and dedicated linting job. - Adjusted test matrix for Laravel and Statamic versions. Signed-off-by: Thomas van der Westen <thomas@codesmiths.nl>
- Removed `.github/workflows/ci.yml` to streamline workflows. - Merged linting and testing into a single `.github/workflows/tests.yml`. - Added dependency installation and dedicated linting job. - Adjusted test matrix for Laravel and Statamic versions. Signed-off-by: Thomas van der Westen <thomas@codesmiths.nl>
…eprintController` - Introduced tests for editing builder-defined navigations and navigation blueprints to ensure the "not editable" view is displayed. - Added `TestNavigationBlueprint` helper class for blueprint testing. - Updated `EloquentNavigationRepository` with `getNavigationByHandle` method. - Refactored `NavigationController` and `NavigationBlueprintController` to improve builder support. Signed-off-by: Thomas van der Westen <thomas@codesmiths.nl>
- Added tests for displaying "not editable" views in builder-defined asset containers and blueprints. - Introduced `TestAssetContainer` and `TestAssetContainerBlueprint` for testing purposes. - Updated `AssetContainerRepository` with `getAssetContainerByHandle` method. - Refactored `AssetContainersController` to handle builder-defined asset containers. Signed-off-by: Thomas van der Westen <thomas@codesmiths.nl>
Contributor
There was a problem hiding this comment.
Pull request overview
This is a major version update ("version-2") that significantly expands the Statamic Builder addon with new features including Navigation and Asset Container support, auto-discovery of components, and numerous test improvements. The PR modernizes the codebase, adds comprehensive test coverage (from 34.8% to 36.1%), and introduces breaking changes in configuration structure.
Key Changes:
- Adds Navigation and Asset Container PHP-based definitions with full repository support
- Implements auto-discovery system for automatic component registration
- Adds new field types (Rating, Password, Number, Money, Hidden) and fixes typo in Color class
- Refactors base classes to provide default implementations, reducing boilerplate
- Updates configuration path from
builder.phptostatamic.builder - Adds 21 new tests with 305 total passing tests
Reviewed changes
Copilot reviewed 99 out of 100 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/BaseNavigation.php | New base class for defining navigations in PHP |
| src/BaseAssetContainer.php | New base class for defining asset containers in PHP |
| src/Discovery.php | Auto-discovery system for components |
| src/Repositories/NavigationRepository.php | Repository for builder-registered navigations |
| src/Repositories/AssetContainerRepository.php | Repository for builder-registered asset containers |
| src/FieldTypes/Color.php | Fixed typo: renamed from Collor to Color |
| src/FieldTypes/{Rating,Password,Number,Money,Hidden}.php | New field type implementations |
| src/ServiceProvider.php | Updated config path and added discovery |
| config/builder.php | Added new configuration options for navigations, asset containers, and auto-discovery |
| tests/* | Added 21 new tests across multiple files |
| stubs/* | Updated stubs for simpler code generation |
| README.md | Comprehensive documentation updates |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Deleted `COVERAGE_SESSION_2_SUMMARY.md` and `TEST_COVERAGE_IMPROVEMENTS.md` as coverage summaries are now outdated and redundant. - Removed standalone compatibility script `test-compatibility.php`, no longer relevant for current Statamic versions. - Updated related documentation and coverage report files. Signed-off-by: Thomas van der Westen <thomas@codesmiths.nl>
- Deleted `COVERAGE_SESSION_2_SUMMARY.md` and `TEST_COVERAGE_IMPROVEMENTS.md` as coverage summaries are now outdated and redundant. - Removed standalone compatibility script `test-compatibility.php`, no longer relevant for current Statamic versions. - Updated related documentation and coverage report files. Signed-off-by: Thomas van der Westen <thomas@codesmiths.nl> display an auto-registration reminder for Statamic builder components when auto-registration is disabled. - Implemented `getShortType` method to customize type-specific messages. Signed-off-by: Thomas van der Westen <thomas@codesmiths.nl>
…e support - Introduced `CHANGELOG.md` adhering to Keep a Changelog format. - Added multi-site functionality and new commands (`make:site`, `make:asset-container`). - Integrated Eloquent driver for Global Sets and Navigations. - Refactored generator commands for consistency. - Added support for new field types: `Color`, `Hidden`, `Money`, `Number`, `Password`, `Rating`, `Time`, `Video`. Signed-off-by: Thomas van der Westen <thomas@codesmiths.nl>
Signed-off-by: Thomas van der Westen <thomas@codesmiths.nl>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.