diff --git a/.travis.yml b/.travis.yml index b1b5d8a..f7f4bd3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,8 @@ language: php php: - - 7.3 - 7.4 + - 8.0 matrix: fast_finish: true diff --git a/CHANGELOG.md b/CHANGELOG.md index 4e8ae4c..7706983 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [1.0.0] - 2020-07-07 - Initial release -[Unreleased]: https://github.com/sprocketbox/eloquent-identity/compare/v1.2.0...master -[1.2.0]: https://github.com/sprocketbox/eloquent-identity/releases/tag/v1.2.0 -[1.1.0]: https://github.com/sprocketbox/eloquent-identity/releases/tag/v1.1.0 -[1.0.0]: https://github.com/sprocketbox/eloquent-identity/releases/tag/v1.0.0 \ No newline at end of file +[Unreleased]: https://github.com/olliecodes/eloquent-identity/compare/v1.2.0...master +[1.2.0]: https://github.com/olliecodes/eloquent-identity/releases/tag/v1.2.0 +[1.1.0]: https://github.com/olliecodes/eloquent-identity/releases/tag/v1.1.0 +[1.0.0]: https://github.com/olliecodes/eloquent-identity/releases/tag/v1.0.0 \ No newline at end of file diff --git a/LICENSE b/LICENSE index 11b2cef..78e9eff 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2019 Sprocketbox +Copyright (c) 2021 Ollie Codes Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 0baf816..df831e6 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,14 @@ # Eloquent Identity -[![Latest Stable Version](https://poser.pugx.org/sprocketbox/eloquent-identity/v/stable.png)](https://packagist.org/packages/sprocketbox/eloquent-identity) -[![Latest Unstable Version](https://poser.pugx.org/sprocketbox/eloquent-identity/v/unstable.png)](https://packagist.org/packages/sprocketbox/eloquent-identity) -[![License](https://poser.pugx.org/sprocketbox/eloquent-identity/license.png)](https://packagist.org/packages/sprocketbox/eloquent-identity) -[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/sprocketbox/eloquent-identity/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/sprocketbox/eloquent-identity/?branch=master) +[![Latest Stable Version](https://poser.pugx.org/olliecodes/eloquent-identity/v/stable.png)](https://packagist.org/packages/olliecodes/eloquent-identity) +[![Latest Unstable Version](https://poser.pugx.org/olliecodes/eloquent-identity/v/unstable.png)](https://packagist.org/packages/olliecodes/eloquent-identity) +[![License](https://poser.pugx.org/olliecodes/eloquent-identity/license.png)](https://packagist.org/packages/olliecodes/eloquent-identity) +[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/olliecodes/eloquent-identity/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/olliecodes/eloquent-identity/?branch=master) -- **Laravel**: 7+ -- **PHP**: 7.4+ +- **Laravel**: 7.* || 8.* +- **PHP**: 7.* || 8.* - **License**: MIT - **Author**: Ollie Read -- **Author Homepage**: https://sprocketbox.io +- **Author Homepage**: https://ollie.codes Eloquent identity provides a cache on top of Eloquent preventing multiple models being created for a single database row using the Identity Map design pattern ([P of EAA](https://martinfowler.com/eaaCatalog/identityMap.html) & [Wikipedia](https://en.wikipedia.org/wiki/Identity_map_pattern)). @@ -28,14 +28,14 @@ using the Identity Map design pattern ([P of EAA](https://martinfowler.com/eaaCa To install this package simply run the following command. ``` -composer require sprocketbox/eloquent-identity +composer require olliecodes/eloquent-identity ``` This package uses auto-discovery to register the service provider but if you'd rather do it manually, the service provider is: ``` -Sprocketbox\Eloquent\Identity\ServiceProvider +OllieCodes\Eloquent\Identity\ServiceProvider ``` There is no configuration required. @@ -44,7 +44,7 @@ There is no configuration required. To make use of the Eloquent identity map on your models, add the following trait. ``` -Sprocketbox\Eloquent\Identity\Concerns\MapsIdentity +OllieCodes\Eloquent\Identity\Concerns\MapsIdentity ``` ### Finding @@ -79,7 +79,7 @@ The `IdentityManager` stores an array containing all existing model instances an The identities for models are stored as string, created using the following class. ``` -Sprocketbox\Eloquent\Identity\ModelIdentity +OllieCodes\Eloquent\Identity\ModelIdentity ``` This contains a key, the model class name, and the connection name. The string version of these looks like so: diff --git a/composer.json b/composer.json index 8809671..40a9f05 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "sprocketbox/eloquent-identity", + "name": "olliecodes/eloquent-identity", "description": "An identity map implementation for Eloquent", "keywords": [ "laravel", @@ -12,12 +12,12 @@ "authors": [ { "name": "Ollie Read", - "email": "ollie@sprocketbox.io" + "email": "packages@ollie.codes" } ], "autoload": { "psr-4": { - "Sprocketbox\\Eloquent\\Identity\\": "src/" + "OllieCodes\\Eloquent\\Identity\\": "src/" } }, "require": { @@ -27,7 +27,7 @@ "extra": { "laravel": { "providers": [ - "Sprocketbox\\Eloquent\\Identity\\ServiceProvider" + "OllieCodes\\Eloquent\\Identity\\ServiceProvider" ], "facades": [ "Identity" diff --git a/phpunit.xml.dist b/phpunit.xml.dist deleted file mode 100644 index c2d1913..0000000 --- a/phpunit.xml.dist +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - ./tests/ - - - - - - - - - - - src/ - - - - - - - - \ No newline at end of file diff --git a/src/Concerns/MapsIdentity.php b/src/Concerns/MapsIdentity.php index 86ab855..2f8bb8d 100644 --- a/src/Concerns/MapsIdentity.php +++ b/src/Concerns/MapsIdentity.php @@ -1,6 +1,6 @@