Skip to content

Commit

Permalink
UPDATE package namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardodallavia committed Oct 12, 2021
1 parent a7ca6c9 commit 4118b9d
Show file tree
Hide file tree
Showing 13 changed files with 39 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github: h-farm
github: maize-tech
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
blank_issues_enabled: false
contact_links:
- name: Ask a question
url: https://github.com/h-farm/laravel-email-domain-rule/discussions/new?category=q-a
url: https://github.com/maize-tech/laravel-email-domain-rule/discussions/new?category=q-a
about: Ask the community for help
- name: Request a feature
url: https://github.com/h-farm/laravel-email-domain-rule/discussions/new?category=ideas
url: https://github.com/maize-tech/laravel-email-domain-rule/discussions/new?category=ideas
about: Share ideas for new features
- name: Report a bug
url: https://github.com/h-farm/laravel-email-domain-rule/issues/new
url: https://github.com/maize-tech/laravel-email-domain-rule/issues/new
about: Report a reproducable bug
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to `laravel-email-domain-rule` will be documented in this file.

## 2.0.0 - 2021-10-12

- UPDATE package namespace

## 1.0.0 - 2021-06-16

- first release 🚀
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2021 H-FARM SPA <[email protected]>
Copyright (c) 2021 MAIZE SRL <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

# Laravel Email Domain Rule

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

This package allows to define a subset of allowed email domains and validate any user registration form with a custom rule.

Expand All @@ -14,19 +14,19 @@ This package allows to define a subset of allowed email domains and validate any
You can install the package via composer:

```bash
composer require h-farm/laravel-email-domain-rule
composer require maize-tech/laravel-email-domain-rule
```

You can publish and run the migrations with:

```bash
php artisan vendor:publish --provider="HFarm\EmailDomainRule\EmailDomainRuleServiceProvider" --tag="email-domain-rule-migrations"
php artisan vendor:publish --provider="Maize\EmailDomainRule\EmailDomainRuleServiceProvider" --tag="email-domain-rule-migrations"
php artisan migrate
```

You can publish the config file with:
```bash
php artisan vendor:publish --provider="HFarm\EmailDomainRule\EmailDomainRuleServiceProvider" --tag="email-domain-rule-config"
php artisan vendor:publish --provider="Maize\EmailDomainRule\EmailDomainRuleServiceProvider" --tag="email-domain-rule-config"
```

This is the content of the published config file:
Expand All @@ -43,7 +43,7 @@ return [
|
*/

'email_domain_model' => HFarm\EmailDomainRule\Models\EmailDomain::class,
'email_domain_model' => Maize\EmailDomainRule\Models\EmailDomain::class,

/*
|--------------------------------------------------------------------------
Expand Down Expand Up @@ -78,7 +78,7 @@ To use the package, run the migration and fill in the table with a list of accep
You can then just add the custom validation rule to validate, for example, a user registration form.

```php
use HFarm\EmailDomainRule\EmailDomainRule;
use Maize\EmailDomainRule\EmailDomainRule;
use Illuminate\Support\Facades\Validator;

$email = '[email protected]';
Expand All @@ -104,8 +104,8 @@ If needed, you can optionally add wildcard domains to the `email_domains` databa
The default wildcard character is an asterisk (`*`), but you can customize it within the `email_domain_wildcard` setting.

```php
use HFarm\EmailDomainRule\EmailDomainRule;
use HFarm\EmailDomainRule\Models\EmailDomain;
use Maize\EmailDomainRule\EmailDomainRule;
use Maize\EmailDomainRule\Models\EmailDomain;
use Illuminate\Support\Facades\Validator;

EmailDomain::create(['domain' => '*.example.com']);
Expand All @@ -130,7 +130,7 @@ You can also override the default `EmailDomain` model to add any additional fiel
This can be useful when working with a multi-tenancy scenario in a single database system: in this case you can just add a `tenant_id` column to the migration and model classes, and apply a global scope to the custom model.

```php
use HFarm\EmailDomainRule\EmailDomainRule as BaseEmailDomain;
use Maize\EmailDomainRule\EmailDomainRule as BaseEmailDomain;
use Illuminate\Database\Eloquent\Builder;

class EmailDomain extends BaseEmailDomain
Expand Down
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"name": "h-farm/laravel-email-domain-rule",
"name": "maize-tech/laravel-email-domain-rule",
"description": "Laravel Email Domain Rule",
"keywords": [
"h-farm",
"maize-tech",
"laravel-email-domain-rule"
],
"homepage": "https://github.com/h-farm/laravel-email-domain-rule",
"homepage": "https://github.com/maize-tech/laravel-email-domain-rule",
"license": "MIT",
"authors": [
{
"name": "Riccardo Dalla Via",
"email": "[email protected]",
"homepage": "https://h-farm.com",
"homepage": "https://innovation.h-farm.com",
"role": "Developer"
}
],
Expand All @@ -32,12 +32,12 @@
},
"autoload": {
"psr-4": {
"HFarm\\EmailDomainRule\\": "src"
"Maize\\EmailDomainRule\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"HFarm\\EmailDomainRule\\Tests\\": "tests"
"Maize\\EmailDomainRule\\Tests\\": "tests"
}
},
"scripts": {
Expand All @@ -52,7 +52,7 @@
"extra": {
"laravel": {
"providers": [
"HFarm\\EmailDomainRule\\EmailDomainRuleServiceProvider"
"Maize\\EmailDomainRule\\EmailDomainRuleServiceProvider"
]
}
},
Expand Down
2 changes: 1 addition & 1 deletion config/email-domain-rule.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
|
*/

'email_domain_model' => HFarm\EmailDomainRule\Models\EmailDomain::class,
'email_domain_model' => Maize\EmailDomainRule\Models\EmailDomain::class,

/*
|--------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
verbose="true"
>
<testsuites>
<testsuite name="HFarm Test Suite">
<testsuite name="Maize Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
Expand Down
4 changes: 2 additions & 2 deletions src/EmailDomainRule.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace HFarm\EmailDomainRule;
namespace Maize\EmailDomainRule;

use HFarm\EmailDomainRule\Models\EmailDomain;
use Illuminate\Contracts\Validation\Rule;
use Illuminate\Support\Str;
use Maize\EmailDomainRule\Models\EmailDomain;

class EmailDomainRule implements Rule
{
Expand Down
2 changes: 1 addition & 1 deletion src/EmailDomainRuleServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace HFarm\EmailDomainRule;
namespace Maize\EmailDomainRule;

use Spatie\LaravelPackageTools\Package;
use Spatie\LaravelPackageTools\PackageServiceProvider;
Expand Down
2 changes: 1 addition & 1 deletion src/Models/EmailDomain.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace HFarm\EmailDomainRule\Models;
namespace Maize\EmailDomainRule\Models;

use Illuminate\Database\Eloquent\Model;

Expand Down
6 changes: 3 additions & 3 deletions tests/EmailDomainRuleTest.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace HFarm\EmailDomainRule\Tests;
namespace Maize\EmailDomainRule\Tests;

use HFarm\EmailDomainRule\EmailDomainRule;
use HFarm\EmailDomainRule\Models\EmailDomain;
use Illuminate\Support\Facades\Validator;
use Maize\EmailDomainRule\EmailDomainRule;
use Maize\EmailDomainRule\Models\EmailDomain;

class EmailDomainRuleTest extends TestCase
{
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace HFarm\EmailDomainRule\Tests;
namespace Maize\EmailDomainRule\Tests;

use HFarm\EmailDomainRule\EmailDomainRuleServiceProvider;
use Maize\EmailDomainRule\EmailDomainRuleServiceProvider;
use Orchestra\Testbench\TestCase as Orchestra;

class TestCase extends Orchestra
Expand Down

0 comments on commit 4118b9d

Please sign in to comment.