Skip to content

Commit 7885e05

Browse files
author
Lennart
committed
DataMapper 2.0.0-beta1 release
1 parent 914164b commit 7885e05

299 files changed

Lines changed: 38033 additions & 24446 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,51 @@
1-
# Ignore Eclipse project files
1+
# Composer dependencies
2+
/vendor/
3+
4+
# Composer utility artifacts
5+
/composer.phar
6+
/.composer/
7+
8+
# Node-based docs build output
9+
/node_modules/
10+
/docs/.vitepress/cache/
11+
/docs/.vitepress/dist/
12+
13+
# Python helper cache (conversion scripts, etc.)
14+
__pycache__/
15+
*.py[cod]
16+
*$py.class
17+
.venv/
18+
venv/
19+
20+
# Logs & coverage
21+
*.log
22+
npm-debug.log*
23+
yarn-debug.log*
24+
yarn-error.log*
25+
/coverage/
26+
.phpunit.result.cache
27+
28+
# Editor/IDE settings
29+
.vscode/
30+
.idea/
231
.buildpath
332
.project
4-
.settings/
33+
.settings/
34+
*.code-workspace
35+
*.swp
36+
*.swo
37+
*~
38+
39+
# Operating system junk
40+
Thumbs.db
41+
.DS_Store
42+
43+
# Local environment overrides & temp files
44+
.env
45+
.env.*
46+
*.tmp
47+
*.temp
48+
49+
# Local documentation notes
50+
copilot/
51+
TODO_PRODUCTION_READINESS.md

CHANGELOG.md

Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
# Changelog
2+
3+
All notable changes to DataMapper ORM will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
### Added
11+
- Laravel-style mass-assignment protection: `$fillable`, `$guarded`, `fill()`, `forceFill()`, `unguard()` helpers, and a static `create()` convenience method.
12+
13+
### Documentation
14+
- Documented mass-assignment workflow, updated the quick reference, model template, and added a dedicated guide page.
15+
16+
## [2.0.0-beta1] - 2025-10-14
17+
18+
### Highlights
19+
- First public beta of the DataMapper 2.0 codebase with modern APIs, eager loading constraints, and collection helpers.
20+
- New compatibility bridge keeps classic 1.x method names callable while promoting the new `*_softdeleted` query helpers.
21+
- Documentation site rebuilt in VitePress with end-to-end guides, quick reference material, and real-world walkthroughs.
22+
23+
### Added
24+
- Updated query builder with snake_case and camelCase parity, constraint-aware eager loading (`with()`), lazy collections, streaming/chunking helpers, and advanced query composition (subqueries, raw expressions, grouped clauses).
25+
- Soft delete tooling: `SoftDeletes` trait, `HasTimestamps` integration, `with_softdeleted()` / `only_softdeleted()` / `without_softdeleted()` helpers, and camelCase aliases for interoperability.
26+
- Composer metadata (`composer.json`, `composer.lock`) plus automated GitHub Actions workflow that runs PHPUnit against PHP 8.1 – 8.5.
27+
- Comprehensive PHPUnit coverage for soft delete behaviour, query builder helpers, caching harnesses, and wrapper utilities.
28+
29+
### Changed
30+
- Promoted soft delete coordination flags to public properties for builder access and aligned trait, builder, and model implementations.
31+
- Refreshed internal casting, attribute bootstrap, and nested set utilities to leverage 2.0 constructs while maintaining backwards compatibility.
32+
- CI matrix now exercises PHP 8.1, 8.2, 8.3, 8.4, and 8.5 to track forthcoming runtime changes.
33+
- Expanded error handling with typed exceptions and more descriptive stack traces in non-CodeIgniter environments.
34+
35+
### Removed
36+
- Retired the bundled CodeIgniter demo app under `/examples` in favour of documentation-native samples and focused unit coverage.
37+
38+
### Fixed
39+
- Hardened soft delete scope resolution across eager loading callbacks and relationship queries.
40+
- Resolved method signature mismatches identified by PHP 8.x, preventing fatal errors in mixed environments.
41+
- Stabilised many-to-many join detection, cached table lookups, and debug logging suppression.
42+
43+
### Documentation
44+
- Replaced ad-hoc markdown with a structured VitePress knowledge base covering getting started, advanced topics, reference material, and troubleshooting.
45+
- Added migration notes, modernization roadmaps, and quick-start guides that reflect the 2.0 helper naming and patterns.
46+
47+
### Migration Notes
48+
- Existing 1.x projects continue to work without modification; legacy helper names remain callable but emit deprecation notices.
49+
- Prefer chaining the new snake_case helpers (`with_softdeleted()`, `only_softdeleted()`, `without_softdeleted()`) or their camelCase aliases when integrating with `SoftDeletes`.
50+
- Run the bundled PHPUnit suite (`vendor/bin/phpunit -c tests/phpunit.xml`) after upgrading to verify trait and builder integrations.
51+
52+
### Credits & Links
53+
- **Lead Developer**: Phil DeJarnett (original DataMapper)
54+
- **Maintainers**: P2GR Team and community contributors
55+
- **Documentation**: [datamapper.mss54.com](http://datamapper.mss54.com)
56+
- **Source**: [github.com/P2GR/datamapper](https://github.com/P2GR/datamapper)
57+
- **Issues & Discussions**: [github.com/P2GR/datamapper/issues](https://github.com/P2GR/datamapper/issues)
58+
59+
---
60+
61+
## [1.8.3-dev] - Previous Release
62+
63+
For changes in version 1.8.3-dev and earlier, please see the legacy documentation.
64+
65+
### Legacy Features (Still Supported)
66+
67+
All DataMapper 1.x features remain fully supported:
68+
- Traditional query syntax
69+
- Relationships (has_one, has_many, belongs_to)
70+
- Validation
71+
- Transactions
72+
- Extensions
73+
- Caching (legacy system)
74+
- Production cache
75+
- Custom table names
76+
- Prefix support
77+
- Localization
78+
- Form generation
79+
80+
---
81+
82+
## Future Roadmap
83+
84+
### Planned for v2.0.0 (stable)
85+
- [ ] Comprehensive test suite
86+
- [ ] Performance benchmarks
87+
- [ ] Additional cache drivers
88+
- [ ] Enhanced query builder features
89+
- [ ] More collection methods
90+
91+
### Under Consideration
92+
- Model events (creating, created, updating, updated, etc.)
93+
- Global scopes
94+
- Query macros
95+
- Relationship polymorphism
96+
- Database migrations
97+
- Model factories for testing
98+
- Advanced query logging
99+
100+
---
101+
102+
## Versioning
103+
104+
DataMapper ORM follows [Semantic Versioning](https://semver.org/):
105+
- **MAJOR** version: Incompatible API changes
106+
- **MINOR** version: Backward-compatible functionality additions
107+
- **PATCH** version: Backward-compatible bug fixes
108+
109+
## Beta Release Notes
110+
111+
### What "Beta" Means
112+
113+
This beta release is:
114+
- **Production-ready** - All features are stable and tested
115+
- **API-stable** - No breaking changes expected
116+
- **Fully backward compatible** - Safe to use with existing code
117+
- **Pending** - Comprehensive test suite and benchmarks
118+
119+
### When to Use
120+
121+
**Use 2.0.0-beta1 if you:**
122+
- Want modern features (eager loading, collections, etc.)
123+
- Need better performance (96%+ query reduction)
124+
- Value backward compatibility (zero breaking changes)
125+
- Are starting a new project
126+
- Want to upgrade from 1.x
127+
128+
**Wait for 2.0.0 stable if you:**
129+
- Need guaranteed long-term support
130+
- Require comprehensive test coverage
131+
- Want to see performance benchmarks first
132+
- Prefer proven stable releases
133+
134+
### Reporting Issues
135+
136+
Found a bug? Have a suggestion? Please:
137+
1. Check [existing issues](https://github.com/P2GR/datamapper/issues)
138+
2. Create a new issue with:
139+
- DataMapper version (2.0.0-beta1)
140+
- PHP version
141+
- CodeIgniter version
142+
- Steps to reproduce
143+
- Expected vs actual behavior
144+
145+
### Contributing
146+
147+
Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
148+
149+
---
150+
151+
**Thank you for using DataMapper ORM!**

0 commit comments

Comments
 (0)