Skip to content

Commit e508bdb

Browse files
author
riccardodallavia
committedOct 12, 2021
UPDATE package namespace
1 parent 8b69c6f commit e508bdb

28 files changed

+70
-70
lines changed
 

‎.github/FUNDING.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
github: h-farm
1+
github: maize-tech

‎.github/ISSUE_TEMPLATE/config.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
blank_issues_enabled: false
22
contact_links:
33
- name: Ask a question
4-
url: https://github.com/h-farm/laravel-encryptable/discussions/new?category=q-a
4+
url: https://github.com/maize-tech/laravel-encryptable/discussions/new?category=q-a
55
about: Ask the community for help
66
- name: Request a feature
7-
url: https://github.com/h-farm/laravel-encryptable/discussions/new?category=ideas
7+
url: https://github.com/maize-tech/laravel-encryptable/discussions/new?category=ideas
88
about: Share ideas for new features
99
- name: Report a bug
10-
url: https://github.com/h-farm/laravel-encryptable/issues/new
10+
url: https://github.com/maize-tech/laravel-encryptable/issues/new
1111
about: Report a reproducable bug

‎LICENSE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2021 H-FARM SPA <innovation@h-farm.com>
3+
Copyright (c) 2021 MAIZE SRL <innovation@h-farm.com>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

‎README.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
# Laravel Encryptable
44

5-
[![Latest Version on Packagist](https://img.shields.io/packagist/v/h-farm/laravel-encryptable.svg?style=flat-square)](https://packagist.org/packages/h-farm/laravel-encryptable)
6-
[![GitHub Tests Action Status](https://img.shields.io/github/workflow/status/h-farm/laravel-encryptable/run-tests?label=tests)](https://github.com/h-farm/laravel-encryptable/actions?query=workflow%3ATests+branch%3Amaster)
7-
[![GitHub Code Style Action Status](https://img.shields.io/github/workflow/status/h-farm/laravel-encryptable/Check%20&%20fix%20styling?label=code%20style)](https://github.com/h-farm/laravel-encryptable/actions?query=workflow%3A"Check+%26+fix+styling"+branch%3Amaster)
8-
[![Total Downloads](https://img.shields.io/packagist/dt/h-farm/laravel-encryptable.svg?style=flat-square)](https://packagist.org/packages/h-farm/laravel-encryptable)
5+
[![Latest Version on Packagist](https://img.shields.io/packagist/v/maize-tech/laravel-encryptable.svg?style=flat-square)](https://packagist.org/packages/maize-tech/laravel-encryptable)
6+
[![GitHub Tests Action Status](https://img.shields.io/github/workflow/status/maize-tech/laravel-encryptable/run-tests?label=tests)](https://github.com/maize-tech/laravel-encryptable/actions?query=workflow%3ATests+branch%3Amaster)
7+
[![GitHub Code Style Action Status](https://img.shields.io/github/workflow/status/maize-tech/laravel-encryptable/Check%20&%20fix%20styling?label=code%20style)](https://github.com/maize-tech/laravel-encryptable/actions?query=workflow%3A"Check+%26+fix+styling"+branch%3Amaster)
8+
[![Total Downloads](https://img.shields.io/packagist/dt/maize-tech/laravel-encryptable.svg?style=flat-square)](https://packagist.org/packages/maize-tech/laravel-encryptable)
99

1010

1111
This package allows you to anonymize sensitive data (like the name, surname and email address of a user) similarly to Laravel's Encryption feature, but still have the ability to make direct queries to the database.
@@ -18,12 +18,12 @@ This package currently supports `MySQL` and `PostgreSQL` databases.
1818
You can install the package via composer:
1919

2020
```bash
21-
composer require h-farm/laravel-encryptable
21+
composer require maize-tech/laravel-encryptable
2222
```
2323

2424
You can publish the config file with:
2525
```bash
26-
php artisan vendor:publish --provider="HFarm\Encryptable\EncryptableServiceProvider" --tag="encryptable-config"
26+
php artisan vendor:publish --provider="Maize\Encryptable\EncryptableServiceProvider" --tag="encryptable-config"
2727
```
2828

2929
This is the content of the published config file:
@@ -68,7 +68,7 @@ To use the package, just add the `Encryptable` cast to all model attributes you
6868

6969
namespace App\Models;
7070

71-
use HFarm\Encryptable\Encryptable;
71+
use Maize\Encryptable\Encryptable;
7272
use Illuminate\Database\Eloquent\Model;
7373

7474
class User extends Model
@@ -90,7 +90,7 @@ Once done, all values will be encrypted before being stored in the database, and
9090
### Manually encrypt via PHP
9191

9292
``` php
93-
use HFarm\Encryptable\Encryption;
93+
use Maize\Encryptable\Encryption;
9494

9595
$value = "your-decrypted-value";
9696

@@ -100,7 +100,7 @@ $encrypted = Encryption::php()->encrypt($value); // returns the encrypted value
100100
### Manually decrypt via PHP
101101

102102
``` php
103-
use HFarm\Encryptable\Encryption;
103+
use Maize\Encryptable\Encryption;
104104

105105
$encrypted = "your-encrypted-value";
106106

@@ -110,7 +110,7 @@ $value = Encryption::php()->decrypt($value); // returns the decrypted value
110110
### Manually decrypt via DB
111111

112112
``` php
113-
use HFarm\Encryptable\Encryption;
113+
use Maize\Encryptable\Encryption;
114114

115115
$encrypted = "your-encrypted-value";
116116

@@ -124,7 +124,7 @@ You can use one of the two custom rules to check the uniqueness or existence of
124124
`ExistsEncrypted` is an extension of Laravel's `Exists` rule, whereas `UniqueEncrypted` is an extension of Laravel's `Unique` rule.
125125
You can use them in the same way as Laravel's base rules:
126126
``` php
127-
use HFarm\Encryptable\Rules\ExistsEncrypted;
127+
use Maize\Encryptable\Rules\ExistsEncrypted;
128128
use Illuminate\Support\Facades\Validator;
129129

130130
$data = [
@@ -142,7 +142,7 @@ Validator::make($data, [
142142
```
143143

144144
``` php
145-
use HFarm\Encryptable\Rules\UniqueEncrypted;
145+
use Maize\Encryptable\Rules\UniqueEncrypted;
146146
use Illuminate\Support\Facades\Validator;
147147

148148
$data = [

‎composer.json

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
{
2-
"name": "h-farm/laravel-encryptable",
2+
"name": "maize-tech/laravel-encryptable",
33
"description": "Laravel Encryptable",
44
"keywords": [
5-
"h-farm",
5+
"maize-tech",
66
"laravel-encryptable"
77
],
8-
"homepage": "https://github.com/h-farm/laravel-encryptable",
8+
"homepage": "https://github.com/maize-tech/laravel-encryptable",
99
"license": "MIT",
1010
"authors": [
1111
{
1212
"name": "Enrico De Lazzari",
1313
"email": "enrico.delazzari@h-farm.com",
14-
"homepage": "https://h-farm.com",
14+
"homepage": "https://innovation.h-farm.com",
1515
"role": "Developer"
1616
},
1717
{
1818
"name": "Riccardo Dalla Via",
1919
"email": "riccardo.dallavia@h-farm.com",
20-
"homepage": "https://h-farm.com",
20+
"homepage": "https://innovation.h-farm.com",
2121
"role": "Developer"
2222
}
2323
],
@@ -39,12 +39,12 @@
3939
},
4040
"autoload": {
4141
"psr-4": {
42-
"HFarm\\Encryptable\\": "src"
42+
"Maize\\Encryptable\\": "src"
4343
}
4444
},
4545
"autoload-dev": {
4646
"psr-4": {
47-
"HFarm\\Encryptable\\Tests\\": "tests"
47+
"Maize\\Encryptable\\Tests\\": "tests"
4848
}
4949
},
5050
"scripts": {
@@ -59,7 +59,7 @@
5959
"extra": {
6060
"laravel": {
6161
"providers": [
62-
"HFarm\\Encryptable\\EncryptableServiceProvider"
62+
"Maize\\Encryptable\\EncryptableServiceProvider"
6363
]
6464
}
6565
},

‎phpunit.xml.dist

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
verbose="true"
2020
>
2121
<testsuites>
22-
<testsuite name="HFarm Test Suite">
22+
<testsuite name="Maize Test Suite">
2323
<directory>tests</directory>
2424
</testsuite>
2525
</testsuites>

‎src/DBEncrypter.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace HFarm\Encryptable;
3+
namespace Maize\Encryptable;
44

55
use Illuminate\Contracts\Encryption\EncryptException;
66
use Illuminate\Database\Query\Grammars\PostgresGrammar;

‎src/Encryptable.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace HFarm\Encryptable;
3+
namespace Maize\Encryptable;
44

55
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
66

‎src/EncryptableServiceProvider.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace HFarm\Encryptable;
3+
namespace Maize\Encryptable;
44

55
use Spatie\LaravelPackageTools\Package;
66
use Spatie\LaravelPackageTools\PackageServiceProvider;

‎src/Encrypter.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

3-
namespace HFarm\Encryptable;
3+
namespace Maize\Encryptable;
44

5-
use HFarm\Encryptable\Exceptions\MissingEncryptionCipherException;
6-
use HFarm\Encryptable\Exceptions\MissingEncryptionKeyException;
5+
use Maize\Encryptable\Exceptions\MissingEncryptionCipherException;
6+
use Maize\Encryptable\Exceptions\MissingEncryptionKeyException;
77

88
abstract class Encrypter
99
{

‎src/Encryption.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace HFarm\Encryptable;
3+
namespace Maize\Encryptable;
44

55
class Encryption
66
{

‎src/Exceptions/MissingEncryptionCipherException.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace HFarm\Encryptable\Exceptions;
3+
namespace Maize\Encryptable\Exceptions;
44

55
use RuntimeException;
66

‎src/Exceptions/MissingEncryptionKeyException.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace HFarm\Encryptable\Exceptions;
3+
namespace Maize\Encryptable\Exceptions;
44

55
use RuntimeException;
66

‎src/Exceptions/SerializationException.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace HFarm\Encryptable\Exceptions;
3+
namespace Maize\Encryptable\Exceptions;
44

55
use RuntimeException;
66

‎src/Exceptions/UnserializationException.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace HFarm\Encryptable\Exceptions;
3+
namespace Maize\Encryptable\Exceptions;
44

55
use RuntimeException;
66

‎src/PHPEncrypter.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?php
22

3-
namespace HFarm\Encryptable;
3+
namespace Maize\Encryptable;
44

5-
use HFarm\Encryptable\Utils\Serializer;
65
use Illuminate\Contracts\Encryption\DecryptException;
76
use Illuminate\Contracts\Encryption\EncryptException;
87
use Illuminate\Support\Str;
8+
use Maize\Encryptable\Utils\Serializer;
99

1010
class PHPEncrypter extends Encrypter
1111
{

‎src/Rules/ExistsEncrypted.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?php
22

3-
namespace HFarm\Encryptable\Rules;
3+
namespace Maize\Encryptable\Rules;
44

5-
use HFarm\Encryptable\Encryption;
65
use Illuminate\Contracts\Validation\Rule;
76
use Illuminate\Support\Facades\Validator;
87
use Illuminate\Support\Str;
98
use Illuminate\Validation\Rules\Exists;
9+
use Maize\Encryptable\Encryption;
1010

1111
class ExistsEncrypted extends Exists implements Rule
1212
{

‎src/Rules/UniqueEncrypted.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?php
22

3-
namespace HFarm\Encryptable\Rules;
3+
namespace Maize\Encryptable\Rules;
44

5-
use HFarm\Encryptable\Encryption;
65
use Illuminate\Contracts\Validation\Rule;
76
use Illuminate\Support\Facades\Validator;
87
use Illuminate\Support\Str;
98
use Illuminate\Validation\Rules\Unique;
9+
use Maize\Encryptable\Encryption;
1010

1111
class UniqueEncrypted extends Unique implements Rule
1212
{

‎src/Utils/Serializer.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

3-
namespace HFarm\Encryptable\Utils;
3+
namespace Maize\Encryptable\Utils;
44

5-
use HFarm\Encryptable\Exceptions\SerializationException;
6-
use HFarm\Encryptable\Exceptions\UnserializationException;
5+
use Maize\Encryptable\Exceptions\SerializationException;
6+
use Maize\Encryptable\Exceptions\UnserializationException;
77

88
class Serializer
99
{

‎tests/DBEncrypterTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

3-
namespace HFarm\Encryptable\Tests;
3+
namespace Maize\Encryptable\Tests;
44

5-
use HFarm\Encryptable\Encryption;
65
use Illuminate\Contracts\Encryption\EncryptException;
6+
use Maize\Encryptable\Encryption;
77

88
class DBEncrypterTest extends TestCase
99
{

‎tests/EncryptableTest.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22

3-
namespace HFarm\Encryptable\Tests;
3+
namespace Maize\Encryptable\Tests;
44

5-
use HFarm\Encryptable\Encryption;
6-
use HFarm\Encryptable\Tests\Models\User;
75
use Illuminate\Support\Facades\DB;
6+
use Maize\Encryptable\Encryption;
7+
use Maize\Encryptable\Tests\Models\User;
88

99
class EncryptableTest extends TestCase
1010
{

‎tests/EncrypterTest.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22

3-
namespace HFarm\Encryptable\Tests;
3+
namespace Maize\Encryptable\Tests;
44

5-
use HFarm\Encryptable\Encryption;
6-
use HFarm\Encryptable\Exceptions\MissingEncryptionCipherException;
7-
use HFarm\Encryptable\Exceptions\MissingEncryptionKeyException;
5+
use Maize\Encryptable\Encryption;
6+
use Maize\Encryptable\Exceptions\MissingEncryptionCipherException;
7+
use Maize\Encryptable\Exceptions\MissingEncryptionKeyException;
88

99
class EncrypterTest extends TestCase
1010
{

‎tests/ExistsEncryptedTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

3-
namespace HFarm\Encryptable\Tests;
3+
namespace Maize\Encryptable\Tests;
44

5-
use HFarm\Encryptable\Rules\ExistsEncrypted;
65
use Illuminate\Support\Facades\Validator;
6+
use Maize\Encryptable\Rules\ExistsEncrypted;
77

88
class ExistsEncryptedTest extends TestCase
99
{

‎tests/Models/User.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

3-
namespace HFarm\Encryptable\Tests\Models;
3+
namespace Maize\Encryptable\Tests\Models;
44

5-
use HFarm\Encryptable\Encryptable;
65
use Illuminate\Database\Eloquent\Model;
6+
use Maize\Encryptable\Encryptable;
77

88
class User extends Model
99
{

‎tests/PHPEncrypterTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
22

3-
namespace HFarm\Encryptable\Tests;
3+
namespace Maize\Encryptable\Tests;
44

5-
use HFarm\Encryptable\Encryption;
5+
use Maize\Encryptable\Encryption;
66

77
class PHPEncrypterTest extends TestCase
88
{

‎tests/SerializerTest.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22

3-
namespace HFarm\Encryptable\Tests;
3+
namespace Maize\Encryptable\Tests;
44

5-
use HFarm\Encryptable\Exceptions\SerializationException;
6-
use HFarm\Encryptable\Exceptions\UnserializationException;
7-
use HFarm\Encryptable\Utils\Serializer;
5+
use Maize\Encryptable\Exceptions\SerializationException;
6+
use Maize\Encryptable\Exceptions\UnserializationException;
7+
use Maize\Encryptable\Utils\Serializer;
88

99
class SerializerTest extends TestCase
1010
{

‎tests/TestCase.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22

3-
namespace HFarm\Encryptable\Tests;
3+
namespace Maize\Encryptable\Tests;
44

5-
use HFarm\Encryptable\EncryptableServiceProvider;
6-
use HFarm\Encryptable\Tests\Models\User;
75
use Illuminate\Database\Schema\Blueprint;
6+
use Maize\Encryptable\EncryptableServiceProvider;
7+
use Maize\Encryptable\Tests\Models\User;
88
use Orchestra\Testbench\TestCase as Orchestra;
99

1010
class TestCase extends Orchestra

‎tests/UniqueEncryptedTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

3-
namespace HFarm\Encryptable\Tests;
3+
namespace Maize\Encryptable\Tests;
44

5-
use HFarm\Encryptable\Rules\UniqueEncrypted;
65
use Illuminate\Support\Facades\Validator;
6+
use Maize\Encryptable\Rules\UniqueEncrypted;
77

88
class UniqueEncryptedTest extends TestCase
99
{

0 commit comments

Comments
 (0)
Please sign in to comment.