Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# WORM (Wordpress ORM)
# Fork from WORM (Wordpress ORM) to support PHP 8.0+

*Under active development*

Expand Down Expand Up @@ -31,7 +31,7 @@ master branch = active development
## Installation

```
composer require rjjakes/wordpress-orm
composer require ziorwebdev/wordpress-orm:dev-master
```

## Usage
Expand Down
30 changes: 18 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
{
"name": "rjjakes/wordpress-orm",
"name": "ziorwebdev/wordpress-orm",
"description": "WORM. Doctrine style ORM for Wordpress.",
"keywords": ["wordpress", "plugin", "orm", "doctrine", "composer", "sql"],
"homepage": "https://github.com/rjjakes/wordpress-orm",
"keywords": [
"wordpress",
"plugin",
"orm",
"doctrine",
"composer",
"sql"
],
"homepage": "https://github.com/ziorwebdev/wordpress-orm",
"require": {
"php": ">=5.5",
"minime/annotations": "^3.1"
"php": ">=8.0",
"ziorwebdev/annotations": "dev-master"
},
"license": "MIT",
"authors": [
{
"name": "Ray Jakes",
"email": "symlinkdigital@gmail.com"
"name": "Rey C",
"email": "reygcalantaol@gmail.com"
}
],
"autoload" : {
"psr-4" : {
"autoload": {
"psr-4": {
"Symlink\\ORM\\": "src/"
}
},
"minimum-stability": "stable"
}
}
}
8 changes: 4 additions & 4 deletions src/Collections/TrackedCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public function getRemoveTableData() {
* @param mixed $object
* @param mixed $state
*/
public function offsetSet($object, $state) {
public function offsetSet(mixed $object, mixed $state): void {

switch ($state) {
// If new, objects will have a 'model' but no 'last_state',
Expand Down Expand Up @@ -136,7 +136,7 @@ public function offsetSet($object, $state) {
*
* @return bool
*/
public function offsetExists($object) {
public function offsetExists(mixed $object): bool {
return isset($this->list[$object->getHash()]);
}

Expand All @@ -146,7 +146,7 @@ public function offsetExists($object) {
*
* @param mixed $object
*/
public function offsetUnset($object) {
public function offsetUnset(mixed $object): void {

// If the object exists in the list.
if (isset($this->list[$object->getHash()])) {
Expand All @@ -167,7 +167,7 @@ public function offsetUnset($object) {
*
* @return mixed|null
*/
public function offsetGet($object) {
public function offsetGet(mixed $object): bool {
return isset($this->list[$object->getHash()]) ? $this->list[$object->getHash()]['model'] : NULL;
}

Expand Down